Home | History | Annotate | Download | only in tests
      1 #! /bin/sh
      2 # Generated from ../../../tests/local.at by GNU Autoconf 2.69.
      3 #
      4 # Copyright (C) 2009-2012 Free Software Foundation, Inc.
      5 #
      6 # This test suite is free software; the Free Software Foundation gives
      7 # unlimited permission to copy, distribute and modify it.
      8 ## -------------------- ##
      9 ## M4sh Initialization. ##
     10 ## -------------------- ##
     11 
     12 # Be more Bourne compatible
     13 DUALCASE=1; export DUALCASE # for MKS sh
     14 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
     15   emulate sh
     16   NULLCMD=:
     17   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
     18   # is contrary to our usage.  Disable this feature.
     19   alias -g '${1+"$@"}'='"$@"'
     20   setopt NO_GLOB_SUBST
     21 else
     22   case `(set -o) 2>/dev/null` in #(
     23   *posix*) :
     24     set -o posix ;; #(
     25   *) :
     26      ;;
     27 esac
     28 fi
     29 
     30 
     31 as_nl='
     32 '
     33 export as_nl
     34 # Printing a long string crashes Solaris 7 /usr/bin/printf.
     35 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
     36 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
     37 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
     38 # Prefer a ksh shell builtin over an external printf program on Solaris,
     39 # but without wasting forks for bash or zsh.
     40 if test -z "$BASH_VERSION$ZSH_VERSION" \
     41     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
     42   as_echo='print -r --'
     43   as_echo_n='print -rn --'
     44 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
     45   as_echo='printf %s\n'
     46   as_echo_n='printf %s'
     47 else
     48   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
     49     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
     50     as_echo_n='/usr/ucb/echo -n'
     51   else
     52     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
     53     as_echo_n_body='eval
     54       arg=$1;
     55       case $arg in #(
     56       *"$as_nl"*)
     57 	expr "X$arg" : "X\\(.*\\)$as_nl";
     58 	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
     59       esac;
     60       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
     61     '
     62     export as_echo_n_body
     63     as_echo_n='sh -c $as_echo_n_body as_echo'
     64   fi
     65   export as_echo_body
     66   as_echo='sh -c $as_echo_body as_echo'
     67 fi
     68 
     69 # The user is always right.
     70 if test "${PATH_SEPARATOR+set}" != set; then
     71   PATH_SEPARATOR=:
     72   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
     73     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
     74       PATH_SEPARATOR=';'
     75   }
     76 fi
     77 
     78 
     79 # IFS
     80 # We need space, tab and new line, in precisely that order.  Quoting is
     81 # there to prevent editors from complaining about space-tab.
     82 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
     83 # splitting by setting IFS to empty value.)
     84 IFS=" ""	$as_nl"
     85 
     86 # Find who we are.  Look in the path if we contain no directory separator.
     87 as_myself=
     88 case $0 in #((
     89   *[\\/]* ) as_myself=$0 ;;
     90   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     91 for as_dir in $PATH
     92 do
     93   IFS=$as_save_IFS
     94   test -z "$as_dir" && as_dir=.
     95     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
     96   done
     97 IFS=$as_save_IFS
     98 
     99      ;;
    100 esac
    101 # We did not find ourselves, most probably we were run as `sh COMMAND'
    102 # in which case we are not to be found in the path.
    103 if test "x$as_myself" = x; then
    104   as_myself=$0
    105 fi
    106 if test ! -f "$as_myself"; then
    107   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
    108   exit 1
    109 fi
    110 
    111 # Unset variables that we do not need and which cause bugs (e.g. in
    112 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
    113 # suppresses any "Segmentation fault" message there.  '((' could
    114 # trigger a bug in pdksh 5.2.14.
    115 for as_var in BASH_ENV ENV MAIL MAILPATH
    116 do eval test x\${$as_var+set} = xset \
    117   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
    118 done
    119 PS1='$ '
    120 PS2='> '
    121 PS4='+ '
    122 
    123 # NLS nuisances.
    124 LC_ALL=C
    125 export LC_ALL
    126 LANGUAGE=C
    127 export LANGUAGE
    128 
    129 # CDPATH.
    130 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
    131 
    132 if test "x$CONFIG_SHELL" = x; then
    133   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
    134   emulate sh
    135   NULLCMD=:
    136   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
    137   # is contrary to our usage.  Disable this feature.
    138   alias -g '\${1+\"\$@\"}'='\"\$@\"'
    139   setopt NO_GLOB_SUBST
    140 else
    141   case \`(set -o) 2>/dev/null\` in #(
    142   *posix*) :
    143     set -o posix ;; #(
    144   *) :
    145      ;;
    146 esac
    147 fi
    148 "
    149   as_required="as_fn_return () { (exit \$1); }
    150 as_fn_success () { as_fn_return 0; }
    151 as_fn_failure () { as_fn_return 1; }
    152 as_fn_ret_success () { return 0; }
    153 as_fn_ret_failure () { return 1; }
    154 
    155 exitcode=0
    156 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
    157 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
    158 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
    159 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
    160 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
    161 
    162 else
    163   exitcode=1; echo positional parameters were not saved.
    164 fi
    165 test x\$exitcode = x0 || exit 1
    166 test -x / || exit 1"
    167   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
    168   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
    169   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
    170   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
    171 test \$(( 1 + 1 )) = 2 || exit 1"
    172   if (eval "$as_required") 2>/dev/null; then :
    173   as_have_required=yes
    174 else
    175   as_have_required=no
    176 fi
    177   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
    178 
    179 else
    180   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    181 as_found=false
    182 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
    183 do
    184   IFS=$as_save_IFS
    185   test -z "$as_dir" && as_dir=.
    186   as_found=:
    187   case $as_dir in #(
    188 	 /*)
    189 	   for as_base in sh bash ksh sh5; do
    190 	     # Try only shells that exist, to save several forks.
    191 	     as_shell=$as_dir/$as_base
    192 	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
    193 		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
    194   CONFIG_SHELL=$as_shell as_have_required=yes
    195 		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
    196   break 2
    197 fi
    198 fi
    199 	   done;;
    200        esac
    201   as_found=false
    202 done
    203 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
    204 	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
    205   CONFIG_SHELL=$SHELL as_have_required=yes
    206 fi; }
    207 IFS=$as_save_IFS
    208 
    209 
    210       if test "x$CONFIG_SHELL" != x; then :
    211   export CONFIG_SHELL
    212              # We cannot yet assume a decent shell, so we have to provide a
    213 # neutralization value for shells without unset; and this also
    214 # works around shells that cannot unset nonexistent variables.
    215 # Preserve -v and -x to the replacement shell.
    216 BASH_ENV=/dev/null
    217 ENV=/dev/null
    218 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
    219 case $- in # ((((
    220   *v*x* | *x*v* ) as_opts=-vx ;;
    221   *v* ) as_opts=-v ;;
    222   *x* ) as_opts=-x ;;
    223   * ) as_opts= ;;
    224 esac
    225 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
    226 # Admittedly, this is quite paranoid, since all the known shells bail
    227 # out after a failed `exec'.
    228 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
    229 exit 255
    230 fi
    231 
    232     if test x$as_have_required = xno; then :
    233   $as_echo "$0: This script requires a shell more modern than all"
    234   $as_echo "$0: the shells that I found on your system."
    235   if test x${ZSH_VERSION+set} = xset ; then
    236     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
    237     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
    238   else
    239     $as_echo "$0: Please tell bug-autoconf (at] gnu.org about your system,
    240 $0: including any error possibly output before this
    241 $0: message. Then install a modern shell, or manually run
    242 $0: the script under such a shell if you do have one."
    243   fi
    244   exit 1
    245 fi
    246 fi
    247 fi
    248 SHELL=${CONFIG_SHELL-/bin/sh}
    249 export SHELL
    250 # Unset more variables known to interfere with behavior of common tools.
    251 CLICOLOR_FORCE= GREP_OPTIONS=
    252 unset CLICOLOR_FORCE GREP_OPTIONS
    253 
    254 ## --------------------- ##
    255 ## M4sh Shell Functions. ##
    256 ## --------------------- ##
    257 # as_fn_unset VAR
    258 # ---------------
    259 # Portably unset VAR.
    260 as_fn_unset ()
    261 {
    262   { eval $1=; unset $1;}
    263 }
    264 as_unset=as_fn_unset
    265 
    266 # as_fn_set_status STATUS
    267 # -----------------------
    268 # Set $? to STATUS, without forking.
    269 as_fn_set_status ()
    270 {
    271   return $1
    272 } # as_fn_set_status
    273 
    274 # as_fn_exit STATUS
    275 # -----------------
    276 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
    277 as_fn_exit ()
    278 {
    279   set +e
    280   as_fn_set_status $1
    281   exit $1
    282 } # as_fn_exit
    283 
    284 # as_fn_mkdir_p
    285 # -------------
    286 # Create "$as_dir" as a directory, including parents if necessary.
    287 as_fn_mkdir_p ()
    288 {
    289 
    290   case $as_dir in #(
    291   -*) as_dir=./$as_dir;;
    292   esac
    293   test -d "$as_dir" || eval $as_mkdir_p || {
    294     as_dirs=
    295     while :; do
    296       case $as_dir in #(
    297       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
    298       *) as_qdir=$as_dir;;
    299       esac
    300       as_dirs="'$as_qdir' $as_dirs"
    301       as_dir=`$as_dirname -- "$as_dir" ||
    302 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
    303 	 X"$as_dir" : 'X\(//\)[^/]' \| \
    304 	 X"$as_dir" : 'X\(//\)$' \| \
    305 	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
    306 $as_echo X"$as_dir" |
    307     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
    308 	    s//\1/
    309 	    q
    310 	  }
    311 	  /^X\(\/\/\)[^/].*/{
    312 	    s//\1/
    313 	    q
    314 	  }
    315 	  /^X\(\/\/\)$/{
    316 	    s//\1/
    317 	    q
    318 	  }
    319 	  /^X\(\/\).*/{
    320 	    s//\1/
    321 	    q
    322 	  }
    323 	  s/.*/./; q'`
    324       test -d "$as_dir" && break
    325     done
    326     test -z "$as_dirs" || eval "mkdir $as_dirs"
    327   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
    328 
    329 
    330 } # as_fn_mkdir_p
    331 
    332 # as_fn_executable_p FILE
    333 # -----------------------
    334 # Test if FILE is an executable regular file.
    335 as_fn_executable_p ()
    336 {
    337   test -f "$1" && test -x "$1"
    338 } # as_fn_executable_p
    339 # as_fn_append VAR VALUE
    340 # ----------------------
    341 # Append the text in VALUE to the end of the definition contained in VAR. Take
    342 # advantage of any shell optimizations that allow amortized linear growth over
    343 # repeated appends, instead of the typical quadratic growth present in naive
    344 # implementations.
    345 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
    346   eval 'as_fn_append ()
    347   {
    348     eval $1+=\$2
    349   }'
    350 else
    351   as_fn_append ()
    352   {
    353     eval $1=\$$1\$2
    354   }
    355 fi # as_fn_append
    356 
    357 # as_fn_arith ARG...
    358 # ------------------
    359 # Perform arithmetic evaluation on the ARGs, and store the result in the
    360 # global $as_val. Take advantage of shells that can avoid forks. The arguments
    361 # must be portable across $(()) and expr.
    362 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
    363   eval 'as_fn_arith ()
    364   {
    365     as_val=$(( $* ))
    366   }'
    367 else
    368   as_fn_arith ()
    369   {
    370     as_val=`expr "$@" || test $? -eq 1`
    371   }
    372 fi # as_fn_arith
    373 
    374 
    375 # as_fn_error STATUS ERROR [LINENO LOG_FD]
    376 # ----------------------------------------
    377 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
    378 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
    379 # script with STATUS, using 1 if that was 0.
    380 as_fn_error ()
    381 {
    382   as_status=$1; test $as_status -eq 0 && as_status=1
    383   if test "$4"; then
    384     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    385     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
    386   fi
    387   $as_echo "$as_me: error: $2" >&2
    388   as_fn_exit $as_status
    389 } # as_fn_error
    390 
    391 if expr a : '\(a\)' >/dev/null 2>&1 &&
    392    test "X`expr 00001 : '.*\(...\)'`" = X001; then
    393   as_expr=expr
    394 else
    395   as_expr=false
    396 fi
    397 
    398 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
    399   as_basename=basename
    400 else
    401   as_basename=false
    402 fi
    403 
    404 as_me=`$as_basename -- "$0" ||
    405 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
    406 	 X"$0" : 'X\(//\)$' \| \
    407 	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
    408 $as_echo X/"$0" |
    409     sed '/^.*\/\([^/][^/]*\)\/*$/{
    410 	    s//\1/
    411 	    q
    412 	  }
    413 	  /^X\/\(\/\/\)$/{
    414 	    s//\1/
    415 	    q
    416 	  }
    417 	  /^X\/\(\/\).*/{
    418 	    s//\1/
    419 	    q
    420 	  }
    421 	  s/.*/./; q'`
    422 
    423 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
    424   as_dirname=dirname
    425 else
    426   as_dirname=false
    427 fi
    428 
    429 # Avoid depending upon Character Ranges.
    430 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
    431 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    432 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
    433 as_cr_digits='0123456789'
    434 as_cr_alnum=$as_cr_Letters$as_cr_digits
    435 
    436 
    437   as_lineno_1=$LINENO as_lineno_1a=$LINENO
    438   as_lineno_2=$LINENO as_lineno_2a=$LINENO
    439   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
    440   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
    441   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
    442   sed -n '
    443     p
    444     /[$]LINENO/=
    445   ' <$as_myself |
    446     sed '
    447       s/[$]LINENO.*/&-/
    448       t lineno
    449       b
    450       :lineno
    451       N
    452       :loop
    453       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
    454       t loop
    455       s/-\n.*//
    456     ' >$as_me.lineno &&
    457   chmod +x "$as_me.lineno" ||
    458     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
    459 
    460   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
    461   # already done that, so ensure we don't try to do so again and fall
    462   # in an infinite loop.  This has already happened in practice.
    463   _as_can_reexec=no; export _as_can_reexec
    464   # Don't try to exec as it changes $[0], causing all sort of problems
    465   # (the dirname of $[0] is not the place where we might find the
    466   # original and so on.  Autoconf is especially sensitive to this).
    467   . "./$as_me.lineno"
    468   # Exit status is that of the last command.
    469   exit
    470 }
    471 
    472 ECHO_C= ECHO_N= ECHO_T=
    473 case `echo -n x` in #(((((
    474 -n*)
    475   case `echo 'xy\c'` in
    476   *c*) ECHO_T='	';;	# ECHO_T is single tab character.
    477   xy)  ECHO_C='\c';;
    478   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
    479        ECHO_T='	';;
    480   esac;;
    481 *)
    482   ECHO_N='-n';;
    483 esac
    484 
    485 rm -f conf$$ conf$$.exe conf$$.file
    486 if test -d conf$$.dir; then
    487   rm -f conf$$.dir/conf$$.file
    488 else
    489   rm -f conf$$.dir
    490   mkdir conf$$.dir 2>/dev/null
    491 fi
    492 if (echo >conf$$.file) 2>/dev/null; then
    493   if ln -s conf$$.file conf$$ 2>/dev/null; then
    494     as_ln_s='ln -s'
    495     # ... but there are two gotchas:
    496     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
    497     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
    498     # In both cases, we have to default to `cp -pR'.
    499     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
    500       as_ln_s='cp -pR'
    501   elif ln conf$$.file conf$$ 2>/dev/null; then
    502     as_ln_s=ln
    503   else
    504     as_ln_s='cp -pR'
    505   fi
    506 else
    507   as_ln_s='cp -pR'
    508 fi
    509 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
    510 rmdir conf$$.dir 2>/dev/null
    511 
    512 if mkdir -p . 2>/dev/null; then
    513   as_mkdir_p='mkdir -p "$as_dir"'
    514 else
    515   test -d ./-p && rmdir ./-p
    516   as_mkdir_p=false
    517 fi
    518 
    519 as_test_x='test -x'
    520 as_executable_p=as_fn_executable_p
    521 
    522 # Sed expression to map a string onto a valid CPP name.
    523 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
    524 
    525 # Sed expression to map a string onto a valid variable name.
    526 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
    527 
    528 
    529 
    530 
    531 
    532 SHELL=${CONFIG_SHELL-/bin/sh}
    533 
    534 # How were we run?
    535 at_cli_args="$@"
    536 
    537 
    538 # Not all shells have the 'times' builtin; the subshell is needed to make
    539 # sure we discard the 'times: not found' message from the shell.
    540 at_times_p=false
    541 (times) >/dev/null 2>&1 && at_times_p=:
    542 
    543 # CLI Arguments to pass to the debugging scripts.
    544 at_debug_args=
    545 # -e sets to true
    546 at_errexit_p=false
    547 # Shall we be verbose?  ':' means no, empty means yes.
    548 at_verbose=:
    549 at_quiet=
    550 # Running several jobs in parallel, 0 means as many as test groups.
    551 at_jobs=1
    552 at_traceon=:
    553 at_trace_echo=:
    554 at_check_filter_trace=:
    555 
    556 # Shall we keep the debug scripts?  Must be `:' when the suite is
    557 # run by a debug script, so that the script doesn't remove itself.
    558 at_debug_p=false
    559 # Display help message?
    560 at_help_p=false
    561 # Display the version message?
    562 at_version_p=false
    563 # List test groups?
    564 at_list_p=false
    565 # --clean
    566 at_clean=false
    567 # Test groups to run
    568 at_groups=
    569 # Whether to rerun failed tests.
    570 at_recheck=
    571 # Whether a write failure occurred
    572 at_write_fail=0
    573 
    574 # The directory we run the suite in.  Default to . if no -C option.
    575 at_dir=`pwd`
    576 # An absolute reference to this testsuite script.
    577 case $as_myself in
    578   [\\/]* | ?:[\\/]* ) at_myself=$as_myself ;;
    579   * ) at_myself=$at_dir/$as_myself ;;
    580 esac
    581 # Whether -C is in effect.
    582 at_change_dir=false
    583 
    584 # Whether to enable colored test results.
    585 at_color=auto
    586 # List of the tested programs.
    587 at_tested='bison'
    588 # As many question marks as there are digits in the last test group number.
    589 # Used to normalize the test group numbers so that `ls' lists them in
    590 # numerical order.
    591 at_format='???'
    592 # Description of all the test groups.
    593 at_help_all="1;input.at:27;Invalid inputs;;
    594 2;input.at:57;Invalid inputs with {};;
    595 3;input.at:84;Invalid \$n and @n;;
    596 4;input.at:104;Type Clashes;;
    597 5;input.at:285;Unused values;;
    598 6;input.at:295;Unused values before symbol declarations;;
    599 7;input.at:305;Default %printer and %destructor redeclared;;
    600 8;input.at:365;Per-type %printer and %destructor redeclared;;
    601 9;input.at:408;Unused values with default %destructor;;
    602 10;input.at:450;Unused values with per-type %destructor;;
    603 11;input.at:475;Incompatible Aliases;;
    604 12;input.at:516;Torturing the Scanner;;
    605 13;input.at:674;Typed symbol aliases;;
    606 14;input.at:710;Require 1.0;;
    607 15;input.at:711;Require 2.7;;
    608 16;input.at:713;Require 100.0;;
    609 17;input.at:720;String aliases for character tokens;;
    610 18;input.at:741;Symbols;;
    611 19;input.at:807;Numbered tokens;;
    612 20;input.at:845;Unclosed constructs;;
    613 21;input.at:909;%start after first rule;;
    614 22;input.at:930;%prec takes a token;;
    615 23;input.at:951;%prec's token must be defined;;
    616 24;input.at:971;Reject unused %code qualifiers;;
    617 25;input.at:1060;%define errors;;
    618 26;input.at:1096;%define, --define, --force-define;;
    619 27;input.at:1161;%define Boolean variables;;
    620 28;input.at:1181;%define enum variables;;
    621 29;input.at:1216;%define backward compatibility;;
    622 30;input.at:1257;Unused %define api.pure;;
    623 31;input.at:1290;C++ namespace reference errors;;
    624 32;input.at:1346;Bad character literals;;
    625 33;input.at:1399;Bad escapes in literals;;
    626 34;input.at:1448;LAC: Errors for %define;;
    627 35;input.at:1471;-Werror is not affected by -Wnone and -Wall;;
    628 36;input.at:1505;%name-prefix and %define api.prefix are incompatible;;
    629 37;input.at:1534;Stray \$ or @;;
    630 38;input.at:1568;Code injection;;
    631 39;named-refs.at:21;Tutorial calculator;;
    632 40;named-refs.at:195;Undefined and ambiguous references;;
    633 41;named-refs.at:271;Misleading references;;
    634 42;named-refs.at:288;Many kinds of errors;;
    635 43;named-refs.at:521;Missing identifiers in brackets;;
    636 44;named-refs.at:535;Redundant words in brackets;;
    637 45;named-refs.at:549;Comments in brackets;;
    638 46;named-refs.at:563;Stray symbols in brackets;;
    639 47;named-refs.at:580;Redundant words in LHS brackets;;
    640 48;named-refs.at:595;Factored LHS;;
    641 49;named-refs.at:606;Unresolved references;;
    642 50;named-refs.at:671;\$ or @ followed by . or -;;
    643 51;output.at:44;Output files:  -dv ;;
    644 52;output.at:50;Output files:  -dv >&-;;
    645 53;output.at:55;Output files:  -dv -o foo.c ;;
    646 54;output.at:57;Output files:  -dv -o foo.tab.c ;;
    647 55;output.at:59;Output files:  -dv -y ;;
    648 56;output.at:61;Output files:  -dv -b bar ;;
    649 57;output.at:63;Output files:  -dv -g -o foo.c ;;
    650 58;output.at:67;Output files: %defines %verbose  ;;
    651 59;output.at:69;Output files: %defines %verbose %yacc  ;;
    652 60;output.at:72;Output files: %defines %verbose %yacc  ;;
    653 61;output.at:76;Output files: %file-prefix \"bar\" %defines %verbose  ;;
    654 62;output.at:78;Output files: %output=\"bar.c\" %defines %verbose %yacc  ;;
    655 63;output.at:80;Output files: %file-prefix=\"baz\" %output \"bar.c\" %defines %verbose %yacc  ;;
    656 64;output.at:87;Output files: %defines %verbose  ;;
    657 65;output.at:90;Output files: %defines %verbose  -o foo.c ;;
    658 66;output.at:93;Output files:  --defines=foo.hpp -o foo.c++ ;;
    659 67;output.at:97;Output files: %defines \"foo.hpp\" -o foo.c++ ;;
    660 68;output.at:101;Output files:  -o foo.c++ --graph=foo.gph ;;
    661 69;output.at:116;Output files: %skeleton \"lalr1.cc\" %defines %verbose  ;;
    662 70;output.at:119;Output files: %skeleton \"lalr1.cc\" %defines %verbose  ;;
    663 71;output.at:123;Output files: %skeleton \"lalr1.cc\" %defines %verbose -o subdir/foo.cc ;;
    664 72;output.at:128;Output files: %skeleton \"lalr1.cc\" %defines %verbose %file-prefix \"output_dir/foo\"  ;;
    665 73;output.at:158;Conflicting output files:  --graph=\"foo.tab.c\";;
    666 74;output.at:163;Conflicting output files: %defines \"foo.output\" -v;;
    667 75;output.at:168;Conflicting output files: %skeleton \"lalr1.cc\" %defines --graph=\"location.hh\";;
    668 76;output.at:173;Conflicting output files:  -o foo.y;;
    669 77;output.at:219;Output file name: \`~!@#\$%^&*()-=_+{}[]|\\:;<>, .';c++;
    670 78;output.at:226;Output file name: (;c++;
    671 79;output.at:227;Output file name: );c++;
    672 80;output.at:228;Output file name: #;c++;
    673 81;output.at:229;Output file name: @@;c++;
    674 82;output.at:230;Output file name: @{;c++;
    675 83;output.at:231;Output file name: @};c++;
    676 84;output.at:232;Output file name: [;c++;
    677 85;output.at:233;Output file name: ];c++;
    678 86;output.at:260;Graph with no conflicts;graph;
    679 87;output.at:294;Graph with unsolved S/R;graph;
    680 88;output.at:358;Graph with solved S/R;graph;
    681 89;output.at:417;Graph with R/R;graph;
    682 90;output.at:449;Graph with reductions with multiple LAT;graph;
    683 91;output.at:508;Graph with a reduction rule both enabled and disabled;graph;
    684 92;skeletons.at:24;Relative skeleton file names;;
    685 93;skeletons.at:84;Installed skeleton file names;;
    686 94;skeletons.at:146;%define Boolean variables: invalid skeleton defaults;;
    687 95;skeletons.at:170;Complaining during macro argument expansion;;
    688 96;skeletons.at:252;Fatal errors make M4 exit immediately;;
    689 97;skeletons.at:306;Fatal errors but M4 continues producing output;;
    690 98;sets.at:66;Nullable;;
    691 99;sets.at:151;Broken Closure;;
    692 100;sets.at:193;Firsts;;
    693 101;sets.at:269;Accept;;
    694 102;reduce.at:25;Useless Terminals;;
    695 103;reduce.at:69;Useless Nonterminals;;
    696 104;reduce.at:124;Useless Rules;report;
    697 105;reduce.at:271;Reduced Automaton;report;
    698 106;reduce.at:381;Underivable Rules;report;
    699 107;reduce.at:423;Empty Language;;
    700 108;reduce.at:474;no %define lr.type: Single State Split;;
    701 109;reduce.at:474;%define lr.type lalr: Single State Split;;
    702 110;reduce.at:474;%define lr.type ielr: Single State Split;;
    703 111;reduce.at:474;%define lr.type canonical-lr: Single State Split;;
    704 112;reduce.at:707;no %define lr.type: Lane Split;;
    705 113;reduce.at:707;%define lr.type lalr: Lane Split;;
    706 114;reduce.at:707;%define lr.type ielr: Lane Split;;
    707 115;reduce.at:707;%define lr.type canonical-lr: Lane Split;;
    708 116;reduce.at:951;no %define lr.type: Complex Lane Split;;
    709 117;reduce.at:951;%define lr.type lalr: Complex Lane Split;;
    710 118;reduce.at:951;%define lr.type ielr: Complex Lane Split;;
    711 119;reduce.at:951;%define lr.type canonical-lr: Complex Lane Split;;
    712 120;reduce.at:1220;no %define lr.type: Split During Added Lookahead Propagation;;
    713 121;reduce.at:1220;%define lr.type lalr: Split During Added Lookahead Propagation;;
    714 122;reduce.at:1220;%define lr.type ielr: Split During Added Lookahead Propagation;;
    715 123;reduce.at:1220;%define lr.type canonical-lr: Split During Added Lookahead Propagation;;
    716 124;reduce.at:1550;no %define lr.default-reductions;;
    717 125;reduce.at:1550;%define lr.default-reductions most;;
    718 126;reduce.at:1550;%define lr.default-reductions consistent;;
    719 127;reduce.at:1550;%define lr.default-reductions accepting;;
    720 128;synclines.at:150;Prologue syncline;;
    721 129;synclines.at:168;%union syncline;;
    722 130;synclines.at:189;Postprologue syncline;;
    723 131;synclines.at:213;Action syncline;;
    724 132;synclines.at:232;Epilogue syncline;;
    725 133;synclines.at:249;%code top syncline;;
    726 134;synclines.at:290;%no-lines;;
    727 135;synclines.at:291;%no-lines;;
    728 136;synclines.at:292;%no-lines;;
    729 137;synclines.at:293;%no-lines;;
    730 138;headers.at:57;Invalid CPP guards:  --defines=input/input.h;;
    731 139;headers.at:58;Invalid CPP guards:  --defines=9foo.h;;
    732 140;headers.at:59;Invalid CPP guards: %glr-parser --defines=input/input.h;;
    733 141;headers.at:60;Invalid CPP guards: %glr-parser --defines=9foo.h;;
    734 142;headers.at:69;export YYLTYPE;;
    735 143;headers.at:125;Several parsers;c++;
    736 144;actions.at:24;Mid-rule actions;;
    737 145;actions.at:133;Initial location: yacc.c ;;
    738 146;actions.at:134;Initial location: yacc.c %define api.pure full;;
    739 147;actions.at:135;Initial location: yacc.c %define api.pure %parse-param { int x };;
    740 148;actions.at:136;Initial location: yacc.c %define api.push-pull both;;
    741 149;actions.at:137;Initial location: yacc.c %define api.push-pull both %define api.pure full;;
    742 150;actions.at:138;Initial location: glr.c ;;
    743 151;actions.at:139;Initial location: glr.c %define api.pure;;
    744 152;actions.at:140;Initial location: lalr1.cc ;c++;
    745 153;actions.at:141;Initial location: glr.cc ;c++;
    746 154;actions.at:150;Initial location: yacc.c %define api.pure full;;
    747 155;actions.at:161;Initial location: yacc.c %define api.pure full;;
    748 156;actions.at:244;Location print: yacc.c ;;
    749 157;actions.at:245;Location print: glr.c ;;
    750 158;actions.at:257;Exotic Dollars;;
    751 159;actions.at:751;Printers and Destructors;;
    752 160;actions.at:752;Printers and Destructors with union;;
    753 161;actions.at:754;Printers and Destructors: %defines %skeleton \"lalr1.cc\";c++;
    754 162;actions.at:755;Printers and Destructors with union: %defines %skeleton \"lalr1.cc\";c++;
    755 163;actions.at:757;Printers and Destructors: %glr-parser;;
    756 164;actions.at:758;Printers and Destructors with union: %glr-parser;;
    757 165;actions.at:769;Default tagless %printer and %destructor;;
    758 166;actions.at:867;Default tagged and per-type %printer and %destructor;;
    759 167;actions.at:991;Default %printer and %destructor for user-defined end token;;
    760 168;actions.at:1098;Default %printer and %destructor are not for error or \$undefined;;
    761 169;actions.at:1193;Default %printer and %destructor are not for \$accept;;
    762 170;actions.at:1258;Default %printer and %destructor for mid-rule values;;
    763 171;actions.at:1406;@\$ in %initial-action implies %locations;;
    764 172;actions.at:1407;@\$ in %destructor implies %locations;;
    765 173;actions.at:1408;@\$ in %printer implies %locations;;
    766 174;actions.at:1529;Qualified \$\$ in actions: yacc.c;;
    767 175;actions.at:1530;Qualified \$\$ in actions: glr.c;;
    768 176;actions.at:1531;Qualified \$\$ in actions: lalr1.cc;c++;
    769 177;actions.at:1532;Qualified \$\$ in actions: glr.cc;c++;
    770 178;actions.at:1540;Fix user actions without a trailing semicolon;;
    771 179;actions.at:1649;Destroying lookahead assigned by semantic action;;
    772 180;actions.at:1708;YYBACKUP;;
    773 181;conflicts.at:31;S/R in initial;;
    774 182;conflicts.at:57;%nonassoc and eof;;
    775 183;conflicts.at:155;%error-verbose and consistent errors;c++ java;
    776 184;conflicts.at:456;LAC: %nonassoc requires splitting canonical LR states;;
    777 185;conflicts.at:546;Unresolved SR Conflicts;report;
    778 186;conflicts.at:653;Resolved SR Conflicts;report;
    779 187;conflicts.at:775;Defaulted Conflicted Reduction;report;
    780 188;conflicts.at:894;%expect not enough;;
    781 189;conflicts.at:914;%expect right;;
    782 190;conflicts.at:931;%expect too much;;
    783 191;conflicts.at:951;%expect with reduce conflicts;;
    784 192;conflicts.at:971;%prec with user string;;
    785 193;conflicts.at:988;%no-default-prec without %prec;;
    786 194;conflicts.at:1014;%no-default-prec with %prec;;
    787 195;conflicts.at:1038;%default-prec;;
    788 196;conflicts.at:1062;Unreachable States After Conflict Resolution;;
    789 197;conflicts.at:1273;Solved conflicts report for multiple reductions in a state;;
    790 198;conflicts.at:1353;%nonassoc error actions for multiple reductions in a state;;
    791 199;conflicts.at:1422;-W versus %expect and %expect-rr;;
    792 200;calc.at:597;Calculator ;;
    793 201;calc.at:599;Calculator %defines;;
    794 202;calc.at:600;Calculator %locations;;
    795 203;calc.at:602;Calculator %name-prefix=\"calc\";;
    796 204;calc.at:603;Calculator %verbose;;
    797 205;calc.at:604;Calculator %yacc;;
    798 206;calc.at:605;Calculator %error-verbose;;
    799 207;calc.at:607;Calculator %define api.pure full %locations;;
    800 208;calc.at:608;Calculator %define api.push-pull both %define api.pure full %locations;;
    801 209;calc.at:609;Calculator %error-verbose %locations;;
    802 210;calc.at:611;Calculator %error-verbose %locations %defines %name-prefix \"calc\" %verbose %yacc;;
    803 211;calc.at:612;Calculator %error-verbose %locations %defines %define api.prefix \"calc\" %verbose %yacc;;
    804 212;calc.at:614;Calculator %debug;;
    805 213;calc.at:615;Calculator %error-verbose %debug %locations %defines %name-prefix \"calc\" %verbose %yacc;;
    806 214;calc.at:616;Calculator %error-verbose %debug %locations %defines %define api.prefix \"calc\" %verbose %yacc;;
    807 215;calc.at:618;Calculator %define api.pure full %verbose %debug %locations %defines %name-prefix \"calc\" %verbose %yacc;;
    808 216;calc.at:619;Calculator %define api.push-pull both %define api.pure full %verbose %debug %locations %defines %define api.prefix \"calc\" %verbose %yacc;;
    809 217;calc.at:621;Calculator %define api.pure %error-verbose %debug %locations %defines %define api.prefix \"calc\" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count};;
    810 218;calc.at:638;Calculator %glr-parser ;;
    811 219;calc.at:640;Calculator %glr-parser %defines;;
    812 220;calc.at:641;Calculator %glr-parser %locations;;
    813 221;calc.at:642;Calculator %glr-parser %name-prefix \"calc\";;
    814 222;calc.at:643;Calculator %glr-parser %define api.prefix \"calc\";;
    815 223;calc.at:644;Calculator %glr-parser %verbose;;
    816 224;calc.at:645;Calculator %glr-parser %yacc;;
    817 225;calc.at:646;Calculator %glr-parser %error-verbose;;
    818 226;calc.at:648;Calculator %glr-parser %define api.pure %locations;;
    819 227;calc.at:649;Calculator %glr-parser %error-verbose %locations;;
    820 228;calc.at:651;Calculator %glr-parser %error-verbose %locations %defines %name-prefix \"calc\" %verbose %yacc;;
    821 229;calc.at:653;Calculator %glr-parser %debug;;
    822 230;calc.at:654;Calculator %glr-parser %error-verbose %debug %locations %defines %name-prefix \"calc\" %verbose %yacc;;
    823 231;calc.at:655;Calculator %glr-parser %error-verbose %debug %locations %defines %define api.prefix \"calc\" %verbose %yacc;;
    824 232;calc.at:657;Calculator %glr-parser %define api.pure %error-verbose %debug %locations %defines %name-prefix \"calc\" %verbose %yacc;;
    825 233;calc.at:659;Calculator %glr-parser %define api.pure %error-verbose %debug %locations %defines %name-prefix \"calc\" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count};;
    826 234;calc.at:660;Calculator %glr-parser %define api.pure %error-verbose %debug %locations %defines %define api.prefix \"calc\" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count};;
    827 235;calc.at:670;Calculator %skeleton \"lalr1.cc\" %defines %locations;c++;
    828 236;calc.at:679;Calculator %language \"C++\" %defines %locations ;c++;
    829 237;calc.at:680;Calculator %language \"C++\" %defines %locations %define api.location.type Span;c++;
    830 238;calc.at:681;Calculator %language \"C++\" %defines %locations %error-verbose %name-prefix \"calc\" %verbose %yacc;c++;
    831 239;calc.at:682;Calculator %language \"C++\" %defines %locations %error-verbose %define api.prefix \"calc\" %verbose %yacc;c++;
    832 240;calc.at:683;Calculator %language \"C++\" %defines %locations %error-verbose %debug %name-prefix \"calc\" %verbose %yacc;c++;
    833 241;calc.at:685;Calculator %language \"C++\" %defines %locations %pure-parser %error-verbose %debug %define api.prefix \"calc\" %verbose %yacc;c++;
    834 242;calc.at:687;Calculator %language \"C++\" %defines %locations %pure-parser %error-verbose %debug %name-prefix \"calc\" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count};c++;
    835 243;calc.at:688;Calculator %language \"C++\" %defines %locations %pure-parser %error-verbose %debug %define api.prefix \"calc\" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count};c++;
    836 244;calc.at:699;Calculator %skeleton \"glr.cc\" %defines %locations;c++;
    837 245;calc.at:708;Calculator %language \"C++\" %glr-parser %defines %locations ;c++;
    838 246;calc.at:709;Calculator %language \"C++\" %glr-parser %defines %locations %define api.location.type Span;c++;
    839 247;calc.at:710;Calculator %language \"C++\" %glr-parser %defines %locations %error-verbose %name-prefix \"calc\" %verbose %yacc;c++;
    840 248;calc.at:711;Calculator %language \"C++\" %glr-parser %defines %locations %error-verbose %define api.prefix \"calc\" %verbose %yacc;c++;
    841 249;calc.at:713;Calculator %language \"C++\" %glr-parser %defines %locations %debug;c++;
    842 250;calc.at:714;Calculator %language \"C++\" %glr-parser %defines %locations %error-verbose %debug %name-prefix \"calc\" %verbose %yacc;c++;
    843 251;calc.at:716;Calculator %language \"C++\" %glr-parser %defines %locations %pure-parser %error-verbose %debug %name-prefix \"calc\" %verbose %yacc;c++;
    844 252;calc.at:718;Calculator %language \"C++\" %glr-parser %defines %locations %pure-parser %error-verbose %debug %name-prefix \"calc\" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count};c++;
    845 253;calc.at:719;Calculator %language \"C++\" %glr-parser %defines %locations %pure-parser %error-verbose %debug %define api.prefix \"calc\" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count};c++;
    846 254;torture.at:137;Big triangle;;
    847 255;torture.at:227;Big horizontal;;
    848 256;torture.at:364;Many lookahead tokens;;
    849 257;torture.at:466;Exploding the Stack Size with Alloca;;
    850 258;torture.at:512;Exploding the Stack Size with Malloc;;
    851 259;existing.at:79;GNU AWK 3.1.0 Grammar: LALR(1);;
    852 260;existing.at:79;GNU AWK 3.1.0 Grammar: IELR(1);;
    853 261;existing.at:79;GNU AWK 3.1.0 Grammar: Canonical LR(1);;
    854 262;existing.at:783;GNU Cim Grammar: LALR(1);;
    855 263;existing.at:783;GNU Cim Grammar: IELR(1);;
    856 264;existing.at:783;GNU Cim Grammar: Canonical LR(1);;
    857 265;existing.at:1403;GNU pic (Groff 1.18.1) Grammar: LALR(1);;
    858 266;existing.at:1403;GNU pic (Groff 1.18.1) Grammar: IELR(1);;
    859 267;existing.at:1403;GNU pic (Groff 1.18.1) Grammar: Canonical LR(1);;
    860 268;regression.at:25;Trivial grammars;;
    861 269;regression.at:55;YYSTYPE typedef;;
    862 270;regression.at:85;Early token definitions with --yacc;;
    863 271;regression.at:125;Early token definitions without --yacc;;
    864 272;regression.at:170;Braces parsing;;
    865 273;regression.at:194;Duplicate string;;
    866 274;regression.at:222;Rule Line Numbers;report;
    867 275;regression.at:368;Mixing %token styles;;
    868 276;regression.at:391;Invalid inputs;;
    869 277;regression.at:418;Invalid inputs with {};;
    870 278;regression.at:443;Token definitions;;
    871 279;regression.at:511;Characters Escapes;;
    872 280;regression.at:544;Web2c Report;report;
    873 281;regression.at:721;Web2c Actions;report;
    874 282;regression.at:936;Dancer ;;
    875 283;regression.at:937;Dancer %glr-parser;;
    876 284;regression.at:938;Dancer %skeleton \"lalr1.cc\";c++;
    877 285;regression.at:1020;Expecting two tokens ;;
    878 286;regression.at:1021;Expecting two tokens %glr-parser;;
    879 287;regression.at:1022;Expecting two tokens %skeleton \"lalr1.cc\";c++;
    880 288;regression.at:1030;Braced code in declaration in rules section;;
    881 289;regression.at:1097;String alias declared after use;;
    882 290;regression.at:1120;Extra lookahead sets in report;;
    883 291;regression.at:1161;Token number in precedence declaration;;
    884 292;regression.at:1219;parse-gram.y: LALR = IELR;;
    885 293;regression.at:1240;%error-verbose and YYSTACK_USE_ALLOCA;;
    886 294;regression.at:1319;%error-verbose overflow;;
    887 295;regression.at:1429;LAC: Exploratory stack;;
    888 296;regression.at:1523;LAC: Memory exhaustion;;
    889 297;regression.at:1664;Lex and parse params: yacc.c;;
    890 298;regression.at:1665;Lex and parse params: glr.c;;
    891 299;regression.at:1666;Lex and parse params: lalr1.cc;c++;
    892 300;regression.at:1667;Lex and parse params: glr.cc;c++;
    893 301;c++.at:101;Doxygen Public Documentation;;
    894 302;c++.at:102;Doxygen Private Documentation;;
    895 303;c++.at:160;Relative namespace references;c++;
    896 304;c++.at:166;Absolute namespace references;c++;
    897 305;c++.at:175;Syntactically invalid namespace references;;
    898 306;c++.at:190;Exception safety;c++;
    899 307;java.at:360;Calculator ;java;
    900 308;java.at:360;Calculator %error-verbose ;java;
    901 309;java.at:360;Calculator %locations ;java;
    902 310;java.at:360;Calculator %error-verbose %locations ;java;
    903 311;java.at:369;Calculator %lex-param { InputStream is } ;java;
    904 312;java.at:369;Calculator %error-verbose %lex-param { InputStream is } ;java;
    905 313;java.at:369;Calculator %locations %lex-param { InputStream is } ;java;
    906 314;java.at:369;Calculator %error-verbose %locations %lex-param { InputStream is } ;java;
    907 315;java.at:455;Java parser class and package names;java;
    908 316;java.at:476;Java parser class modifiers;java;
    909 317;java.at:534;Java parser class extends and implements;java;
    910 318;java.at:554;Java %parse-param and %lex-param;java;
    911 319;java.at:628;Java throws specifications;java;
    912 320;java.at:717;Java stype, position_class and location_class;java;
    913 321;java.at:748;Java syntax error handling without error token;java;
    914 322;cxx-type.at:394;GLR: Resolve ambiguity, impure, no locations;;
    915 323;cxx-type.at:401;GLR: Resolve ambiguity, impure, locations;;
    916 324;cxx-type.at:407;GLR: Resolve ambiguity, pure, no locations;;
    917 325;cxx-type.at:414;GLR: Resolve ambiguity, pure, locations;;
    918 326;cxx-type.at:421;GLR: Merge conflicting parses, impure, no locations;;
    919 327;cxx-type.at:428;GLR: Merge conflicting parses, impure, locations;;
    920 328;cxx-type.at:435;GLR: Merge conflicting parses, pure, no locations;;
    921 329;cxx-type.at:441;GLR: Merge conflicting parses, pure, locations;;
    922 330;cxx-type.at:448;GLR: Verbose messages, resolve ambiguity, impure, no locations;;
    923 331;glr-regression.at:25;Badly Collapsed GLR States;;
    924 332;glr-regression.at:112;Improper handling of embedded actions and dollar(-N) in GLR parsers;;
    925 333;glr-regression.at:244;Improper merging of GLR delayed action sets;;
    926 334;glr-regression.at:364;Duplicate representation of merged trees;;
    927 335;glr-regression.at:455;User destructor for unresolved GLR semantic value;;
    928 336;glr-regression.at:515;User destructor after an error during a split parse;;
    929 337;glr-regression.at:569;Duplicated user destructor for lookahead;;
    930 338;glr-regression.at:658;Incorrectly initialized location for empty right-hand side in GLR;;
    931 339;glr-regression.at:752;No users destructors if stack 0 deleted;;
    932 340;glr-regression.at:829;Corrupted semantic options if user action cuts parse;;
    933 341;glr-regression.at:883;Undesirable destructors if user action cuts parse;;
    934 342;glr-regression.at:941;Leaked semantic values if user action cuts parse;;
    935 343;glr-regression.at:1064;Incorrect lookahead during deterministic GLR;;
    936 344;glr-regression.at:1188;Incorrect lookahead during nondeterministic GLR;;
    937 345;glr-regression.at:1405;Leaked semantic values when reporting ambiguity;;
    938 346;glr-regression.at:1487;Leaked lookahead after nondeterministic parse syntax error;;
    939 347;glr-regression.at:1547;Uninitialized location when reporting ambiguity;;
    940 348;glr-regression.at:1625;Missed %merge type warnings when LHS type is declared later;;
    941 349;glr-regression.at:1678;Ambiguity reports;;
    942 350;push.at:24;Memory Leak for Early Deletion;;
    943 351;push.at:83;Multiple impure instances;;
    944 352;push.at:144;Unsupported Skeletons;;
    945 "
    946 # List of the all the test groups.
    947 at_groups_all=`$as_echo "$at_help_all" | sed 's/;.*//'`
    948 
    949 # at_fn_validate_ranges NAME...
    950 # -----------------------------
    951 # Validate and normalize the test group number contained in each variable
    952 # NAME. Leading zeroes are treated as decimal.
    953 at_fn_validate_ranges ()
    954 {
    955   for at_grp
    956   do
    957     eval at_value=\$$at_grp
    958     if test $at_value -lt 1 || test $at_value -gt 352; then
    959       $as_echo "invalid test group: $at_value" >&2
    960       exit 1
    961     fi
    962     case $at_value in
    963       0*) # We want to treat leading 0 as decimal, like expr and test, but
    964 	  # AS_VAR_ARITH treats it as octal if it uses $(( )).
    965 	  # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the
    966 	  # expr fork, but it is not worth the effort to determine if the
    967 	  # shell supports XSI when the user can just avoid leading 0.
    968 	  eval $at_grp='`expr $at_value + 0`' ;;
    969     esac
    970   done
    971 }
    972 
    973 ##
    974 ## Set up package specific options.
    975 ##
    976 
    977 at_arg_compile_c_with_cxx=false
    978 at_arg_given_compile_c_with_cxx=false
    979 
    980 
    981 at_prev=
    982 for at_option
    983 do
    984   # If the previous option needs an argument, assign it.
    985   if test -n "$at_prev"; then
    986     at_option=$at_prev=$at_option
    987     at_prev=
    988   fi
    989 
    990   case $at_option in
    991   *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;;
    992   *)    at_optarg= ;;
    993   esac
    994 
    995   # Accept the important Cygnus configure options, so we can diagnose typos.
    996 
    997   case $at_option in
    998     --help | -h )
    999 	at_help_p=:
   1000 	;;
   1001 
   1002     --list | -l )
   1003 	at_list_p=:
   1004 	;;
   1005 
   1006     --version | -V )
   1007 	at_version_p=:
   1008 	;;
   1009 
   1010     --clean | -c )
   1011 	at_clean=:
   1012 	;;
   1013 
   1014     --color )
   1015 	at_color=always
   1016 	;;
   1017     --color=* )
   1018 	case $at_optarg in
   1019 	no | never | none) at_color=never ;;
   1020 	auto | tty | if-tty) at_color=auto ;;
   1021 	always | yes | force) at_color=always ;;
   1022 	*) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'`
   1023 	   as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;;
   1024 	esac
   1025 	;;
   1026 
   1027     --debug | -d )
   1028 	at_debug_p=:
   1029 	;;
   1030 
   1031     --errexit | -e )
   1032 	at_debug_p=:
   1033 	at_errexit_p=:
   1034 	;;
   1035 
   1036     --verbose | -v )
   1037 	at_verbose=; at_quiet=:
   1038 	;;
   1039 
   1040     --trace | -x )
   1041 	at_traceon='set -x'
   1042 	at_trace_echo=echo
   1043 	at_check_filter_trace=at_fn_filter_trace
   1044 	;;
   1045 
   1046     [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
   1047 	at_fn_validate_ranges at_option
   1048 	as_fn_append at_groups "$at_option$as_nl"
   1049 	;;
   1050 
   1051     # Ranges
   1052     [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
   1053 	at_range_start=`echo $at_option |tr -d X-`
   1054 	at_fn_validate_ranges at_range_start
   1055 	at_range=`$as_echo "$at_groups_all" | \
   1056 	  sed -ne '/^'$at_range_start'$/,$p'`
   1057 	as_fn_append at_groups "$at_range$as_nl"
   1058 	;;
   1059 
   1060     -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
   1061 	at_range_end=`echo $at_option |tr -d X-`
   1062 	at_fn_validate_ranges at_range_end
   1063 	at_range=`$as_echo "$at_groups_all" | \
   1064 	  sed -ne '1,/^'$at_range_end'$/p'`
   1065 	as_fn_append at_groups "$at_range$as_nl"
   1066 	;;
   1067 
   1068     [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
   1069     [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \
   1070     [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \
   1071     [0-9][0-9][0-9]-[0-9][0-9][0-9] | \
   1072     [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \
   1073     [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] )
   1074 	at_range_start=`expr $at_option : '\(.*\)-'`
   1075 	at_range_end=`expr $at_option : '.*-\(.*\)'`
   1076 	if test $at_range_start -gt $at_range_end; then
   1077 	  at_tmp=$at_range_end
   1078 	  at_range_end=$at_range_start
   1079 	  at_range_start=$at_tmp
   1080 	fi
   1081 	at_fn_validate_ranges at_range_start at_range_end
   1082 	at_range=`$as_echo "$at_groups_all" | \
   1083 	  sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'`
   1084 	as_fn_append at_groups "$at_range$as_nl"
   1085 	;;
   1086 
   1087     # Directory selection.
   1088     --directory | -C )
   1089 	at_prev=--directory
   1090 	;;
   1091     --directory=* )
   1092 	at_change_dir=:
   1093 	at_dir=$at_optarg
   1094 	if test x- = "x$at_dir" ; then
   1095 	  at_dir=./-
   1096 	fi
   1097 	;;
   1098 
   1099     # Parallel execution.
   1100     --jobs | -j )
   1101 	at_jobs=0
   1102 	;;
   1103     --jobs=* | -j[0-9]* )
   1104 	if test -n "$at_optarg"; then
   1105 	  at_jobs=$at_optarg
   1106 	else
   1107 	  at_jobs=`expr X$at_option : 'X-j\(.*\)'`
   1108 	fi
   1109 	case $at_jobs in *[!0-9]*)
   1110 	  at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'`
   1111 	  as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;;
   1112 	esac
   1113 	;;
   1114 
   1115     # Keywords.
   1116     --keywords | -k )
   1117 	at_prev=--keywords
   1118 	;;
   1119     --keywords=* )
   1120 	at_groups_selected=$at_help_all
   1121 	at_save_IFS=$IFS
   1122 	IFS=,
   1123 	set X $at_optarg
   1124 	shift
   1125 	IFS=$at_save_IFS
   1126 	for at_keyword
   1127 	do
   1128 	  at_invert=
   1129 	  case $at_keyword in
   1130 	  '!'*)
   1131 	    at_invert="-v"
   1132 	    at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'`
   1133 	    ;;
   1134 	  esac
   1135 	  # It is on purpose that we match the test group titles too.
   1136 	  at_groups_selected=`$as_echo "$at_groups_selected" |
   1137 	      grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
   1138 	done
   1139 	# Smash the keywords.
   1140 	at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//'`
   1141 	as_fn_append at_groups "$at_groups_selected$as_nl"
   1142 	;;
   1143     --recheck)
   1144 	at_recheck=:
   1145 	;;
   1146     --compile-c-with-cxx )
   1147 	at_optarg=:
   1148 	at_arg_compile_c_with_cxx=:
   1149 	at_arg_given_compile_c_with_cxx=:
   1150 		;;
   1151     --no-compile-c-with-cxx )
   1152 	at_optarg=false
   1153 	at_arg_compile_c_with_cxx=false
   1154 	at_arg_given_compile_c_with_cxx=:
   1155 		;;
   1156 
   1157 
   1158     *=*)
   1159 	at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
   1160 	# Reject names that are not valid shell variable names.
   1161 	case $at_envvar in
   1162 	  '' | [0-9]* | *[!_$as_cr_alnum]* )
   1163 	    as_fn_error $? "invalid variable name: \`$at_envvar'" ;;
   1164 	esac
   1165 	at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
   1166 	# Export now, but save eval for later and for debug scripts.
   1167 	export $at_envvar
   1168 	as_fn_append at_debug_args " $at_envvar='$at_value'"
   1169 	;;
   1170 
   1171      *) $as_echo "$as_me: invalid option: $at_option" >&2
   1172 	$as_echo "Try \`$0 --help' for more information." >&2
   1173 	exit 1
   1174 	;;
   1175   esac
   1176 done
   1177 
   1178 # Verify our last option didn't require an argument
   1179 if test -n "$at_prev"; then :
   1180   as_fn_error $? "\`$at_prev' requires an argument"
   1181 fi
   1182 
   1183 # The file containing the suite.
   1184 at_suite_log=$at_dir/$as_me.log
   1185 
   1186 # Selected test groups.
   1187 if test -z "$at_groups$at_recheck"; then
   1188   at_groups=$at_groups_all
   1189 else
   1190   if test -n "$at_recheck" && test -r "$at_suite_log"; then
   1191     at_oldfails=`sed -n '
   1192       /^Failed tests:$/,/^Skipped tests:$/{
   1193 	s/^[ ]*\([1-9][0-9]*\):.*/\1/p
   1194       }
   1195       /^Unexpected passes:$/,/^## Detailed failed tests/{
   1196 	s/^[ ]*\([1-9][0-9]*\):.*/\1/p
   1197       }
   1198       /^## Detailed failed tests/q
   1199       ' "$at_suite_log"`
   1200     as_fn_append at_groups "$at_oldfails$as_nl"
   1201   fi
   1202   # Sort the tests, removing duplicates.
   1203   at_groups=`$as_echo "$at_groups" | sort -nu | sed '/^$/d'`
   1204 fi
   1205 
   1206 if test x"$at_color" = xalways \
   1207    || { test x"$at_color" = xauto && test -t 1; }; then
   1208   at_red=`printf '\033[0;31m'`
   1209   at_grn=`printf '\033[0;32m'`
   1210   at_lgn=`printf '\033[1;32m'`
   1211   at_blu=`printf '\033[1;34m'`
   1212   at_std=`printf '\033[m'`
   1213 else
   1214   at_red= at_grn= at_lgn= at_blu= at_std=
   1215 fi
   1216 
   1217 # Help message.
   1218 if $at_help_p; then
   1219   cat <<_ATEOF || at_write_fail=1
   1220 Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
   1221 
   1222 Run all the tests, or the selected TESTS, given by numeric ranges, and
   1223 save a detailed log file.  Upon failure, create debugging scripts.
   1224 
   1225 Do not change environment variables directly.  Instead, set them via
   1226 command line arguments.  Set \`AUTOTEST_PATH' to select the executables
   1227 to exercise.  Each relative directory is expanded as build and source
   1228 directories relative to the top level of this distribution.
   1229 E.g., from within the build directory /tmp/foo-1.0, invoking this:
   1230 
   1231   $ $0 AUTOTEST_PATH=bin
   1232 
   1233 is equivalent to the following, assuming the source directory is /src/foo-1.0:
   1234 
   1235   PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0
   1236 _ATEOF
   1237 cat <<_ATEOF || at_write_fail=1
   1238 
   1239 Operation modes:
   1240   -h, --help     print the help message, then exit
   1241   -V, --version  print version number, then exit
   1242   -c, --clean    remove all the files this test suite might create and exit
   1243   -l, --list     describes all the tests, or the selected TESTS
   1244 _ATEOF
   1245 cat <<_ATEOF || at_write_fail=1
   1246 
   1247 Execution tuning:
   1248   -C, --directory=DIR
   1249                  change to directory DIR before starting
   1250       --color[=never|auto|always]
   1251                  disable colored test results, or enable even without terminal
   1252   -j, --jobs[=N]
   1253                  Allow N jobs at once; infinite jobs with no arg (default 1)
   1254   -k, --keywords=KEYWORDS
   1255                  select the tests matching all the comma-separated KEYWORDS
   1256                  multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
   1257       --recheck  select all tests that failed or passed unexpectedly last time
   1258   -e, --errexit  abort as soon as a test fails; implies --debug
   1259   -v, --verbose  force more detailed output
   1260                  default for debugging scripts
   1261   -d, --debug    inhibit clean up and top-level logging
   1262                  default for debugging scripts
   1263   -x, --trace    enable tests shell tracing
   1264 _ATEOF
   1265 cat <<_ATEOF || at_write_fail=1
   1266 
   1267 Other options:
   1268 _ATEOF
   1269 
   1270 cat <<_ATEOF || at_write_fail=1
   1271 compile C parsers with the C++ compiler
   1272 _ATEOF
   1273 cat <<_ATEOF || at_write_fail=1
   1274 
   1275 Report bugs to <bug-bison@gnu.org>.
   1276 General help using GNU software: <http://www.gnu.org/gethelp/>.
   1277 _ATEOF
   1278   exit $at_write_fail
   1279 fi
   1280 
   1281 # List of tests.
   1282 if $at_list_p; then
   1283   cat <<_ATEOF || at_write_fail=1
   1284 GNU Bison 2.7 test suite test groups:
   1285 
   1286  NUM: FILE-NAME:LINE     TEST-GROUP-NAME
   1287       KEYWORDS
   1288 
   1289 _ATEOF
   1290   # Pass an empty line as separator between selected groups and help.
   1291   $as_echo "$at_groups$as_nl$as_nl$at_help_all" |
   1292     awk 'NF == 1 && FS != ";" {
   1293 	   selected[$ 1] = 1
   1294 	   next
   1295 	 }
   1296 	 /^$/ { FS = ";" }
   1297 	 NF > 0 {
   1298 	   if (selected[$ 1]) {
   1299 	     printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
   1300 	     if ($ 4) {
   1301 	       lmax = 79
   1302 	       indent = "     "
   1303 	       line = indent
   1304 	       len = length (line)
   1305 	       n = split ($ 4, a, " ")
   1306 	       for (i = 1; i <= n; i++) {
   1307 		 l = length (a[i]) + 1
   1308 		 if (i > 1 && len + l > lmax) {
   1309 		   print line
   1310 		   line = indent " " a[i]
   1311 		   len = length (line)
   1312 		 } else {
   1313 		   line = line " " a[i]
   1314 		   len += l
   1315 		 }
   1316 	       }
   1317 	       if (n)
   1318 		 print line
   1319 	     }
   1320 	   }
   1321 	 }' || at_write_fail=1
   1322   exit $at_write_fail
   1323 fi
   1324 if $at_version_p; then
   1325   $as_echo "$as_me (GNU Bison 2.7)" &&
   1326   cat <<\_ATEOF || at_write_fail=1
   1327 
   1328 Copyright (C) 2012 Free Software Foundation, Inc.
   1329 This test suite is free software; the Free Software Foundation gives
   1330 unlimited permission to copy, distribute and modify it.
   1331 _ATEOF
   1332   exit $at_write_fail
   1333 fi
   1334 
   1335 # Should we print banners?  Yes if more than one test is run.
   1336 case $at_groups in #(
   1337   *$as_nl* )
   1338       at_print_banners=: ;; #(
   1339   * ) at_print_banners=false ;;
   1340 esac
   1341 # Text for banner N, set to a single space once printed.
   1342 # Banner 1. input.at:18
   1343 # Category starts at test group 1.
   1344 at_banner_text_1="Input Processing."
   1345 # Banner 2. named-refs.at:19
   1346 # Category starts at test group 39.
   1347 at_banner_text_2="Named references tests."
   1348 # Banner 3. output.at:18
   1349 # Category starts at test group 51.
   1350 at_banner_text_3="Output file names."
   1351 # Banner 4. skeletons.at:18
   1352 # Category starts at test group 92.
   1353 at_banner_text_4="Skeleton Support."
   1354 # Banner 5. sets.at:59
   1355 # Category starts at test group 98.
   1356 at_banner_text_5="Grammar Sets (Firsts etc.)."
   1357 # Banner 6. reduce.at:18
   1358 # Category starts at test group 102.
   1359 at_banner_text_6="Grammar Reduction."
   1360 # Banner 7. synclines.at:19
   1361 # Category starts at test group 128.
   1362 at_banner_text_7="User Actions."
   1363 # Banner 8. headers.at:19
   1364 # Category starts at test group 138.
   1365 at_banner_text_8="Parser Headers."
   1366 # Banner 9. actions.at:18
   1367 # Category starts at test group 144.
   1368 at_banner_text_9="User Actions."
   1369 # Banner 10. conflicts.at:19
   1370 # Category starts at test group 181.
   1371 at_banner_text_10="Conflicts."
   1372 # Banner 11. calc.at:588
   1373 # Category starts at test group 200.
   1374 at_banner_text_11="Simple LALR(1) Calculator."
   1375 # Banner 12. calc.at:628
   1376 # Category starts at test group 218.
   1377 at_banner_text_12="Simple GLR Calculator."
   1378 # Banner 13. calc.at:667
   1379 # Category starts at test group 235.
   1380 at_banner_text_13="Simple LALR(1) C++ Calculator."
   1381 # Banner 14. calc.at:696
   1382 # Category starts at test group 244.
   1383 at_banner_text_14="Simple GLR C++ Calculator."
   1384 # Banner 15. torture.at:19
   1385 # Category starts at test group 254.
   1386 at_banner_text_15="Torture Tests."
   1387 # Banner 16. existing.at:19
   1388 # Category starts at test group 259.
   1389 at_banner_text_16="Existing Grammars."
   1390 # Banner 17. regression.at:18
   1391 # Category starts at test group 268.
   1392 at_banner_text_17="Regression tests."
   1393 # Banner 18. c++.at:19
   1394 # Category starts at test group 301.
   1395 at_banner_text_18="C++ Features."
   1396 # Banner 19. java.at:18
   1397 # Category starts at test group 307.
   1398 at_banner_text_19="Java Calculator."
   1399 # Banner 20. java.at:382
   1400 # Category starts at test group 315.
   1401 at_banner_text_20="Java Parameters."
   1402 # Banner 21. cxx-type.at:18
   1403 # Category starts at test group 322.
   1404 at_banner_text_21="C++ Type Syntax (GLR)."
   1405 # Banner 22. glr-regression.at:19
   1406 # Category starts at test group 331.
   1407 at_banner_text_22="GLR Regression Tests"
   1408 # Banner 23. push.at:18
   1409 # Category starts at test group 350.
   1410 at_banner_text_23="Push Parsing Tests"
   1411 
   1412 # Take any -C into account.
   1413 if $at_change_dir ; then
   1414   test x != "x$at_dir" && cd "$at_dir" \
   1415     || as_fn_error $? "unable to change directory"
   1416   at_dir=`pwd`
   1417 fi
   1418 
   1419 # Load the config files for any default variable assignments.
   1420 for at_file in atconfig atlocal
   1421 do
   1422   test -r $at_file || continue
   1423   . ./$at_file || as_fn_error $? "invalid content: $at_file"
   1424 done
   1425 
   1426 # Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
   1427 : "${at_top_build_prefix=$at_top_builddir}"
   1428 
   1429 # Perform any assignments requested during argument parsing.
   1430 eval "$at_debug_args"
   1431 
   1432 # atconfig delivers names relative to the directory the test suite is
   1433 # in, but the groups themselves are run in testsuite-dir/group-dir.
   1434 if test -n "$at_top_srcdir"; then
   1435   builddir=../..
   1436   for at_dir_var in srcdir top_srcdir top_build_prefix
   1437   do
   1438     eval at_val=\$at_$at_dir_var
   1439     case $at_val in
   1440       [\\/$]* | ?:[\\/]* ) at_prefix= ;;
   1441       *) at_prefix=../../ ;;
   1442     esac
   1443     eval "$at_dir_var=\$at_prefix\$at_val"
   1444   done
   1445 fi
   1446 
   1447 ## -------------------- ##
   1448 ## Directory structure. ##
   1449 ## -------------------- ##
   1450 
   1451 # This is the set of directories and files used by this script
   1452 # (non-literals are capitalized):
   1453 #
   1454 # TESTSUITE         - the testsuite
   1455 # TESTSUITE.log     - summarizes the complete testsuite run
   1456 # TESTSUITE.dir/    - created during a run, remains after -d or failed test
   1457 # + at-groups/      - during a run: status of all groups in run
   1458 # | + NNN/          - during a run: meta-data about test group NNN
   1459 # | | + check-line  - location (source file and line) of current AT_CHECK
   1460 # | | + status      - exit status of current AT_CHECK
   1461 # | | + stdout      - stdout of current AT_CHECK
   1462 # | | + stder1      - stderr, including trace
   1463 # | | + stderr      - stderr, with trace filtered out
   1464 # | | + test-source - portion of testsuite that defines group
   1465 # | | + times       - timestamps for computing duration
   1466 # | | + pass        - created if group passed
   1467 # | | + xpass       - created if group xpassed
   1468 # | | + fail        - created if group failed
   1469 # | | + xfail       - created if group xfailed
   1470 # | | + skip        - created if group skipped
   1471 # + at-stop         - during a run: end the run if this file exists
   1472 # + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction
   1473 # + 0..NNN/         - created for each group NNN, remains after -d or failed test
   1474 # | + TESTSUITE.log - summarizes the group results
   1475 # | + ...           - files created during the group
   1476 
   1477 # The directory the whole suite works in.
   1478 # Should be absolute to let the user `cd' at will.
   1479 at_suite_dir=$at_dir/$as_me.dir
   1480 # The file containing the suite ($at_dir might have changed since earlier).
   1481 at_suite_log=$at_dir/$as_me.log
   1482 # The directory containing helper files per test group.
   1483 at_helper_dir=$at_suite_dir/at-groups
   1484 # Stop file: if it exists, do not start new jobs.
   1485 at_stop_file=$at_suite_dir/at-stop
   1486 # The fifo used for the job dispatcher.
   1487 at_job_fifo=$at_suite_dir/at-job-fifo
   1488 
   1489 if $at_clean; then
   1490   test -d "$at_suite_dir" &&
   1491     find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
   1492   rm -f -r "$at_suite_dir" "$at_suite_log"
   1493   exit $?
   1494 fi
   1495 
   1496 # Don't take risks: use only absolute directories in PATH.
   1497 #
   1498 # For stand-alone test suites (ie. atconfig was not found),
   1499 # AUTOTEST_PATH is relative to `.'.
   1500 #
   1501 # For embedded test suites, AUTOTEST_PATH is relative to the top level
   1502 # of the package.  Then expand it into build/src parts, since users
   1503 # may create executables in both places.
   1504 AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"`
   1505 at_path=
   1506 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   1507 for as_dir in $AUTOTEST_PATH $PATH
   1508 do
   1509   IFS=$as_save_IFS
   1510   test -z "$as_dir" && as_dir=.
   1511     test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR
   1512 case $as_dir in
   1513   [\\/]* | ?:[\\/]* )
   1514     as_fn_append at_path "$as_dir"
   1515     ;;
   1516   * )
   1517     if test -z "$at_top_build_prefix"; then
   1518       # Stand-alone test suite.
   1519       as_fn_append at_path "$as_dir"
   1520     else
   1521       # Embedded test suite.
   1522       as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR"
   1523       as_fn_append at_path "$at_top_srcdir/$as_dir"
   1524     fi
   1525     ;;
   1526 esac
   1527   done
   1528 IFS=$as_save_IFS
   1529 
   1530 
   1531 # Now build and simplify PATH.
   1532 #
   1533 # There might be directories that don't exist, but don't redirect
   1534 # builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
   1535 at_new_path=
   1536 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   1537 for as_dir in $at_path
   1538 do
   1539   IFS=$as_save_IFS
   1540   test -z "$as_dir" && as_dir=.
   1541     test -d "$as_dir" || continue
   1542 case $as_dir in
   1543   [\\/]* | ?:[\\/]* ) ;;
   1544   * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;;
   1545 esac
   1546 case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in
   1547   *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;;
   1548   $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;;
   1549   *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;;
   1550 esac
   1551   done
   1552 IFS=$as_save_IFS
   1553 
   1554 PATH=$at_new_path
   1555 export PATH
   1556 
   1557 # Setting up the FDs.
   1558 
   1559 
   1560 
   1561 # 5 is the log file.  Not to be overwritten if `-d'.
   1562 if $at_debug_p; then
   1563   at_suite_log=/dev/null
   1564 else
   1565   : >"$at_suite_log"
   1566 fi
   1567 exec 5>>"$at_suite_log"
   1568 
   1569 # Banners and logs.
   1570 $as_echo "## ------------------------- ##
   1571 ## GNU Bison 2.7 test suite. ##
   1572 ## ------------------------- ##"
   1573 {
   1574   $as_echo "## ------------------------- ##
   1575 ## GNU Bison 2.7 test suite. ##
   1576 ## ------------------------- ##"
   1577   echo
   1578 
   1579   $as_echo "$as_me: command line was:"
   1580   $as_echo "  \$ $0 $at_cli_args"
   1581   echo
   1582 
   1583   # If ChangeLog exists, list a few lines in case it might help determining
   1584   # the exact version.
   1585   if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then
   1586     $as_echo "## ---------- ##
   1587 ## ChangeLog. ##
   1588 ## ---------- ##"
   1589     echo
   1590     sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog"
   1591     echo
   1592   fi
   1593 
   1594   {
   1595 cat <<_ASUNAME
   1596 ## --------- ##
   1597 ## Platform. ##
   1598 ## --------- ##
   1599 
   1600 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
   1601 uname -m = `(uname -m) 2>/dev/null || echo unknown`
   1602 uname -r = `(uname -r) 2>/dev/null || echo unknown`
   1603 uname -s = `(uname -s) 2>/dev/null || echo unknown`
   1604 uname -v = `(uname -v) 2>/dev/null || echo unknown`
   1605 
   1606 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
   1607 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
   1608 
   1609 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
   1610 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
   1611 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
   1612 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
   1613 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
   1614 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
   1615 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
   1616 
   1617 _ASUNAME
   1618 
   1619 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   1620 for as_dir in $PATH
   1621 do
   1622   IFS=$as_save_IFS
   1623   test -z "$as_dir" && as_dir=.
   1624     $as_echo "PATH: $as_dir"
   1625   done
   1626 IFS=$as_save_IFS
   1627 
   1628 }
   1629   echo
   1630 
   1631   # Contents of the config files.
   1632   for at_file in atconfig atlocal
   1633   do
   1634     test -r $at_file || continue
   1635     $as_echo "$as_me: $at_file:"
   1636     sed 's/^/| /' $at_file
   1637     echo
   1638   done
   1639 } >&5
   1640 
   1641 at_save_special_files ()
   1642 {
   1643   for at_save_file in stderr experr expout
   1644   do
   1645     test ! -f at-bison-check-$at_save_file.bak ||
   1646       as_fn_error 1 "fatal error: back-up on top of a back-up"
   1647     test ! -f $at_save_file || mv $at_save_file at-bison-check-$at_save_file.bak
   1648   done
   1649 }
   1650 
   1651 at_restore_special_files ()
   1652 {
   1653   for at_save_file in stderr experr expout
   1654   do
   1655     test ! -f at-bison-check-$at_save_file.bak ||
   1656       mv at-bison-check-$at_save_file.bak $at_save_file
   1657   done
   1658 }
   1659 
   1660 
   1661 ## ------------------------- ##
   1662 ## Autotest shell functions. ##
   1663 ## ------------------------- ##
   1664 
   1665 # at_fn_banner NUMBER
   1666 # -------------------
   1667 # Output banner NUMBER, provided the testsuite is running multiple groups and
   1668 # this particular banner has not yet been printed.
   1669 at_fn_banner ()
   1670 {
   1671   $at_print_banners || return 0
   1672   eval at_banner_text=\$at_banner_text_$1
   1673   test "x$at_banner_text" = "x " && return 0
   1674   eval "at_banner_text_$1=\" \""
   1675   if test -z "$at_banner_text"; then
   1676     $at_first || echo
   1677   else
   1678     $as_echo "$as_nl$at_banner_text$as_nl"
   1679   fi
   1680 } # at_fn_banner
   1681 
   1682 # at_fn_check_prepare_notrace REASON LINE
   1683 # ---------------------------------------
   1684 # Perform AT_CHECK preparations for the command at LINE for an untraceable
   1685 # command; REASON is the reason for disabling tracing.
   1686 at_fn_check_prepare_notrace ()
   1687 {
   1688   $at_trace_echo "Not enabling shell tracing (command contains $1)"
   1689   $as_echo "$2" >"$at_check_line_file"
   1690   at_check_trace=: at_check_filter=:
   1691   : >"$at_stdout"; : >"$at_stderr"
   1692 }
   1693 
   1694 # at_fn_check_prepare_trace LINE
   1695 # ------------------------------
   1696 # Perform AT_CHECK preparations for the command at LINE for a traceable
   1697 # command.
   1698 at_fn_check_prepare_trace ()
   1699 {
   1700   $as_echo "$1" >"$at_check_line_file"
   1701   at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace
   1702   : >"$at_stdout"; : >"$at_stderr"
   1703 }
   1704 
   1705 # at_fn_check_prepare_dynamic COMMAND LINE
   1706 # ----------------------------------------
   1707 # Decide if COMMAND at LINE is traceable at runtime, and call the appropriate
   1708 # preparation function.
   1709 at_fn_check_prepare_dynamic ()
   1710 {
   1711   case $1 in
   1712     *$as_nl*)
   1713       at_fn_check_prepare_notrace 'an embedded newline' "$2" ;;
   1714     *)
   1715       at_fn_check_prepare_trace "$2" ;;
   1716   esac
   1717 }
   1718 
   1719 # at_fn_filter_trace
   1720 # ------------------
   1721 # Remove the lines in the file "$at_stderr" generated by "set -x" and print
   1722 # them to stderr.
   1723 at_fn_filter_trace ()
   1724 {
   1725   mv "$at_stderr" "$at_stder1"
   1726   grep '^ *+' "$at_stder1" >&2
   1727   grep -v '^ *+' "$at_stder1" >"$at_stderr"
   1728 }
   1729 
   1730 # at_fn_log_failure FILE-LIST
   1731 # ---------------------------
   1732 # Copy the files in the list on stdout with a "> " prefix, and exit the shell
   1733 # with a failure exit code.
   1734 at_fn_log_failure ()
   1735 {
   1736   for file
   1737     do $as_echo "$file:"; sed 's/^/> /' "$file"; done
   1738   echo 1 > "$at_status_file"
   1739   exit 1
   1740 }
   1741 
   1742 # at_fn_check_skip EXIT-CODE LINE
   1743 # -------------------------------
   1744 # Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit
   1745 # the test group subshell with that same exit code. Use LINE in any report
   1746 # about test failure.
   1747 at_fn_check_skip ()
   1748 {
   1749   case $1 in
   1750     99) echo 99 > "$at_status_file"; at_failed=:
   1751 	$as_echo "$2: hard failure"; exit 99;;
   1752     77) echo 77 > "$at_status_file"; exit 77;;
   1753   esac
   1754 }
   1755 
   1756 # at_fn_check_status EXPECTED EXIT-CODE LINE
   1757 # ------------------------------------------
   1758 # Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing.
   1759 # Otherwise, if it is 77 or 99, exit the test group subshell with that same
   1760 # exit code; if it is anything else print an error message referring to LINE,
   1761 # and fail the test.
   1762 at_fn_check_status ()
   1763 {
   1764   case $2 in
   1765     $1 ) ;;
   1766     77) echo 77 > "$at_status_file"; exit 77;;
   1767     99) echo 99 > "$at_status_file"; at_failed=:
   1768 	$as_echo "$3: hard failure"; exit 99;;
   1769     *) $as_echo "$3: exit code was $2, expected $1"
   1770       at_failed=:;;
   1771   esac
   1772 }
   1773 
   1774 # at_fn_diff_devnull FILE
   1775 # -----------------------
   1776 # Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff
   1777 # invocations.
   1778 at_fn_diff_devnull ()
   1779 {
   1780   test -s "$1" || return 0
   1781   $at_diff "$at_devnull" "$1"
   1782 }
   1783 
   1784 # at_fn_test NUMBER
   1785 # -----------------
   1786 # Parse out test NUMBER from the tail of this file.
   1787 at_fn_test ()
   1788 {
   1789   eval at_sed=\$at_sed$1
   1790   sed "$at_sed" "$at_myself" > "$at_test_source"
   1791 }
   1792 
   1793 # at_fn_create_debugging_script
   1794 # -----------------------------
   1795 # Create the debugging script $at_group_dir/run which will reproduce the
   1796 # current test group.
   1797 at_fn_create_debugging_script ()
   1798 {
   1799   {
   1800     echo "#! /bin/sh" &&
   1801     echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' &&
   1802     $as_echo "cd '$at_dir'" &&
   1803     $as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" &&
   1804     echo 'exit 1'
   1805   } >"$at_group_dir/run" &&
   1806   chmod +x "$at_group_dir/run"
   1807 }
   1808 
   1809 ## -------------------------------- ##
   1810 ## End of autotest shell functions. ##
   1811 ## -------------------------------- ##
   1812 {
   1813   $as_echo "## ---------------- ##
   1814 ## Tested programs. ##
   1815 ## ---------------- ##"
   1816   echo
   1817 } >&5
   1818 
   1819 # Report what programs are being tested.
   1820 for at_program in : $at_tested
   1821 do
   1822   test "$at_program" = : && continue
   1823   case $at_program in
   1824     [\\/]* | ?:[\\/]* ) $at_program_=$at_program ;;
   1825     * )
   1826     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   1827 for as_dir in $PATH
   1828 do
   1829   IFS=$as_save_IFS
   1830   test -z "$as_dir" && as_dir=.
   1831     test -f "$as_dir/$at_program" && break
   1832   done
   1833 IFS=$as_save_IFS
   1834 
   1835     at_program_=$as_dir/$at_program ;;
   1836   esac
   1837   if test -f "$at_program_"; then
   1838     {
   1839       $as_echo "$at_srcdir/local.at:913: $at_program_ --version"
   1840       "$at_program_" --version </dev/null
   1841       echo
   1842     } >&5 2>&1
   1843   else
   1844     as_fn_error $? "cannot find $at_program" "$LINENO" 5
   1845   fi
   1846 done
   1847 
   1848 {
   1849   $as_echo "## ------------------ ##
   1850 ## Running the tests. ##
   1851 ## ------------------ ##"
   1852 } >&5
   1853 
   1854 at_start_date=`date`
   1855 at_start_time=`date +%s 2>/dev/null`
   1856 $as_echo "$as_me: starting at: $at_start_date" >&5
   1857 
   1858 # Create the master directory if it doesn't already exist.
   1859 as_dir="$at_suite_dir"; as_fn_mkdir_p ||
   1860   as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5
   1861 
   1862 # Can we diff with `/dev/null'?  DU 5.0 refuses.
   1863 if diff /dev/null /dev/null >/dev/null 2>&1; then
   1864   at_devnull=/dev/null
   1865 else
   1866   at_devnull=$at_suite_dir/devnull
   1867   >"$at_devnull"
   1868 fi
   1869 
   1870 # Use `diff -u' when possible.
   1871 if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff"
   1872 then
   1873   at_diff='diff -u'
   1874 else
   1875   at_diff=diff
   1876 fi
   1877 
   1878 # Get the last needed group.
   1879 for at_group in : $at_groups; do :; done
   1880 
   1881 # Extract the start and end lines of each test group at the tail
   1882 # of this file
   1883 awk '
   1884 BEGIN { FS="" }
   1885 /^#AT_START_/ {
   1886   start = NR
   1887 }
   1888 /^#AT_STOP_/ {
   1889   test = substr ($ 0, 10)
   1890   print "at_sed" test "=\"1," start "d;" (NR-1) "q\""
   1891   if (test == "'"$at_group"'") exit
   1892 }' "$at_myself" > "$at_suite_dir/at-source-lines" &&
   1893 . "$at_suite_dir/at-source-lines" ||
   1894   as_fn_error $? "cannot create test line number cache" "$LINENO" 5
   1895 rm -f "$at_suite_dir/at-source-lines"
   1896 
   1897 # Set number of jobs for `-j'; avoid more jobs than test groups.
   1898 set X $at_groups; shift; at_max_jobs=$#
   1899 if test $at_max_jobs -eq 0; then
   1900   at_jobs=1
   1901 fi
   1902 if test $at_jobs -ne 1 &&
   1903    { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then
   1904   at_jobs=$at_max_jobs
   1905 fi
   1906 
   1907 # If parallel mode, don't output banners, don't split summary lines.
   1908 if test $at_jobs -ne 1; then
   1909   at_print_banners=false
   1910   at_quiet=:
   1911 fi
   1912 
   1913 # Set up helper dirs.
   1914 rm -rf "$at_helper_dir" &&
   1915 mkdir "$at_helper_dir" &&
   1916 cd "$at_helper_dir" &&
   1917 { test -z "$at_groups" || mkdir $at_groups; } ||
   1918 as_fn_error $? "testsuite directory setup failed" "$LINENO" 5
   1919 
   1920 # Functions for running a test group.  We leave the actual
   1921 # test group execution outside of a shell function in order
   1922 # to avoid hitting zsh 4.x exit status bugs.
   1923 
   1924 # at_fn_group_prepare
   1925 # -------------------
   1926 # Prepare for running a test group.
   1927 at_fn_group_prepare ()
   1928 {
   1929   # The directory for additional per-group helper files.
   1930   at_job_dir=$at_helper_dir/$at_group
   1931   # The file containing the location of the last AT_CHECK.
   1932   at_check_line_file=$at_job_dir/check-line
   1933   # The file containing the exit status of the last command.
   1934   at_status_file=$at_job_dir/status
   1935   # The files containing the output of the tested commands.
   1936   at_stdout=$at_job_dir/stdout
   1937   at_stder1=$at_job_dir/stder1
   1938   at_stderr=$at_job_dir/stderr
   1939   # The file containing the code for a test group.
   1940   at_test_source=$at_job_dir/test-source
   1941   # The file containing dates.
   1942   at_times_file=$at_job_dir/times
   1943 
   1944   # Be sure to come back to the top test directory.
   1945   cd "$at_suite_dir"
   1946 
   1947   # Clearly separate the test groups when verbose.
   1948   $at_first || $at_verbose echo
   1949 
   1950   at_group_normalized=$at_group
   1951 
   1952   eval 'while :; do
   1953     case $at_group_normalized in #(
   1954     '"$at_format"'*) break;;
   1955     esac
   1956     at_group_normalized=0$at_group_normalized
   1957   done'
   1958 
   1959 
   1960   # Create a fresh directory for the next test group, and enter.
   1961   # If one already exists, the user may have invoked ./run from
   1962   # within that directory; we remove the contents, but not the
   1963   # directory itself, so that we aren't pulling the rug out from
   1964   # under the shell's notion of the current directory.
   1965   at_group_dir=$at_suite_dir/$at_group_normalized
   1966   at_group_log=$at_group_dir/$as_me.log
   1967   if test -d "$at_group_dir"; then
   1968   find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \;
   1969   rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??*
   1970 fi ||
   1971     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5
   1972 $as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;}
   1973   # Be tolerant if the above `rm' was not able to remove the directory.
   1974   as_dir="$at_group_dir"; as_fn_mkdir_p
   1975 
   1976   echo 0 > "$at_status_file"
   1977 
   1978   # In verbose mode, append to the log file *and* show on
   1979   # the standard output; in quiet mode only write to the log.
   1980   if test -z "$at_verbose"; then
   1981     at_tee_pipe='tee -a "$at_group_log"'
   1982   else
   1983     at_tee_pipe='cat >> "$at_group_log"'
   1984   fi
   1985 }
   1986 
   1987 # at_fn_group_banner ORDINAL LINE DESC PAD [BANNER]
   1988 # -------------------------------------------------
   1989 # Declare the test group ORDINAL, located at LINE with group description DESC,
   1990 # and residing under BANNER. Use PAD to align the status column.
   1991 at_fn_group_banner ()
   1992 {
   1993   at_setup_line="$2"
   1994   test -n "$5" && at_fn_banner $5
   1995   at_desc="$3"
   1996   case $1 in
   1997     [0-9])      at_desc_line="  $1: ";;
   1998     [0-9][0-9]) at_desc_line=" $1: " ;;
   1999     *)          at_desc_line="$1: "  ;;
   2000   esac
   2001   as_fn_append at_desc_line "$3$4"
   2002   $at_quiet $as_echo_n "$at_desc_line"
   2003   echo "#                             -*- compilation -*-" >> "$at_group_log"
   2004 }
   2005 
   2006 # at_fn_group_postprocess
   2007 # -----------------------
   2008 # Perform cleanup after running a test group.
   2009 at_fn_group_postprocess ()
   2010 {
   2011   # Be sure to come back to the suite directory, in particular
   2012   # since below we might `rm' the group directory we are in currently.
   2013   cd "$at_suite_dir"
   2014 
   2015   if test ! -f "$at_check_line_file"; then
   2016     sed "s/^ */$as_me: WARNING: /" <<_ATEOF
   2017       A failure happened in a test group before any test could be
   2018       run. This means that test suite is improperly designed.  Please
   2019       report this failure to <bug-bison@gnu.org>.
   2020 _ATEOF
   2021     $as_echo "$at_setup_line" >"$at_check_line_file"
   2022     at_status=99
   2023   fi
   2024   $at_verbose $as_echo_n "$at_group. $at_setup_line: "
   2025   $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log"
   2026   case $at_xfail:$at_status in
   2027     yes:0)
   2028 	at_msg="UNEXPECTED PASS"
   2029 	at_res=xpass
   2030 	at_errexit=$at_errexit_p
   2031 	at_color=$at_red
   2032 	;;
   2033     no:0)
   2034 	at_msg="ok"
   2035 	at_res=pass
   2036 	at_errexit=false
   2037 	at_color=$at_grn
   2038 	;;
   2039     *:77)
   2040 	at_msg='skipped ('`cat "$at_check_line_file"`')'
   2041 	at_res=skip
   2042 	at_errexit=false
   2043 	at_color=$at_blu
   2044 	;;
   2045     no:* | *:99)
   2046 	at_msg='FAILED ('`cat "$at_check_line_file"`')'
   2047 	at_res=fail
   2048 	at_errexit=$at_errexit_p
   2049 	at_color=$at_red
   2050 	;;
   2051     yes:*)
   2052 	at_msg='expected failure ('`cat "$at_check_line_file"`')'
   2053 	at_res=xfail
   2054 	at_errexit=false
   2055 	at_color=$at_lgn
   2056 	;;
   2057   esac
   2058   echo "$at_res" > "$at_job_dir/$at_res"
   2059   # In parallel mode, output the summary line only afterwards.
   2060   if test $at_jobs -ne 1 && test -n "$at_verbose"; then
   2061     $as_echo "$at_desc_line $at_color$at_msg$at_std"
   2062   else
   2063     # Make sure there is a separator even with long titles.
   2064     $as_echo " $at_color$at_msg$at_std"
   2065   fi
   2066   at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
   2067   case $at_status in
   2068     0|77)
   2069       # $at_times_file is only available if the group succeeded.
   2070       # We're not including the group log, so the success message
   2071       # is written in the global log separately.  But we also
   2072       # write to the group log in case they're using -d.
   2073       if test -f "$at_times_file"; then
   2074 	at_log_msg="$at_log_msg     ("`sed 1d "$at_times_file"`')'
   2075 	rm -f "$at_times_file"
   2076       fi
   2077       $as_echo "$at_log_msg" >> "$at_group_log"
   2078       $as_echo "$at_log_msg" >&5
   2079 
   2080       # Cleanup the group directory, unless the user wants the files
   2081       # or the success was unexpected.
   2082       if $at_debug_p || test $at_res = xpass; then
   2083 	at_fn_create_debugging_script
   2084 	if test $at_res = xpass && $at_errexit; then
   2085 	  echo stop > "$at_stop_file"
   2086 	fi
   2087       else
   2088 	if test -d "$at_group_dir"; then
   2089 	  find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
   2090 	  rm -fr "$at_group_dir"
   2091 	fi
   2092 	rm -f "$at_test_source"
   2093       fi
   2094       ;;
   2095     *)
   2096       # Upon failure, include the log into the testsuite's global
   2097       # log.  The failure message is written in the group log.  It
   2098       # is later included in the global log.
   2099       $as_echo "$at_log_msg" >> "$at_group_log"
   2100 
   2101       # Upon failure, keep the group directory for autopsy, and create
   2102       # the debugging script.  With -e, do not start any further tests.
   2103       at_fn_create_debugging_script
   2104       if $at_errexit; then
   2105 	echo stop > "$at_stop_file"
   2106       fi
   2107       ;;
   2108   esac
   2109 }
   2110 
   2111 
   2112 ## ------------ ##
   2113 ## Driver loop. ##
   2114 ## ------------ ##
   2115 
   2116 
   2117 if (set -m && set +m && set +b) >/dev/null 2>&1; then
   2118   set +b
   2119   at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
   2120 else
   2121   at_job_control_on=: at_job_control_off=: at_job_group=
   2122 fi
   2123 
   2124 for at_signal in 1 2 15; do
   2125   trap 'set +x; set +e
   2126 	$at_job_control_off
   2127 	at_signal='"$at_signal"'
   2128 	echo stop > "$at_stop_file"
   2129 	trap "" $at_signal
   2130 	at_pgids=
   2131 	for at_pgid in `jobs -p 2>/dev/null`; do
   2132 	  at_pgids="$at_pgids $at_job_group$at_pgid"
   2133 	done
   2134 	test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null
   2135 	wait
   2136 	if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then
   2137 	  echo >&2
   2138 	fi
   2139 	at_signame=`kill -l $at_signal 2>&1 || echo $at_signal`
   2140 	set x $at_signame
   2141 	test 0 -gt 2 && at_signame=$at_signal
   2142 	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5
   2143 $as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;}
   2144 	as_fn_arith 128 + $at_signal && exit_status=$as_val
   2145 	as_fn_exit $exit_status' $at_signal
   2146 done
   2147 
   2148 rm -f "$at_stop_file"
   2149 at_first=:
   2150 
   2151 if test $at_jobs -ne 1 &&
   2152      rm -f "$at_job_fifo" &&
   2153      test -n "$at_job_group" &&
   2154      ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null
   2155 then
   2156   # FIFO job dispatcher.
   2157 
   2158   trap 'at_pids=
   2159 	for at_pid in `jobs -p`; do
   2160 	  at_pids="$at_pids $at_job_group$at_pid"
   2161 	done
   2162 	if test -n "$at_pids"; then
   2163 	  at_sig=TSTP
   2164 	  test "${TMOUT+set}" = set && at_sig=STOP
   2165 	  kill -$at_sig $at_pids 2>/dev/null
   2166 	fi
   2167 	kill -STOP $$
   2168 	test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP
   2169 
   2170   echo
   2171   # Turn jobs into a list of numbers, starting from 1.
   2172   at_joblist=`$as_echo "$at_groups" | sed -n 1,${at_jobs}p`
   2173 
   2174   set X $at_joblist
   2175   shift
   2176   for at_group in $at_groups; do
   2177     $at_job_control_on 2>/dev/null
   2178     (
   2179       # Start one test group.
   2180       $at_job_control_off
   2181       if $at_first; then
   2182 	exec 7>"$at_job_fifo"
   2183       else
   2184 	exec 6<&-
   2185       fi
   2186       trap 'set +x; set +e
   2187 	    trap "" PIPE
   2188 	    echo stop > "$at_stop_file"
   2189 	    echo >&7
   2190 	    as_fn_exit 141' PIPE
   2191       at_fn_group_prepare
   2192       if cd "$at_group_dir" &&
   2193 	 at_fn_test $at_group &&
   2194 	 . "$at_test_source"
   2195       then :; else
   2196 	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
   2197 $as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
   2198 	at_failed=:
   2199       fi
   2200       at_fn_group_postprocess
   2201       echo >&7
   2202     ) &
   2203     $at_job_control_off
   2204     if $at_first; then
   2205       at_first=false
   2206       exec 6<"$at_job_fifo" 7>"$at_job_fifo"
   2207     fi
   2208     shift # Consume one token.
   2209     if test $# -gt 0; then :; else
   2210       read at_token <&6 || break
   2211       set x $*
   2212     fi
   2213     test -f "$at_stop_file" && break
   2214   done
   2215   exec 7>&-
   2216   # Read back the remaining ($at_jobs - 1) tokens.
   2217   set X $at_joblist
   2218   shift
   2219   if test $# -gt 0; then
   2220     shift
   2221     for at_job
   2222     do
   2223       read at_token
   2224     done <&6
   2225   fi
   2226   exec 6<&-
   2227   wait
   2228 else
   2229   # Run serially, avoid forks and other potential surprises.
   2230   for at_group in $at_groups; do
   2231     at_fn_group_prepare
   2232     if cd "$at_group_dir" &&
   2233        at_fn_test $at_group &&
   2234        . "$at_test_source"; then :; else
   2235       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
   2236 $as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
   2237       at_failed=:
   2238     fi
   2239     at_fn_group_postprocess
   2240     test -f "$at_stop_file" && break
   2241     at_first=false
   2242   done
   2243 fi
   2244 
   2245 # Wrap up the test suite with summary statistics.
   2246 cd "$at_helper_dir"
   2247 
   2248 # Use ?..???? when the list must remain sorted, the faster * otherwise.
   2249 at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'`
   2250 at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'`
   2251 at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'`
   2252 at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do
   2253 		 echo $f; done | sed '/?/d; s,/xpass,,'`
   2254 at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do
   2255 		echo $f; done | sed '/?/d; s,/fail,,'`
   2256 
   2257 set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list
   2258 shift; at_group_count=$#
   2259 set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$*
   2260 set X $at_xfail_list; shift; at_xfail_count=$#
   2261 set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$*
   2262 set X $at_skip_list; shift; at_skip_count=$#
   2263 
   2264 as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val
   2265 as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val
   2266 as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val
   2267 
   2268 # Back to the top directory.
   2269 cd "$at_dir"
   2270 rm -rf "$at_helper_dir"
   2271 
   2272 # Compute the duration of the suite.
   2273 at_stop_date=`date`
   2274 at_stop_time=`date +%s 2>/dev/null`
   2275 $as_echo "$as_me: ending at: $at_stop_date" >&5
   2276 case $at_start_time,$at_stop_time in
   2277   [0-9]*,[0-9]*)
   2278     as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val
   2279     as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val
   2280     as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val
   2281     as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val
   2282     as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val
   2283     at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
   2284     $as_echo "$as_me: test suite duration: $at_duration" >&5
   2285     ;;
   2286 esac
   2287 
   2288 echo
   2289 $as_echo "## ------------- ##
   2290 ## Test results. ##
   2291 ## ------------- ##"
   2292 echo
   2293 {
   2294   echo
   2295   $as_echo "## ------------- ##
   2296 ## Test results. ##
   2297 ## ------------- ##"
   2298   echo
   2299 } >&5
   2300 
   2301 if test $at_run_count = 1; then
   2302   at_result="1 test"
   2303   at_were=was
   2304 else
   2305   at_result="$at_run_count tests"
   2306   at_were=were
   2307 fi
   2308 if $at_errexit_p && test $at_unexpected_count != 0; then
   2309   if test $at_xpass_count = 1; then
   2310     at_result="$at_result $at_were run, one passed"
   2311   else
   2312     at_result="$at_result $at_were run, one failed"
   2313   fi
   2314   at_result="$at_result unexpectedly and inhibited subsequent tests."
   2315   at_color=$at_red
   2316 else
   2317   # Don't you just love exponential explosion of the number of cases?
   2318   at_color=$at_red
   2319   case $at_xpass_count:$at_fail_count:$at_xfail_count in
   2320     # So far, so good.
   2321     0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;;
   2322     0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;;
   2323 
   2324     # Some unexpected failures
   2325     0:*:0) at_result="$at_result $at_were run,
   2326 $at_fail_count failed unexpectedly." ;;
   2327 
   2328     # Some failures, both expected and unexpected
   2329     0:*:1) at_result="$at_result $at_were run,
   2330 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
   2331     0:*:*) at_result="$at_result $at_were run,
   2332 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
   2333 
   2334     # No unexpected failures, but some xpasses
   2335     *:0:*) at_result="$at_result $at_were run,
   2336 $at_xpass_count passed unexpectedly." ;;
   2337 
   2338     # No expected failures, but failures and xpasses
   2339     *:1:0) at_result="$at_result $at_were run,
   2340 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
   2341     *:*:0) at_result="$at_result $at_were run,
   2342 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
   2343 
   2344     # All of them.
   2345     *:*:1) at_result="$at_result $at_were run,
   2346 $at_xpass_count passed unexpectedly,
   2347 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
   2348     *:*:*) at_result="$at_result $at_were run,
   2349 $at_xpass_count passed unexpectedly,
   2350 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
   2351   esac
   2352 
   2353   if test $at_skip_count = 0 && test $at_run_count -gt 1; then
   2354     at_result="All $at_result"
   2355   fi
   2356 fi
   2357 
   2358 # Now put skips in the mix.
   2359 case $at_skip_count in
   2360   0) ;;
   2361   1) at_result="$at_result
   2362 1 test was skipped." ;;
   2363   *) at_result="$at_result
   2364 $at_skip_count tests were skipped." ;;
   2365 esac
   2366 
   2367 if test $at_unexpected_count = 0; then
   2368   echo "$at_color$at_result$at_std"
   2369   echo "$at_result" >&5
   2370 else
   2371   echo "${at_color}ERROR: $at_result$at_std" >&2
   2372   echo "ERROR: $at_result" >&5
   2373   {
   2374     echo
   2375     $as_echo "## ------------------------ ##
   2376 ## Summary of the failures. ##
   2377 ## ------------------------ ##"
   2378 
   2379     # Summary of failed and skipped tests.
   2380     if test $at_fail_count != 0; then
   2381       echo "Failed tests:"
   2382       $SHELL "$at_myself" $at_fail_list --list
   2383       echo
   2384     fi
   2385     if test $at_skip_count != 0; then
   2386       echo "Skipped tests:"
   2387       $SHELL "$at_myself" $at_skip_list --list
   2388       echo
   2389     fi
   2390     if test $at_xpass_count != 0; then
   2391       echo "Unexpected passes:"
   2392       $SHELL "$at_myself" $at_xpass_list --list
   2393       echo
   2394     fi
   2395     if test $at_fail_count != 0; then
   2396       $as_echo "## ---------------------- ##
   2397 ## Detailed failed tests. ##
   2398 ## ---------------------- ##"
   2399       echo
   2400       for at_group in $at_fail_list
   2401       do
   2402 	at_group_normalized=$at_group
   2403 
   2404   eval 'while :; do
   2405     case $at_group_normalized in #(
   2406     '"$at_format"'*) break;;
   2407     esac
   2408     at_group_normalized=0$at_group_normalized
   2409   done'
   2410 
   2411 	cat "$at_suite_dir/$at_group_normalized/$as_me.log"
   2412 	echo
   2413       done
   2414       echo
   2415     fi
   2416     if test -n "$at_top_srcdir"; then
   2417       sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
   2418 ## ${at_top_build_prefix}config.log ##
   2419 _ASBOX
   2420       sed 's/^/| /' ${at_top_build_prefix}config.log
   2421       echo
   2422     fi
   2423   } >&5
   2424 
   2425   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
   2426 ## $as_me.log was created. ##
   2427 _ASBOX
   2428 
   2429   echo
   2430   if $at_debug_p; then
   2431     at_msg='per-test log files'
   2432   else
   2433     at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'"
   2434   fi
   2435   $as_echo "Please send $at_msg and all information you think might help:
   2436 
   2437    To: <bug-bison (at] gnu.org>
   2438    Subject: [GNU Bison 2.7] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly}
   2439 
   2440 You may investigate any problem if you feel able to do so, in which
   2441 case the test suite provides a good starting point.  Its output may
   2442 be found below \`${at_testdir+${at_testdir}/}$as_me.dir'.
   2443 "
   2444   exit 1
   2445 fi
   2446 
   2447 exit 0
   2448 
   2449 ## ------------- ##
   2450 ## Actual tests. ##
   2451 ## ------------- ##
   2452 #AT_START_1
   2453 at_fn_group_banner 1 'input.at:27' \
   2454   "Invalid inputs" "                                 " 1
   2455 at_xfail=no
   2456 (
   2457   $as_echo "1. $at_setup_line: testing $at_desc ..."
   2458   $at_traceon
   2459 
   2460 
   2461 cat >input.y <<'_ATEOF'
   2462 \000\001\002\377?
   2463 %%
   2464 ?
   2465 default: 'a' }
   2466 %&
   2467 %a-does-not-exist
   2468 %-
   2469 %{
   2470 _ATEOF
   2471 
   2472 { set +x
   2473 $as_echo "$at_srcdir/input.at:39: \$PERL -pi -e 's/\\\\(\\d{3})/chr(oct(\$1))/ge' input.y || exit 77"
   2474 at_fn_check_prepare_dynamic "$PERL -pi -e 's/\\\\(\\d{3})/chr(oct($1))/ge' input.y || exit 77" "input.at:39"
   2475 ( $at_check_trace; $PERL -pi -e 's/\\(\d{3})/chr(oct($1))/ge' input.y || exit 77
   2476 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   2477 at_status=$? at_failed=false
   2478 $at_check_filter
   2479 at_fn_diff_devnull "$at_stderr" || at_failed=:
   2480 at_fn_diff_devnull "$at_stdout" || at_failed=:
   2481 at_fn_check_status 0 $at_status "$at_srcdir/input.at:39"
   2482 $at_failed && at_fn_log_failure
   2483 $at_traceon; }
   2484 
   2485 
   2486 
   2487 { set +x
   2488 $as_echo "$at_srcdir/input.at:41: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   2489 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:41"
   2490 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   2491 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   2492 at_status=$? at_failed=false
   2493 $at_check_filter
   2494 echo >>"$at_stderr"; $as_echo "input.y:1.1-2: error: invalid characters: '\\0\\001\\002\\377?'
   2495 input.y:3.1: error: invalid character: '?'
   2496 input.y:4.14: error: invalid character: '}'
   2497 input.y:5.1: error: invalid character: '%'
   2498 input.y:5.2: error: invalid character: '&'
   2499 input.y:6.1-17: error: invalid directive: '%a-does-not-exist'
   2500 input.y:7.1: error: invalid character: '%'
   2501 input.y:7.2: error: invalid character: '-'
   2502 input.y:8.1-9.0: error: missing '%}' at end of file
   2503 input.y:8.1-9.0: error: syntax error, unexpected %{...%}
   2504 " | \
   2505   $at_diff - "$at_stderr" || at_failed=:
   2506 at_fn_diff_devnull "$at_stdout" || at_failed=:
   2507 at_fn_check_status 1 $at_status "$at_srcdir/input.at:41"
   2508 $at_failed && at_fn_log_failure
   2509 $at_traceon; }
   2510 
   2511 
   2512 
   2513   set +x
   2514   $at_times_p && times >"$at_times_file"
   2515 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   2516 read at_status <"$at_status_file"
   2517 #AT_STOP_1
   2518 #AT_START_2
   2519 at_fn_group_banner 2 'input.at:57' \
   2520   "Invalid inputs with {}" "                         " 1
   2521 at_xfail=no
   2522 (
   2523   $as_echo "2. $at_setup_line: testing $at_desc ..."
   2524   $at_traceon
   2525 
   2526 
   2527 # We used to SEGV here.  See
   2528 # http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html
   2529 
   2530 cat >input.y <<'_ATEOF'
   2531 
   2532 %destructor
   2533 %initial-action
   2534 %lex-param
   2535 %parse-param
   2536 %printer
   2537 %union
   2538 _ATEOF
   2539 
   2540 
   2541 
   2542 { set +x
   2543 $as_echo "$at_srcdir/input.at:72: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   2544 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:72"
   2545 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   2546 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   2547 at_status=$? at_failed=false
   2548 $at_check_filter
   2549 echo >>"$at_stderr"; $as_echo "input.y:3.1-15: error: syntax error, unexpected %initial-action, expecting {...}
   2550 " | \
   2551   $at_diff - "$at_stderr" || at_failed=:
   2552 at_fn_diff_devnull "$at_stdout" || at_failed=:
   2553 at_fn_check_status 1 $at_status "$at_srcdir/input.at:72"
   2554 $at_failed && at_fn_log_failure
   2555 $at_traceon; }
   2556 
   2557 
   2558 
   2559   set +x
   2560   $at_times_p && times >"$at_times_file"
   2561 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   2562 read at_status <"$at_status_file"
   2563 #AT_STOP_2
   2564 #AT_START_3
   2565 at_fn_group_banner 3 'input.at:84' \
   2566   "Invalid \$n and @n" "                              " 1
   2567 at_xfail=no
   2568 (
   2569   $as_echo "3. $at_setup_line: testing $at_desc ..."
   2570   $at_traceon
   2571 
   2572 
   2573 cat >input.y <<'_ATEOF'
   2574 %%
   2575 exp: { $$ = $1 ; };
   2576 exp: { @$ = @1 ; };
   2577 _ATEOF
   2578 
   2579 
   2580 
   2581 { set +x
   2582 $as_echo "$at_srcdir/input.at:92: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   2583 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:92"
   2584 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   2585 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   2586 at_status=$? at_failed=false
   2587 $at_check_filter
   2588 echo >>"$at_stderr"; $as_echo "input.y:2.13-14: error: integer out of range: '\$1'
   2589 input.y:3.13-14: error: integer out of range: '@1'
   2590 " | \
   2591   $at_diff - "$at_stderr" || at_failed=:
   2592 at_fn_diff_devnull "$at_stdout" || at_failed=:
   2593 at_fn_check_status 1 $at_status "$at_srcdir/input.at:92"
   2594 $at_failed && at_fn_log_failure
   2595 $at_traceon; }
   2596 
   2597 
   2598 
   2599   set +x
   2600   $at_times_p && times >"$at_times_file"
   2601 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   2602 read at_status <"$at_status_file"
   2603 #AT_STOP_3
   2604 #AT_START_4
   2605 at_fn_group_banner 4 'input.at:104' \
   2606   "Type Clashes" "                                   " 1
   2607 at_xfail=no
   2608 (
   2609   $as_echo "4. $at_setup_line: testing $at_desc ..."
   2610   $at_traceon
   2611 
   2612 
   2613 cat >input.y <<'_ATEOF'
   2614 %union { int bar; }
   2615 %token foo
   2616 %type <bar> exp
   2617 %%
   2618 exp: foo { $$; } foo { $2; } foo
   2619    | foo
   2620    | /* Empty. */
   2621    ;
   2622 _ATEOF
   2623 
   2624 
   2625 
   2626 { set +x
   2627 $as_echo "$at_srcdir/input.at:117: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   2628 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:117"
   2629 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   2630 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   2631 at_status=$? at_failed=false
   2632 $at_check_filter
   2633 echo >>"$at_stderr"; $as_echo "input.y:5.12-13: error: \$\$ for the midrule at \$2 of 'exp' has no declared type
   2634 input.y:5.24-25: error: \$2 of 'exp' has no declared type
   2635 input.y:5.6-32: warning: type clash on default action: <bar> != <>
   2636 input.y:6.6-8: warning: type clash on default action: <bar> != <>
   2637 input.y:7.5: warning: empty rule for typed nonterminal, and no action
   2638 " | \
   2639   $at_diff - "$at_stderr" || at_failed=:
   2640 at_fn_diff_devnull "$at_stdout" || at_failed=:
   2641 at_fn_check_status 1 $at_status "$at_srcdir/input.at:117"
   2642 $at_failed && at_fn_log_failure
   2643 $at_traceon; }
   2644 
   2645 
   2646 
   2647   set +x
   2648   $at_times_p && times >"$at_times_file"
   2649 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   2650 read at_status <"$at_status_file"
   2651 #AT_STOP_4
   2652 #AT_START_5
   2653 at_fn_group_banner 5 'input.at:285' \
   2654   "Unused values" "                                  " 1
   2655 at_xfail=no
   2656 (
   2657   $as_echo "5. $at_setup_line: testing $at_desc ..."
   2658   $at_traceon
   2659 
   2660 cat >input.y <<'_ATEOF'
   2661 %token <integer> INT;
   2662 %type <integer> a b c d e f g h i j k l;
   2663 %destructor { destroy ($$); } INT a b c d e f g h i j k l;
   2664 %%
   2665 start:
   2666   'a' a { $2; } | 'b' b { $2; } | 'c' c { $2; } | 'd' d { $2; }
   2667 | 'e' e { $2; } | 'f' f { $2; } | 'g' g { $2; } | 'h' h { $2; }
   2668 | 'i' i { $2; } | 'j' j { $2; } | 'k' k { $2; } | 'l' l { $2; }
   2669 ;
   2670 
   2671 a: INT | INT { } INT { } INT { };
   2672 b: INT | /* empty */;
   2673 c: INT | INT { $1; } INT { $<integer>2; } INT { $<integer>4; };
   2674 d: INT | INT { } INT { $1; } INT { $<integer>2; };
   2675 e: INT | INT { } INT {  } INT { $1; };
   2676 f: INT | INT { } INT {  } INT { $$ = $1 + $3 + $5; };
   2677 g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   2678 h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
   2679 i: INT | INT INT { } { $$ = $1 + $2; };
   2680 j: INT | INT INT { $<integer>$ = 1; } { $$ = $1 + $2; };
   2681 k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
   2682 l: INT | INT { $<integer>$ = $<integer>1; } INT { $<integer>$ = $<integer>2 + $<integer>3; } INT { $<integer>$ = $<integer>4 + $<integer>5; };
   2683 _ATEOF
   2684 
   2685 
   2686 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   2687   at_save_special_files
   2688   mkdir xml-tests
   2689     # Don't combine these Bison invocations since we want to be sure that
   2690   # --report=all isn't required to get the full XML file.
   2691   { set +x
   2692 $as_echo "$at_srcdir/input.at:286: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   2693                   --graph=xml-tests/test.dot -fcaret input.y"
   2694 at_fn_check_prepare_notrace 'an embedded newline' "input.at:286"
   2695 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   2696                   --graph=xml-tests/test.dot -fcaret input.y
   2697 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   2698 at_status=$? at_failed=false
   2699 $at_check_filter
   2700 echo stderr:; cat "$at_stderr"
   2701 echo stdout:; cat "$at_stdout"
   2702 at_fn_check_status 0 $at_status "$at_srcdir/input.at:286"
   2703 $at_failed && at_fn_log_failure
   2704 $at_traceon; }
   2705 
   2706   { set +x
   2707 $as_echo "$at_srcdir/input.at:286: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -fcaret input.y"
   2708 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -fcaret input.y" "input.at:286"
   2709 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -fcaret input.y
   2710 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   2711 at_status=$? at_failed=false
   2712 $at_check_filter
   2713 echo stderr:; cat "$at_stderr"
   2714 echo stdout:; cat "$at_stdout"
   2715 at_fn_check_status 0 $at_status "$at_srcdir/input.at:286"
   2716 $at_failed && at_fn_log_failure
   2717 $at_traceon; }
   2718 
   2719     cp xml-tests/test.output expout
   2720   { set +x
   2721 $as_echo "$at_srcdir/input.at:286: \$XSLTPROC \\
   2722              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   2723              xml-tests/test.xml"
   2724 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:286"
   2725 ( $at_check_trace; $XSLTPROC \
   2726              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   2727              xml-tests/test.xml
   2728 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   2729 at_status=$? at_failed=false
   2730 $at_check_filter
   2731 at_fn_diff_devnull "$at_stderr" || at_failed=:
   2732 $at_diff expout "$at_stdout" || at_failed=:
   2733 at_fn_check_status 0 $at_status "$at_srcdir/input.at:286"
   2734 $at_failed && at_fn_log_failure
   2735 $at_traceon; }
   2736 
   2737   sort xml-tests/test.dot > expout
   2738   { set +x
   2739 $as_echo "$at_srcdir/input.at:286: \$XSLTPROC \\
   2740              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   2741              xml-tests/test.xml | sort"
   2742 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:286"
   2743 ( $at_check_trace; $XSLTPROC \
   2744              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   2745              xml-tests/test.xml | sort
   2746 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   2747 at_status=$? at_failed=false
   2748 $at_check_filter
   2749 at_fn_diff_devnull "$at_stderr" || at_failed=:
   2750 $at_diff expout "$at_stdout" || at_failed=:
   2751 at_fn_check_status 0 $at_status "$at_srcdir/input.at:286"
   2752 $at_failed && at_fn_log_failure
   2753 $at_traceon; }
   2754 
   2755   rm -rf xml-tests expout
   2756   at_restore_special_files
   2757 fi
   2758 { set +x
   2759 $as_echo "$at_srcdir/input.at:286: bison -fcaret input.y"
   2760 at_fn_check_prepare_trace "input.at:286"
   2761 ( $at_check_trace; bison -fcaret input.y
   2762 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   2763 at_status=$? at_failed=false
   2764 $at_check_filter
   2765 echo >>"$at_stderr"; $as_echo "input.y:11.10-32: warning: unset value: \$\$
   2766  a: INT | INT { } INT { } INT { };
   2767           ^^^^^^^^^^^^^^^^^^^^^^^
   2768 input.y:11.10-12: warning: unused value: \$1
   2769  a: INT | INT { } INT { } INT { };
   2770           ^^^
   2771 input.y:11.18-20: warning: unused value: \$3
   2772  a: INT | INT { } INT { } INT { };
   2773                   ^^^
   2774 input.y:11.26-28: warning: unused value: \$5
   2775  a: INT | INT { } INT { } INT { };
   2776                           ^^^
   2777 input.y:12.9: warning: empty rule for typed nonterminal, and no action
   2778  b: INT | /* empty */;
   2779          ^
   2780 input.y:13.10-62: warning: unset value: \$\$
   2781  c: INT | INT { \$1; } INT { \$<integer>2; } INT { \$<integer>4; };
   2782           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   2783 input.y:13.22-24: warning: unused value: \$3
   2784  c: INT | INT { \$1; } INT { \$<integer>2; } INT { \$<integer>4; };
   2785                       ^^^
   2786 input.y:13.43-45: warning: unused value: \$5
   2787  c: INT | INT { \$1; } INT { \$<integer>2; } INT { \$<integer>4; };
   2788                                            ^^^
   2789 input.y:14.10-49: warning: unset value: \$\$
   2790  d: INT | INT { } INT { \$1; } INT { \$<integer>2; };
   2791           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   2792 input.y:14.18-20: warning: unused value: \$3
   2793  d: INT | INT { } INT { \$1; } INT { \$<integer>2; };
   2794                   ^^^
   2795 input.y:14.30-32: warning: unused value: \$5
   2796  d: INT | INT { } INT { \$1; } INT { \$<integer>2; };
   2797                               ^^^
   2798 input.y:15.10-37: warning: unset value: \$\$
   2799  e: INT | INT { } INT {  } INT { \$1; };
   2800           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   2801 input.y:15.18-20: warning: unused value: \$3
   2802  e: INT | INT { } INT {  } INT { \$1; };
   2803                   ^^^
   2804 input.y:15.27-29: warning: unused value: \$5
   2805  e: INT | INT { } INT {  } INT { \$1; };
   2806                            ^^^
   2807 input.y:17.10-58: warning: unset value: \$\$
   2808  g: INT | INT { \$<integer>\$; } INT { \$<integer>\$; } INT { };
   2809           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   2810 input.y:17.10-12: warning: unused value: \$1
   2811  g: INT | INT { \$<integer>\$; } INT { \$<integer>\$; } INT { };
   2812           ^^^
   2813 input.y:17.31-33: warning: unused value: \$3
   2814  g: INT | INT { \$<integer>\$; } INT { \$<integer>\$; } INT { };
   2815                                ^^^
   2816 input.y:17.52-54: warning: unused value: \$5
   2817  g: INT | INT { \$<integer>\$; } INT { \$<integer>\$; } INT { };
   2818                                                     ^^^
   2819 input.y:18.10-72: warning: unset value: \$\$
   2820  h: INT | INT { \$<integer>\$; } INT { \$<integer>\$ = \$<integer>2; } INT { };
   2821           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   2822 input.y:18.10-12: warning: unused value: \$1
   2823  h: INT | INT { \$<integer>\$; } INT { \$<integer>\$ = \$<integer>2; } INT { };
   2824           ^^^
   2825 input.y:18.31-33: warning: unused value: \$3
   2826  h: INT | INT { \$<integer>\$; } INT { \$<integer>\$ = \$<integer>2; } INT { };
   2827                                ^^^
   2828 input.y:18.66-68: warning: unused value: \$5
   2829  h: INT | INT { \$<integer>\$; } INT { \$<integer>\$ = \$<integer>2; } INT { };
   2830                                                                   ^^^
   2831 input.y:21.10-68: warning: unset value: \$\$
   2832  k: INT | INT INT { \$<integer>\$; } { \$<integer>\$ = \$<integer>3; } { };
   2833           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   2834 input.y:21.10-12: warning: unused value: \$1
   2835  k: INT | INT INT { \$<integer>\$; } { \$<integer>\$ = \$<integer>3; } { };
   2836           ^^^
   2837 input.y:21.14-16: warning: unused value: \$2
   2838  k: INT | INT INT { \$<integer>\$; } { \$<integer>\$ = \$<integer>3; } { };
   2839               ^^^
   2840 " | \
   2841   $at_diff - "$at_stderr" || at_failed=:
   2842 at_fn_diff_devnull "$at_stdout" || at_failed=:
   2843 at_fn_check_status 0 $at_status "$at_srcdir/input.at:286"
   2844 $at_failed && at_fn_log_failure
   2845 $at_traceon; }
   2846 
   2847 # Defining POSIXLY_CORRECT causes bison to complain if options are
   2848 # added after the grammar file name, so skip these checks in that
   2849 # case.
   2850 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   2851   at_save_special_files
   2852 
   2853   # To avoid expanding it repeatedly, store specified stdout.
   2854   : >expout
   2855 
   2856   # Run with -Werror.
   2857   { set +x
   2858 $as_echo "$at_srcdir/input.at:286: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y -Werror"
   2859 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y -Werror" "input.at:286"
   2860 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret input.y -Werror
   2861 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   2862 at_status=$? at_failed=false
   2863 $at_check_filter
   2864 echo stderr:; tee stderr <"$at_stderr"
   2865 $at_diff expout "$at_stdout" || at_failed=:
   2866 at_fn_check_status 1 $at_status "$at_srcdir/input.at:286"
   2867 $at_failed && at_fn_log_failure
   2868 $at_traceon; }
   2869 
   2870 
   2871   # Build expected stderr up to and including the "warnings being
   2872   # treated as errors" message.
   2873   cat >at-bison-check-warnings <<'_ATEOF'
   2874 input.y:11.10-32: warning: unset value: $$
   2875  a: INT | INT { } INT { } INT { };
   2876           ^^^^^^^^^^^^^^^^^^^^^^^
   2877 input.y:11.10-12: warning: unused value: $1
   2878  a: INT | INT { } INT { } INT { };
   2879           ^^^
   2880 input.y:11.18-20: warning: unused value: $3
   2881  a: INT | INT { } INT { } INT { };
   2882                   ^^^
   2883 input.y:11.26-28: warning: unused value: $5
   2884  a: INT | INT { } INT { } INT { };
   2885                           ^^^
   2886 input.y:12.9: warning: empty rule for typed nonterminal, and no action
   2887  b: INT | /* empty */;
   2888          ^
   2889 input.y:13.10-62: warning: unset value: $$
   2890  c: INT | INT { $1; } INT { $<integer>2; } INT { $<integer>4; };
   2891           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   2892 input.y:13.22-24: warning: unused value: $3
   2893  c: INT | INT { $1; } INT { $<integer>2; } INT { $<integer>4; };
   2894                       ^^^
   2895 input.y:13.43-45: warning: unused value: $5
   2896  c: INT | INT { $1; } INT { $<integer>2; } INT { $<integer>4; };
   2897                                            ^^^
   2898 input.y:14.10-49: warning: unset value: $$
   2899  d: INT | INT { } INT { $1; } INT { $<integer>2; };
   2900           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   2901 input.y:14.18-20: warning: unused value: $3
   2902  d: INT | INT { } INT { $1; } INT { $<integer>2; };
   2903                   ^^^
   2904 input.y:14.30-32: warning: unused value: $5
   2905  d: INT | INT { } INT { $1; } INT { $<integer>2; };
   2906                               ^^^
   2907 input.y:15.10-37: warning: unset value: $$
   2908  e: INT | INT { } INT {  } INT { $1; };
   2909           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   2910 input.y:15.18-20: warning: unused value: $3
   2911  e: INT | INT { } INT {  } INT { $1; };
   2912                   ^^^
   2913 input.y:15.27-29: warning: unused value: $5
   2914  e: INT | INT { } INT {  } INT { $1; };
   2915                            ^^^
   2916 input.y:17.10-58: warning: unset value: $$
   2917  g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   2918           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   2919 input.y:17.10-12: warning: unused value: $1
   2920  g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   2921           ^^^
   2922 input.y:17.31-33: warning: unused value: $3
   2923  g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   2924                                ^^^
   2925 input.y:17.52-54: warning: unused value: $5
   2926  g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   2927                                                     ^^^
   2928 input.y:18.10-72: warning: unset value: $$
   2929  h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
   2930           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   2931 input.y:18.10-12: warning: unused value: $1
   2932  h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
   2933           ^^^
   2934 input.y:18.31-33: warning: unused value: $3
   2935  h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
   2936                                ^^^
   2937 input.y:18.66-68: warning: unused value: $5
   2938  h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
   2939                                                                   ^^^
   2940 input.y:21.10-68: warning: unset value: $$
   2941  k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
   2942           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   2943 input.y:21.10-12: warning: unused value: $1
   2944  k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
   2945           ^^^
   2946 input.y:21.14-16: warning: unused value: $2
   2947  k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
   2948               ^^^
   2949 _ATEOF
   2950 
   2951   at_bison_check_first=`sed -n \
   2952     '/: warning: /{=;q;}' at-bison-check-warnings`
   2953   : ${at_bison_check_first:=1}
   2954   at_bison_check_first_tmp=`sed -n \
   2955     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   2956   : ${at_bison_check_first_tmp:=1}
   2957   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   2958     at_bison_check_first=$at_bison_check_first_tmp
   2959   fi
   2960   if test $at_bison_check_first -gt 1; then
   2961     sed -n "1,`expr $at_bison_check_first - 1`"p \
   2962       at-bison-check-warnings > experr
   2963   fi
   2964   echo 'bison: warnings being treated as errors' >> experr
   2965 
   2966   # Finish building expected stderr and check.  Unlike warnings,
   2967   # complaints cause bison to exit early.  Thus, with -Werror, bison
   2968   # does not necessarily report all warnings that it does without
   2969   # -Werror, but it at least reports one.
   2970   at_bison_check_last=`sed -n '$=' stderr`
   2971   : ${at_bison_check_last:=1}
   2972   at_bison_check_last=`expr $at_bison_check_last - 1`
   2973   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   2974     at-bison-check-warnings >> experr
   2975   { set +x
   2976 $as_echo "$at_srcdir/input.at:286: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   2977               stderr 1>&2"
   2978 at_fn_check_prepare_notrace 'an embedded newline' "input.at:286"
   2979 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   2980               stderr 1>&2
   2981 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   2982 at_status=$? at_failed=false
   2983 $at_check_filter
   2984 $at_diff experr "$at_stderr" || at_failed=:
   2985 at_fn_diff_devnull "$at_stdout" || at_failed=:
   2986 at_fn_check_status 0 $at_status "$at_srcdir/input.at:286"
   2987 $at_failed && at_fn_log_failure
   2988 $at_traceon; }
   2989 
   2990 
   2991   # Now check --warnings=error.
   2992   cp stderr experr
   2993   { set +x
   2994 $as_echo "$at_srcdir/input.at:286: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y --warnings=error"
   2995 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y --warnings=error" "input.at:286"
   2996 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret input.y --warnings=error
   2997 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   2998 at_status=$? at_failed=false
   2999 $at_check_filter
   3000 $at_diff experr "$at_stderr" || at_failed=:
   3001 $at_diff expout "$at_stdout" || at_failed=:
   3002 at_fn_check_status 1 $at_status "$at_srcdir/input.at:286"
   3003 $at_failed && at_fn_log_failure
   3004 $at_traceon; }
   3005 
   3006 
   3007   # Now check -Wnone and --warnings=none by making sure that
   3008   # -Werror doesn't change the exit status when -Wnone or
   3009   # --warnings=none is specified.
   3010   { set +x
   3011 $as_echo "$at_srcdir/input.at:286: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y -Wnone -Werror"
   3012 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y -Wnone -Werror" "input.at:286"
   3013 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret input.y -Wnone -Werror
   3014 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3015 at_status=$? at_failed=false
   3016 $at_check_filter
   3017 at_fn_diff_devnull "$at_stderr" || at_failed=:
   3018 $at_diff expout "$at_stdout" || at_failed=:
   3019 at_fn_check_status 0 $at_status "$at_srcdir/input.at:286"
   3020 $at_failed && at_fn_log_failure
   3021 $at_traceon; }
   3022 
   3023   { set +x
   3024 $as_echo "$at_srcdir/input.at:286: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y --warnings=none -Werror"
   3025 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y --warnings=none -Werror" "input.at:286"
   3026 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret input.y --warnings=none -Werror
   3027 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3028 at_status=$? at_failed=false
   3029 $at_check_filter
   3030 at_fn_diff_devnull "$at_stderr" || at_failed=:
   3031 $at_diff expout "$at_stdout" || at_failed=:
   3032 at_fn_check_status 0 $at_status "$at_srcdir/input.at:286"
   3033 $at_failed && at_fn_log_failure
   3034 $at_traceon; }
   3035 
   3036 
   3037   at_restore_special_files
   3038 fi
   3039 
   3040 cat >input.y <<'_ATEOF'
   3041 %token <integer> INT;
   3042 %type <integer> a b c d e f g h i j k l;
   3043 %destructor { destroy ($$); } INT a b c d e f g h i j k l;
   3044 %%
   3045 start:
   3046   'a' a { $2; } | 'b' b { $2; } | 'c' c { $2; } | 'd' d { $2; }
   3047 | 'e' e { $2; } | 'f' f { $2; } | 'g' g { $2; } | 'h' h { $2; }
   3048 | 'i' i { $2; } | 'j' j { $2; } | 'k' k { $2; } | 'l' l { $2; }
   3049 ;
   3050 
   3051 a: INT | INT { } INT { } INT { };
   3052 b: INT | /* empty */;
   3053 c: INT | INT { $1; } INT { $<integer>2; } INT { $<integer>4; };
   3054 d: INT | INT { } INT { $1; } INT { $<integer>2; };
   3055 e: INT | INT { } INT {  } INT { $1; };
   3056 f: INT | INT { } INT {  } INT { $$ = $1 + $3 + $5; };
   3057 g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   3058 h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
   3059 i: INT | INT INT { } { $$ = $1 + $2; };
   3060 j: INT | INT INT { $<integer>$ = 1; } { $$ = $1 + $2; };
   3061 k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
   3062 l: INT | INT { $<integer>$ = $<integer>1; } INT { $<integer>$ = $<integer>2 + $<integer>3; } INT { $<integer>$ = $<integer>4 + $<integer>5; };
   3063 _ATEOF
   3064 
   3065 
   3066 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   3067   at_save_special_files
   3068   mkdir xml-tests
   3069     # Don't combine these Bison invocations since we want to be sure that
   3070   # --report=all isn't required to get the full XML file.
   3071   { set +x
   3072 $as_echo "$at_srcdir/input.at:287: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   3073                   --graph=xml-tests/test.dot --warnings=midrule-values -fcaret input.y"
   3074 at_fn_check_prepare_notrace 'an embedded newline' "input.at:287"
   3075 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   3076                   --graph=xml-tests/test.dot --warnings=midrule-values -fcaret input.y
   3077 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3078 at_status=$? at_failed=false
   3079 $at_check_filter
   3080 echo stderr:; cat "$at_stderr"
   3081 echo stdout:; cat "$at_stdout"
   3082 at_fn_check_status 0 $at_status "$at_srcdir/input.at:287"
   3083 $at_failed && at_fn_log_failure
   3084 $at_traceon; }
   3085 
   3086   { set +x
   3087 $as_echo "$at_srcdir/input.at:287: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --warnings=midrule-values -fcaret input.y"
   3088 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --warnings=midrule-values -fcaret input.y" "input.at:287"
   3089 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --warnings=midrule-values -fcaret input.y
   3090 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3091 at_status=$? at_failed=false
   3092 $at_check_filter
   3093 echo stderr:; cat "$at_stderr"
   3094 echo stdout:; cat "$at_stdout"
   3095 at_fn_check_status 0 $at_status "$at_srcdir/input.at:287"
   3096 $at_failed && at_fn_log_failure
   3097 $at_traceon; }
   3098 
   3099     cp xml-tests/test.output expout
   3100   { set +x
   3101 $as_echo "$at_srcdir/input.at:287: \$XSLTPROC \\
   3102              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   3103              xml-tests/test.xml"
   3104 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:287"
   3105 ( $at_check_trace; $XSLTPROC \
   3106              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   3107              xml-tests/test.xml
   3108 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3109 at_status=$? at_failed=false
   3110 $at_check_filter
   3111 at_fn_diff_devnull "$at_stderr" || at_failed=:
   3112 $at_diff expout "$at_stdout" || at_failed=:
   3113 at_fn_check_status 0 $at_status "$at_srcdir/input.at:287"
   3114 $at_failed && at_fn_log_failure
   3115 $at_traceon; }
   3116 
   3117   sort xml-tests/test.dot > expout
   3118   { set +x
   3119 $as_echo "$at_srcdir/input.at:287: \$XSLTPROC \\
   3120              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   3121              xml-tests/test.xml | sort"
   3122 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:287"
   3123 ( $at_check_trace; $XSLTPROC \
   3124              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   3125              xml-tests/test.xml | sort
   3126 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3127 at_status=$? at_failed=false
   3128 $at_check_filter
   3129 at_fn_diff_devnull "$at_stderr" || at_failed=:
   3130 $at_diff expout "$at_stdout" || at_failed=:
   3131 at_fn_check_status 0 $at_status "$at_srcdir/input.at:287"
   3132 $at_failed && at_fn_log_failure
   3133 $at_traceon; }
   3134 
   3135   rm -rf xml-tests expout
   3136   at_restore_special_files
   3137 fi
   3138 { set +x
   3139 $as_echo "$at_srcdir/input.at:287: bison --warnings=midrule-values -fcaret input.y"
   3140 at_fn_check_prepare_trace "input.at:287"
   3141 ( $at_check_trace; bison --warnings=midrule-values -fcaret input.y
   3142 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3143 at_status=$? at_failed=false
   3144 $at_check_filter
   3145 echo >>"$at_stderr"; $as_echo "input.y:11.10-32: warning: unset value: \$\$
   3146  a: INT | INT { } INT { } INT { };
   3147           ^^^^^^^^^^^^^^^^^^^^^^^
   3148 input.y:11.10-12: warning: unused value: \$1
   3149  a: INT | INT { } INT { } INT { };
   3150           ^^^
   3151 input.y:11.18-20: warning: unused value: \$3
   3152  a: INT | INT { } INT { } INT { };
   3153                   ^^^
   3154 input.y:11.26-28: warning: unused value: \$5
   3155  a: INT | INT { } INT { } INT { };
   3156                           ^^^
   3157 input.y:12.9: warning: empty rule for typed nonterminal, and no action
   3158  b: INT | /* empty */;
   3159          ^
   3160 input.y:13.14-20: warning: unset value: \$\$
   3161  c: INT | INT { \$1; } INT { \$<integer>2; } INT { \$<integer>4; };
   3162               ^^^^^^^
   3163 input.y:13.26-41: warning: unset value: \$\$
   3164  c: INT | INT { \$1; } INT { \$<integer>2; } INT { \$<integer>4; };
   3165                           ^^^^^^^^^^^^^^^^
   3166 input.y:13.10-62: warning: unset value: \$\$
   3167  c: INT | INT { \$1; } INT { \$<integer>2; } INT { \$<integer>4; };
   3168           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3169 input.y:13.22-24: warning: unused value: \$3
   3170  c: INT | INT { \$1; } INT { \$<integer>2; } INT { \$<integer>4; };
   3171                       ^^^
   3172 input.y:13.43-45: warning: unused value: \$5
   3173  c: INT | INT { \$1; } INT { \$<integer>2; } INT { \$<integer>4; };
   3174                                            ^^^
   3175 input.y:14.14-16: warning: unset value: \$\$
   3176  d: INT | INT { } INT { \$1; } INT { \$<integer>2; };
   3177               ^^^
   3178 input.y:14.10-49: warning: unset value: \$\$
   3179  d: INT | INT { } INT { \$1; } INT { \$<integer>2; };
   3180           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3181 input.y:14.18-20: warning: unused value: \$3
   3182  d: INT | INT { } INT { \$1; } INT { \$<integer>2; };
   3183                   ^^^
   3184 input.y:14.30-32: warning: unused value: \$5
   3185  d: INT | INT { } INT { \$1; } INT { \$<integer>2; };
   3186                               ^^^
   3187 input.y:15.10-37: warning: unset value: \$\$
   3188  e: INT | INT { } INT {  } INT { \$1; };
   3189           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3190 input.y:15.18-20: warning: unused value: \$3
   3191  e: INT | INT { } INT {  } INT { \$1; };
   3192                   ^^^
   3193 input.y:15.27-29: warning: unused value: \$5
   3194  e: INT | INT { } INT {  } INT { \$1; };
   3195                            ^^^
   3196 input.y:17.10-58: warning: unset value: \$\$
   3197  g: INT | INT { \$<integer>\$; } INT { \$<integer>\$; } INT { };
   3198           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3199 input.y:17.10-12: warning: unused value: \$1
   3200  g: INT | INT { \$<integer>\$; } INT { \$<integer>\$; } INT { };
   3201           ^^^
   3202 input.y:17.14-29: warning: unused value: \$2
   3203  g: INT | INT { \$<integer>\$; } INT { \$<integer>\$; } INT { };
   3204               ^^^^^^^^^^^^^^^^
   3205 input.y:17.31-33: warning: unused value: \$3
   3206  g: INT | INT { \$<integer>\$; } INT { \$<integer>\$; } INT { };
   3207                                ^^^
   3208 input.y:17.35-50: warning: unused value: \$4
   3209  g: INT | INT { \$<integer>\$; } INT { \$<integer>\$; } INT { };
   3210                                    ^^^^^^^^^^^^^^^^
   3211 input.y:17.52-54: warning: unused value: \$5
   3212  g: INT | INT { \$<integer>\$; } INT { \$<integer>\$; } INT { };
   3213                                                     ^^^
   3214 input.y:18.10-72: warning: unset value: \$\$
   3215  h: INT | INT { \$<integer>\$; } INT { \$<integer>\$ = \$<integer>2; } INT { };
   3216           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3217 input.y:18.10-12: warning: unused value: \$1
   3218  h: INT | INT { \$<integer>\$; } INT { \$<integer>\$ = \$<integer>2; } INT { };
   3219           ^^^
   3220 input.y:18.31-33: warning: unused value: \$3
   3221  h: INT | INT { \$<integer>\$; } INT { \$<integer>\$ = \$<integer>2; } INT { };
   3222                                ^^^
   3223 input.y:18.35-64: warning: unused value: \$4
   3224  h: INT | INT { \$<integer>\$; } INT { \$<integer>\$ = \$<integer>2; } INT { };
   3225                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3226 input.y:18.66-68: warning: unused value: \$5
   3227  h: INT | INT { \$<integer>\$; } INT { \$<integer>\$ = \$<integer>2; } INT { };
   3228                                                                   ^^^
   3229 input.y:20.18-37: warning: unused value: \$3
   3230  j: INT | INT INT { \$<integer>\$ = 1; } { \$\$ = \$1 + \$2; };
   3231                   ^^^^^^^^^^^^^^^^^^^^
   3232 input.y:21.10-68: warning: unset value: \$\$
   3233  k: INT | INT INT { \$<integer>\$; } { \$<integer>\$ = \$<integer>3; } { };
   3234           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3235 input.y:21.10-12: warning: unused value: \$1
   3236  k: INT | INT INT { \$<integer>\$; } { \$<integer>\$ = \$<integer>3; } { };
   3237           ^^^
   3238 input.y:21.14-16: warning: unused value: \$2
   3239  k: INT | INT INT { \$<integer>\$; } { \$<integer>\$ = \$<integer>3; } { };
   3240               ^^^
   3241 input.y:21.35-64: warning: unused value: \$4
   3242  k: INT | INT INT { \$<integer>\$; } { \$<integer>\$ = \$<integer>3; } { };
   3243                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3244 " | \
   3245   $at_diff - "$at_stderr" || at_failed=:
   3246 at_fn_diff_devnull "$at_stdout" || at_failed=:
   3247 at_fn_check_status 0 $at_status "$at_srcdir/input.at:287"
   3248 $at_failed && at_fn_log_failure
   3249 $at_traceon; }
   3250 
   3251 # Defining POSIXLY_CORRECT causes bison to complain if options are
   3252 # added after the grammar file name, so skip these checks in that
   3253 # case.
   3254 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   3255   at_save_special_files
   3256 
   3257   # To avoid expanding it repeatedly, store specified stdout.
   3258   : >expout
   3259 
   3260   # Run with -Werror.
   3261   { set +x
   3262 $as_echo "$at_srcdir/input.at:287: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y -Werror"
   3263 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y -Werror" "input.at:287"
   3264 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y -Werror
   3265 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3266 at_status=$? at_failed=false
   3267 $at_check_filter
   3268 echo stderr:; tee stderr <"$at_stderr"
   3269 $at_diff expout "$at_stdout" || at_failed=:
   3270 at_fn_check_status 1 $at_status "$at_srcdir/input.at:287"
   3271 $at_failed && at_fn_log_failure
   3272 $at_traceon; }
   3273 
   3274 
   3275   # Build expected stderr up to and including the "warnings being
   3276   # treated as errors" message.
   3277   cat >at-bison-check-warnings <<'_ATEOF'
   3278 input.y:11.10-32: warning: unset value: $$
   3279  a: INT | INT { } INT { } INT { };
   3280           ^^^^^^^^^^^^^^^^^^^^^^^
   3281 input.y:11.10-12: warning: unused value: $1
   3282  a: INT | INT { } INT { } INT { };
   3283           ^^^
   3284 input.y:11.18-20: warning: unused value: $3
   3285  a: INT | INT { } INT { } INT { };
   3286                   ^^^
   3287 input.y:11.26-28: warning: unused value: $5
   3288  a: INT | INT { } INT { } INT { };
   3289                           ^^^
   3290 input.y:12.9: warning: empty rule for typed nonterminal, and no action
   3291  b: INT | /* empty */;
   3292          ^
   3293 input.y:13.14-20: warning: unset value: $$
   3294  c: INT | INT { $1; } INT { $<integer>2; } INT { $<integer>4; };
   3295               ^^^^^^^
   3296 input.y:13.26-41: warning: unset value: $$
   3297  c: INT | INT { $1; } INT { $<integer>2; } INT { $<integer>4; };
   3298                           ^^^^^^^^^^^^^^^^
   3299 input.y:13.10-62: warning: unset value: $$
   3300  c: INT | INT { $1; } INT { $<integer>2; } INT { $<integer>4; };
   3301           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3302 input.y:13.22-24: warning: unused value: $3
   3303  c: INT | INT { $1; } INT { $<integer>2; } INT { $<integer>4; };
   3304                       ^^^
   3305 input.y:13.43-45: warning: unused value: $5
   3306  c: INT | INT { $1; } INT { $<integer>2; } INT { $<integer>4; };
   3307                                            ^^^
   3308 input.y:14.14-16: warning: unset value: $$
   3309  d: INT | INT { } INT { $1; } INT { $<integer>2; };
   3310               ^^^
   3311 input.y:14.10-49: warning: unset value: $$
   3312  d: INT | INT { } INT { $1; } INT { $<integer>2; };
   3313           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3314 input.y:14.18-20: warning: unused value: $3
   3315  d: INT | INT { } INT { $1; } INT { $<integer>2; };
   3316                   ^^^
   3317 input.y:14.30-32: warning: unused value: $5
   3318  d: INT | INT { } INT { $1; } INT { $<integer>2; };
   3319                               ^^^
   3320 input.y:15.10-37: warning: unset value: $$
   3321  e: INT | INT { } INT {  } INT { $1; };
   3322           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3323 input.y:15.18-20: warning: unused value: $3
   3324  e: INT | INT { } INT {  } INT { $1; };
   3325                   ^^^
   3326 input.y:15.27-29: warning: unused value: $5
   3327  e: INT | INT { } INT {  } INT { $1; };
   3328                            ^^^
   3329 input.y:17.10-58: warning: unset value: $$
   3330  g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   3331           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3332 input.y:17.10-12: warning: unused value: $1
   3333  g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   3334           ^^^
   3335 input.y:17.14-29: warning: unused value: $2
   3336  g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   3337               ^^^^^^^^^^^^^^^^
   3338 input.y:17.31-33: warning: unused value: $3
   3339  g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   3340                                ^^^
   3341 input.y:17.35-50: warning: unused value: $4
   3342  g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   3343                                    ^^^^^^^^^^^^^^^^
   3344 input.y:17.52-54: warning: unused value: $5
   3345  g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   3346                                                     ^^^
   3347 input.y:18.10-72: warning: unset value: $$
   3348  h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
   3349           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3350 input.y:18.10-12: warning: unused value: $1
   3351  h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
   3352           ^^^
   3353 input.y:18.31-33: warning: unused value: $3
   3354  h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
   3355                                ^^^
   3356 input.y:18.35-64: warning: unused value: $4
   3357  h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
   3358                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3359 input.y:18.66-68: warning: unused value: $5
   3360  h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
   3361                                                                   ^^^
   3362 input.y:20.18-37: warning: unused value: $3
   3363  j: INT | INT INT { $<integer>$ = 1; } { $$ = $1 + $2; };
   3364                   ^^^^^^^^^^^^^^^^^^^^
   3365 input.y:21.10-68: warning: unset value: $$
   3366  k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
   3367           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3368 input.y:21.10-12: warning: unused value: $1
   3369  k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
   3370           ^^^
   3371 input.y:21.14-16: warning: unused value: $2
   3372  k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
   3373               ^^^
   3374 input.y:21.35-64: warning: unused value: $4
   3375  k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
   3376                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3377 _ATEOF
   3378 
   3379   at_bison_check_first=`sed -n \
   3380     '/: warning: /{=;q;}' at-bison-check-warnings`
   3381   : ${at_bison_check_first:=1}
   3382   at_bison_check_first_tmp=`sed -n \
   3383     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   3384   : ${at_bison_check_first_tmp:=1}
   3385   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   3386     at_bison_check_first=$at_bison_check_first_tmp
   3387   fi
   3388   if test $at_bison_check_first -gt 1; then
   3389     sed -n "1,`expr $at_bison_check_first - 1`"p \
   3390       at-bison-check-warnings > experr
   3391   fi
   3392   echo 'bison: warnings being treated as errors' >> experr
   3393 
   3394   # Finish building expected stderr and check.  Unlike warnings,
   3395   # complaints cause bison to exit early.  Thus, with -Werror, bison
   3396   # does not necessarily report all warnings that it does without
   3397   # -Werror, but it at least reports one.
   3398   at_bison_check_last=`sed -n '$=' stderr`
   3399   : ${at_bison_check_last:=1}
   3400   at_bison_check_last=`expr $at_bison_check_last - 1`
   3401   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   3402     at-bison-check-warnings >> experr
   3403   { set +x
   3404 $as_echo "$at_srcdir/input.at:287: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   3405               stderr 1>&2"
   3406 at_fn_check_prepare_notrace 'an embedded newline' "input.at:287"
   3407 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   3408               stderr 1>&2
   3409 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3410 at_status=$? at_failed=false
   3411 $at_check_filter
   3412 $at_diff experr "$at_stderr" || at_failed=:
   3413 at_fn_diff_devnull "$at_stdout" || at_failed=:
   3414 at_fn_check_status 0 $at_status "$at_srcdir/input.at:287"
   3415 $at_failed && at_fn_log_failure
   3416 $at_traceon; }
   3417 
   3418 
   3419   # Now check --warnings=error.
   3420   cp stderr experr
   3421   { set +x
   3422 $as_echo "$at_srcdir/input.at:287: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y --warnings=error"
   3423 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y --warnings=error" "input.at:287"
   3424 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y --warnings=error
   3425 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3426 at_status=$? at_failed=false
   3427 $at_check_filter
   3428 $at_diff experr "$at_stderr" || at_failed=:
   3429 $at_diff expout "$at_stdout" || at_failed=:
   3430 at_fn_check_status 1 $at_status "$at_srcdir/input.at:287"
   3431 $at_failed && at_fn_log_failure
   3432 $at_traceon; }
   3433 
   3434 
   3435   # Now check -Wnone and --warnings=none by making sure that
   3436   # -Werror doesn't change the exit status when -Wnone or
   3437   # --warnings=none is specified.
   3438   { set +x
   3439 $as_echo "$at_srcdir/input.at:287: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y -Wnone -Werror"
   3440 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y -Wnone -Werror" "input.at:287"
   3441 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y -Wnone -Werror
   3442 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3443 at_status=$? at_failed=false
   3444 $at_check_filter
   3445 at_fn_diff_devnull "$at_stderr" || at_failed=:
   3446 $at_diff expout "$at_stdout" || at_failed=:
   3447 at_fn_check_status 0 $at_status "$at_srcdir/input.at:287"
   3448 $at_failed && at_fn_log_failure
   3449 $at_traceon; }
   3450 
   3451   { set +x
   3452 $as_echo "$at_srcdir/input.at:287: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y --warnings=none -Werror"
   3453 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y --warnings=none -Werror" "input.at:287"
   3454 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y --warnings=none -Werror
   3455 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3456 at_status=$? at_failed=false
   3457 $at_check_filter
   3458 at_fn_diff_devnull "$at_stderr" || at_failed=:
   3459 $at_diff expout "$at_stdout" || at_failed=:
   3460 at_fn_check_status 0 $at_status "$at_srcdir/input.at:287"
   3461 $at_failed && at_fn_log_failure
   3462 $at_traceon; }
   3463 
   3464 
   3465   at_restore_special_files
   3466 fi
   3467 
   3468   set +x
   3469   $at_times_p && times >"$at_times_file"
   3470 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   3471 read at_status <"$at_status_file"
   3472 #AT_STOP_5
   3473 #AT_START_6
   3474 at_fn_group_banner 6 'input.at:295' \
   3475   "Unused values before symbol declarations" "       " 1
   3476 at_xfail=no
   3477 (
   3478   $as_echo "6. $at_setup_line: testing $at_desc ..."
   3479   $at_traceon
   3480 
   3481 cat >input.y <<'_ATEOF'
   3482 
   3483 
   3484 
   3485 %%
   3486 start:
   3487   'a' a { $2; } | 'b' b { $2; } | 'c' c { $2; } | 'd' d { $2; }
   3488 | 'e' e { $2; } | 'f' f { $2; } | 'g' g { $2; } | 'h' h { $2; }
   3489 | 'i' i { $2; } | 'j' j { $2; } | 'k' k { $2; } | 'l' l { $2; }
   3490 ;
   3491 
   3492 a: INT | INT { } INT { } INT { };
   3493 b: INT | /* empty */;
   3494 c: INT | INT { $1; } INT { $<integer>2; } INT { $<integer>4; };
   3495 d: INT | INT { } INT { $1; } INT { $<integer>2; };
   3496 e: INT | INT { } INT {  } INT { $1; };
   3497 f: INT | INT { } INT {  } INT { $$ = $1 + $3 + $5; };
   3498 g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   3499 h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
   3500 i: INT | INT INT { } { $$ = $1 + $2; };
   3501 j: INT | INT INT { $<integer>$ = 1; } { $$ = $1 + $2; };
   3502 k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
   3503 l: INT | INT { $<integer>$ = $<integer>1; } INT { $<integer>$ = $<integer>2 + $<integer>3; } INT { $<integer>$ = $<integer>4 + $<integer>5; };
   3504 %token <integer> INT;
   3505 %type <integer> a b c d e f g h i j k l;
   3506 %destructor { destroy ($$); } INT a b c d e f g h i j k l;
   3507 _ATEOF
   3508 
   3509 
   3510 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   3511   at_save_special_files
   3512   mkdir xml-tests
   3513     # Don't combine these Bison invocations since we want to be sure that
   3514   # --report=all isn't required to get the full XML file.
   3515   { set +x
   3516 $as_echo "$at_srcdir/input.at:296: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   3517                   --graph=xml-tests/test.dot -fcaret input.y"
   3518 at_fn_check_prepare_notrace 'an embedded newline' "input.at:296"
   3519 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   3520                   --graph=xml-tests/test.dot -fcaret input.y
   3521 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3522 at_status=$? at_failed=false
   3523 $at_check_filter
   3524 echo stderr:; cat "$at_stderr"
   3525 echo stdout:; cat "$at_stdout"
   3526 at_fn_check_status 0 $at_status "$at_srcdir/input.at:296"
   3527 $at_failed && at_fn_log_failure
   3528 $at_traceon; }
   3529 
   3530   { set +x
   3531 $as_echo "$at_srcdir/input.at:296: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -fcaret input.y"
   3532 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -fcaret input.y" "input.at:296"
   3533 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -fcaret input.y
   3534 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3535 at_status=$? at_failed=false
   3536 $at_check_filter
   3537 echo stderr:; cat "$at_stderr"
   3538 echo stdout:; cat "$at_stdout"
   3539 at_fn_check_status 0 $at_status "$at_srcdir/input.at:296"
   3540 $at_failed && at_fn_log_failure
   3541 $at_traceon; }
   3542 
   3543     cp xml-tests/test.output expout
   3544   { set +x
   3545 $as_echo "$at_srcdir/input.at:296: \$XSLTPROC \\
   3546              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   3547              xml-tests/test.xml"
   3548 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:296"
   3549 ( $at_check_trace; $XSLTPROC \
   3550              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   3551              xml-tests/test.xml
   3552 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3553 at_status=$? at_failed=false
   3554 $at_check_filter
   3555 at_fn_diff_devnull "$at_stderr" || at_failed=:
   3556 $at_diff expout "$at_stdout" || at_failed=:
   3557 at_fn_check_status 0 $at_status "$at_srcdir/input.at:296"
   3558 $at_failed && at_fn_log_failure
   3559 $at_traceon; }
   3560 
   3561   sort xml-tests/test.dot > expout
   3562   { set +x
   3563 $as_echo "$at_srcdir/input.at:296: \$XSLTPROC \\
   3564              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   3565              xml-tests/test.xml | sort"
   3566 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:296"
   3567 ( $at_check_trace; $XSLTPROC \
   3568              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   3569              xml-tests/test.xml | sort
   3570 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3571 at_status=$? at_failed=false
   3572 $at_check_filter
   3573 at_fn_diff_devnull "$at_stderr" || at_failed=:
   3574 $at_diff expout "$at_stdout" || at_failed=:
   3575 at_fn_check_status 0 $at_status "$at_srcdir/input.at:296"
   3576 $at_failed && at_fn_log_failure
   3577 $at_traceon; }
   3578 
   3579   rm -rf xml-tests expout
   3580   at_restore_special_files
   3581 fi
   3582 { set +x
   3583 $as_echo "$at_srcdir/input.at:296: bison -fcaret input.y"
   3584 at_fn_check_prepare_trace "input.at:296"
   3585 ( $at_check_trace; bison -fcaret input.y
   3586 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3587 at_status=$? at_failed=false
   3588 $at_check_filter
   3589 echo >>"$at_stderr"; $as_echo "input.y:11.10-32: warning: unset value: \$\$
   3590  a: INT | INT { } INT { } INT { };
   3591           ^^^^^^^^^^^^^^^^^^^^^^^
   3592 input.y:11.10-12: warning: unused value: \$1
   3593  a: INT | INT { } INT { } INT { };
   3594           ^^^
   3595 input.y:11.18-20: warning: unused value: \$3
   3596  a: INT | INT { } INT { } INT { };
   3597                   ^^^
   3598 input.y:11.26-28: warning: unused value: \$5
   3599  a: INT | INT { } INT { } INT { };
   3600                           ^^^
   3601 input.y:12.9: warning: empty rule for typed nonterminal, and no action
   3602  b: INT | /* empty */;
   3603          ^
   3604 input.y:13.10-62: warning: unset value: \$\$
   3605  c: INT | INT { \$1; } INT { \$<integer>2; } INT { \$<integer>4; };
   3606           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3607 input.y:13.22-24: warning: unused value: \$3
   3608  c: INT | INT { \$1; } INT { \$<integer>2; } INT { \$<integer>4; };
   3609                       ^^^
   3610 input.y:13.43-45: warning: unused value: \$5
   3611  c: INT | INT { \$1; } INT { \$<integer>2; } INT { \$<integer>4; };
   3612                                            ^^^
   3613 input.y:14.10-49: warning: unset value: \$\$
   3614  d: INT | INT { } INT { \$1; } INT { \$<integer>2; };
   3615           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3616 input.y:14.18-20: warning: unused value: \$3
   3617  d: INT | INT { } INT { \$1; } INT { \$<integer>2; };
   3618                   ^^^
   3619 input.y:14.30-32: warning: unused value: \$5
   3620  d: INT | INT { } INT { \$1; } INT { \$<integer>2; };
   3621                               ^^^
   3622 input.y:15.10-37: warning: unset value: \$\$
   3623  e: INT | INT { } INT {  } INT { \$1; };
   3624           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3625 input.y:15.18-20: warning: unused value: \$3
   3626  e: INT | INT { } INT {  } INT { \$1; };
   3627                   ^^^
   3628 input.y:15.27-29: warning: unused value: \$5
   3629  e: INT | INT { } INT {  } INT { \$1; };
   3630                            ^^^
   3631 input.y:17.10-58: warning: unset value: \$\$
   3632  g: INT | INT { \$<integer>\$; } INT { \$<integer>\$; } INT { };
   3633           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3634 input.y:17.10-12: warning: unused value: \$1
   3635  g: INT | INT { \$<integer>\$; } INT { \$<integer>\$; } INT { };
   3636           ^^^
   3637 input.y:17.31-33: warning: unused value: \$3
   3638  g: INT | INT { \$<integer>\$; } INT { \$<integer>\$; } INT { };
   3639                                ^^^
   3640 input.y:17.52-54: warning: unused value: \$5
   3641  g: INT | INT { \$<integer>\$; } INT { \$<integer>\$; } INT { };
   3642                                                     ^^^
   3643 input.y:18.10-72: warning: unset value: \$\$
   3644  h: INT | INT { \$<integer>\$; } INT { \$<integer>\$ = \$<integer>2; } INT { };
   3645           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3646 input.y:18.10-12: warning: unused value: \$1
   3647  h: INT | INT { \$<integer>\$; } INT { \$<integer>\$ = \$<integer>2; } INT { };
   3648           ^^^
   3649 input.y:18.31-33: warning: unused value: \$3
   3650  h: INT | INT { \$<integer>\$; } INT { \$<integer>\$ = \$<integer>2; } INT { };
   3651                                ^^^
   3652 input.y:18.66-68: warning: unused value: \$5
   3653  h: INT | INT { \$<integer>\$; } INT { \$<integer>\$ = \$<integer>2; } INT { };
   3654                                                                   ^^^
   3655 input.y:21.10-68: warning: unset value: \$\$
   3656  k: INT | INT INT { \$<integer>\$; } { \$<integer>\$ = \$<integer>3; } { };
   3657           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3658 input.y:21.10-12: warning: unused value: \$1
   3659  k: INT | INT INT { \$<integer>\$; } { \$<integer>\$ = \$<integer>3; } { };
   3660           ^^^
   3661 input.y:21.14-16: warning: unused value: \$2
   3662  k: INT | INT INT { \$<integer>\$; } { \$<integer>\$ = \$<integer>3; } { };
   3663               ^^^
   3664 " | \
   3665   $at_diff - "$at_stderr" || at_failed=:
   3666 at_fn_diff_devnull "$at_stdout" || at_failed=:
   3667 at_fn_check_status 0 $at_status "$at_srcdir/input.at:296"
   3668 $at_failed && at_fn_log_failure
   3669 $at_traceon; }
   3670 
   3671 # Defining POSIXLY_CORRECT causes bison to complain if options are
   3672 # added after the grammar file name, so skip these checks in that
   3673 # case.
   3674 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   3675   at_save_special_files
   3676 
   3677   # To avoid expanding it repeatedly, store specified stdout.
   3678   : >expout
   3679 
   3680   # Run with -Werror.
   3681   { set +x
   3682 $as_echo "$at_srcdir/input.at:296: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y -Werror"
   3683 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y -Werror" "input.at:296"
   3684 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret input.y -Werror
   3685 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3686 at_status=$? at_failed=false
   3687 $at_check_filter
   3688 echo stderr:; tee stderr <"$at_stderr"
   3689 $at_diff expout "$at_stdout" || at_failed=:
   3690 at_fn_check_status 1 $at_status "$at_srcdir/input.at:296"
   3691 $at_failed && at_fn_log_failure
   3692 $at_traceon; }
   3693 
   3694 
   3695   # Build expected stderr up to and including the "warnings being
   3696   # treated as errors" message.
   3697   cat >at-bison-check-warnings <<'_ATEOF'
   3698 input.y:11.10-32: warning: unset value: $$
   3699  a: INT | INT { } INT { } INT { };
   3700           ^^^^^^^^^^^^^^^^^^^^^^^
   3701 input.y:11.10-12: warning: unused value: $1
   3702  a: INT | INT { } INT { } INT { };
   3703           ^^^
   3704 input.y:11.18-20: warning: unused value: $3
   3705  a: INT | INT { } INT { } INT { };
   3706                   ^^^
   3707 input.y:11.26-28: warning: unused value: $5
   3708  a: INT | INT { } INT { } INT { };
   3709                           ^^^
   3710 input.y:12.9: warning: empty rule for typed nonterminal, and no action
   3711  b: INT | /* empty */;
   3712          ^
   3713 input.y:13.10-62: warning: unset value: $$
   3714  c: INT | INT { $1; } INT { $<integer>2; } INT { $<integer>4; };
   3715           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3716 input.y:13.22-24: warning: unused value: $3
   3717  c: INT | INT { $1; } INT { $<integer>2; } INT { $<integer>4; };
   3718                       ^^^
   3719 input.y:13.43-45: warning: unused value: $5
   3720  c: INT | INT { $1; } INT { $<integer>2; } INT { $<integer>4; };
   3721                                            ^^^
   3722 input.y:14.10-49: warning: unset value: $$
   3723  d: INT | INT { } INT { $1; } INT { $<integer>2; };
   3724           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3725 input.y:14.18-20: warning: unused value: $3
   3726  d: INT | INT { } INT { $1; } INT { $<integer>2; };
   3727                   ^^^
   3728 input.y:14.30-32: warning: unused value: $5
   3729  d: INT | INT { } INT { $1; } INT { $<integer>2; };
   3730                               ^^^
   3731 input.y:15.10-37: warning: unset value: $$
   3732  e: INT | INT { } INT {  } INT { $1; };
   3733           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3734 input.y:15.18-20: warning: unused value: $3
   3735  e: INT | INT { } INT {  } INT { $1; };
   3736                   ^^^
   3737 input.y:15.27-29: warning: unused value: $5
   3738  e: INT | INT { } INT {  } INT { $1; };
   3739                            ^^^
   3740 input.y:17.10-58: warning: unset value: $$
   3741  g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   3742           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3743 input.y:17.10-12: warning: unused value: $1
   3744  g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   3745           ^^^
   3746 input.y:17.31-33: warning: unused value: $3
   3747  g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   3748                                ^^^
   3749 input.y:17.52-54: warning: unused value: $5
   3750  g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   3751                                                     ^^^
   3752 input.y:18.10-72: warning: unset value: $$
   3753  h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
   3754           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3755 input.y:18.10-12: warning: unused value: $1
   3756  h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
   3757           ^^^
   3758 input.y:18.31-33: warning: unused value: $3
   3759  h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
   3760                                ^^^
   3761 input.y:18.66-68: warning: unused value: $5
   3762  h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
   3763                                                                   ^^^
   3764 input.y:21.10-68: warning: unset value: $$
   3765  k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
   3766           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3767 input.y:21.10-12: warning: unused value: $1
   3768  k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
   3769           ^^^
   3770 input.y:21.14-16: warning: unused value: $2
   3771  k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
   3772               ^^^
   3773 _ATEOF
   3774 
   3775   at_bison_check_first=`sed -n \
   3776     '/: warning: /{=;q;}' at-bison-check-warnings`
   3777   : ${at_bison_check_first:=1}
   3778   at_bison_check_first_tmp=`sed -n \
   3779     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   3780   : ${at_bison_check_first_tmp:=1}
   3781   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   3782     at_bison_check_first=$at_bison_check_first_tmp
   3783   fi
   3784   if test $at_bison_check_first -gt 1; then
   3785     sed -n "1,`expr $at_bison_check_first - 1`"p \
   3786       at-bison-check-warnings > experr
   3787   fi
   3788   echo 'bison: warnings being treated as errors' >> experr
   3789 
   3790   # Finish building expected stderr and check.  Unlike warnings,
   3791   # complaints cause bison to exit early.  Thus, with -Werror, bison
   3792   # does not necessarily report all warnings that it does without
   3793   # -Werror, but it at least reports one.
   3794   at_bison_check_last=`sed -n '$=' stderr`
   3795   : ${at_bison_check_last:=1}
   3796   at_bison_check_last=`expr $at_bison_check_last - 1`
   3797   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   3798     at-bison-check-warnings >> experr
   3799   { set +x
   3800 $as_echo "$at_srcdir/input.at:296: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   3801               stderr 1>&2"
   3802 at_fn_check_prepare_notrace 'an embedded newline' "input.at:296"
   3803 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   3804               stderr 1>&2
   3805 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3806 at_status=$? at_failed=false
   3807 $at_check_filter
   3808 $at_diff experr "$at_stderr" || at_failed=:
   3809 at_fn_diff_devnull "$at_stdout" || at_failed=:
   3810 at_fn_check_status 0 $at_status "$at_srcdir/input.at:296"
   3811 $at_failed && at_fn_log_failure
   3812 $at_traceon; }
   3813 
   3814 
   3815   # Now check --warnings=error.
   3816   cp stderr experr
   3817   { set +x
   3818 $as_echo "$at_srcdir/input.at:296: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y --warnings=error"
   3819 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y --warnings=error" "input.at:296"
   3820 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret input.y --warnings=error
   3821 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3822 at_status=$? at_failed=false
   3823 $at_check_filter
   3824 $at_diff experr "$at_stderr" || at_failed=:
   3825 $at_diff expout "$at_stdout" || at_failed=:
   3826 at_fn_check_status 1 $at_status "$at_srcdir/input.at:296"
   3827 $at_failed && at_fn_log_failure
   3828 $at_traceon; }
   3829 
   3830 
   3831   # Now check -Wnone and --warnings=none by making sure that
   3832   # -Werror doesn't change the exit status when -Wnone or
   3833   # --warnings=none is specified.
   3834   { set +x
   3835 $as_echo "$at_srcdir/input.at:296: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y -Wnone -Werror"
   3836 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y -Wnone -Werror" "input.at:296"
   3837 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret input.y -Wnone -Werror
   3838 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3839 at_status=$? at_failed=false
   3840 $at_check_filter
   3841 at_fn_diff_devnull "$at_stderr" || at_failed=:
   3842 $at_diff expout "$at_stdout" || at_failed=:
   3843 at_fn_check_status 0 $at_status "$at_srcdir/input.at:296"
   3844 $at_failed && at_fn_log_failure
   3845 $at_traceon; }
   3846 
   3847   { set +x
   3848 $as_echo "$at_srcdir/input.at:296: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y --warnings=none -Werror"
   3849 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y --warnings=none -Werror" "input.at:296"
   3850 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret input.y --warnings=none -Werror
   3851 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3852 at_status=$? at_failed=false
   3853 $at_check_filter
   3854 at_fn_diff_devnull "$at_stderr" || at_failed=:
   3855 $at_diff expout "$at_stdout" || at_failed=:
   3856 at_fn_check_status 0 $at_status "$at_srcdir/input.at:296"
   3857 $at_failed && at_fn_log_failure
   3858 $at_traceon; }
   3859 
   3860 
   3861   at_restore_special_files
   3862 fi
   3863 
   3864 cat >input.y <<'_ATEOF'
   3865 
   3866 
   3867 
   3868 %%
   3869 start:
   3870   'a' a { $2; } | 'b' b { $2; } | 'c' c { $2; } | 'd' d { $2; }
   3871 | 'e' e { $2; } | 'f' f { $2; } | 'g' g { $2; } | 'h' h { $2; }
   3872 | 'i' i { $2; } | 'j' j { $2; } | 'k' k { $2; } | 'l' l { $2; }
   3873 ;
   3874 
   3875 a: INT | INT { } INT { } INT { };
   3876 b: INT | /* empty */;
   3877 c: INT | INT { $1; } INT { $<integer>2; } INT { $<integer>4; };
   3878 d: INT | INT { } INT { $1; } INT { $<integer>2; };
   3879 e: INT | INT { } INT {  } INT { $1; };
   3880 f: INT | INT { } INT {  } INT { $$ = $1 + $3 + $5; };
   3881 g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   3882 h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
   3883 i: INT | INT INT { } { $$ = $1 + $2; };
   3884 j: INT | INT INT { $<integer>$ = 1; } { $$ = $1 + $2; };
   3885 k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
   3886 l: INT | INT { $<integer>$ = $<integer>1; } INT { $<integer>$ = $<integer>2 + $<integer>3; } INT { $<integer>$ = $<integer>4 + $<integer>5; };
   3887 %token <integer> INT;
   3888 %type <integer> a b c d e f g h i j k l;
   3889 %destructor { destroy ($$); } INT a b c d e f g h i j k l;
   3890 _ATEOF
   3891 
   3892 
   3893 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   3894   at_save_special_files
   3895   mkdir xml-tests
   3896     # Don't combine these Bison invocations since we want to be sure that
   3897   # --report=all isn't required to get the full XML file.
   3898   { set +x
   3899 $as_echo "$at_srcdir/input.at:297: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   3900                   --graph=xml-tests/test.dot --warnings=midrule-values -fcaret input.y"
   3901 at_fn_check_prepare_notrace 'an embedded newline' "input.at:297"
   3902 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   3903                   --graph=xml-tests/test.dot --warnings=midrule-values -fcaret input.y
   3904 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3905 at_status=$? at_failed=false
   3906 $at_check_filter
   3907 echo stderr:; cat "$at_stderr"
   3908 echo stdout:; cat "$at_stdout"
   3909 at_fn_check_status 0 $at_status "$at_srcdir/input.at:297"
   3910 $at_failed && at_fn_log_failure
   3911 $at_traceon; }
   3912 
   3913   { set +x
   3914 $as_echo "$at_srcdir/input.at:297: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --warnings=midrule-values -fcaret input.y"
   3915 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --warnings=midrule-values -fcaret input.y" "input.at:297"
   3916 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --warnings=midrule-values -fcaret input.y
   3917 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3918 at_status=$? at_failed=false
   3919 $at_check_filter
   3920 echo stderr:; cat "$at_stderr"
   3921 echo stdout:; cat "$at_stdout"
   3922 at_fn_check_status 0 $at_status "$at_srcdir/input.at:297"
   3923 $at_failed && at_fn_log_failure
   3924 $at_traceon; }
   3925 
   3926     cp xml-tests/test.output expout
   3927   { set +x
   3928 $as_echo "$at_srcdir/input.at:297: \$XSLTPROC \\
   3929              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   3930              xml-tests/test.xml"
   3931 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:297"
   3932 ( $at_check_trace; $XSLTPROC \
   3933              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   3934              xml-tests/test.xml
   3935 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3936 at_status=$? at_failed=false
   3937 $at_check_filter
   3938 at_fn_diff_devnull "$at_stderr" || at_failed=:
   3939 $at_diff expout "$at_stdout" || at_failed=:
   3940 at_fn_check_status 0 $at_status "$at_srcdir/input.at:297"
   3941 $at_failed && at_fn_log_failure
   3942 $at_traceon; }
   3943 
   3944   sort xml-tests/test.dot > expout
   3945   { set +x
   3946 $as_echo "$at_srcdir/input.at:297: \$XSLTPROC \\
   3947              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   3948              xml-tests/test.xml | sort"
   3949 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:297"
   3950 ( $at_check_trace; $XSLTPROC \
   3951              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   3952              xml-tests/test.xml | sort
   3953 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3954 at_status=$? at_failed=false
   3955 $at_check_filter
   3956 at_fn_diff_devnull "$at_stderr" || at_failed=:
   3957 $at_diff expout "$at_stdout" || at_failed=:
   3958 at_fn_check_status 0 $at_status "$at_srcdir/input.at:297"
   3959 $at_failed && at_fn_log_failure
   3960 $at_traceon; }
   3961 
   3962   rm -rf xml-tests expout
   3963   at_restore_special_files
   3964 fi
   3965 { set +x
   3966 $as_echo "$at_srcdir/input.at:297: bison --warnings=midrule-values -fcaret input.y"
   3967 at_fn_check_prepare_trace "input.at:297"
   3968 ( $at_check_trace; bison --warnings=midrule-values -fcaret input.y
   3969 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   3970 at_status=$? at_failed=false
   3971 $at_check_filter
   3972 echo >>"$at_stderr"; $as_echo "input.y:11.10-32: warning: unset value: \$\$
   3973  a: INT | INT { } INT { } INT { };
   3974           ^^^^^^^^^^^^^^^^^^^^^^^
   3975 input.y:11.10-12: warning: unused value: \$1
   3976  a: INT | INT { } INT { } INT { };
   3977           ^^^
   3978 input.y:11.18-20: warning: unused value: \$3
   3979  a: INT | INT { } INT { } INT { };
   3980                   ^^^
   3981 input.y:11.26-28: warning: unused value: \$5
   3982  a: INT | INT { } INT { } INT { };
   3983                           ^^^
   3984 input.y:12.9: warning: empty rule for typed nonterminal, and no action
   3985  b: INT | /* empty */;
   3986          ^
   3987 input.y:13.14-20: warning: unset value: \$\$
   3988  c: INT | INT { \$1; } INT { \$<integer>2; } INT { \$<integer>4; };
   3989               ^^^^^^^
   3990 input.y:13.26-41: warning: unset value: \$\$
   3991  c: INT | INT { \$1; } INT { \$<integer>2; } INT { \$<integer>4; };
   3992                           ^^^^^^^^^^^^^^^^
   3993 input.y:13.10-62: warning: unset value: \$\$
   3994  c: INT | INT { \$1; } INT { \$<integer>2; } INT { \$<integer>4; };
   3995           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   3996 input.y:13.22-24: warning: unused value: \$3
   3997  c: INT | INT { \$1; } INT { \$<integer>2; } INT { \$<integer>4; };
   3998                       ^^^
   3999 input.y:13.43-45: warning: unused value: \$5
   4000  c: INT | INT { \$1; } INT { \$<integer>2; } INT { \$<integer>4; };
   4001                                            ^^^
   4002 input.y:14.14-16: warning: unset value: \$\$
   4003  d: INT | INT { } INT { \$1; } INT { \$<integer>2; };
   4004               ^^^
   4005 input.y:14.10-49: warning: unset value: \$\$
   4006  d: INT | INT { } INT { \$1; } INT { \$<integer>2; };
   4007           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   4008 input.y:14.18-20: warning: unused value: \$3
   4009  d: INT | INT { } INT { \$1; } INT { \$<integer>2; };
   4010                   ^^^
   4011 input.y:14.30-32: warning: unused value: \$5
   4012  d: INT | INT { } INT { \$1; } INT { \$<integer>2; };
   4013                               ^^^
   4014 input.y:15.10-37: warning: unset value: \$\$
   4015  e: INT | INT { } INT {  } INT { \$1; };
   4016           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   4017 input.y:15.18-20: warning: unused value: \$3
   4018  e: INT | INT { } INT {  } INT { \$1; };
   4019                   ^^^
   4020 input.y:15.27-29: warning: unused value: \$5
   4021  e: INT | INT { } INT {  } INT { \$1; };
   4022                            ^^^
   4023 input.y:17.10-58: warning: unset value: \$\$
   4024  g: INT | INT { \$<integer>\$; } INT { \$<integer>\$; } INT { };
   4025           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   4026 input.y:17.10-12: warning: unused value: \$1
   4027  g: INT | INT { \$<integer>\$; } INT { \$<integer>\$; } INT { };
   4028           ^^^
   4029 input.y:17.14-29: warning: unused value: \$2
   4030  g: INT | INT { \$<integer>\$; } INT { \$<integer>\$; } INT { };
   4031               ^^^^^^^^^^^^^^^^
   4032 input.y:17.31-33: warning: unused value: \$3
   4033  g: INT | INT { \$<integer>\$; } INT { \$<integer>\$; } INT { };
   4034                                ^^^
   4035 input.y:17.35-50: warning: unused value: \$4
   4036  g: INT | INT { \$<integer>\$; } INT { \$<integer>\$; } INT { };
   4037                                    ^^^^^^^^^^^^^^^^
   4038 input.y:17.52-54: warning: unused value: \$5
   4039  g: INT | INT { \$<integer>\$; } INT { \$<integer>\$; } INT { };
   4040                                                     ^^^
   4041 input.y:18.10-72: warning: unset value: \$\$
   4042  h: INT | INT { \$<integer>\$; } INT { \$<integer>\$ = \$<integer>2; } INT { };
   4043           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   4044 input.y:18.10-12: warning: unused value: \$1
   4045  h: INT | INT { \$<integer>\$; } INT { \$<integer>\$ = \$<integer>2; } INT { };
   4046           ^^^
   4047 input.y:18.31-33: warning: unused value: \$3
   4048  h: INT | INT { \$<integer>\$; } INT { \$<integer>\$ = \$<integer>2; } INT { };
   4049                                ^^^
   4050 input.y:18.35-64: warning: unused value: \$4
   4051  h: INT | INT { \$<integer>\$; } INT { \$<integer>\$ = \$<integer>2; } INT { };
   4052                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   4053 input.y:18.66-68: warning: unused value: \$5
   4054  h: INT | INT { \$<integer>\$; } INT { \$<integer>\$ = \$<integer>2; } INT { };
   4055                                                                   ^^^
   4056 input.y:20.18-37: warning: unused value: \$3
   4057  j: INT | INT INT { \$<integer>\$ = 1; } { \$\$ = \$1 + \$2; };
   4058                   ^^^^^^^^^^^^^^^^^^^^
   4059 input.y:21.10-68: warning: unset value: \$\$
   4060  k: INT | INT INT { \$<integer>\$; } { \$<integer>\$ = \$<integer>3; } { };
   4061           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   4062 input.y:21.10-12: warning: unused value: \$1
   4063  k: INT | INT INT { \$<integer>\$; } { \$<integer>\$ = \$<integer>3; } { };
   4064           ^^^
   4065 input.y:21.14-16: warning: unused value: \$2
   4066  k: INT | INT INT { \$<integer>\$; } { \$<integer>\$ = \$<integer>3; } { };
   4067               ^^^
   4068 input.y:21.35-64: warning: unused value: \$4
   4069  k: INT | INT INT { \$<integer>\$; } { \$<integer>\$ = \$<integer>3; } { };
   4070                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   4071 " | \
   4072   $at_diff - "$at_stderr" || at_failed=:
   4073 at_fn_diff_devnull "$at_stdout" || at_failed=:
   4074 at_fn_check_status 0 $at_status "$at_srcdir/input.at:297"
   4075 $at_failed && at_fn_log_failure
   4076 $at_traceon; }
   4077 
   4078 # Defining POSIXLY_CORRECT causes bison to complain if options are
   4079 # added after the grammar file name, so skip these checks in that
   4080 # case.
   4081 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   4082   at_save_special_files
   4083 
   4084   # To avoid expanding it repeatedly, store specified stdout.
   4085   : >expout
   4086 
   4087   # Run with -Werror.
   4088   { set +x
   4089 $as_echo "$at_srcdir/input.at:297: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y -Werror"
   4090 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y -Werror" "input.at:297"
   4091 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y -Werror
   4092 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4093 at_status=$? at_failed=false
   4094 $at_check_filter
   4095 echo stderr:; tee stderr <"$at_stderr"
   4096 $at_diff expout "$at_stdout" || at_failed=:
   4097 at_fn_check_status 1 $at_status "$at_srcdir/input.at:297"
   4098 $at_failed && at_fn_log_failure
   4099 $at_traceon; }
   4100 
   4101 
   4102   # Build expected stderr up to and including the "warnings being
   4103   # treated as errors" message.
   4104   cat >at-bison-check-warnings <<'_ATEOF'
   4105 input.y:11.10-32: warning: unset value: $$
   4106  a: INT | INT { } INT { } INT { };
   4107           ^^^^^^^^^^^^^^^^^^^^^^^
   4108 input.y:11.10-12: warning: unused value: $1
   4109  a: INT | INT { } INT { } INT { };
   4110           ^^^
   4111 input.y:11.18-20: warning: unused value: $3
   4112  a: INT | INT { } INT { } INT { };
   4113                   ^^^
   4114 input.y:11.26-28: warning: unused value: $5
   4115  a: INT | INT { } INT { } INT { };
   4116                           ^^^
   4117 input.y:12.9: warning: empty rule for typed nonterminal, and no action
   4118  b: INT | /* empty */;
   4119          ^
   4120 input.y:13.14-20: warning: unset value: $$
   4121  c: INT | INT { $1; } INT { $<integer>2; } INT { $<integer>4; };
   4122               ^^^^^^^
   4123 input.y:13.26-41: warning: unset value: $$
   4124  c: INT | INT { $1; } INT { $<integer>2; } INT { $<integer>4; };
   4125                           ^^^^^^^^^^^^^^^^
   4126 input.y:13.10-62: warning: unset value: $$
   4127  c: INT | INT { $1; } INT { $<integer>2; } INT { $<integer>4; };
   4128           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   4129 input.y:13.22-24: warning: unused value: $3
   4130  c: INT | INT { $1; } INT { $<integer>2; } INT { $<integer>4; };
   4131                       ^^^
   4132 input.y:13.43-45: warning: unused value: $5
   4133  c: INT | INT { $1; } INT { $<integer>2; } INT { $<integer>4; };
   4134                                            ^^^
   4135 input.y:14.14-16: warning: unset value: $$
   4136  d: INT | INT { } INT { $1; } INT { $<integer>2; };
   4137               ^^^
   4138 input.y:14.10-49: warning: unset value: $$
   4139  d: INT | INT { } INT { $1; } INT { $<integer>2; };
   4140           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   4141 input.y:14.18-20: warning: unused value: $3
   4142  d: INT | INT { } INT { $1; } INT { $<integer>2; };
   4143                   ^^^
   4144 input.y:14.30-32: warning: unused value: $5
   4145  d: INT | INT { } INT { $1; } INT { $<integer>2; };
   4146                               ^^^
   4147 input.y:15.10-37: warning: unset value: $$
   4148  e: INT | INT { } INT {  } INT { $1; };
   4149           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   4150 input.y:15.18-20: warning: unused value: $3
   4151  e: INT | INT { } INT {  } INT { $1; };
   4152                   ^^^
   4153 input.y:15.27-29: warning: unused value: $5
   4154  e: INT | INT { } INT {  } INT { $1; };
   4155                            ^^^
   4156 input.y:17.10-58: warning: unset value: $$
   4157  g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   4158           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   4159 input.y:17.10-12: warning: unused value: $1
   4160  g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   4161           ^^^
   4162 input.y:17.14-29: warning: unused value: $2
   4163  g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   4164               ^^^^^^^^^^^^^^^^
   4165 input.y:17.31-33: warning: unused value: $3
   4166  g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   4167                                ^^^
   4168 input.y:17.35-50: warning: unused value: $4
   4169  g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   4170                                    ^^^^^^^^^^^^^^^^
   4171 input.y:17.52-54: warning: unused value: $5
   4172  g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
   4173                                                     ^^^
   4174 input.y:18.10-72: warning: unset value: $$
   4175  h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
   4176           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   4177 input.y:18.10-12: warning: unused value: $1
   4178  h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
   4179           ^^^
   4180 input.y:18.31-33: warning: unused value: $3
   4181  h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
   4182                                ^^^
   4183 input.y:18.35-64: warning: unused value: $4
   4184  h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
   4185                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   4186 input.y:18.66-68: warning: unused value: $5
   4187  h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
   4188                                                                   ^^^
   4189 input.y:20.18-37: warning: unused value: $3
   4190  j: INT | INT INT { $<integer>$ = 1; } { $$ = $1 + $2; };
   4191                   ^^^^^^^^^^^^^^^^^^^^
   4192 input.y:21.10-68: warning: unset value: $$
   4193  k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
   4194           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   4195 input.y:21.10-12: warning: unused value: $1
   4196  k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
   4197           ^^^
   4198 input.y:21.14-16: warning: unused value: $2
   4199  k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
   4200               ^^^
   4201 input.y:21.35-64: warning: unused value: $4
   4202  k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
   4203                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   4204 _ATEOF
   4205 
   4206   at_bison_check_first=`sed -n \
   4207     '/: warning: /{=;q;}' at-bison-check-warnings`
   4208   : ${at_bison_check_first:=1}
   4209   at_bison_check_first_tmp=`sed -n \
   4210     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   4211   : ${at_bison_check_first_tmp:=1}
   4212   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   4213     at_bison_check_first=$at_bison_check_first_tmp
   4214   fi
   4215   if test $at_bison_check_first -gt 1; then
   4216     sed -n "1,`expr $at_bison_check_first - 1`"p \
   4217       at-bison-check-warnings > experr
   4218   fi
   4219   echo 'bison: warnings being treated as errors' >> experr
   4220 
   4221   # Finish building expected stderr and check.  Unlike warnings,
   4222   # complaints cause bison to exit early.  Thus, with -Werror, bison
   4223   # does not necessarily report all warnings that it does without
   4224   # -Werror, but it at least reports one.
   4225   at_bison_check_last=`sed -n '$=' stderr`
   4226   : ${at_bison_check_last:=1}
   4227   at_bison_check_last=`expr $at_bison_check_last - 1`
   4228   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   4229     at-bison-check-warnings >> experr
   4230   { set +x
   4231 $as_echo "$at_srcdir/input.at:297: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   4232               stderr 1>&2"
   4233 at_fn_check_prepare_notrace 'an embedded newline' "input.at:297"
   4234 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   4235               stderr 1>&2
   4236 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4237 at_status=$? at_failed=false
   4238 $at_check_filter
   4239 $at_diff experr "$at_stderr" || at_failed=:
   4240 at_fn_diff_devnull "$at_stdout" || at_failed=:
   4241 at_fn_check_status 0 $at_status "$at_srcdir/input.at:297"
   4242 $at_failed && at_fn_log_failure
   4243 $at_traceon; }
   4244 
   4245 
   4246   # Now check --warnings=error.
   4247   cp stderr experr
   4248   { set +x
   4249 $as_echo "$at_srcdir/input.at:297: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y --warnings=error"
   4250 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y --warnings=error" "input.at:297"
   4251 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y --warnings=error
   4252 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4253 at_status=$? at_failed=false
   4254 $at_check_filter
   4255 $at_diff experr "$at_stderr" || at_failed=:
   4256 $at_diff expout "$at_stdout" || at_failed=:
   4257 at_fn_check_status 1 $at_status "$at_srcdir/input.at:297"
   4258 $at_failed && at_fn_log_failure
   4259 $at_traceon; }
   4260 
   4261 
   4262   # Now check -Wnone and --warnings=none by making sure that
   4263   # -Werror doesn't change the exit status when -Wnone or
   4264   # --warnings=none is specified.
   4265   { set +x
   4266 $as_echo "$at_srcdir/input.at:297: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y -Wnone -Werror"
   4267 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y -Wnone -Werror" "input.at:297"
   4268 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y -Wnone -Werror
   4269 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4270 at_status=$? at_failed=false
   4271 $at_check_filter
   4272 at_fn_diff_devnull "$at_stderr" || at_failed=:
   4273 $at_diff expout "$at_stdout" || at_failed=:
   4274 at_fn_check_status 0 $at_status "$at_srcdir/input.at:297"
   4275 $at_failed && at_fn_log_failure
   4276 $at_traceon; }
   4277 
   4278   { set +x
   4279 $as_echo "$at_srcdir/input.at:297: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y --warnings=none -Werror"
   4280 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y --warnings=none -Werror" "input.at:297"
   4281 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --warnings=midrule-values -fcaret input.y --warnings=none -Werror
   4282 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4283 at_status=$? at_failed=false
   4284 $at_check_filter
   4285 at_fn_diff_devnull "$at_stderr" || at_failed=:
   4286 $at_diff expout "$at_stdout" || at_failed=:
   4287 at_fn_check_status 0 $at_status "$at_srcdir/input.at:297"
   4288 $at_failed && at_fn_log_failure
   4289 $at_traceon; }
   4290 
   4291 
   4292   at_restore_special_files
   4293 fi
   4294 
   4295   set +x
   4296   $at_times_p && times >"$at_times_file"
   4297 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   4298 read at_status <"$at_status_file"
   4299 #AT_STOP_6
   4300 #AT_START_7
   4301 at_fn_group_banner 7 'input.at:305' \
   4302   "Default %printer and %destructor redeclared" "    " 1
   4303 at_xfail=no
   4304 (
   4305   $as_echo "7. $at_setup_line: testing $at_desc ..."
   4306   $at_traceon
   4307 
   4308 
   4309 cat >input.y <<'_ATEOF'
   4310 %destructor { destroy ($$); } <*> <*>
   4311 %printer { print ($$); } <*> <*>
   4312 
   4313 %destructor { destroy ($$); } <*>
   4314 %printer { print ($$); } <*>
   4315 
   4316 %destructor { destroy ($$); } <> <>
   4317 %printer { print ($$); } <> <>
   4318 
   4319 %destructor { destroy ($$); } <>
   4320 %printer { print ($$); } <>
   4321 
   4322 %%
   4323 
   4324 start: ;
   4325 
   4326 %destructor { destroy ($$); } <*>;
   4327 %printer { print ($$); } <*>;
   4328 
   4329 %destructor { destroy ($$); } <>;
   4330 %printer { print ($$); } <>;
   4331 _ATEOF
   4332 
   4333 
   4334 
   4335 { set +x
   4336 $as_echo "$at_srcdir/input.at:331: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   4337 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:331"
   4338 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   4339 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4340 at_status=$? at_failed=false
   4341 $at_check_filter
   4342 echo >>"$at_stderr"; $as_echo "input.y:1.13-29: error: redeclaration for default tagged %destructor
   4343 input.y:1.13-29:     previous declaration
   4344 input.y:2.10-24: error: redeclaration for default tagged %printer
   4345 input.y:2.10-24:     previous declaration
   4346 input.y:4.13-29: error: redeclaration for default tagged %destructor
   4347 input.y:1.13-29:     previous declaration
   4348 input.y:5.10-24: error: redeclaration for default tagged %printer
   4349 input.y:2.10-24:     previous declaration
   4350 input.y:7.13-29: error: redeclaration for default tagless %destructor
   4351 input.y:7.13-29:     previous declaration
   4352 input.y:8.10-24: error: redeclaration for default tagless %printer
   4353 input.y:8.10-24:     previous declaration
   4354 input.y:10.13-29: error: redeclaration for default tagless %destructor
   4355 input.y:7.13-29:      previous declaration
   4356 input.y:11.10-24: error: redeclaration for default tagless %printer
   4357 input.y:8.10-24:      previous declaration
   4358 input.y:17.13-29: error: redeclaration for default tagged %destructor
   4359 input.y:4.13-29:      previous declaration
   4360 input.y:18.10-24: error: redeclaration for default tagged %printer
   4361 input.y:5.10-24:      previous declaration
   4362 input.y:20.13-29: error: redeclaration for default tagless %destructor
   4363 input.y:10.13-29:     previous declaration
   4364 input.y:21.10-24: error: redeclaration for default tagless %printer
   4365 input.y:11.10-24:     previous declaration
   4366 " | \
   4367   $at_diff - "$at_stderr" || at_failed=:
   4368 at_fn_diff_devnull "$at_stdout" || at_failed=:
   4369 at_fn_check_status 1 $at_status "$at_srcdir/input.at:331"
   4370 $at_failed && at_fn_log_failure
   4371 $at_traceon; }
   4372 
   4373 
   4374 
   4375   set +x
   4376   $at_times_p && times >"$at_times_file"
   4377 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   4378 read at_status <"$at_status_file"
   4379 #AT_STOP_7
   4380 #AT_START_8
   4381 at_fn_group_banner 8 'input.at:365' \
   4382   "Per-type %printer and %destructor redeclared" "   " 1
   4383 at_xfail=no
   4384 (
   4385   $as_echo "8. $at_setup_line: testing $at_desc ..."
   4386   $at_traceon
   4387 
   4388 
   4389 cat >input.y <<'_ATEOF'
   4390 %destructor { destroy ($$); } <field1> <field2>
   4391 %printer { print ($$); } <field1> <field2>
   4392 
   4393 %destructor { destroy ($$); } <field1> <field1>
   4394 %printer { print ($$); } <field2> <field2>
   4395 
   4396 %%
   4397 
   4398 start: ;
   4399 
   4400 %destructor { destroy ($$); } <field2> <field1>;
   4401 %printer { print ($$); } <field2> <field1>;
   4402 _ATEOF
   4403 
   4404 
   4405 
   4406 { set +x
   4407 $as_echo "$at_srcdir/input.at:382: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   4408 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:382"
   4409 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   4410 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4411 at_status=$? at_failed=false
   4412 $at_check_filter
   4413 echo >>"$at_stderr"; $as_echo "input.y:4.13-29: error: %destructor redeclaration for <field1>
   4414 input.y:1.13-29:     previous declaration
   4415 input.y:4.13-29: error: %destructor redeclaration for <field1>
   4416 input.y:4.13-29:     previous declaration
   4417 input.y:5.10-24: error: %printer redeclaration for <field2>
   4418 input.y:2.10-24:     previous declaration
   4419 input.y:5.10-24: error: %printer redeclaration for <field2>
   4420 input.y:5.10-24:     previous declaration
   4421 input.y:11.13-29: error: %destructor redeclaration for <field1>
   4422 input.y:4.13-29:      previous declaration
   4423 input.y:11.13-29: error: %destructor redeclaration for <field2>
   4424 input.y:1.13-29:      previous declaration
   4425 input.y:12.10-24: error: %printer redeclaration for <field1>
   4426 input.y:2.10-24:      previous declaration
   4427 input.y:12.10-24: error: %printer redeclaration for <field2>
   4428 input.y:5.10-24:      previous declaration
   4429 " | \
   4430   $at_diff - "$at_stderr" || at_failed=:
   4431 at_fn_diff_devnull "$at_stdout" || at_failed=:
   4432 at_fn_check_status 1 $at_status "$at_srcdir/input.at:382"
   4433 $at_failed && at_fn_log_failure
   4434 $at_traceon; }
   4435 
   4436 
   4437 
   4438   set +x
   4439   $at_times_p && times >"$at_times_file"
   4440 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   4441 read at_status <"$at_status_file"
   4442 #AT_STOP_8
   4443 #AT_START_9
   4444 at_fn_group_banner 9 'input.at:408' \
   4445   "Unused values with default %destructor" "         " 1
   4446 at_xfail=no
   4447 (
   4448   $as_echo "9. $at_setup_line: testing $at_desc ..."
   4449   $at_traceon
   4450 
   4451 
   4452 cat >input.y <<'_ATEOF'
   4453 %destructor { destroy ($$); } <>
   4454 %type <tag> tagged
   4455 
   4456 %%
   4457 
   4458 start: end end tagged tagged { $<tag>1; $3; } ;
   4459 end: { } ;
   4460 tagged: { } ;
   4461 _ATEOF
   4462 
   4463 
   4464 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   4465   at_save_special_files
   4466   mkdir xml-tests
   4467     # Don't combine these Bison invocations since we want to be sure that
   4468   # --report=all isn't required to get the full XML file.
   4469   { set +x
   4470 $as_echo "$at_srcdir/input.at:421: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   4471                   --graph=xml-tests/test.dot input.y"
   4472 at_fn_check_prepare_notrace 'an embedded newline' "input.at:421"
   4473 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   4474                   --graph=xml-tests/test.dot input.y
   4475 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4476 at_status=$? at_failed=false
   4477 $at_check_filter
   4478 echo stderr:; cat "$at_stderr"
   4479 echo stdout:; cat "$at_stdout"
   4480 at_fn_check_status 0 $at_status "$at_srcdir/input.at:421"
   4481 $at_failed && at_fn_log_failure
   4482 $at_traceon; }
   4483 
   4484   { set +x
   4485 $as_echo "$at_srcdir/input.at:421: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y"
   4486 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y" "input.at:421"
   4487 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y
   4488 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4489 at_status=$? at_failed=false
   4490 $at_check_filter
   4491 echo stderr:; cat "$at_stderr"
   4492 echo stdout:; cat "$at_stdout"
   4493 at_fn_check_status 0 $at_status "$at_srcdir/input.at:421"
   4494 $at_failed && at_fn_log_failure
   4495 $at_traceon; }
   4496 
   4497     cp xml-tests/test.output expout
   4498   { set +x
   4499 $as_echo "$at_srcdir/input.at:421: \$XSLTPROC \\
   4500              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   4501              xml-tests/test.xml"
   4502 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:421"
   4503 ( $at_check_trace; $XSLTPROC \
   4504              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   4505              xml-tests/test.xml
   4506 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4507 at_status=$? at_failed=false
   4508 $at_check_filter
   4509 at_fn_diff_devnull "$at_stderr" || at_failed=:
   4510 $at_diff expout "$at_stdout" || at_failed=:
   4511 at_fn_check_status 0 $at_status "$at_srcdir/input.at:421"
   4512 $at_failed && at_fn_log_failure
   4513 $at_traceon; }
   4514 
   4515   sort xml-tests/test.dot > expout
   4516   { set +x
   4517 $as_echo "$at_srcdir/input.at:421: \$XSLTPROC \\
   4518              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   4519              xml-tests/test.xml | sort"
   4520 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:421"
   4521 ( $at_check_trace; $XSLTPROC \
   4522              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   4523              xml-tests/test.xml | sort
   4524 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4525 at_status=$? at_failed=false
   4526 $at_check_filter
   4527 at_fn_diff_devnull "$at_stderr" || at_failed=:
   4528 $at_diff expout "$at_stdout" || at_failed=:
   4529 at_fn_check_status 0 $at_status "$at_srcdir/input.at:421"
   4530 $at_failed && at_fn_log_failure
   4531 $at_traceon; }
   4532 
   4533   rm -rf xml-tests expout
   4534   at_restore_special_files
   4535 fi
   4536 { set +x
   4537 $as_echo "$at_srcdir/input.at:421: bison input.y"
   4538 at_fn_check_prepare_trace "input.at:421"
   4539 ( $at_check_trace; bison input.y
   4540 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4541 at_status=$? at_failed=false
   4542 $at_check_filter
   4543 echo >>"$at_stderr"; $as_echo "input.y:6.8-45: warning: unset value: \$\$
   4544 input.y:6.12-14: warning: unused value: \$2
   4545 input.y:7.6-8: warning: unset value: \$\$
   4546 " | \
   4547   $at_diff - "$at_stderr" || at_failed=:
   4548 at_fn_diff_devnull "$at_stdout" || at_failed=:
   4549 at_fn_check_status 0 $at_status "$at_srcdir/input.at:421"
   4550 $at_failed && at_fn_log_failure
   4551 $at_traceon; }
   4552 
   4553 # Defining POSIXLY_CORRECT causes bison to complain if options are
   4554 # added after the grammar file name, so skip these checks in that
   4555 # case.
   4556 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   4557   at_save_special_files
   4558 
   4559   # To avoid expanding it repeatedly, store specified stdout.
   4560   : >expout
   4561 
   4562   # Run with -Werror.
   4563   { set +x
   4564 $as_echo "$at_srcdir/input.at:421: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Werror"
   4565 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Werror" "input.at:421"
   4566 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y -Werror
   4567 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4568 at_status=$? at_failed=false
   4569 $at_check_filter
   4570 echo stderr:; tee stderr <"$at_stderr"
   4571 $at_diff expout "$at_stdout" || at_failed=:
   4572 at_fn_check_status 1 $at_status "$at_srcdir/input.at:421"
   4573 $at_failed && at_fn_log_failure
   4574 $at_traceon; }
   4575 
   4576 
   4577   # Build expected stderr up to and including the "warnings being
   4578   # treated as errors" message.
   4579   cat >at-bison-check-warnings <<'_ATEOF'
   4580 input.y:6.8-45: warning: unset value: $$
   4581 input.y:6.12-14: warning: unused value: $2
   4582 input.y:7.6-8: warning: unset value: $$
   4583 _ATEOF
   4584 
   4585   at_bison_check_first=`sed -n \
   4586     '/: warning: /{=;q;}' at-bison-check-warnings`
   4587   : ${at_bison_check_first:=1}
   4588   at_bison_check_first_tmp=`sed -n \
   4589     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   4590   : ${at_bison_check_first_tmp:=1}
   4591   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   4592     at_bison_check_first=$at_bison_check_first_tmp
   4593   fi
   4594   if test $at_bison_check_first -gt 1; then
   4595     sed -n "1,`expr $at_bison_check_first - 1`"p \
   4596       at-bison-check-warnings > experr
   4597   fi
   4598   echo 'bison: warnings being treated as errors' >> experr
   4599 
   4600   # Finish building expected stderr and check.  Unlike warnings,
   4601   # complaints cause bison to exit early.  Thus, with -Werror, bison
   4602   # does not necessarily report all warnings that it does without
   4603   # -Werror, but it at least reports one.
   4604   at_bison_check_last=`sed -n '$=' stderr`
   4605   : ${at_bison_check_last:=1}
   4606   at_bison_check_last=`expr $at_bison_check_last - 1`
   4607   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   4608     at-bison-check-warnings >> experr
   4609   { set +x
   4610 $as_echo "$at_srcdir/input.at:421: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   4611               stderr 1>&2"
   4612 at_fn_check_prepare_notrace 'an embedded newline' "input.at:421"
   4613 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   4614               stderr 1>&2
   4615 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4616 at_status=$? at_failed=false
   4617 $at_check_filter
   4618 $at_diff experr "$at_stderr" || at_failed=:
   4619 at_fn_diff_devnull "$at_stdout" || at_failed=:
   4620 at_fn_check_status 0 $at_status "$at_srcdir/input.at:421"
   4621 $at_failed && at_fn_log_failure
   4622 $at_traceon; }
   4623 
   4624 
   4625   # Now check --warnings=error.
   4626   cp stderr experr
   4627   { set +x
   4628 $as_echo "$at_srcdir/input.at:421: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=error"
   4629 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=error" "input.at:421"
   4630 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y --warnings=error
   4631 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4632 at_status=$? at_failed=false
   4633 $at_check_filter
   4634 $at_diff experr "$at_stderr" || at_failed=:
   4635 $at_diff expout "$at_stdout" || at_failed=:
   4636 at_fn_check_status 1 $at_status "$at_srcdir/input.at:421"
   4637 $at_failed && at_fn_log_failure
   4638 $at_traceon; }
   4639 
   4640 
   4641   # Now check -Wnone and --warnings=none by making sure that
   4642   # -Werror doesn't change the exit status when -Wnone or
   4643   # --warnings=none is specified.
   4644   { set +x
   4645 $as_echo "$at_srcdir/input.at:421: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Wnone -Werror"
   4646 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Wnone -Werror" "input.at:421"
   4647 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y -Wnone -Werror
   4648 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4649 at_status=$? at_failed=false
   4650 $at_check_filter
   4651 at_fn_diff_devnull "$at_stderr" || at_failed=:
   4652 $at_diff expout "$at_stdout" || at_failed=:
   4653 at_fn_check_status 0 $at_status "$at_srcdir/input.at:421"
   4654 $at_failed && at_fn_log_failure
   4655 $at_traceon; }
   4656 
   4657   { set +x
   4658 $as_echo "$at_srcdir/input.at:421: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror"
   4659 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror" "input.at:421"
   4660 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror
   4661 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4662 at_status=$? at_failed=false
   4663 $at_check_filter
   4664 at_fn_diff_devnull "$at_stderr" || at_failed=:
   4665 $at_diff expout "$at_stdout" || at_failed=:
   4666 at_fn_check_status 0 $at_status "$at_srcdir/input.at:421"
   4667 $at_failed && at_fn_log_failure
   4668 $at_traceon; }
   4669 
   4670 
   4671   at_restore_special_files
   4672 fi
   4673 
   4674 cat >input.y <<'_ATEOF'
   4675 %destructor { destroy ($$); } <*>
   4676 %type <tag> tagged
   4677 
   4678 %%
   4679 
   4680 start: end end tagged tagged { $<tag>1; $3; } ;
   4681 end: { } ;
   4682 tagged: { } ;
   4683 _ATEOF
   4684 
   4685 
   4686 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   4687   at_save_special_files
   4688   mkdir xml-tests
   4689     # Don't combine these Bison invocations since we want to be sure that
   4690   # --report=all isn't required to get the full XML file.
   4691   { set +x
   4692 $as_echo "$at_srcdir/input.at:438: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   4693                   --graph=xml-tests/test.dot input.y"
   4694 at_fn_check_prepare_notrace 'an embedded newline' "input.at:438"
   4695 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   4696                   --graph=xml-tests/test.dot input.y
   4697 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4698 at_status=$? at_failed=false
   4699 $at_check_filter
   4700 echo stderr:; cat "$at_stderr"
   4701 echo stdout:; cat "$at_stdout"
   4702 at_fn_check_status 0 $at_status "$at_srcdir/input.at:438"
   4703 $at_failed && at_fn_log_failure
   4704 $at_traceon; }
   4705 
   4706   { set +x
   4707 $as_echo "$at_srcdir/input.at:438: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y"
   4708 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y" "input.at:438"
   4709 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y
   4710 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4711 at_status=$? at_failed=false
   4712 $at_check_filter
   4713 echo stderr:; cat "$at_stderr"
   4714 echo stdout:; cat "$at_stdout"
   4715 at_fn_check_status 0 $at_status "$at_srcdir/input.at:438"
   4716 $at_failed && at_fn_log_failure
   4717 $at_traceon; }
   4718 
   4719     cp xml-tests/test.output expout
   4720   { set +x
   4721 $as_echo "$at_srcdir/input.at:438: \$XSLTPROC \\
   4722              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   4723              xml-tests/test.xml"
   4724 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:438"
   4725 ( $at_check_trace; $XSLTPROC \
   4726              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   4727              xml-tests/test.xml
   4728 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4729 at_status=$? at_failed=false
   4730 $at_check_filter
   4731 at_fn_diff_devnull "$at_stderr" || at_failed=:
   4732 $at_diff expout "$at_stdout" || at_failed=:
   4733 at_fn_check_status 0 $at_status "$at_srcdir/input.at:438"
   4734 $at_failed && at_fn_log_failure
   4735 $at_traceon; }
   4736 
   4737   sort xml-tests/test.dot > expout
   4738   { set +x
   4739 $as_echo "$at_srcdir/input.at:438: \$XSLTPROC \\
   4740              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   4741              xml-tests/test.xml | sort"
   4742 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:438"
   4743 ( $at_check_trace; $XSLTPROC \
   4744              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   4745              xml-tests/test.xml | sort
   4746 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4747 at_status=$? at_failed=false
   4748 $at_check_filter
   4749 at_fn_diff_devnull "$at_stderr" || at_failed=:
   4750 $at_diff expout "$at_stdout" || at_failed=:
   4751 at_fn_check_status 0 $at_status "$at_srcdir/input.at:438"
   4752 $at_failed && at_fn_log_failure
   4753 $at_traceon; }
   4754 
   4755   rm -rf xml-tests expout
   4756   at_restore_special_files
   4757 fi
   4758 { set +x
   4759 $as_echo "$at_srcdir/input.at:438: bison input.y"
   4760 at_fn_check_prepare_trace "input.at:438"
   4761 ( $at_check_trace; bison input.y
   4762 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4763 at_status=$? at_failed=false
   4764 $at_check_filter
   4765 echo >>"$at_stderr"; $as_echo "input.y:6.23-28: warning: unused value: \$4
   4766 input.y:8.9-11: warning: unset value: \$\$
   4767 " | \
   4768   $at_diff - "$at_stderr" || at_failed=:
   4769 at_fn_diff_devnull "$at_stdout" || at_failed=:
   4770 at_fn_check_status 0 $at_status "$at_srcdir/input.at:438"
   4771 $at_failed && at_fn_log_failure
   4772 $at_traceon; }
   4773 
   4774 # Defining POSIXLY_CORRECT causes bison to complain if options are
   4775 # added after the grammar file name, so skip these checks in that
   4776 # case.
   4777 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   4778   at_save_special_files
   4779 
   4780   # To avoid expanding it repeatedly, store specified stdout.
   4781   : >expout
   4782 
   4783   # Run with -Werror.
   4784   { set +x
   4785 $as_echo "$at_srcdir/input.at:438: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Werror"
   4786 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Werror" "input.at:438"
   4787 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y -Werror
   4788 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4789 at_status=$? at_failed=false
   4790 $at_check_filter
   4791 echo stderr:; tee stderr <"$at_stderr"
   4792 $at_diff expout "$at_stdout" || at_failed=:
   4793 at_fn_check_status 1 $at_status "$at_srcdir/input.at:438"
   4794 $at_failed && at_fn_log_failure
   4795 $at_traceon; }
   4796 
   4797 
   4798   # Build expected stderr up to and including the "warnings being
   4799   # treated as errors" message.
   4800   cat >at-bison-check-warnings <<'_ATEOF'
   4801 input.y:6.23-28: warning: unused value: $4
   4802 input.y:8.9-11: warning: unset value: $$
   4803 _ATEOF
   4804 
   4805   at_bison_check_first=`sed -n \
   4806     '/: warning: /{=;q;}' at-bison-check-warnings`
   4807   : ${at_bison_check_first:=1}
   4808   at_bison_check_first_tmp=`sed -n \
   4809     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   4810   : ${at_bison_check_first_tmp:=1}
   4811   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   4812     at_bison_check_first=$at_bison_check_first_tmp
   4813   fi
   4814   if test $at_bison_check_first -gt 1; then
   4815     sed -n "1,`expr $at_bison_check_first - 1`"p \
   4816       at-bison-check-warnings > experr
   4817   fi
   4818   echo 'bison: warnings being treated as errors' >> experr
   4819 
   4820   # Finish building expected stderr and check.  Unlike warnings,
   4821   # complaints cause bison to exit early.  Thus, with -Werror, bison
   4822   # does not necessarily report all warnings that it does without
   4823   # -Werror, but it at least reports one.
   4824   at_bison_check_last=`sed -n '$=' stderr`
   4825   : ${at_bison_check_last:=1}
   4826   at_bison_check_last=`expr $at_bison_check_last - 1`
   4827   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   4828     at-bison-check-warnings >> experr
   4829   { set +x
   4830 $as_echo "$at_srcdir/input.at:438: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   4831               stderr 1>&2"
   4832 at_fn_check_prepare_notrace 'an embedded newline' "input.at:438"
   4833 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   4834               stderr 1>&2
   4835 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4836 at_status=$? at_failed=false
   4837 $at_check_filter
   4838 $at_diff experr "$at_stderr" || at_failed=:
   4839 at_fn_diff_devnull "$at_stdout" || at_failed=:
   4840 at_fn_check_status 0 $at_status "$at_srcdir/input.at:438"
   4841 $at_failed && at_fn_log_failure
   4842 $at_traceon; }
   4843 
   4844 
   4845   # Now check --warnings=error.
   4846   cp stderr experr
   4847   { set +x
   4848 $as_echo "$at_srcdir/input.at:438: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=error"
   4849 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=error" "input.at:438"
   4850 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y --warnings=error
   4851 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4852 at_status=$? at_failed=false
   4853 $at_check_filter
   4854 $at_diff experr "$at_stderr" || at_failed=:
   4855 $at_diff expout "$at_stdout" || at_failed=:
   4856 at_fn_check_status 1 $at_status "$at_srcdir/input.at:438"
   4857 $at_failed && at_fn_log_failure
   4858 $at_traceon; }
   4859 
   4860 
   4861   # Now check -Wnone and --warnings=none by making sure that
   4862   # -Werror doesn't change the exit status when -Wnone or
   4863   # --warnings=none is specified.
   4864   { set +x
   4865 $as_echo "$at_srcdir/input.at:438: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Wnone -Werror"
   4866 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Wnone -Werror" "input.at:438"
   4867 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y -Wnone -Werror
   4868 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4869 at_status=$? at_failed=false
   4870 $at_check_filter
   4871 at_fn_diff_devnull "$at_stderr" || at_failed=:
   4872 $at_diff expout "$at_stdout" || at_failed=:
   4873 at_fn_check_status 0 $at_status "$at_srcdir/input.at:438"
   4874 $at_failed && at_fn_log_failure
   4875 $at_traceon; }
   4876 
   4877   { set +x
   4878 $as_echo "$at_srcdir/input.at:438: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror"
   4879 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror" "input.at:438"
   4880 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror
   4881 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4882 at_status=$? at_failed=false
   4883 $at_check_filter
   4884 at_fn_diff_devnull "$at_stderr" || at_failed=:
   4885 $at_diff expout "$at_stdout" || at_failed=:
   4886 at_fn_check_status 0 $at_status "$at_srcdir/input.at:438"
   4887 $at_failed && at_fn_log_failure
   4888 $at_traceon; }
   4889 
   4890 
   4891   at_restore_special_files
   4892 fi
   4893 
   4894   set +x
   4895   $at_times_p && times >"$at_times_file"
   4896 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   4897 read at_status <"$at_status_file"
   4898 #AT_STOP_9
   4899 #AT_START_10
   4900 at_fn_group_banner 10 'input.at:450' \
   4901   "Unused values with per-type %destructor" "        " 1
   4902 at_xfail=no
   4903 (
   4904   $as_echo "10. $at_setup_line: testing $at_desc ..."
   4905   $at_traceon
   4906 
   4907 
   4908 cat >input.y <<'_ATEOF'
   4909 %destructor { destroy ($$); } <field1>
   4910 %type <field1> start end
   4911 
   4912 %%
   4913 
   4914 start: end end { $1; } ;
   4915 end: { }  ;
   4916 _ATEOF
   4917 
   4918 
   4919 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   4920   at_save_special_files
   4921   mkdir xml-tests
   4922     # Don't combine these Bison invocations since we want to be sure that
   4923   # --report=all isn't required to get the full XML file.
   4924   { set +x
   4925 $as_echo "$at_srcdir/input.at:462: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   4926                   --graph=xml-tests/test.dot input.y"
   4927 at_fn_check_prepare_notrace 'an embedded newline' "input.at:462"
   4928 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   4929                   --graph=xml-tests/test.dot input.y
   4930 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4931 at_status=$? at_failed=false
   4932 $at_check_filter
   4933 echo stderr:; cat "$at_stderr"
   4934 echo stdout:; cat "$at_stdout"
   4935 at_fn_check_status 0 $at_status "$at_srcdir/input.at:462"
   4936 $at_failed && at_fn_log_failure
   4937 $at_traceon; }
   4938 
   4939   { set +x
   4940 $as_echo "$at_srcdir/input.at:462: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y"
   4941 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y" "input.at:462"
   4942 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y
   4943 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4944 at_status=$? at_failed=false
   4945 $at_check_filter
   4946 echo stderr:; cat "$at_stderr"
   4947 echo stdout:; cat "$at_stdout"
   4948 at_fn_check_status 0 $at_status "$at_srcdir/input.at:462"
   4949 $at_failed && at_fn_log_failure
   4950 $at_traceon; }
   4951 
   4952     cp xml-tests/test.output expout
   4953   { set +x
   4954 $as_echo "$at_srcdir/input.at:462: \$XSLTPROC \\
   4955              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   4956              xml-tests/test.xml"
   4957 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:462"
   4958 ( $at_check_trace; $XSLTPROC \
   4959              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   4960              xml-tests/test.xml
   4961 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4962 at_status=$? at_failed=false
   4963 $at_check_filter
   4964 at_fn_diff_devnull "$at_stderr" || at_failed=:
   4965 $at_diff expout "$at_stdout" || at_failed=:
   4966 at_fn_check_status 0 $at_status "$at_srcdir/input.at:462"
   4967 $at_failed && at_fn_log_failure
   4968 $at_traceon; }
   4969 
   4970   sort xml-tests/test.dot > expout
   4971   { set +x
   4972 $as_echo "$at_srcdir/input.at:462: \$XSLTPROC \\
   4973              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   4974              xml-tests/test.xml | sort"
   4975 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:462"
   4976 ( $at_check_trace; $XSLTPROC \
   4977              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   4978              xml-tests/test.xml | sort
   4979 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4980 at_status=$? at_failed=false
   4981 $at_check_filter
   4982 at_fn_diff_devnull "$at_stderr" || at_failed=:
   4983 $at_diff expout "$at_stdout" || at_failed=:
   4984 at_fn_check_status 0 $at_status "$at_srcdir/input.at:462"
   4985 $at_failed && at_fn_log_failure
   4986 $at_traceon; }
   4987 
   4988   rm -rf xml-tests expout
   4989   at_restore_special_files
   4990 fi
   4991 { set +x
   4992 $as_echo "$at_srcdir/input.at:462: bison input.y"
   4993 at_fn_check_prepare_trace "input.at:462"
   4994 ( $at_check_trace; bison input.y
   4995 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   4996 at_status=$? at_failed=false
   4997 $at_check_filter
   4998 echo >>"$at_stderr"; $as_echo "input.y:6.8-22: warning: unset value: \$\$
   4999 input.y:6.12-14: warning: unused value: \$2
   5000 input.y:7.6-8: warning: unset value: \$\$
   5001 " | \
   5002   $at_diff - "$at_stderr" || at_failed=:
   5003 at_fn_diff_devnull "$at_stdout" || at_failed=:
   5004 at_fn_check_status 0 $at_status "$at_srcdir/input.at:462"
   5005 $at_failed && at_fn_log_failure
   5006 $at_traceon; }
   5007 
   5008 # Defining POSIXLY_CORRECT causes bison to complain if options are
   5009 # added after the grammar file name, so skip these checks in that
   5010 # case.
   5011 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   5012   at_save_special_files
   5013 
   5014   # To avoid expanding it repeatedly, store specified stdout.
   5015   : >expout
   5016 
   5017   # Run with -Werror.
   5018   { set +x
   5019 $as_echo "$at_srcdir/input.at:462: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Werror"
   5020 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Werror" "input.at:462"
   5021 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y -Werror
   5022 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5023 at_status=$? at_failed=false
   5024 $at_check_filter
   5025 echo stderr:; tee stderr <"$at_stderr"
   5026 $at_diff expout "$at_stdout" || at_failed=:
   5027 at_fn_check_status 1 $at_status "$at_srcdir/input.at:462"
   5028 $at_failed && at_fn_log_failure
   5029 $at_traceon; }
   5030 
   5031 
   5032   # Build expected stderr up to and including the "warnings being
   5033   # treated as errors" message.
   5034   cat >at-bison-check-warnings <<'_ATEOF'
   5035 input.y:6.8-22: warning: unset value: $$
   5036 input.y:6.12-14: warning: unused value: $2
   5037 input.y:7.6-8: warning: unset value: $$
   5038 _ATEOF
   5039 
   5040   at_bison_check_first=`sed -n \
   5041     '/: warning: /{=;q;}' at-bison-check-warnings`
   5042   : ${at_bison_check_first:=1}
   5043   at_bison_check_first_tmp=`sed -n \
   5044     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   5045   : ${at_bison_check_first_tmp:=1}
   5046   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   5047     at_bison_check_first=$at_bison_check_first_tmp
   5048   fi
   5049   if test $at_bison_check_first -gt 1; then
   5050     sed -n "1,`expr $at_bison_check_first - 1`"p \
   5051       at-bison-check-warnings > experr
   5052   fi
   5053   echo 'bison: warnings being treated as errors' >> experr
   5054 
   5055   # Finish building expected stderr and check.  Unlike warnings,
   5056   # complaints cause bison to exit early.  Thus, with -Werror, bison
   5057   # does not necessarily report all warnings that it does without
   5058   # -Werror, but it at least reports one.
   5059   at_bison_check_last=`sed -n '$=' stderr`
   5060   : ${at_bison_check_last:=1}
   5061   at_bison_check_last=`expr $at_bison_check_last - 1`
   5062   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   5063     at-bison-check-warnings >> experr
   5064   { set +x
   5065 $as_echo "$at_srcdir/input.at:462: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   5066               stderr 1>&2"
   5067 at_fn_check_prepare_notrace 'an embedded newline' "input.at:462"
   5068 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   5069               stderr 1>&2
   5070 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5071 at_status=$? at_failed=false
   5072 $at_check_filter
   5073 $at_diff experr "$at_stderr" || at_failed=:
   5074 at_fn_diff_devnull "$at_stdout" || at_failed=:
   5075 at_fn_check_status 0 $at_status "$at_srcdir/input.at:462"
   5076 $at_failed && at_fn_log_failure
   5077 $at_traceon; }
   5078 
   5079 
   5080   # Now check --warnings=error.
   5081   cp stderr experr
   5082   { set +x
   5083 $as_echo "$at_srcdir/input.at:462: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=error"
   5084 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=error" "input.at:462"
   5085 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y --warnings=error
   5086 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5087 at_status=$? at_failed=false
   5088 $at_check_filter
   5089 $at_diff experr "$at_stderr" || at_failed=:
   5090 $at_diff expout "$at_stdout" || at_failed=:
   5091 at_fn_check_status 1 $at_status "$at_srcdir/input.at:462"
   5092 $at_failed && at_fn_log_failure
   5093 $at_traceon; }
   5094 
   5095 
   5096   # Now check -Wnone and --warnings=none by making sure that
   5097   # -Werror doesn't change the exit status when -Wnone or
   5098   # --warnings=none is specified.
   5099   { set +x
   5100 $as_echo "$at_srcdir/input.at:462: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Wnone -Werror"
   5101 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Wnone -Werror" "input.at:462"
   5102 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y -Wnone -Werror
   5103 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5104 at_status=$? at_failed=false
   5105 $at_check_filter
   5106 at_fn_diff_devnull "$at_stderr" || at_failed=:
   5107 $at_diff expout "$at_stdout" || at_failed=:
   5108 at_fn_check_status 0 $at_status "$at_srcdir/input.at:462"
   5109 $at_failed && at_fn_log_failure
   5110 $at_traceon; }
   5111 
   5112   { set +x
   5113 $as_echo "$at_srcdir/input.at:462: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror"
   5114 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror" "input.at:462"
   5115 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror
   5116 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5117 at_status=$? at_failed=false
   5118 $at_check_filter
   5119 at_fn_diff_devnull "$at_stderr" || at_failed=:
   5120 $at_diff expout "$at_stdout" || at_failed=:
   5121 at_fn_check_status 0 $at_status "$at_srcdir/input.at:462"
   5122 $at_failed && at_fn_log_failure
   5123 $at_traceon; }
   5124 
   5125 
   5126   at_restore_special_files
   5127 fi
   5128 
   5129   set +x
   5130   $at_times_p && times >"$at_times_file"
   5131 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   5132 read at_status <"$at_status_file"
   5133 #AT_STOP_10
   5134 #AT_START_11
   5135 at_fn_group_banner 11 'input.at:475' \
   5136   "Incompatible Aliases" "                           " 1
   5137 at_xfail=no
   5138 (
   5139   $as_echo "11. $at_setup_line: testing $at_desc ..."
   5140   $at_traceon
   5141 
   5142 
   5143 cat >input.y <<'_ATEOF'
   5144 %token foo "foo"
   5145 
   5146 %type <bar>       foo
   5147 %printer {bar}    foo
   5148 %destructor {bar} foo
   5149 %left             foo
   5150 
   5151 %type <baz>       "foo"
   5152 %printer {baz}    "foo"
   5153 %destructor {baz} "foo"
   5154 %left             "foo"
   5155 
   5156 %%
   5157 exp: foo;
   5158 _ATEOF
   5159 
   5160 
   5161 
   5162 { set +x
   5163 $as_echo "$at_srcdir/input.at:494: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   5164 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:494"
   5165 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   5166 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5167 at_status=$? at_failed=false
   5168 $at_check_filter
   5169 echo >>"$at_stderr"; $as_echo "input.y:8.7-11: error: %type redeclaration for foo
   5170 input.y:3.7-11:     previous declaration
   5171 input.y:10.13-17: error: %destructor redeclaration for foo
   5172 input.y:5.13-17:      previous declaration
   5173 input.y:9.10-14: error: %printer redeclaration for foo
   5174 input.y:4.10-14:     previous declaration
   5175 input.y:11.1-5: error: %left redeclaration for foo
   5176 input.y:6.1-5:      previous declaration
   5177 " | \
   5178   $at_diff - "$at_stderr" || at_failed=:
   5179 at_fn_diff_devnull "$at_stdout" || at_failed=:
   5180 at_fn_check_status 1 $at_status "$at_srcdir/input.at:494"
   5181 $at_failed && at_fn_log_failure
   5182 $at_traceon; }
   5183 
   5184 
   5185 
   5186   set +x
   5187   $at_times_p && times >"$at_times_file"
   5188 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   5189 read at_status <"$at_status_file"
   5190 #AT_STOP_11
   5191 #AT_START_12
   5192 at_fn_group_banner 12 'input.at:516' \
   5193   "Torturing the Scanner" "                          " 1
   5194 at_xfail=no
   5195 (
   5196   $as_echo "12. $at_setup_line: testing $at_desc ..."
   5197   $at_traceon
   5198 
   5199 
   5200 
   5201 : >input.y
   5202 
   5203 { set +x
   5204 $as_echo "$at_srcdir/input.at:520: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   5205 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:520"
   5206 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   5207 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5208 at_status=$? at_failed=false
   5209 $at_check_filter
   5210 echo >>"$at_stderr"; $as_echo "input.y:1.1: error: syntax error, unexpected end of file
   5211 " | \
   5212   $at_diff - "$at_stderr" || at_failed=:
   5213 at_fn_diff_devnull "$at_stdout" || at_failed=:
   5214 at_fn_check_status 1 $at_status "$at_srcdir/input.at:520"
   5215 $at_failed && at_fn_log_failure
   5216 $at_traceon; }
   5217 
   5218 
   5219 
   5220 
   5221 cat >input.y <<'_ATEOF'
   5222 {}
   5223 _ATEOF
   5224 
   5225 
   5226 { set +x
   5227 $as_echo "$at_srcdir/input.at:528: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   5228 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:528"
   5229 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   5230 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5231 at_status=$? at_failed=false
   5232 $at_check_filter
   5233 echo >>"$at_stderr"; $as_echo "input.y:1.1-2: error: syntax error, unexpected {...}
   5234 " | \
   5235   $at_diff - "$at_stderr" || at_failed=:
   5236 at_fn_diff_devnull "$at_stdout" || at_failed=:
   5237 at_fn_check_status 1 $at_status "$at_srcdir/input.at:528"
   5238 $at_failed && at_fn_log_failure
   5239 $at_traceon; }
   5240 
   5241 
   5242 
   5243 
   5244 cat >input.y <<'_ATEOF'
   5245 %code top {
   5246 #include <config.h>
   5247 /* We don't need perfect functions for these tests. */
   5248 #undef malloc
   5249 #undef memcmp
   5250 #undef realloc
   5251 }
   5252 
   5253 %{
   5254 /* This is seen in GCC: a %{ and %} in middle of a comment. */
   5255 const char *foo = "So %{ and %} can be here too.";
   5256 
   5257 #if 0
   5258 /* These examples test Bison while not stressing C compilers too much.
   5259    Many C compilers mishandle backslash-newlines, so this part of the
   5260    test is inside "#if 0".  The comment and string are written so that
   5261    the "#endif" will be seen regardless of the C compiler bugs that we
   5262    know about, namely:
   5263 
   5264      HP C (as of late 2002) mishandles *\[newline]\[newline]/ within a
   5265      comment.
   5266 
   5267      The Apple Darwin compiler (as of late 2002) mishandles
   5268      \\[newline]' within a character constant.
   5269 
   5270    */
   5271 
   5272 /\
   5273 * A comment with backslash-newlines in it. %} *\
   5274 \
   5275 /
   5276 /* { Close the above comment, if the C compiler mishandled it.  */
   5277 
   5278 char str[] = "\\
   5279 " A string with backslash-newlines in it %{ %} \\
   5280 \
   5281 "";
   5282 
   5283 char apostrophe = '\'';
   5284 #endif
   5285 
   5286 #include <stdio.h>
   5287 #include <stdlib.h>
   5288 #include <assert.h>
   5289 %}
   5290 /* %{ and %} can be here too. */
   5291 
   5292 %{
   5293 /* Exercise pre-prologue dependency to %union.  */
   5294 typedef int value;
   5295 %}
   5296 
   5297 /* Exercise M4 quoting: ']]', 0.  */
   5298 
   5299 /* Also exercise %union. */
   5300 %union
   5301 {
   5302   value ival; /* A comment to exercise an old bug. */
   5303 };
   5304 
   5305 
   5306 /* Exercise post-prologue dependency to %union.  */
   5307 %{
   5308 static YYSTYPE value_as_yystype (value val);
   5309 
   5310 /* Exercise quotes in declarations.  */
   5311 char quote[] = "]],";
   5312 %}
   5313 
   5314 %{
   5315 static void yyerror ( const char *msg);
   5316 static int yylex (void);
   5317 %}
   5318 
   5319 %type <ival> '['
   5320 
   5321 /* Exercise quotes in strings.  */
   5322 %token FAKE "fake [] \a\b\f\n\r\t\v\"\'\?\\\u005B\U0000005c ??!??'??(??)??-??/??<??=??> \x1\1"
   5323 
   5324 %%
   5325 /* Exercise M4 quoting: ']]', [, 1.  */
   5326 exp: '[' '\1' two '$' '@' '{' oline output.or.oline.opt
   5327   {
   5328     /* Exercise quotes in braces.  */
   5329     char tmp[] = "[%c],\n";
   5330     printf (tmp, $1);
   5331   }
   5332 ;
   5333 
   5334 two: '\x000000000000000000000000000000000000000000000000000000000000000000002';
   5335 oline: '@' 'o' 'l' 'i' 'n' 'e' '@' '_' '_' 'o' 'l' 'i' 'n' 'e' '_' '_';
   5336 output.or.oline.opt: ;|oline;;|output;;;
   5337 output: '#' 'o' 'u' 't' 'p' 'u' 't' ' ';
   5338 %%
   5339 /* Exercise M4 quoting: ']]', [, 2.  */
   5340 
   5341 static YYSTYPE
   5342 value_as_yystype (value val)
   5343 {
   5344   YYSTYPE res;
   5345   res.ival = val;
   5346   return res;
   5347 }
   5348 #include <stdio.h>
   5349 /* A C error reporting function.  */
   5350 static
   5351 void yyerror ( const char *msg)
   5352 {
   5353   fprintf (stderr, "%s\n", msg);
   5354 }
   5355 static int
   5356 yylex (void)
   5357 {
   5358   static char const input[] = "[\1\2$@{@oline@__oline__\
   5359 #output "; /* "
   5360   */
   5361   static size_t toknum;
   5362   assert (toknum < sizeof input);
   5363   yylval = value_as_yystype (input[toknum]);
   5364   return input[toknum++];
   5365 }
   5366 _ATEOF
   5367 
   5368 
   5369 
   5370 # Pacify Emacs' font-lock-mode: "
   5371 
   5372 cat >main.c <<'_ATEOF'
   5373 typedef int value;
   5374 #include "input.h"
   5375 
   5376 int yyparse (void);
   5377 
   5378 int
   5379 main (void)
   5380 {
   5381   return yyparse ();
   5382 }
   5383 _ATEOF
   5384 
   5385 
   5386 
   5387 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   5388   at_save_special_files
   5389   mkdir xml-tests
   5390     # Don't combine these Bison invocations since we want to be sure that
   5391   # --report=all isn't required to get the full XML file.
   5392   { set +x
   5393 $as_echo "$at_srcdir/input.at:659: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   5394                   --graph=xml-tests/test.dot -d -v -o input.c input.y"
   5395 at_fn_check_prepare_notrace 'an embedded newline' "input.at:659"
   5396 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   5397                   --graph=xml-tests/test.dot -d -v -o input.c input.y
   5398 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5399 at_status=$? at_failed=false
   5400 $at_check_filter
   5401 echo stderr:; cat "$at_stderr"
   5402 echo stdout:; cat "$at_stdout"
   5403 at_fn_check_status 0 $at_status "$at_srcdir/input.at:659"
   5404 $at_failed && at_fn_log_failure
   5405 $at_traceon; }
   5406 
   5407   { set +x
   5408 $as_echo "$at_srcdir/input.at:659: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -v -o input.c input.y"
   5409 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -v -o input.c input.y" "input.at:659"
   5410 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -v -o input.c input.y
   5411 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5412 at_status=$? at_failed=false
   5413 $at_check_filter
   5414 echo stderr:; cat "$at_stderr"
   5415 echo stdout:; cat "$at_stdout"
   5416 at_fn_check_status 0 $at_status "$at_srcdir/input.at:659"
   5417 $at_failed && at_fn_log_failure
   5418 $at_traceon; }
   5419 
   5420     cp xml-tests/test.output expout
   5421   { set +x
   5422 $as_echo "$at_srcdir/input.at:659: \$XSLTPROC \\
   5423              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   5424              xml-tests/test.xml"
   5425 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:659"
   5426 ( $at_check_trace; $XSLTPROC \
   5427              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   5428              xml-tests/test.xml
   5429 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5430 at_status=$? at_failed=false
   5431 $at_check_filter
   5432 at_fn_diff_devnull "$at_stderr" || at_failed=:
   5433 $at_diff expout "$at_stdout" || at_failed=:
   5434 at_fn_check_status 0 $at_status "$at_srcdir/input.at:659"
   5435 $at_failed && at_fn_log_failure
   5436 $at_traceon; }
   5437 
   5438   sort xml-tests/test.dot > expout
   5439   { set +x
   5440 $as_echo "$at_srcdir/input.at:659: \$XSLTPROC \\
   5441              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   5442              xml-tests/test.xml | sort"
   5443 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:659"
   5444 ( $at_check_trace; $XSLTPROC \
   5445              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   5446              xml-tests/test.xml | sort
   5447 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5448 at_status=$? at_failed=false
   5449 $at_check_filter
   5450 at_fn_diff_devnull "$at_stderr" || at_failed=:
   5451 $at_diff expout "$at_stdout" || at_failed=:
   5452 at_fn_check_status 0 $at_status "$at_srcdir/input.at:659"
   5453 $at_failed && at_fn_log_failure
   5454 $at_traceon; }
   5455 
   5456   rm -rf xml-tests expout
   5457   at_restore_special_files
   5458 fi
   5459 { set +x
   5460 $as_echo "$at_srcdir/input.at:659: bison -d -v -o input.c input.y"
   5461 at_fn_check_prepare_trace "input.at:659"
   5462 ( $at_check_trace; bison -d -v -o input.c input.y
   5463 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5464 at_status=$? at_failed=false
   5465 $at_check_filter
   5466 at_fn_diff_devnull "$at_stderr" || at_failed=:
   5467 at_fn_diff_devnull "$at_stdout" || at_failed=:
   5468 at_fn_check_status 0 $at_status "$at_srcdir/input.at:659"
   5469 $at_failed && at_fn_log_failure
   5470 $at_traceon; }
   5471 
   5472 
   5473 { set +x
   5474 $as_echo "$at_srcdir/input.at:660: \$BISON_C_WORKS"
   5475 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "input.at:660"
   5476 ( $at_check_trace; $BISON_C_WORKS
   5477 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5478 at_status=$? at_failed=false
   5479 $at_check_filter
   5480 echo stderr:; cat "$at_stderr"
   5481 echo stdout:; cat "$at_stdout"
   5482 at_fn_check_status 0 $at_status "$at_srcdir/input.at:660"
   5483 $at_failed && at_fn_log_failure
   5484 $at_traceon; }
   5485 
   5486 { set +x
   5487 $as_echo "$at_srcdir/input.at:660: \$CC \$CFLAGS \$CPPFLAGS -c -o input.o input.c "
   5488 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o input.o input.c " "input.at:660"
   5489 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o input.o input.c
   5490 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5491 at_status=$? at_failed=false
   5492 $at_check_filter
   5493 echo stderr:; cat "$at_stderr"
   5494 echo stdout:; cat "$at_stdout"
   5495 at_fn_check_status 0 $at_status "$at_srcdir/input.at:660"
   5496 $at_failed && at_fn_log_failure
   5497 $at_traceon; }
   5498 
   5499 { set +x
   5500 $as_echo "$at_srcdir/input.at:661: \$BISON_C_WORKS"
   5501 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "input.at:661"
   5502 ( $at_check_trace; $BISON_C_WORKS
   5503 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5504 at_status=$? at_failed=false
   5505 $at_check_filter
   5506 echo stderr:; cat "$at_stderr"
   5507 echo stdout:; cat "$at_stdout"
   5508 at_fn_check_status 0 $at_status "$at_srcdir/input.at:661"
   5509 $at_failed && at_fn_log_failure
   5510 $at_traceon; }
   5511 
   5512 { set +x
   5513 $as_echo "$at_srcdir/input.at:661: \$CC \$CFLAGS \$CPPFLAGS -c -o main.o main.c "
   5514 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o main.o main.c " "input.at:661"
   5515 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o main.o main.c
   5516 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5517 at_status=$? at_failed=false
   5518 $at_check_filter
   5519 echo stderr:; cat "$at_stderr"
   5520 echo stdout:; cat "$at_stdout"
   5521 at_fn_check_status 0 $at_status "$at_srcdir/input.at:661"
   5522 $at_failed && at_fn_log_failure
   5523 $at_traceon; }
   5524 
   5525 { set +x
   5526 $as_echo "$at_srcdir/input.at:662: \$BISON_C_WORKS"
   5527 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "input.at:662"
   5528 ( $at_check_trace; $BISON_C_WORKS
   5529 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5530 at_status=$? at_failed=false
   5531 $at_check_filter
   5532 echo stderr:; cat "$at_stderr"
   5533 echo stdout:; cat "$at_stdout"
   5534 at_fn_check_status 0 $at_status "$at_srcdir/input.at:662"
   5535 $at_failed && at_fn_log_failure
   5536 $at_traceon; }
   5537 
   5538 { set +x
   5539 $as_echo "$at_srcdir/input.at:662: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.o main.o \$LIBS"
   5540 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.o main.o $LIBS" "input.at:662"
   5541 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.o main.o $LIBS
   5542 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5543 at_status=$? at_failed=false
   5544 $at_check_filter
   5545 echo stderr:; cat "$at_stderr"
   5546 echo stdout:; cat "$at_stdout"
   5547 at_fn_check_status 0 $at_status "$at_srcdir/input.at:662"
   5548 $at_failed && at_fn_log_failure
   5549 $at_traceon; }
   5550 
   5551 { set +x
   5552 $as_echo "$at_srcdir/input.at:663:  \$PREPARSER ./input"
   5553 at_fn_check_prepare_dynamic " $PREPARSER ./input" "input.at:663"
   5554 ( $at_check_trace;  $PREPARSER ./input
   5555 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5556 at_status=$? at_failed=false
   5557 $at_check_filter
   5558 echo stderr:; tee stderr <"$at_stderr"
   5559 echo >>"$at_stdout"; $as_echo "[[],
   5560 " | \
   5561   $at_diff - "$at_stdout" || at_failed=:
   5562 at_fn_check_status 0 $at_status "$at_srcdir/input.at:663"
   5563 $at_failed && at_fn_log_failure
   5564 $at_traceon; }
   5565 
   5566 { set +x
   5567 $as_echo "$at_srcdir/input.at:663: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   5568 at_fn_check_prepare_trace "input.at:663"
   5569 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   5570 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5571 at_status=$? at_failed=false
   5572 $at_check_filter
   5573 at_fn_diff_devnull "$at_stderr" || at_failed=:
   5574 at_fn_diff_devnull "$at_stdout" || at_failed=:
   5575 at_fn_check_status 0 $at_status "$at_srcdir/input.at:663"
   5576 $at_failed && at_fn_log_failure
   5577 $at_traceon; }
   5578 
   5579 
   5580 
   5581   set +x
   5582   $at_times_p && times >"$at_times_file"
   5583 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   5584 read at_status <"$at_status_file"
   5585 #AT_STOP_12
   5586 #AT_START_13
   5587 at_fn_group_banner 13 'input.at:674' \
   5588   "Typed symbol aliases" "                           " 1
   5589 at_xfail=no
   5590 (
   5591   $as_echo "13. $at_setup_line: testing $at_desc ..."
   5592   $at_traceon
   5593 
   5594 
   5595 # Bison 2.0 broke typed symbol aliases - ensure they work.
   5596 
   5597 cat >input.y <<'_ATEOF'
   5598 %code top {
   5599 #include <config.h>
   5600 /* We don't need perfect functions for these tests. */
   5601 #undef malloc
   5602 #undef memcmp
   5603 #undef realloc
   5604 }
   5605 
   5606 %union
   5607 {
   5608   int val;
   5609 };
   5610 %token <val> MY_TOKEN "MY TOKEN"
   5611 %type <val> exp
   5612 %%
   5613 exp: "MY TOKEN";
   5614 %%
   5615 _ATEOF
   5616 
   5617 
   5618 
   5619 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   5620   at_save_special_files
   5621   mkdir xml-tests
   5622     # Don't combine these Bison invocations since we want to be sure that
   5623   # --report=all isn't required to get the full XML file.
   5624   { set +x
   5625 $as_echo "$at_srcdir/input.at:690: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   5626                   --graph=xml-tests/test.dot -o input.c input.y"
   5627 at_fn_check_prepare_notrace 'an embedded newline' "input.at:690"
   5628 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   5629                   --graph=xml-tests/test.dot -o input.c input.y
   5630 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5631 at_status=$? at_failed=false
   5632 $at_check_filter
   5633 echo stderr:; cat "$at_stderr"
   5634 echo stdout:; cat "$at_stdout"
   5635 at_fn_check_status 0 $at_status "$at_srcdir/input.at:690"
   5636 $at_failed && at_fn_log_failure
   5637 $at_traceon; }
   5638 
   5639   { set +x
   5640 $as_echo "$at_srcdir/input.at:690: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   5641 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "input.at:690"
   5642 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   5643 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5644 at_status=$? at_failed=false
   5645 $at_check_filter
   5646 echo stderr:; cat "$at_stderr"
   5647 echo stdout:; cat "$at_stdout"
   5648 at_fn_check_status 0 $at_status "$at_srcdir/input.at:690"
   5649 $at_failed && at_fn_log_failure
   5650 $at_traceon; }
   5651 
   5652     cp xml-tests/test.output expout
   5653   { set +x
   5654 $as_echo "$at_srcdir/input.at:690: \$XSLTPROC \\
   5655              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   5656              xml-tests/test.xml"
   5657 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:690"
   5658 ( $at_check_trace; $XSLTPROC \
   5659              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   5660              xml-tests/test.xml
   5661 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5662 at_status=$? at_failed=false
   5663 $at_check_filter
   5664 at_fn_diff_devnull "$at_stderr" || at_failed=:
   5665 $at_diff expout "$at_stdout" || at_failed=:
   5666 at_fn_check_status 0 $at_status "$at_srcdir/input.at:690"
   5667 $at_failed && at_fn_log_failure
   5668 $at_traceon; }
   5669 
   5670   sort xml-tests/test.dot > expout
   5671   { set +x
   5672 $as_echo "$at_srcdir/input.at:690: \$XSLTPROC \\
   5673              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   5674              xml-tests/test.xml | sort"
   5675 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:690"
   5676 ( $at_check_trace; $XSLTPROC \
   5677              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   5678              xml-tests/test.xml | sort
   5679 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5680 at_status=$? at_failed=false
   5681 $at_check_filter
   5682 at_fn_diff_devnull "$at_stderr" || at_failed=:
   5683 $at_diff expout "$at_stdout" || at_failed=:
   5684 at_fn_check_status 0 $at_status "$at_srcdir/input.at:690"
   5685 $at_failed && at_fn_log_failure
   5686 $at_traceon; }
   5687 
   5688   rm -rf xml-tests expout
   5689   at_restore_special_files
   5690 fi
   5691 { set +x
   5692 $as_echo "$at_srcdir/input.at:690: bison -o input.c input.y"
   5693 at_fn_check_prepare_trace "input.at:690"
   5694 ( $at_check_trace; bison -o input.c input.y
   5695 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5696 at_status=$? at_failed=false
   5697 $at_check_filter
   5698 at_fn_diff_devnull "$at_stderr" || at_failed=:
   5699 at_fn_diff_devnull "$at_stdout" || at_failed=:
   5700 at_fn_check_status 0 $at_status "$at_srcdir/input.at:690"
   5701 $at_failed && at_fn_log_failure
   5702 $at_traceon; }
   5703 
   5704 
   5705 
   5706   set +x
   5707   $at_times_p && times >"$at_times_file"
   5708 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   5709 read at_status <"$at_status_file"
   5710 #AT_STOP_13
   5711 #AT_START_14
   5712 at_fn_group_banner 14 'input.at:710' \
   5713   "Require 1.0" "                                    " 1
   5714 at_xfail=no
   5715 (
   5716   $as_echo "14. $at_setup_line: testing $at_desc ..."
   5717   $at_traceon
   5718 
   5719 cat >input.y <<'_ATEOF'
   5720 %code top {
   5721 #include <config.h>
   5722 /* We don't need perfect functions for these tests. */
   5723 #undef malloc
   5724 #undef memcmp
   5725 #undef realloc
   5726 }
   5727 
   5728 %require "1.0";
   5729 %%
   5730 empty_file:;
   5731 _ATEOF
   5732 
   5733 
   5734 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   5735   at_save_special_files
   5736   mkdir xml-tests
   5737     # Don't combine these Bison invocations since we want to be sure that
   5738   # --report=all isn't required to get the full XML file.
   5739   { set +x
   5740 $as_echo "$at_srcdir/input.at:710: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   5741                   --graph=xml-tests/test.dot -o input.c input.y"
   5742 at_fn_check_prepare_notrace 'an embedded newline' "input.at:710"
   5743 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   5744                   --graph=xml-tests/test.dot -o input.c input.y
   5745 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5746 at_status=$? at_failed=false
   5747 $at_check_filter
   5748 echo stderr:; cat "$at_stderr"
   5749 echo stdout:; cat "$at_stdout"
   5750 at_fn_check_status 0 $at_status "$at_srcdir/input.at:710"
   5751 $at_failed && at_fn_log_failure
   5752 $at_traceon; }
   5753 
   5754   { set +x
   5755 $as_echo "$at_srcdir/input.at:710: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   5756 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "input.at:710"
   5757 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   5758 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5759 at_status=$? at_failed=false
   5760 $at_check_filter
   5761 echo stderr:; cat "$at_stderr"
   5762 echo stdout:; cat "$at_stdout"
   5763 at_fn_check_status 0 $at_status "$at_srcdir/input.at:710"
   5764 $at_failed && at_fn_log_failure
   5765 $at_traceon; }
   5766 
   5767     cp xml-tests/test.output expout
   5768   { set +x
   5769 $as_echo "$at_srcdir/input.at:710: \$XSLTPROC \\
   5770              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   5771              xml-tests/test.xml"
   5772 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:710"
   5773 ( $at_check_trace; $XSLTPROC \
   5774              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   5775              xml-tests/test.xml
   5776 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5777 at_status=$? at_failed=false
   5778 $at_check_filter
   5779 at_fn_diff_devnull "$at_stderr" || at_failed=:
   5780 $at_diff expout "$at_stdout" || at_failed=:
   5781 at_fn_check_status 0 $at_status "$at_srcdir/input.at:710"
   5782 $at_failed && at_fn_log_failure
   5783 $at_traceon; }
   5784 
   5785   sort xml-tests/test.dot > expout
   5786   { set +x
   5787 $as_echo "$at_srcdir/input.at:710: \$XSLTPROC \\
   5788              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   5789              xml-tests/test.xml | sort"
   5790 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:710"
   5791 ( $at_check_trace; $XSLTPROC \
   5792              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   5793              xml-tests/test.xml | sort
   5794 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5795 at_status=$? at_failed=false
   5796 $at_check_filter
   5797 at_fn_diff_devnull "$at_stderr" || at_failed=:
   5798 $at_diff expout "$at_stdout" || at_failed=:
   5799 at_fn_check_status 0 $at_status "$at_srcdir/input.at:710"
   5800 $at_failed && at_fn_log_failure
   5801 $at_traceon; }
   5802 
   5803   rm -rf xml-tests expout
   5804   at_restore_special_files
   5805 fi
   5806 { set +x
   5807 $as_echo "$at_srcdir/input.at:710: bison -o input.c input.y"
   5808 at_fn_check_prepare_trace "input.at:710"
   5809 ( $at_check_trace; bison -o input.c input.y
   5810 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5811 at_status=$? at_failed=false
   5812 $at_check_filter
   5813 echo stderr:; cat "$at_stderr"
   5814 at_fn_diff_devnull "$at_stdout" || at_failed=:
   5815 at_fn_check_status 0 $at_status "$at_srcdir/input.at:710"
   5816 $at_failed && at_fn_log_failure
   5817 $at_traceon; }
   5818 
   5819 
   5820   set +x
   5821   $at_times_p && times >"$at_times_file"
   5822 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   5823 read at_status <"$at_status_file"
   5824 #AT_STOP_14
   5825 #AT_START_15
   5826 at_fn_group_banner 15 'input.at:711' \
   5827   "Require 2.7" "                                    " 1
   5828 at_xfail=no
   5829 (
   5830   $as_echo "15. $at_setup_line: testing $at_desc ..."
   5831   $at_traceon
   5832 
   5833 cat >input.y <<'_ATEOF'
   5834 %code top {
   5835 #include <config.h>
   5836 /* We don't need perfect functions for these tests. */
   5837 #undef malloc
   5838 #undef memcmp
   5839 #undef realloc
   5840 }
   5841 
   5842 %require "2.7";
   5843 %%
   5844 empty_file:;
   5845 _ATEOF
   5846 
   5847 
   5848 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   5849   at_save_special_files
   5850   mkdir xml-tests
   5851     # Don't combine these Bison invocations since we want to be sure that
   5852   # --report=all isn't required to get the full XML file.
   5853   { set +x
   5854 $as_echo "$at_srcdir/input.at:711: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   5855                   --graph=xml-tests/test.dot -o input.c input.y"
   5856 at_fn_check_prepare_notrace 'an embedded newline' "input.at:711"
   5857 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   5858                   --graph=xml-tests/test.dot -o input.c input.y
   5859 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5860 at_status=$? at_failed=false
   5861 $at_check_filter
   5862 echo stderr:; cat "$at_stderr"
   5863 echo stdout:; cat "$at_stdout"
   5864 at_fn_check_status 0 $at_status "$at_srcdir/input.at:711"
   5865 $at_failed && at_fn_log_failure
   5866 $at_traceon; }
   5867 
   5868   { set +x
   5869 $as_echo "$at_srcdir/input.at:711: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   5870 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "input.at:711"
   5871 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   5872 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5873 at_status=$? at_failed=false
   5874 $at_check_filter
   5875 echo stderr:; cat "$at_stderr"
   5876 echo stdout:; cat "$at_stdout"
   5877 at_fn_check_status 0 $at_status "$at_srcdir/input.at:711"
   5878 $at_failed && at_fn_log_failure
   5879 $at_traceon; }
   5880 
   5881     cp xml-tests/test.output expout
   5882   { set +x
   5883 $as_echo "$at_srcdir/input.at:711: \$XSLTPROC \\
   5884              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   5885              xml-tests/test.xml"
   5886 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:711"
   5887 ( $at_check_trace; $XSLTPROC \
   5888              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   5889              xml-tests/test.xml
   5890 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5891 at_status=$? at_failed=false
   5892 $at_check_filter
   5893 at_fn_diff_devnull "$at_stderr" || at_failed=:
   5894 $at_diff expout "$at_stdout" || at_failed=:
   5895 at_fn_check_status 0 $at_status "$at_srcdir/input.at:711"
   5896 $at_failed && at_fn_log_failure
   5897 $at_traceon; }
   5898 
   5899   sort xml-tests/test.dot > expout
   5900   { set +x
   5901 $as_echo "$at_srcdir/input.at:711: \$XSLTPROC \\
   5902              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   5903              xml-tests/test.xml | sort"
   5904 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:711"
   5905 ( $at_check_trace; $XSLTPROC \
   5906              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   5907              xml-tests/test.xml | sort
   5908 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5909 at_status=$? at_failed=false
   5910 $at_check_filter
   5911 at_fn_diff_devnull "$at_stderr" || at_failed=:
   5912 $at_diff expout "$at_stdout" || at_failed=:
   5913 at_fn_check_status 0 $at_status "$at_srcdir/input.at:711"
   5914 $at_failed && at_fn_log_failure
   5915 $at_traceon; }
   5916 
   5917   rm -rf xml-tests expout
   5918   at_restore_special_files
   5919 fi
   5920 { set +x
   5921 $as_echo "$at_srcdir/input.at:711: bison -o input.c input.y"
   5922 at_fn_check_prepare_trace "input.at:711"
   5923 ( $at_check_trace; bison -o input.c input.y
   5924 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5925 at_status=$? at_failed=false
   5926 $at_check_filter
   5927 echo stderr:; cat "$at_stderr"
   5928 at_fn_diff_devnull "$at_stdout" || at_failed=:
   5929 at_fn_check_status 0 $at_status "$at_srcdir/input.at:711"
   5930 $at_failed && at_fn_log_failure
   5931 $at_traceon; }
   5932 
   5933 
   5934   set +x
   5935   $at_times_p && times >"$at_times_file"
   5936 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   5937 read at_status <"$at_status_file"
   5938 #AT_STOP_15
   5939 #AT_START_16
   5940 at_fn_group_banner 16 'input.at:713' \
   5941   "Require 100.0" "                                  " 1
   5942 at_xfail=no
   5943 (
   5944   $as_echo "16. $at_setup_line: testing $at_desc ..."
   5945   $at_traceon
   5946 
   5947 cat >input.y <<'_ATEOF'
   5948 %code top {
   5949 #include <config.h>
   5950 /* We don't need perfect functions for these tests. */
   5951 #undef malloc
   5952 #undef memcmp
   5953 #undef realloc
   5954 }
   5955 
   5956 %require "100.0";
   5957 %%
   5958 empty_file:;
   5959 _ATEOF
   5960 
   5961 
   5962 
   5963 { set +x
   5964 $as_echo "$at_srcdir/input.at:713: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y"
   5965 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y" "input.at:713"
   5966 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o input.c input.y
   5967 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   5968 at_status=$? at_failed=false
   5969 $at_check_filter
   5970 echo stderr:; cat "$at_stderr"
   5971 at_fn_diff_devnull "$at_stdout" || at_failed=:
   5972 at_fn_check_status 63 $at_status "$at_srcdir/input.at:713"
   5973 $at_failed && at_fn_log_failure
   5974 $at_traceon; }
   5975 
   5976 
   5977   set +x
   5978   $at_times_p && times >"$at_times_file"
   5979 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   5980 read at_status <"$at_status_file"
   5981 #AT_STOP_16
   5982 #AT_START_17
   5983 at_fn_group_banner 17 'input.at:720' \
   5984   "String aliases for character tokens" "            " 1
   5985 at_xfail=no
   5986 (
   5987   $as_echo "17. $at_setup_line: testing $at_desc ..."
   5988   $at_traceon
   5989 
   5990 
   5991 # Bison once thought a character token and its alias were different symbols
   5992 # with the same user token number.
   5993 
   5994 cat >input.y <<'_ATEOF'
   5995 %code top {
   5996 #include <config.h>
   5997 /* We don't need perfect functions for these tests. */
   5998 #undef malloc
   5999 #undef memcmp
   6000 #undef realloc
   6001 }
   6002 
   6003 %token 'a' "a"
   6004 %%
   6005 start: 'a';
   6006 %%
   6007 _ATEOF
   6008 
   6009 
   6010 
   6011 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   6012   at_save_special_files
   6013   mkdir xml-tests
   6014     # Don't combine these Bison invocations since we want to be sure that
   6015   # --report=all isn't required to get the full XML file.
   6016   { set +x
   6017 $as_echo "$at_srcdir/input.at:732: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   6018                   --graph=xml-tests/test.dot -o input.c input.y"
   6019 at_fn_check_prepare_notrace 'an embedded newline' "input.at:732"
   6020 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   6021                   --graph=xml-tests/test.dot -o input.c input.y
   6022 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6023 at_status=$? at_failed=false
   6024 $at_check_filter
   6025 echo stderr:; cat "$at_stderr"
   6026 echo stdout:; cat "$at_stdout"
   6027 at_fn_check_status 0 $at_status "$at_srcdir/input.at:732"
   6028 $at_failed && at_fn_log_failure
   6029 $at_traceon; }
   6030 
   6031   { set +x
   6032 $as_echo "$at_srcdir/input.at:732: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   6033 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "input.at:732"
   6034 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   6035 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6036 at_status=$? at_failed=false
   6037 $at_check_filter
   6038 echo stderr:; cat "$at_stderr"
   6039 echo stdout:; cat "$at_stdout"
   6040 at_fn_check_status 0 $at_status "$at_srcdir/input.at:732"
   6041 $at_failed && at_fn_log_failure
   6042 $at_traceon; }
   6043 
   6044     cp xml-tests/test.output expout
   6045   { set +x
   6046 $as_echo "$at_srcdir/input.at:732: \$XSLTPROC \\
   6047              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   6048              xml-tests/test.xml"
   6049 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:732"
   6050 ( $at_check_trace; $XSLTPROC \
   6051              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   6052              xml-tests/test.xml
   6053 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6054 at_status=$? at_failed=false
   6055 $at_check_filter
   6056 at_fn_diff_devnull "$at_stderr" || at_failed=:
   6057 $at_diff expout "$at_stdout" || at_failed=:
   6058 at_fn_check_status 0 $at_status "$at_srcdir/input.at:732"
   6059 $at_failed && at_fn_log_failure
   6060 $at_traceon; }
   6061 
   6062   sort xml-tests/test.dot > expout
   6063   { set +x
   6064 $as_echo "$at_srcdir/input.at:732: \$XSLTPROC \\
   6065              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   6066              xml-tests/test.xml | sort"
   6067 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:732"
   6068 ( $at_check_trace; $XSLTPROC \
   6069              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   6070              xml-tests/test.xml | sort
   6071 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6072 at_status=$? at_failed=false
   6073 $at_check_filter
   6074 at_fn_diff_devnull "$at_stderr" || at_failed=:
   6075 $at_diff expout "$at_stdout" || at_failed=:
   6076 at_fn_check_status 0 $at_status "$at_srcdir/input.at:732"
   6077 $at_failed && at_fn_log_failure
   6078 $at_traceon; }
   6079 
   6080   rm -rf xml-tests expout
   6081   at_restore_special_files
   6082 fi
   6083 { set +x
   6084 $as_echo "$at_srcdir/input.at:732: bison -o input.c input.y"
   6085 at_fn_check_prepare_trace "input.at:732"
   6086 ( $at_check_trace; bison -o input.c input.y
   6087 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6088 at_status=$? at_failed=false
   6089 $at_check_filter
   6090 at_fn_diff_devnull "$at_stderr" || at_failed=:
   6091 at_fn_diff_devnull "$at_stdout" || at_failed=:
   6092 at_fn_check_status 0 $at_status "$at_srcdir/input.at:732"
   6093 $at_failed && at_fn_log_failure
   6094 $at_traceon; }
   6095 
   6096 
   6097 
   6098   set +x
   6099   $at_times_p && times >"$at_times_file"
   6100 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   6101 read at_status <"$at_status_file"
   6102 #AT_STOP_17
   6103 #AT_START_18
   6104 at_fn_group_banner 18 'input.at:741' \
   6105   "Symbols" "                                        " 1
   6106 at_xfail=no
   6107 (
   6108   $as_echo "18. $at_setup_line: testing $at_desc ..."
   6109   $at_traceon
   6110 
   6111 
   6112 
   6113 cat >input.y <<'_ATEOF'
   6114 %code top {
   6115 #include <config.h>
   6116 /* We don't need perfect functions for these tests. */
   6117 #undef malloc
   6118 #undef memcmp
   6119 #undef realloc
   6120 }
   6121 
   6122 %token WITH-DASH
   6123 %token WITHOUT_DASH "WITHOUT-DASH"
   6124 %token WITH.PERIOD
   6125 %token WITHOUT_PERIOD "WITHOUT.PERIOD"
   6126 %code {
   6127   static void yyerror ( const char *msg);
   6128   static int yylex (void);
   6129 }
   6130 %%
   6131 start: with-dash without_dash with.period without_period;
   6132 with-dash: WITH-DASH;
   6133 without_dash: "WITHOUT-DASH";
   6134 with.period: WITH.PERIOD;
   6135 without_period: "WITHOUT.PERIOD";
   6136 %%
   6137 #include <stdio.h>
   6138 /* A C error reporting function.  */
   6139 static
   6140 void yyerror ( const char *msg)
   6141 {
   6142   fprintf (stderr, "%s\n", msg);
   6143 }
   6144 #include <assert.h>
   6145 static
   6146 int yylex (void)
   6147 {
   6148   static char const input[] = "";
   6149   static size_t toknum = 0;
   6150   int res;
   6151   ;
   6152   assert (toknum < sizeof input / sizeof input[0]);
   6153   res = input[toknum++];
   6154   ;
   6155   return res;
   6156 }
   6157 _ATEOF
   6158 
   6159 
   6160 
   6161 
   6162 # POSIX Yacc accept periods, but not dashes.
   6163 
   6164 { set +x
   6165 $as_echo "$at_srcdir/input.at:766: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --yacc input.y"
   6166 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --yacc input.y" "input.at:766"
   6167 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --yacc input.y
   6168 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6169 at_status=$? at_failed=false
   6170 $at_check_filter
   6171 echo >>"$at_stderr"; $as_echo "input.y:9.8-16: POSIX Yacc forbids dashes in symbol names: WITH-DASH
   6172 input.y:18.8-16: POSIX Yacc forbids dashes in symbol names: with-dash
   6173 " | \
   6174   $at_diff - "$at_stderr" || at_failed=:
   6175 at_fn_diff_devnull "$at_stdout" || at_failed=:
   6176 at_fn_check_status 1 $at_status "$at_srcdir/input.at:766"
   6177 $at_failed && at_fn_log_failure
   6178 $at_traceon; }
   6179 
   6180 
   6181 
   6182 # So warn about them.
   6183 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   6184   at_save_special_files
   6185   mkdir xml-tests
   6186     # Don't combine these Bison invocations since we want to be sure that
   6187   # --report=all isn't required to get the full XML file.
   6188   { set +x
   6189 $as_echo "$at_srcdir/input.at:772: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   6190                   --graph=xml-tests/test.dot -Wyacc input.y"
   6191 at_fn_check_prepare_notrace 'an embedded newline' "input.at:772"
   6192 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   6193                   --graph=xml-tests/test.dot -Wyacc input.y
   6194 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6195 at_status=$? at_failed=false
   6196 $at_check_filter
   6197 echo stderr:; cat "$at_stderr"
   6198 echo stdout:; cat "$at_stdout"
   6199 at_fn_check_status 0 $at_status "$at_srcdir/input.at:772"
   6200 $at_failed && at_fn_log_failure
   6201 $at_traceon; }
   6202 
   6203   { set +x
   6204 $as_echo "$at_srcdir/input.at:772: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Wyacc input.y"
   6205 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Wyacc input.y" "input.at:772"
   6206 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Wyacc input.y
   6207 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6208 at_status=$? at_failed=false
   6209 $at_check_filter
   6210 echo stderr:; cat "$at_stderr"
   6211 echo stdout:; cat "$at_stdout"
   6212 at_fn_check_status 0 $at_status "$at_srcdir/input.at:772"
   6213 $at_failed && at_fn_log_failure
   6214 $at_traceon; }
   6215 
   6216     cp xml-tests/test.output expout
   6217   { set +x
   6218 $as_echo "$at_srcdir/input.at:772: \$XSLTPROC \\
   6219              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   6220              xml-tests/test.xml"
   6221 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:772"
   6222 ( $at_check_trace; $XSLTPROC \
   6223              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   6224              xml-tests/test.xml
   6225 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6226 at_status=$? at_failed=false
   6227 $at_check_filter
   6228 at_fn_diff_devnull "$at_stderr" || at_failed=:
   6229 $at_diff expout "$at_stdout" || at_failed=:
   6230 at_fn_check_status 0 $at_status "$at_srcdir/input.at:772"
   6231 $at_failed && at_fn_log_failure
   6232 $at_traceon; }
   6233 
   6234   sort xml-tests/test.dot > expout
   6235   { set +x
   6236 $as_echo "$at_srcdir/input.at:772: \$XSLTPROC \\
   6237              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   6238              xml-tests/test.xml | sort"
   6239 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:772"
   6240 ( $at_check_trace; $XSLTPROC \
   6241              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   6242              xml-tests/test.xml | sort
   6243 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6244 at_status=$? at_failed=false
   6245 $at_check_filter
   6246 at_fn_diff_devnull "$at_stderr" || at_failed=:
   6247 $at_diff expout "$at_stdout" || at_failed=:
   6248 at_fn_check_status 0 $at_status "$at_srcdir/input.at:772"
   6249 $at_failed && at_fn_log_failure
   6250 $at_traceon; }
   6251 
   6252   rm -rf xml-tests expout
   6253   at_restore_special_files
   6254 fi
   6255 { set +x
   6256 $as_echo "$at_srcdir/input.at:772: bison -Wyacc input.y"
   6257 at_fn_check_prepare_trace "input.at:772"
   6258 ( $at_check_trace; bison -Wyacc input.y
   6259 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6260 at_status=$? at_failed=false
   6261 $at_check_filter
   6262 echo >>"$at_stderr"; $as_echo "input.y:9.8-16: warning: POSIX Yacc forbids dashes in symbol names: WITH-DASH
   6263 input.y:18.8-16: warning: POSIX Yacc forbids dashes in symbol names: with-dash
   6264 " | \
   6265   $at_diff - "$at_stderr" || at_failed=:
   6266 at_fn_diff_devnull "$at_stdout" || at_failed=:
   6267 at_fn_check_status 0 $at_status "$at_srcdir/input.at:772"
   6268 $at_failed && at_fn_log_failure
   6269 $at_traceon; }
   6270 
   6271 # Defining POSIXLY_CORRECT causes bison to complain if options are
   6272 # added after the grammar file name, so skip these checks in that
   6273 # case.
   6274 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   6275   at_save_special_files
   6276 
   6277   # To avoid expanding it repeatedly, store specified stdout.
   6278   : >expout
   6279 
   6280   # Run with -Werror.
   6281   { set +x
   6282 $as_echo "$at_srcdir/input.at:772: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wyacc input.y -Werror"
   6283 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wyacc input.y -Werror" "input.at:772"
   6284 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -Wyacc input.y -Werror
   6285 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6286 at_status=$? at_failed=false
   6287 $at_check_filter
   6288 echo stderr:; tee stderr <"$at_stderr"
   6289 $at_diff expout "$at_stdout" || at_failed=:
   6290 at_fn_check_status 1 $at_status "$at_srcdir/input.at:772"
   6291 $at_failed && at_fn_log_failure
   6292 $at_traceon; }
   6293 
   6294 
   6295   # Build expected stderr up to and including the "warnings being
   6296   # treated as errors" message.
   6297   cat >at-bison-check-warnings <<'_ATEOF'
   6298 input.y:9.8-16: warning: POSIX Yacc forbids dashes in symbol names: WITH-DASH
   6299 input.y:18.8-16: warning: POSIX Yacc forbids dashes in symbol names: with-dash
   6300 _ATEOF
   6301 
   6302   at_bison_check_first=`sed -n \
   6303     '/: warning: /{=;q;}' at-bison-check-warnings`
   6304   : ${at_bison_check_first:=1}
   6305   at_bison_check_first_tmp=`sed -n \
   6306     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   6307   : ${at_bison_check_first_tmp:=1}
   6308   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   6309     at_bison_check_first=$at_bison_check_first_tmp
   6310   fi
   6311   if test $at_bison_check_first -gt 1; then
   6312     sed -n "1,`expr $at_bison_check_first - 1`"p \
   6313       at-bison-check-warnings > experr
   6314   fi
   6315   echo 'bison: warnings being treated as errors' >> experr
   6316 
   6317   # Finish building expected stderr and check.  Unlike warnings,
   6318   # complaints cause bison to exit early.  Thus, with -Werror, bison
   6319   # does not necessarily report all warnings that it does without
   6320   # -Werror, but it at least reports one.
   6321   at_bison_check_last=`sed -n '$=' stderr`
   6322   : ${at_bison_check_last:=1}
   6323   at_bison_check_last=`expr $at_bison_check_last - 1`
   6324   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   6325     at-bison-check-warnings >> experr
   6326   { set +x
   6327 $as_echo "$at_srcdir/input.at:772: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   6328               stderr 1>&2"
   6329 at_fn_check_prepare_notrace 'an embedded newline' "input.at:772"
   6330 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   6331               stderr 1>&2
   6332 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6333 at_status=$? at_failed=false
   6334 $at_check_filter
   6335 $at_diff experr "$at_stderr" || at_failed=:
   6336 at_fn_diff_devnull "$at_stdout" || at_failed=:
   6337 at_fn_check_status 0 $at_status "$at_srcdir/input.at:772"
   6338 $at_failed && at_fn_log_failure
   6339 $at_traceon; }
   6340 
   6341 
   6342   # Now check --warnings=error.
   6343   cp stderr experr
   6344   { set +x
   6345 $as_echo "$at_srcdir/input.at:772: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wyacc input.y --warnings=error"
   6346 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wyacc input.y --warnings=error" "input.at:772"
   6347 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -Wyacc input.y --warnings=error
   6348 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6349 at_status=$? at_failed=false
   6350 $at_check_filter
   6351 $at_diff experr "$at_stderr" || at_failed=:
   6352 $at_diff expout "$at_stdout" || at_failed=:
   6353 at_fn_check_status 1 $at_status "$at_srcdir/input.at:772"
   6354 $at_failed && at_fn_log_failure
   6355 $at_traceon; }
   6356 
   6357 
   6358   # Now check -Wnone and --warnings=none by making sure that
   6359   # -Werror doesn't change the exit status when -Wnone or
   6360   # --warnings=none is specified.
   6361   { set +x
   6362 $as_echo "$at_srcdir/input.at:772: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wyacc input.y -Wnone -Werror"
   6363 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wyacc input.y -Wnone -Werror" "input.at:772"
   6364 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -Wyacc input.y -Wnone -Werror
   6365 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6366 at_status=$? at_failed=false
   6367 $at_check_filter
   6368 at_fn_diff_devnull "$at_stderr" || at_failed=:
   6369 $at_diff expout "$at_stdout" || at_failed=:
   6370 at_fn_check_status 0 $at_status "$at_srcdir/input.at:772"
   6371 $at_failed && at_fn_log_failure
   6372 $at_traceon; }
   6373 
   6374   { set +x
   6375 $as_echo "$at_srcdir/input.at:772: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wyacc input.y --warnings=none -Werror"
   6376 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wyacc input.y --warnings=none -Werror" "input.at:772"
   6377 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -Wyacc input.y --warnings=none -Werror
   6378 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6379 at_status=$? at_failed=false
   6380 $at_check_filter
   6381 at_fn_diff_devnull "$at_stderr" || at_failed=:
   6382 $at_diff expout "$at_stdout" || at_failed=:
   6383 at_fn_check_status 0 $at_status "$at_srcdir/input.at:772"
   6384 $at_failed && at_fn_log_failure
   6385 $at_traceon; }
   6386 
   6387 
   6388   at_restore_special_files
   6389 fi
   6390 
   6391 # Dashes are fine for GNU Bison.
   6392 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   6393   at_save_special_files
   6394   mkdir xml-tests
   6395     # Don't combine these Bison invocations since we want to be sure that
   6396   # --report=all isn't required to get the full XML file.
   6397   { set +x
   6398 $as_echo "$at_srcdir/input.at:778: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   6399                   --graph=xml-tests/test.dot -o input.c input.y"
   6400 at_fn_check_prepare_notrace 'an embedded newline' "input.at:778"
   6401 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   6402                   --graph=xml-tests/test.dot -o input.c input.y
   6403 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6404 at_status=$? at_failed=false
   6405 $at_check_filter
   6406 echo stderr:; cat "$at_stderr"
   6407 echo stdout:; cat "$at_stdout"
   6408 at_fn_check_status 0 $at_status "$at_srcdir/input.at:778"
   6409 $at_failed && at_fn_log_failure
   6410 $at_traceon; }
   6411 
   6412   { set +x
   6413 $as_echo "$at_srcdir/input.at:778: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   6414 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "input.at:778"
   6415 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   6416 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6417 at_status=$? at_failed=false
   6418 $at_check_filter
   6419 echo stderr:; cat "$at_stderr"
   6420 echo stdout:; cat "$at_stdout"
   6421 at_fn_check_status 0 $at_status "$at_srcdir/input.at:778"
   6422 $at_failed && at_fn_log_failure
   6423 $at_traceon; }
   6424 
   6425     cp xml-tests/test.output expout
   6426   { set +x
   6427 $as_echo "$at_srcdir/input.at:778: \$XSLTPROC \\
   6428              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   6429              xml-tests/test.xml"
   6430 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:778"
   6431 ( $at_check_trace; $XSLTPROC \
   6432              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   6433              xml-tests/test.xml
   6434 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6435 at_status=$? at_failed=false
   6436 $at_check_filter
   6437 at_fn_diff_devnull "$at_stderr" || at_failed=:
   6438 $at_diff expout "$at_stdout" || at_failed=:
   6439 at_fn_check_status 0 $at_status "$at_srcdir/input.at:778"
   6440 $at_failed && at_fn_log_failure
   6441 $at_traceon; }
   6442 
   6443   sort xml-tests/test.dot > expout
   6444   { set +x
   6445 $as_echo "$at_srcdir/input.at:778: \$XSLTPROC \\
   6446              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   6447              xml-tests/test.xml | sort"
   6448 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:778"
   6449 ( $at_check_trace; $XSLTPROC \
   6450              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   6451              xml-tests/test.xml | sort
   6452 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6453 at_status=$? at_failed=false
   6454 $at_check_filter
   6455 at_fn_diff_devnull "$at_stderr" || at_failed=:
   6456 $at_diff expout "$at_stdout" || at_failed=:
   6457 at_fn_check_status 0 $at_status "$at_srcdir/input.at:778"
   6458 $at_failed && at_fn_log_failure
   6459 $at_traceon; }
   6460 
   6461   rm -rf xml-tests expout
   6462   at_restore_special_files
   6463 fi
   6464 { set +x
   6465 $as_echo "$at_srcdir/input.at:778: bison -o input.c input.y"
   6466 at_fn_check_prepare_trace "input.at:778"
   6467 ( $at_check_trace; bison -o input.c input.y
   6468 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6469 at_status=$? at_failed=false
   6470 $at_check_filter
   6471 at_fn_diff_devnull "$at_stderr" || at_failed=:
   6472 at_fn_diff_devnull "$at_stdout" || at_failed=:
   6473 at_fn_check_status 0 $at_status "$at_srcdir/input.at:778"
   6474 $at_failed && at_fn_log_failure
   6475 $at_traceon; }
   6476 
   6477 
   6478 
   6479 # Make sure we don't export silly token identifiers with periods or dashes.
   6480 { set +x
   6481 $as_echo "$at_srcdir/input.at:781: \$BISON_C_WORKS"
   6482 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "input.at:781"
   6483 ( $at_check_trace; $BISON_C_WORKS
   6484 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6485 at_status=$? at_failed=false
   6486 $at_check_filter
   6487 echo stderr:; cat "$at_stderr"
   6488 echo stdout:; cat "$at_stdout"
   6489 at_fn_check_status 0 $at_status "$at_srcdir/input.at:781"
   6490 $at_failed && at_fn_log_failure
   6491 $at_traceon; }
   6492 
   6493 { set +x
   6494 $as_echo "$at_srcdir/input.at:781: \$CC \$CFLAGS \$CPPFLAGS -c -o input.o input.c "
   6495 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o input.o input.c " "input.at:781"
   6496 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o input.o input.c
   6497 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6498 at_status=$? at_failed=false
   6499 $at_check_filter
   6500 echo stderr:; cat "$at_stderr"
   6501 echo stdout:; cat "$at_stdout"
   6502 at_fn_check_status 0 $at_status "$at_srcdir/input.at:781"
   6503 $at_failed && at_fn_log_failure
   6504 $at_traceon; }
   6505 
   6506 
   6507 
   6508 # Periods are genuine letters, they can start identifiers.
   6509 # Digits and dashes cannot.
   6510 cat >input.y <<'_ATEOF'
   6511 %code top {
   6512 #include <config.h>
   6513 /* We don't need perfect functions for these tests. */
   6514 #undef malloc
   6515 #undef memcmp
   6516 #undef realloc
   6517 }
   6518 
   6519 %token .GOOD
   6520          -GOOD
   6521          1NV4L1D
   6522          -123
   6523 %%
   6524 start: .GOOD GOOD
   6525 _ATEOF
   6526 
   6527 
   6528 
   6529 { set +x
   6530 $as_echo "$at_srcdir/input.at:794: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y"
   6531 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y" "input.at:794"
   6532 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o input.c input.y
   6533 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6534 at_status=$? at_failed=false
   6535 $at_check_filter
   6536 echo >>"$at_stderr"; $as_echo "input.y:10.10: error: invalid character: '-'
   6537 input.y:11.10-16: error: invalid identifier: '1NV4L1D'
   6538 input.y:12.10: error: invalid character: '-'
   6539 " | \
   6540   $at_diff - "$at_stderr" || at_failed=:
   6541 at_fn_diff_devnull "$at_stdout" || at_failed=:
   6542 at_fn_check_status 1 $at_status "$at_srcdir/input.at:794"
   6543 $at_failed && at_fn_log_failure
   6544 $at_traceon; }
   6545 
   6546 
   6547 
   6548   set +x
   6549   $at_times_p && times >"$at_times_file"
   6550 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   6551 read at_status <"$at_status_file"
   6552 #AT_STOP_18
   6553 #AT_START_19
   6554 at_fn_group_banner 19 'input.at:807' \
   6555   "Numbered tokens" "                                " 1
   6556 at_xfail=no
   6557 (
   6558   $as_echo "19. $at_setup_line: testing $at_desc ..."
   6559   $at_traceon
   6560 
   6561 
   6562 cat >redecl.y <<'_ATEOF'
   6563 %code top {
   6564 #include <config.h>
   6565 /* We don't need perfect functions for these tests. */
   6566 #undef malloc
   6567 #undef memcmp
   6568 #undef realloc
   6569 }
   6570 
   6571 %token DECIMAL_1     11259375
   6572          HEXADECIMAL_1 0xabcdef
   6573          HEXADECIMAL_2 0xFEDCBA
   6574          DECIMAL_2     16702650
   6575 %%
   6576 start: DECIMAL_1 HEXADECIMAL_2;
   6577 _ATEOF
   6578 
   6579 
   6580 
   6581 
   6582 { set +x
   6583 $as_echo "$at_srcdir/input.at:818: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison redecl.y"
   6584 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison redecl.y" "input.at:818"
   6585 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison redecl.y
   6586 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6587 at_status=$? at_failed=false
   6588 $at_check_filter
   6589 echo >>"$at_stderr"; $as_echo "redecl.y:10.10-22: error: user token number 11259375 redeclaration for HEXADECIMAL_1
   6590 redecl.y:9.8-16:       previous declaration for DECIMAL_1
   6591 redecl.y:12.10-18: error: user token number 16702650 redeclaration for DECIMAL_2
   6592 redecl.y:11.10-22:     previous declaration for HEXADECIMAL_2
   6593 " | \
   6594   $at_diff - "$at_stderr" || at_failed=:
   6595 at_fn_diff_devnull "$at_stdout" || at_failed=:
   6596 at_fn_check_status 1 $at_status "$at_srcdir/input.at:818"
   6597 $at_failed && at_fn_log_failure
   6598 $at_traceon; }
   6599 
   6600 
   6601 
   6602 cat >too-large.y <<'_ATEOF'
   6603 %code top {
   6604 #include <config.h>
   6605 /* We don't need perfect functions for these tests. */
   6606 #undef malloc
   6607 #undef memcmp
   6608 #undef realloc
   6609 }
   6610 
   6611 %token TOO_LARGE_DEC 999999999999999999999
   6612          TOO_LARGE_HEX 0xFFFFFFFFFFFFFFFFFFF
   6613 %%
   6614 start: TOO_LARGE_DEC TOO_LARGE_HEX
   6615 %%
   6616 _ATEOF
   6617 
   6618 
   6619 
   6620 
   6621 { set +x
   6622 $as_echo "$at_srcdir/input.at:833: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison too-large.y"
   6623 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison too-large.y" "input.at:833"
   6624 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison too-large.y
   6625 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6626 at_status=$? at_failed=false
   6627 $at_check_filter
   6628 echo >>"$at_stderr"; $as_echo "too-large.y:9.22-42: error: integer out of range: '999999999999999999999'
   6629 too-large.y:10.24-44: error: integer out of range: '0xFFFFFFFFFFFFFFFFFFF'
   6630 " | \
   6631   $at_diff - "$at_stderr" || at_failed=:
   6632 at_fn_diff_devnull "$at_stdout" || at_failed=:
   6633 at_fn_check_status 1 $at_status "$at_srcdir/input.at:833"
   6634 $at_failed && at_fn_log_failure
   6635 $at_traceon; }
   6636 
   6637 
   6638 
   6639   set +x
   6640   $at_times_p && times >"$at_times_file"
   6641 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   6642 read at_status <"$at_status_file"
   6643 #AT_STOP_19
   6644 #AT_START_20
   6645 at_fn_group_banner 20 'input.at:845' \
   6646   "Unclosed constructs" "                            " 1
   6647 at_xfail=no
   6648 (
   6649   $as_echo "20. $at_setup_line: testing $at_desc ..."
   6650   $at_traceon
   6651 
   6652 
   6653 # Bison's scan-gram.l once forgot to STRING_FINISH some unclosed constructs, so
   6654 # they were prepended to whatever it STRING_GROW'ed next.  It also threw them
   6655 # away rather than returning them to the parser.  The effect was confusing
   6656 # subsequent error messages.
   6657 
   6658 cat >input.y <<'_ATEOF'
   6659 %token A "a
   6660 %token B "b"
   6661 %token AB "ab" // Used to complain that "ab" was already used.
   6662 %token C '1
   6663 %token TWO "2"
   6664 %token TICK_TWELVE "'12" // Used to complain that "'12" was already used.
   6665 
   6666 %%
   6667 
   6668 start: ;
   6669 
   6670 // Used to report a syntax error because it didn't see any kind of symbol
   6671 // identifier.
   6672 %type <f> 'a
   6673 ;
   6674 %type <f> "a
   6675 ;
   6676 // Used to report a syntax error because it didn't see braced code.
   6677 %destructor { free ($$)
   6678 _ATEOF
   6679 
   6680 
   6681 
   6682 { set +x
   6683 $as_echo "$at_srcdir/input.at:874: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y"
   6684 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y" "input.at:874"
   6685 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o input.c input.y
   6686 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6687 at_status=$? at_failed=false
   6688 $at_check_filter
   6689 echo >>"$at_stderr"; $as_echo "input.y:1.10-2.0: error: missing '\"' at end of line
   6690 input.y:4.10-5.0: error: missing \"'\" at end of line
   6691 input.y:14.11-15.0: error: missing \"'\" at end of line
   6692 input.y:16.11-17.0: error: missing '\"' at end of line
   6693 input.y:19.13-20.0: error: missing '}' at end of file
   6694 input.y:20.1: error: syntax error, unexpected end of file
   6695 " | \
   6696   $at_diff - "$at_stderr" || at_failed=:
   6697 at_fn_diff_devnull "$at_stdout" || at_failed=:
   6698 at_fn_check_status 1 $at_status "$at_srcdir/input.at:874"
   6699 $at_failed && at_fn_log_failure
   6700 $at_traceon; }
   6701 
   6702 
   6703 
   6704 
   6705 { set +x
   6706 $as_echo "$at_srcdir/input.at:883: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y"
   6707 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y" "input.at:883"
   6708 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y
   6709 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6710 at_status=$? at_failed=false
   6711 $at_check_filter
   6712 echo >>"$at_stderr"; $as_echo "input.y:1.10-2.0: error: missing '\"' at end of line
   6713  %token A \"a
   6714           ^^
   6715 input.y:4.10-5.0: error: missing \"'\" at end of line
   6716  %token C '1
   6717           ^^
   6718 input.y:14.11-15.0: error: missing \"'\" at end of line
   6719  %type <f> 'a
   6720            ^^
   6721 input.y:16.11-17.0: error: missing '\"' at end of line
   6722  %type <f> \"a
   6723            ^^
   6724 input.y:19.13-20.0: error: missing '}' at end of file
   6725  %destructor { free (\$\$)
   6726              ^^^^^^^^^^^
   6727 input.y:20.1: error: syntax error, unexpected end of file
   6728 " | \
   6729   $at_diff - "$at_stderr" || at_failed=:
   6730 at_fn_diff_devnull "$at_stdout" || at_failed=:
   6731 at_fn_check_status 1 $at_status "$at_srcdir/input.at:883"
   6732 $at_failed && at_fn_log_failure
   6733 $at_traceon; }
   6734 
   6735 
   6736 
   6737   set +x
   6738   $at_times_p && times >"$at_times_file"
   6739 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   6740 read at_status <"$at_status_file"
   6741 #AT_STOP_20
   6742 #AT_START_21
   6743 at_fn_group_banner 21 'input.at:909' \
   6744   "%start after first rule" "                        " 1
   6745 at_xfail=no
   6746 (
   6747   $as_echo "21. $at_setup_line: testing $at_desc ..."
   6748   $at_traceon
   6749 
   6750 
   6751 # Bison once complained that a %start after the first rule was a redeclaration
   6752 # of the start symbol.
   6753 
   6754 cat >input.y <<'_ATEOF'
   6755 %%
   6756 false_start: ;
   6757 start: false_start ;
   6758 %start start;
   6759 _ATEOF
   6760 
   6761 
   6762 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   6763   at_save_special_files
   6764   mkdir xml-tests
   6765     # Don't combine these Bison invocations since we want to be sure that
   6766   # --report=all isn't required to get the full XML file.
   6767   { set +x
   6768 $as_echo "$at_srcdir/input.at:921: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   6769                   --graph=xml-tests/test.dot -o input.c input.y"
   6770 at_fn_check_prepare_notrace 'an embedded newline' "input.at:921"
   6771 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   6772                   --graph=xml-tests/test.dot -o input.c input.y
   6773 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6774 at_status=$? at_failed=false
   6775 $at_check_filter
   6776 echo stderr:; cat "$at_stderr"
   6777 echo stdout:; cat "$at_stdout"
   6778 at_fn_check_status 0 $at_status "$at_srcdir/input.at:921"
   6779 $at_failed && at_fn_log_failure
   6780 $at_traceon; }
   6781 
   6782   { set +x
   6783 $as_echo "$at_srcdir/input.at:921: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   6784 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "input.at:921"
   6785 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   6786 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6787 at_status=$? at_failed=false
   6788 $at_check_filter
   6789 echo stderr:; cat "$at_stderr"
   6790 echo stdout:; cat "$at_stdout"
   6791 at_fn_check_status 0 $at_status "$at_srcdir/input.at:921"
   6792 $at_failed && at_fn_log_failure
   6793 $at_traceon; }
   6794 
   6795     cp xml-tests/test.output expout
   6796   { set +x
   6797 $as_echo "$at_srcdir/input.at:921: \$XSLTPROC \\
   6798              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   6799              xml-tests/test.xml"
   6800 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:921"
   6801 ( $at_check_trace; $XSLTPROC \
   6802              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   6803              xml-tests/test.xml
   6804 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6805 at_status=$? at_failed=false
   6806 $at_check_filter
   6807 at_fn_diff_devnull "$at_stderr" || at_failed=:
   6808 $at_diff expout "$at_stdout" || at_failed=:
   6809 at_fn_check_status 0 $at_status "$at_srcdir/input.at:921"
   6810 $at_failed && at_fn_log_failure
   6811 $at_traceon; }
   6812 
   6813   sort xml-tests/test.dot > expout
   6814   { set +x
   6815 $as_echo "$at_srcdir/input.at:921: \$XSLTPROC \\
   6816              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   6817              xml-tests/test.xml | sort"
   6818 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:921"
   6819 ( $at_check_trace; $XSLTPROC \
   6820              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   6821              xml-tests/test.xml | sort
   6822 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6823 at_status=$? at_failed=false
   6824 $at_check_filter
   6825 at_fn_diff_devnull "$at_stderr" || at_failed=:
   6826 $at_diff expout "$at_stdout" || at_failed=:
   6827 at_fn_check_status 0 $at_status "$at_srcdir/input.at:921"
   6828 $at_failed && at_fn_log_failure
   6829 $at_traceon; }
   6830 
   6831   rm -rf xml-tests expout
   6832   at_restore_special_files
   6833 fi
   6834 { set +x
   6835 $as_echo "$at_srcdir/input.at:921: bison -o input.c input.y"
   6836 at_fn_check_prepare_trace "input.at:921"
   6837 ( $at_check_trace; bison -o input.c input.y
   6838 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6839 at_status=$? at_failed=false
   6840 $at_check_filter
   6841 at_fn_diff_devnull "$at_stderr" || at_failed=:
   6842 at_fn_diff_devnull "$at_stdout" || at_failed=:
   6843 at_fn_check_status 0 $at_status "$at_srcdir/input.at:921"
   6844 $at_failed && at_fn_log_failure
   6845 $at_traceon; }
   6846 
   6847 
   6848 
   6849   set +x
   6850   $at_times_p && times >"$at_times_file"
   6851 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   6852 read at_status <"$at_status_file"
   6853 #AT_STOP_21
   6854 #AT_START_22
   6855 at_fn_group_banner 22 'input.at:930' \
   6856   "%prec takes a token" "                            " 1
   6857 at_xfail=no
   6858 (
   6859   $as_echo "22. $at_setup_line: testing $at_desc ..."
   6860   $at_traceon
   6861 
   6862 
   6863 # Bison once allowed %prec sym where sym was a nonterminal.
   6864 
   6865 cat >input.y <<'_ATEOF'
   6866 %%
   6867 start: PREC %prec PREC ;
   6868 PREC: ;
   6869 _ATEOF
   6870 
   6871 
   6872 
   6873 { set +x
   6874 $as_echo "$at_srcdir/input.at:940: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   6875 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:940"
   6876 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   6877 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6878 at_status=$? at_failed=false
   6879 $at_check_filter
   6880 echo >>"$at_stderr"; $as_echo "input.y:3.1-4: error: rule given for PREC, which is a token
   6881 " | \
   6882   $at_diff - "$at_stderr" || at_failed=:
   6883 at_fn_diff_devnull "$at_stdout" || at_failed=:
   6884 at_fn_check_status 1 $at_status "$at_srcdir/input.at:940"
   6885 $at_failed && at_fn_log_failure
   6886 $at_traceon; }
   6887 
   6888 
   6889 
   6890   set +x
   6891   $at_times_p && times >"$at_times_file"
   6892 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   6893 read at_status <"$at_status_file"
   6894 #AT_STOP_22
   6895 #AT_START_23
   6896 at_fn_group_banner 23 'input.at:951' \
   6897   "%prec's token must be defined" "                  " 1
   6898 at_xfail=no
   6899 (
   6900   $as_echo "23. $at_setup_line: testing $at_desc ..."
   6901   $at_traceon
   6902 
   6903 
   6904 # According to POSIX, a %prec token must be defined separately.
   6905 
   6906 cat >input.y <<'_ATEOF'
   6907 %%
   6908 start: %prec PREC ;
   6909 _ATEOF
   6910 
   6911 
   6912 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   6913   at_save_special_files
   6914   mkdir xml-tests
   6915     # Don't combine these Bison invocations since we want to be sure that
   6916   # --report=all isn't required to get the full XML file.
   6917   { set +x
   6918 $as_echo "$at_srcdir/input.at:960: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   6919                   --graph=xml-tests/test.dot input.y"
   6920 at_fn_check_prepare_notrace 'an embedded newline' "input.at:960"
   6921 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   6922                   --graph=xml-tests/test.dot input.y
   6923 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6924 at_status=$? at_failed=false
   6925 $at_check_filter
   6926 echo stderr:; cat "$at_stderr"
   6927 echo stdout:; cat "$at_stdout"
   6928 at_fn_check_status 0 $at_status "$at_srcdir/input.at:960"
   6929 $at_failed && at_fn_log_failure
   6930 $at_traceon; }
   6931 
   6932   { set +x
   6933 $as_echo "$at_srcdir/input.at:960: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y"
   6934 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y" "input.at:960"
   6935 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y
   6936 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6937 at_status=$? at_failed=false
   6938 $at_check_filter
   6939 echo stderr:; cat "$at_stderr"
   6940 echo stdout:; cat "$at_stdout"
   6941 at_fn_check_status 0 $at_status "$at_srcdir/input.at:960"
   6942 $at_failed && at_fn_log_failure
   6943 $at_traceon; }
   6944 
   6945     cp xml-tests/test.output expout
   6946   { set +x
   6947 $as_echo "$at_srcdir/input.at:960: \$XSLTPROC \\
   6948              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   6949              xml-tests/test.xml"
   6950 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:960"
   6951 ( $at_check_trace; $XSLTPROC \
   6952              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   6953              xml-tests/test.xml
   6954 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6955 at_status=$? at_failed=false
   6956 $at_check_filter
   6957 at_fn_diff_devnull "$at_stderr" || at_failed=:
   6958 $at_diff expout "$at_stdout" || at_failed=:
   6959 at_fn_check_status 0 $at_status "$at_srcdir/input.at:960"
   6960 $at_failed && at_fn_log_failure
   6961 $at_traceon; }
   6962 
   6963   sort xml-tests/test.dot > expout
   6964   { set +x
   6965 $as_echo "$at_srcdir/input.at:960: \$XSLTPROC \\
   6966              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   6967              xml-tests/test.xml | sort"
   6968 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:960"
   6969 ( $at_check_trace; $XSLTPROC \
   6970              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   6971              xml-tests/test.xml | sort
   6972 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6973 at_status=$? at_failed=false
   6974 $at_check_filter
   6975 at_fn_diff_devnull "$at_stderr" || at_failed=:
   6976 $at_diff expout "$at_stdout" || at_failed=:
   6977 at_fn_check_status 0 $at_status "$at_srcdir/input.at:960"
   6978 $at_failed && at_fn_log_failure
   6979 $at_traceon; }
   6980 
   6981   rm -rf xml-tests expout
   6982   at_restore_special_files
   6983 fi
   6984 { set +x
   6985 $as_echo "$at_srcdir/input.at:960: bison input.y"
   6986 at_fn_check_prepare_trace "input.at:960"
   6987 ( $at_check_trace; bison input.y
   6988 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   6989 at_status=$? at_failed=false
   6990 $at_check_filter
   6991 echo >>"$at_stderr"; $as_echo "input.y:2.8-17: warning: token for %prec is not defined: PREC
   6992 " | \
   6993   $at_diff - "$at_stderr" || at_failed=:
   6994 at_fn_diff_devnull "$at_stdout" || at_failed=:
   6995 at_fn_check_status 0 $at_status "$at_srcdir/input.at:960"
   6996 $at_failed && at_fn_log_failure
   6997 $at_traceon; }
   6998 
   6999 # Defining POSIXLY_CORRECT causes bison to complain if options are
   7000 # added after the grammar file name, so skip these checks in that
   7001 # case.
   7002 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   7003   at_save_special_files
   7004 
   7005   # To avoid expanding it repeatedly, store specified stdout.
   7006   : >expout
   7007 
   7008   # Run with -Werror.
   7009   { set +x
   7010 $as_echo "$at_srcdir/input.at:960: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Werror"
   7011 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Werror" "input.at:960"
   7012 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y -Werror
   7013 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7014 at_status=$? at_failed=false
   7015 $at_check_filter
   7016 echo stderr:; tee stderr <"$at_stderr"
   7017 $at_diff expout "$at_stdout" || at_failed=:
   7018 at_fn_check_status 1 $at_status "$at_srcdir/input.at:960"
   7019 $at_failed && at_fn_log_failure
   7020 $at_traceon; }
   7021 
   7022 
   7023   # Build expected stderr up to and including the "warnings being
   7024   # treated as errors" message.
   7025   cat >at-bison-check-warnings <<'_ATEOF'
   7026 input.y:2.8-17: warning: token for %prec is not defined: PREC
   7027 _ATEOF
   7028 
   7029   at_bison_check_first=`sed -n \
   7030     '/: warning: /{=;q;}' at-bison-check-warnings`
   7031   : ${at_bison_check_first:=1}
   7032   at_bison_check_first_tmp=`sed -n \
   7033     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   7034   : ${at_bison_check_first_tmp:=1}
   7035   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   7036     at_bison_check_first=$at_bison_check_first_tmp
   7037   fi
   7038   if test $at_bison_check_first -gt 1; then
   7039     sed -n "1,`expr $at_bison_check_first - 1`"p \
   7040       at-bison-check-warnings > experr
   7041   fi
   7042   echo 'bison: warnings being treated as errors' >> experr
   7043 
   7044   # Finish building expected stderr and check.  Unlike warnings,
   7045   # complaints cause bison to exit early.  Thus, with -Werror, bison
   7046   # does not necessarily report all warnings that it does without
   7047   # -Werror, but it at least reports one.
   7048   at_bison_check_last=`sed -n '$=' stderr`
   7049   : ${at_bison_check_last:=1}
   7050   at_bison_check_last=`expr $at_bison_check_last - 1`
   7051   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   7052     at-bison-check-warnings >> experr
   7053   { set +x
   7054 $as_echo "$at_srcdir/input.at:960: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   7055               stderr 1>&2"
   7056 at_fn_check_prepare_notrace 'an embedded newline' "input.at:960"
   7057 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   7058               stderr 1>&2
   7059 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7060 at_status=$? at_failed=false
   7061 $at_check_filter
   7062 $at_diff experr "$at_stderr" || at_failed=:
   7063 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7064 at_fn_check_status 0 $at_status "$at_srcdir/input.at:960"
   7065 $at_failed && at_fn_log_failure
   7066 $at_traceon; }
   7067 
   7068 
   7069   # Now check --warnings=error.
   7070   cp stderr experr
   7071   { set +x
   7072 $as_echo "$at_srcdir/input.at:960: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=error"
   7073 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=error" "input.at:960"
   7074 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y --warnings=error
   7075 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7076 at_status=$? at_failed=false
   7077 $at_check_filter
   7078 $at_diff experr "$at_stderr" || at_failed=:
   7079 $at_diff expout "$at_stdout" || at_failed=:
   7080 at_fn_check_status 1 $at_status "$at_srcdir/input.at:960"
   7081 $at_failed && at_fn_log_failure
   7082 $at_traceon; }
   7083 
   7084 
   7085   # Now check -Wnone and --warnings=none by making sure that
   7086   # -Werror doesn't change the exit status when -Wnone or
   7087   # --warnings=none is specified.
   7088   { set +x
   7089 $as_echo "$at_srcdir/input.at:960: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Wnone -Werror"
   7090 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Wnone -Werror" "input.at:960"
   7091 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y -Wnone -Werror
   7092 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7093 at_status=$? at_failed=false
   7094 $at_check_filter
   7095 at_fn_diff_devnull "$at_stderr" || at_failed=:
   7096 $at_diff expout "$at_stdout" || at_failed=:
   7097 at_fn_check_status 0 $at_status "$at_srcdir/input.at:960"
   7098 $at_failed && at_fn_log_failure
   7099 $at_traceon; }
   7100 
   7101   { set +x
   7102 $as_echo "$at_srcdir/input.at:960: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror"
   7103 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror" "input.at:960"
   7104 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror
   7105 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7106 at_status=$? at_failed=false
   7107 $at_check_filter
   7108 at_fn_diff_devnull "$at_stderr" || at_failed=:
   7109 $at_diff expout "$at_stdout" || at_failed=:
   7110 at_fn_check_status 0 $at_status "$at_srcdir/input.at:960"
   7111 $at_failed && at_fn_log_failure
   7112 $at_traceon; }
   7113 
   7114 
   7115   at_restore_special_files
   7116 fi
   7117 
   7118   set +x
   7119   $at_times_p && times >"$at_times_file"
   7120 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   7121 read at_status <"$at_status_file"
   7122 #AT_STOP_23
   7123 #AT_START_24
   7124 at_fn_group_banner 24 'input.at:971' \
   7125   "Reject unused %code qualifiers" "                 " 1
   7126 at_xfail=no
   7127 (
   7128   $as_echo "24. $at_setup_line: testing $at_desc ..."
   7129   $at_traceon
   7130 
   7131 
   7132 cat >input-c.y <<'_ATEOF'
   7133 %code q {}
   7134 %code bad {}
   7135 %code bad {}
   7136 %code format {}
   7137 %%
   7138 start: ;
   7139 _ATEOF
   7140 
   7141 
   7142 { set +x
   7143 $as_echo "$at_srcdir/input.at:981: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input-c.y"
   7144 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input-c.y" "input.at:981"
   7145 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input-c.y
   7146 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7147 at_status=$? at_failed=false
   7148 $at_check_filter
   7149 echo >>"$at_stderr"; $as_echo "input-c.y:1.7: error: %code qualifier 'q' is not used
   7150 input-c.y:2.7-9: error: %code qualifier 'bad' is not used
   7151 input-c.y:3.7-9: error: %code qualifier 'bad' is not used
   7152 input-c.y:4.7-12: error: %code qualifier 'format' is not used
   7153 " | \
   7154   $at_diff - "$at_stderr" || at_failed=:
   7155 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7156 at_fn_check_status 1 $at_status "$at_srcdir/input.at:981"
   7157 $at_failed && at_fn_log_failure
   7158 $at_traceon; }
   7159 
   7160 
   7161 
   7162 cat >input-c-glr.y <<'_ATEOF'
   7163 %code q {}
   7164 %code bad {}
   7165  %code bad {}
   7166 %%
   7167 start: ;
   7168 _ATEOF
   7169 
   7170 
   7171 { set +x
   7172 $as_echo "$at_srcdir/input.at:995: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input-c-glr.y"
   7173 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input-c-glr.y" "input.at:995"
   7174 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input-c-glr.y
   7175 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7176 at_status=$? at_failed=false
   7177 $at_check_filter
   7178 echo >>"$at_stderr"; $as_echo "input-c-glr.y:1.7: error: %code qualifier 'q' is not used
   7179 input-c-glr.y:2.7-9: error: %code qualifier 'bad' is not used
   7180 input-c-glr.y:3.8-10: error: %code qualifier 'bad' is not used
   7181 " | \
   7182   $at_diff - "$at_stderr" || at_failed=:
   7183 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7184 at_fn_check_status 1 $at_status "$at_srcdir/input.at:995"
   7185 $at_failed && at_fn_log_failure
   7186 $at_traceon; }
   7187 
   7188 
   7189 
   7190 cat >input-c++.y <<'_ATEOF'
   7191 %code q {}
   7192 %code bad {}
   7193  %code q {}
   7194 %%
   7195 start: ;
   7196 _ATEOF
   7197 
   7198 
   7199 { set +x
   7200 $as_echo "$at_srcdir/input.at:1008: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input-c++.y"
   7201 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input-c++.y" "input.at:1008"
   7202 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input-c++.y
   7203 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7204 at_status=$? at_failed=false
   7205 $at_check_filter
   7206 echo >>"$at_stderr"; $as_echo "input-c++.y:1.7: error: %code qualifier 'q' is not used
   7207 input-c++.y:2.7-9: error: %code qualifier 'bad' is not used
   7208 input-c++.y:3.8: error: %code qualifier 'q' is not used
   7209 " | \
   7210   $at_diff - "$at_stderr" || at_failed=:
   7211 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7212 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1008"
   7213 $at_failed && at_fn_log_failure
   7214 $at_traceon; }
   7215 
   7216 
   7217 
   7218 cat >input-c++-glr.y <<'_ATEOF'
   7219 %code bad {}
   7220 %code q {}
   7221 %code q {}
   7222 %%
   7223 start: ;
   7224 _ATEOF
   7225 
   7226 
   7227 { set +x
   7228 $as_echo "$at_srcdir/input.at:1021: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input-c++-glr.y"
   7229 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input-c++-glr.y" "input.at:1021"
   7230 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input-c++-glr.y
   7231 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7232 at_status=$? at_failed=false
   7233 $at_check_filter
   7234 echo >>"$at_stderr"; $as_echo "input-c++-glr.y:1.7-9: error: %code qualifier 'bad' is not used
   7235 input-c++-glr.y:2.7: error: %code qualifier 'q' is not used
   7236 input-c++-glr.y:3.7: error: %code qualifier 'q' is not used
   7237 " | \
   7238   $at_diff - "$at_stderr" || at_failed=:
   7239 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7240 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1021"
   7241 $at_failed && at_fn_log_failure
   7242 $at_traceon; }
   7243 
   7244 
   7245 
   7246 cat >special-char-@@.y <<'_ATEOF'
   7247 %code bad {}
   7248 %code q {}
   7249 %code q {}
   7250 %%
   7251 start: ;
   7252 _ATEOF
   7253 
   7254 
   7255 { set +x
   7256 $as_echo "$at_srcdir/input.at:1034: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison special-char-@@.y"
   7257 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison special-char-@@.y" "input.at:1034"
   7258 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison special-char-@@.y
   7259 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7260 at_status=$? at_failed=false
   7261 $at_check_filter
   7262 echo >>"$at_stderr"; $as_echo "special-char-@@.y:1.7-9: error: %code qualifier 'bad' is not used
   7263 special-char-@@.y:2.7: error: %code qualifier 'q' is not used
   7264 special-char-@@.y:3.7: error: %code qualifier 'q' is not used
   7265 " | \
   7266   $at_diff - "$at_stderr" || at_failed=:
   7267 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7268 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1034"
   7269 $at_failed && at_fn_log_failure
   7270 $at_traceon; }
   7271 
   7272 
   7273 
   7274 cat >special-char-].y <<'_ATEOF'
   7275 %code bad {}
   7276 %code q {}
   7277 %code q {}
   7278 %%
   7279 start: ;
   7280 _ATEOF
   7281 
   7282 
   7283 { set +x
   7284 $as_echo "$at_srcdir/input.at:1047: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison special-char-].y"
   7285 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison special-char-].y" "input.at:1047"
   7286 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison special-char-].y
   7287 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7288 at_status=$? at_failed=false
   7289 $at_check_filter
   7290 echo >>"$at_stderr"; $as_echo "special-char-].y:1.7-9: error: %code qualifier 'bad' is not used
   7291 special-char-].y:2.7: error: %code qualifier 'q' is not used
   7292 special-char-].y:3.7: error: %code qualifier 'q' is not used
   7293 " | \
   7294   $at_diff - "$at_stderr" || at_failed=:
   7295 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7296 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1047"
   7297 $at_failed && at_fn_log_failure
   7298 $at_traceon; }
   7299 
   7300 
   7301 
   7302   set +x
   7303   $at_times_p && times >"$at_times_file"
   7304 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   7305 read at_status <"$at_status_file"
   7306 #AT_STOP_24
   7307 #AT_START_25
   7308 at_fn_group_banner 25 'input.at:1060' \
   7309   "%define errors" "                                 " 1
   7310 at_xfail=no
   7311 (
   7312   $as_echo "25. $at_setup_line: testing $at_desc ..."
   7313   $at_traceon
   7314 
   7315 
   7316 cat >input-redefined.y <<'_ATEOF'
   7317 %define var "value1"
   7318 %define var "value1"
   7319  %define var "value2"
   7320 %define special1 "]"
   7321 %define special2 "["
   7322 %%
   7323 start: ;
   7324 _ATEOF
   7325 
   7326 
   7327 
   7328 { set +x
   7329 $as_echo "$at_srcdir/input.at:1072: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input-redefined.y"
   7330 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input-redefined.y" "input.at:1072"
   7331 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input-redefined.y
   7332 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7333 at_status=$? at_failed=false
   7334 $at_check_filter
   7335 echo >>"$at_stderr"; $as_echo "input-redefined.y:2.9-11: error: %define variable 'var' redefined
   7336 input-redefined.y:1.9-11:     previous definition
   7337 input-redefined.y:3.10-12: error: %define variable 'var' redefined
   7338 input-redefined.y:2.9-11:      previous definition
   7339 " | \
   7340   $at_diff - "$at_stderr" || at_failed=:
   7341 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7342 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1072"
   7343 $at_failed && at_fn_log_failure
   7344 $at_traceon; }
   7345 
   7346 
   7347 
   7348 cat >input-unused.y <<'_ATEOF'
   7349 %define var "value"
   7350 %%
   7351 start: ;
   7352 _ATEOF
   7353 
   7354 
   7355 
   7356 { set +x
   7357 $as_echo "$at_srcdir/input.at:1085: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input-unused.y"
   7358 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input-unused.y" "input.at:1085"
   7359 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input-unused.y
   7360 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7361 at_status=$? at_failed=false
   7362 $at_check_filter
   7363 echo >>"$at_stderr"; $as_echo "input-unused.y:1.9-11: error: %define variable 'var' is not used
   7364 " | \
   7365   $at_diff - "$at_stderr" || at_failed=:
   7366 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7367 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1085"
   7368 $at_failed && at_fn_log_failure
   7369 $at_traceon; }
   7370 
   7371 
   7372 
   7373   set +x
   7374   $at_times_p && times >"$at_times_file"
   7375 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   7376 read at_status <"$at_status_file"
   7377 #AT_STOP_25
   7378 #AT_START_26
   7379 at_fn_group_banner 26 'input.at:1096' \
   7380   "%define, --define, --force-define" "              " 1
   7381 at_xfail=no
   7382 (
   7383   $as_echo "26. $at_setup_line: testing $at_desc ..."
   7384   $at_traceon
   7385 
   7386 
   7387 cat >skel.c <<'_ATEOF'
   7388 m4_divert_push(0)@
   7389 @output(b4_parser_file_name@)@
   7390 [var-dd: ]b4_percent_define_get([[var-dd]])[
   7391 var-ff: ]b4_percent_define_get([[var-ff]])[
   7392 var-dfg: ]b4_percent_define_get([[var-dfg]])[
   7393 var-fd: ]b4_percent_define_get([[var-fd]])
   7394 m4_divert_pop(0)
   7395 _ATEOF
   7396 
   7397 cat >input.y <<'_ATEOF'
   7398 %define var-dfg "gram"
   7399 %%
   7400 start: ;
   7401 _ATEOF
   7402 
   7403 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   7404   at_save_special_files
   7405   mkdir xml-tests
   7406     # Don't combine these Bison invocations since we want to be sure that
   7407   # --report=all isn't required to get the full XML file.
   7408   { set +x
   7409 $as_echo "$at_srcdir/input.at:1112: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   7410                   --graph=xml-tests/test.dot -Dvar-dd=cmd-d1 -Dvar-dd=cmd-d2 \\
   7411                  -Fvar-ff=cmd-f1 -Fvar-ff=cmd-f2 \\
   7412                  -Dvar-dfg=cmd-d -Fvar-dfg=cmd-f \\
   7413                  -Fvar-fd=cmd-f -Dvar-fd=cmd-d   \\
   7414                  --skeleton ./skel.c input.y"
   7415 at_fn_check_prepare_notrace 'an embedded newline' "input.at:1112"
   7416 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   7417                   --graph=xml-tests/test.dot -Dvar-dd=cmd-d1 -Dvar-dd=cmd-d2 \
   7418                  -Fvar-ff=cmd-f1 -Fvar-ff=cmd-f2 \
   7419                  -Dvar-dfg=cmd-d -Fvar-dfg=cmd-f \
   7420                  -Fvar-fd=cmd-f -Dvar-fd=cmd-d   \
   7421                  --skeleton ./skel.c input.y
   7422 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7423 at_status=$? at_failed=false
   7424 $at_check_filter
   7425 echo stderr:; cat "$at_stderr"
   7426 echo stdout:; cat "$at_stdout"
   7427 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1112"
   7428 $at_failed && at_fn_log_failure
   7429 $at_traceon; }
   7430 
   7431   { set +x
   7432 $as_echo "$at_srcdir/input.at:1112: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Dvar-dd=cmd-d1 -Dvar-dd=cmd-d2 \\
   7433                  -Fvar-ff=cmd-f1 -Fvar-ff=cmd-f2 \\
   7434                  -Dvar-dfg=cmd-d -Fvar-dfg=cmd-f \\
   7435                  -Fvar-fd=cmd-f -Dvar-fd=cmd-d   \\
   7436                  --skeleton ./skel.c input.y"
   7437 at_fn_check_prepare_notrace 'an embedded newline' "input.at:1112"
   7438 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Dvar-dd=cmd-d1 -Dvar-dd=cmd-d2 \
   7439                  -Fvar-ff=cmd-f1 -Fvar-ff=cmd-f2 \
   7440                  -Dvar-dfg=cmd-d -Fvar-dfg=cmd-f \
   7441                  -Fvar-fd=cmd-f -Dvar-fd=cmd-d   \
   7442                  --skeleton ./skel.c input.y
   7443 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7444 at_status=$? at_failed=false
   7445 $at_check_filter
   7446 echo stderr:; cat "$at_stderr"
   7447 echo stdout:; cat "$at_stdout"
   7448 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1112"
   7449 $at_failed && at_fn_log_failure
   7450 $at_traceon; }
   7451 
   7452     cp xml-tests/test.output expout
   7453   { set +x
   7454 $as_echo "$at_srcdir/input.at:1112: \$XSLTPROC \\
   7455              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   7456              xml-tests/test.xml"
   7457 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1112"
   7458 ( $at_check_trace; $XSLTPROC \
   7459              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   7460              xml-tests/test.xml
   7461 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7462 at_status=$? at_failed=false
   7463 $at_check_filter
   7464 at_fn_diff_devnull "$at_stderr" || at_failed=:
   7465 $at_diff expout "$at_stdout" || at_failed=:
   7466 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1112"
   7467 $at_failed && at_fn_log_failure
   7468 $at_traceon; }
   7469 
   7470   sort xml-tests/test.dot > expout
   7471   { set +x
   7472 $as_echo "$at_srcdir/input.at:1112: \$XSLTPROC \\
   7473              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   7474              xml-tests/test.xml | sort"
   7475 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1112"
   7476 ( $at_check_trace; $XSLTPROC \
   7477              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   7478              xml-tests/test.xml | sort
   7479 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7480 at_status=$? at_failed=false
   7481 $at_check_filter
   7482 at_fn_diff_devnull "$at_stderr" || at_failed=:
   7483 $at_diff expout "$at_stdout" || at_failed=:
   7484 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1112"
   7485 $at_failed && at_fn_log_failure
   7486 $at_traceon; }
   7487 
   7488   rm -rf xml-tests expout
   7489   at_restore_special_files
   7490 fi
   7491 { set +x
   7492 $as_echo "$at_srcdir/input.at:1112: bison -Dvar-dd=cmd-d1 -Dvar-dd=cmd-d2 \\
   7493                  -Fvar-ff=cmd-f1 -Fvar-ff=cmd-f2 \\
   7494                  -Dvar-dfg=cmd-d -Fvar-dfg=cmd-f \\
   7495                  -Fvar-fd=cmd-f -Dvar-fd=cmd-d   \\
   7496                  --skeleton ./skel.c input.y"
   7497 at_fn_check_prepare_notrace 'an embedded newline' "input.at:1112"
   7498 ( $at_check_trace; bison -Dvar-dd=cmd-d1 -Dvar-dd=cmd-d2 \
   7499                  -Fvar-ff=cmd-f1 -Fvar-ff=cmd-f2 \
   7500                  -Dvar-dfg=cmd-d -Fvar-dfg=cmd-f \
   7501                  -Fvar-fd=cmd-f -Dvar-fd=cmd-d   \
   7502                  --skeleton ./skel.c input.y
   7503 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7504 at_status=$? at_failed=false
   7505 $at_check_filter
   7506 at_fn_diff_devnull "$at_stderr" || at_failed=:
   7507 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7508 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1112"
   7509 $at_failed && at_fn_log_failure
   7510 $at_traceon; }
   7511 
   7512 
   7513 { set +x
   7514 $as_echo "$at_srcdir/input.at:1117: cat input.tab.c"
   7515 at_fn_check_prepare_trace "input.at:1117"
   7516 ( $at_check_trace; cat input.tab.c
   7517 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7518 at_status=$? at_failed=false
   7519 $at_check_filter
   7520 at_fn_diff_devnull "$at_stderr" || at_failed=:
   7521 echo >>"$at_stdout"; $as_echo "var-dd: cmd-d2
   7522 var-ff: cmd-f2
   7523 var-dfg: cmd-f
   7524 var-fd: cmd-d
   7525 " | \
   7526   $at_diff - "$at_stdout" || at_failed=:
   7527 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1117"
   7528 $at_failed && at_fn_log_failure
   7529 $at_traceon; }
   7530 
   7531 
   7532 cat >input-dg.y <<'_ATEOF'
   7533 %define var "gram"
   7534 %%
   7535 start: ;
   7536 _ATEOF
   7537 
   7538 
   7539 { set +x
   7540 $as_echo "$at_srcdir/input.at:1129: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Dvar=cmd-d input-dg.y"
   7541 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Dvar=cmd-d input-dg.y" "input.at:1129"
   7542 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -Dvar=cmd-d input-dg.y
   7543 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7544 at_status=$? at_failed=false
   7545 $at_check_filter
   7546 echo >>"$at_stderr"; $as_echo "input-dg.y:1.9-11: error: %define variable 'var' redefined
   7547 <command line>:1:      previous definition
   7548 " | \
   7549   $at_diff - "$at_stderr" || at_failed=:
   7550 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7551 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1129"
   7552 $at_failed && at_fn_log_failure
   7553 $at_traceon; }
   7554 
   7555 
   7556 
   7557 cat >input-dg.y <<'_ATEOF'
   7558 %define var "gram"
   7559 %%
   7560 start: ;
   7561 _ATEOF
   7562 
   7563 
   7564 { set +x
   7565 $as_echo "$at_srcdir/input.at:1139: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret -Dvar=cmd-d input-dg.y"
   7566 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret -Dvar=cmd-d input-dg.y" "input.at:1139"
   7567 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret -Dvar=cmd-d input-dg.y
   7568 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7569 at_status=$? at_failed=false
   7570 $at_check_filter
   7571 echo >>"$at_stderr"; $as_echo "input-dg.y:1.9-11: error: %define variable 'var' redefined
   7572  %define var \"gram\"
   7573          ^^^
   7574 <command line>:2:      previous definition
   7575 " | \
   7576   $at_diff - "$at_stderr" || at_failed=:
   7577 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7578 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1139"
   7579 $at_failed && at_fn_log_failure
   7580 $at_traceon; }
   7581 
   7582 
   7583 
   7584 cat >input-unused.y <<'_ATEOF'
   7585 %%
   7586 start: ;
   7587 _ATEOF
   7588 
   7589 
   7590 { set +x
   7591 $as_echo "$at_srcdir/input.at:1150: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Dunused-d -Funused-f input-unused.y"
   7592 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Dunused-d -Funused-f input-unused.y" "input.at:1150"
   7593 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -Dunused-d -Funused-f input-unused.y
   7594 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7595 at_status=$? at_failed=false
   7596 $at_check_filter
   7597 echo >>"$at_stderr"; $as_echo "<command line>:1: error: %define variable 'unused-d' is not used
   7598 <command line>:2: error: %define variable 'unused-f' is not used
   7599 " | \
   7600   $at_diff - "$at_stderr" || at_failed=:
   7601 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7602 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1150"
   7603 $at_failed && at_fn_log_failure
   7604 $at_traceon; }
   7605 
   7606 
   7607 
   7608   set +x
   7609   $at_times_p && times >"$at_times_file"
   7610 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   7611 read at_status <"$at_status_file"
   7612 #AT_STOP_26
   7613 #AT_START_27
   7614 at_fn_group_banner 27 'input.at:1161' \
   7615   "%define Boolean variables" "                      " 1
   7616 at_xfail=no
   7617 (
   7618   $as_echo "27. $at_setup_line: testing $at_desc ..."
   7619   $at_traceon
   7620 
   7621 
   7622 cat >Input.y <<'_ATEOF'
   7623 %language "Java"
   7624 %define public "maybe"
   7625 %define parser_class_name "Input"
   7626 %%
   7627 start: ;
   7628 _ATEOF
   7629 
   7630 
   7631 
   7632 { set +x
   7633 $as_echo "$at_srcdir/input.at:1171: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison Input.y"
   7634 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison Input.y" "input.at:1171"
   7635 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison Input.y
   7636 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7637 at_status=$? at_failed=false
   7638 $at_check_filter
   7639 echo >>"$at_stderr"; $as_echo "Input.y:2.9-14: error: invalid value for %define Boolean variable 'public'
   7640 " | \
   7641   $at_diff - "$at_stderr" || at_failed=:
   7642 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7643 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1171"
   7644 $at_failed && at_fn_log_failure
   7645 $at_traceon; }
   7646 
   7647 
   7648 
   7649   set +x
   7650   $at_times_p && times >"$at_times_file"
   7651 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   7652 read at_status <"$at_status_file"
   7653 #AT_STOP_27
   7654 #AT_START_28
   7655 at_fn_group_banner 28 'input.at:1181' \
   7656   "%define enum variables" "                         " 1
   7657 at_xfail=no
   7658 (
   7659   $as_echo "28. $at_setup_line: testing $at_desc ..."
   7660   $at_traceon
   7661 
   7662 
   7663 # Front-end.
   7664 cat >input.y <<'_ATEOF'
   7665 %define lr.default-reductions bogus
   7666 %%
   7667 start: ;
   7668 _ATEOF
   7669 
   7670 
   7671 { set +x
   7672 $as_echo "$at_srcdir/input.at:1189: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   7673 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:1189"
   7674 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   7675 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7676 at_status=$? at_failed=false
   7677 $at_check_filter
   7678 echo >>"$at_stderr"; $as_echo "input.y:1.9-29: error: invalid value for %define variable 'lr.default-reductions': 'bogus'
   7679 input.y:1.9-29:     accepted value: 'most'
   7680 input.y:1.9-29:     accepted value: 'consistent'
   7681 input.y:1.9-29:     accepted value: 'accepting'
   7682 " | \
   7683   $at_diff - "$at_stderr" || at_failed=:
   7684 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7685 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1189"
   7686 $at_failed && at_fn_log_failure
   7687 $at_traceon; }
   7688 
   7689 
   7690 
   7691 # Back-end.
   7692 # FIXME: these should be indented, but we shouldn't mess with the m4 yet
   7693 cat >input.y <<'_ATEOF'
   7694 %define api.push-pull neither
   7695 %%
   7696 start: ;
   7697 _ATEOF
   7698 
   7699 
   7700 { set +x
   7701 $as_echo "$at_srcdir/input.at:1203: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   7702 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:1203"
   7703 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   7704 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7705 at_status=$? at_failed=false
   7706 $at_check_filter
   7707 echo >>"$at_stderr"; $as_echo "input.y:1.9-21: error: invalid value for %define variable 'api.push-pull': 'neither'
   7708 input.y:1.9-21: error: accepted value: 'pull'
   7709 input.y:1.9-21: error: accepted value: 'push'
   7710 input.y:1.9-21: error: accepted value: 'both'
   7711 " | \
   7712   $at_diff - "$at_stderr" || at_failed=:
   7713 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7714 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1203"
   7715 $at_failed && at_fn_log_failure
   7716 $at_traceon; }
   7717 
   7718 
   7719 
   7720   set +x
   7721   $at_times_p && times >"$at_times_file"
   7722 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   7723 read at_status <"$at_status_file"
   7724 #AT_STOP_28
   7725 #AT_START_29
   7726 at_fn_group_banner 29 'input.at:1216' \
   7727   "%define backward compatibility" "                 " 1
   7728 at_xfail=no
   7729 (
   7730   $as_echo "29. $at_setup_line: testing $at_desc ..."
   7731   $at_traceon
   7732 
   7733 
   7734 # The error messages tell us whether underscores in these variables are
   7735 # being converted to dashes.
   7736 
   7737 cat >input.y <<'_ATEOF'
   7738 %define api.push_pull "neither"
   7739 %%
   7740 start: ;
   7741 _ATEOF
   7742 
   7743 
   7744 { set +x
   7745 $as_echo "$at_srcdir/input.at:1226: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   7746 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:1226"
   7747 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   7748 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7749 at_status=$? at_failed=false
   7750 $at_check_filter
   7751 echo >>"$at_stderr"; $as_echo "input.y:1.9-21: error: invalid value for %define variable 'api.push-pull': 'neither'
   7752 input.y:1.9-21: error: accepted value: 'pull'
   7753 input.y:1.9-21: error: accepted value: 'push'
   7754 input.y:1.9-21: error: accepted value: 'both'
   7755 " | \
   7756   $at_diff - "$at_stderr" || at_failed=:
   7757 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7758 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1226"
   7759 $at_failed && at_fn_log_failure
   7760 $at_traceon; }
   7761 
   7762 
   7763 
   7764 cat >input.y <<'_ATEOF'
   7765 %define lr.keep_unreachable_states maybe
   7766 %%
   7767 start: ;
   7768 _ATEOF
   7769 
   7770 
   7771 { set +x
   7772 $as_echo "$at_srcdir/input.at:1238: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   7773 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:1238"
   7774 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   7775 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7776 at_status=$? at_failed=false
   7777 $at_check_filter
   7778 echo >>"$at_stderr"; $as_echo "input.y:1.9-34: error: invalid value for %define Boolean variable 'lr.keep-unreachable-states'
   7779 " | \
   7780   $at_diff - "$at_stderr" || at_failed=:
   7781 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7782 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1238"
   7783 $at_failed && at_fn_log_failure
   7784 $at_traceon; }
   7785 
   7786 
   7787 
   7788 cat >input.y <<'_ATEOF'
   7789 %define foo_bar "baz"
   7790 %%
   7791 start: ;
   7792 _ATEOF
   7793 
   7794 
   7795 { set +x
   7796 $as_echo "$at_srcdir/input.at:1247: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   7797 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:1247"
   7798 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   7799 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7800 at_status=$? at_failed=false
   7801 $at_check_filter
   7802 echo >>"$at_stderr"; $as_echo "input.y:1.9-15: error: %define variable 'foo_bar' is not used
   7803 " | \
   7804   $at_diff - "$at_stderr" || at_failed=:
   7805 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7806 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1247"
   7807 $at_failed && at_fn_log_failure
   7808 $at_traceon; }
   7809 
   7810 
   7811 
   7812   set +x
   7813   $at_times_p && times >"$at_times_file"
   7814 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   7815 read at_status <"$at_status_file"
   7816 #AT_STOP_29
   7817 #AT_START_30
   7818 at_fn_group_banner 30 'input.at:1257' \
   7819   "Unused %define api.pure" "                        " 1
   7820 at_xfail=no
   7821 (
   7822   $as_echo "30. $at_setup_line: testing $at_desc ..."
   7823   $at_traceon
   7824 
   7825 
   7826 # AT_CHECK_API_PURE(DECLS, VALUE)
   7827 # -------------------------------
   7828 # Make sure Bison reports that `%define api.pure VALUE' is unused when DECLS
   7829 # are specified.
   7830 
   7831 
   7832 
   7833 cat >input.y <<'_ATEOF'
   7834 %define api.pure
   7835 %language "c++" %defines
   7836 %%
   7837 start: ;
   7838 _ATEOF
   7839 
   7840 
   7841 
   7842 { set +x
   7843 $as_echo "$at_srcdir/input.at:1277: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   7844 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:1277"
   7845 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   7846 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7847 at_status=$? at_failed=false
   7848 $at_check_filter
   7849 echo >>"$at_stderr"; $as_echo "input.y:1.9-16: error: %define variable 'api.pure' is not used
   7850 " | \
   7851   $at_diff - "$at_stderr" || at_failed=:
   7852 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7853 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1277"
   7854 $at_failed && at_fn_log_failure
   7855 $at_traceon; }
   7856 
   7857 
   7858 
   7859 
   7860 cat >input.y <<'_ATEOF'
   7861 %define api.pure false
   7862 %language "c++" %defines
   7863 %%
   7864 start: ;
   7865 _ATEOF
   7866 
   7867 
   7868 
   7869 { set +x
   7870 $as_echo "$at_srcdir/input.at:1278: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   7871 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:1278"
   7872 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   7873 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7874 at_status=$? at_failed=false
   7875 $at_check_filter
   7876 echo >>"$at_stderr"; $as_echo "input.y:1.9-16: error: %define variable 'api.pure' is not used
   7877 " | \
   7878   $at_diff - "$at_stderr" || at_failed=:
   7879 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7880 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1278"
   7881 $at_failed && at_fn_log_failure
   7882 $at_traceon; }
   7883 
   7884 
   7885 
   7886 
   7887 cat >input.y <<'_ATEOF'
   7888 %define api.pure ""
   7889 %language "c++" %defines %glr-parser
   7890 %%
   7891 start: ;
   7892 _ATEOF
   7893 
   7894 
   7895 
   7896 { set +x
   7897 $as_echo "$at_srcdir/input.at:1279: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   7898 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:1279"
   7899 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   7900 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7901 at_status=$? at_failed=false
   7902 $at_check_filter
   7903 echo >>"$at_stderr"; $as_echo "input.y:1.9-16: error: %define variable 'api.pure' is not used
   7904 " | \
   7905   $at_diff - "$at_stderr" || at_failed=:
   7906 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7907 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1279"
   7908 $at_failed && at_fn_log_failure
   7909 $at_traceon; }
   7910 
   7911 
   7912 
   7913 
   7914 cat >input.y <<'_ATEOF'
   7915 %define api.pure false
   7916 %language "c++" %defines %glr-parser
   7917 %%
   7918 start: ;
   7919 _ATEOF
   7920 
   7921 
   7922 
   7923 { set +x
   7924 $as_echo "$at_srcdir/input.at:1280: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   7925 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:1280"
   7926 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   7927 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7928 at_status=$? at_failed=false
   7929 $at_check_filter
   7930 echo >>"$at_stderr"; $as_echo "input.y:1.9-16: error: %define variable 'api.pure' is not used
   7931 " | \
   7932   $at_diff - "$at_stderr" || at_failed=:
   7933 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7934 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1280"
   7935 $at_failed && at_fn_log_failure
   7936 $at_traceon; }
   7937 
   7938 
   7939 
   7940 
   7941 cat >input.y <<'_ATEOF'
   7942 %define api.pure true
   7943 %language "java"
   7944 %%
   7945 start: ;
   7946 _ATEOF
   7947 
   7948 
   7949 
   7950 { set +x
   7951 $as_echo "$at_srcdir/input.at:1281: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   7952 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:1281"
   7953 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   7954 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7955 at_status=$? at_failed=false
   7956 $at_check_filter
   7957 echo >>"$at_stderr"; $as_echo "input.y:1.9-16: error: %define variable 'api.pure' is not used
   7958 " | \
   7959   $at_diff - "$at_stderr" || at_failed=:
   7960 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7961 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1281"
   7962 $at_failed && at_fn_log_failure
   7963 $at_traceon; }
   7964 
   7965 
   7966 
   7967 
   7968 cat >input.y <<'_ATEOF'
   7969 %define api.pure false
   7970 %language "java"
   7971 %%
   7972 start: ;
   7973 _ATEOF
   7974 
   7975 
   7976 
   7977 { set +x
   7978 $as_echo "$at_srcdir/input.at:1282: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   7979 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:1282"
   7980 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   7981 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   7982 at_status=$? at_failed=false
   7983 $at_check_filter
   7984 echo >>"$at_stderr"; $as_echo "input.y:1.9-16: error: %define variable 'api.pure' is not used
   7985 " | \
   7986   $at_diff - "$at_stderr" || at_failed=:
   7987 at_fn_diff_devnull "$at_stdout" || at_failed=:
   7988 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1282"
   7989 $at_failed && at_fn_log_failure
   7990 $at_traceon; }
   7991 
   7992 
   7993 
   7994 
   7995   set +x
   7996   $at_times_p && times >"$at_times_file"
   7997 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   7998 read at_status <"$at_status_file"
   7999 #AT_STOP_30
   8000 #AT_START_31
   8001 at_fn_group_banner 31 'input.at:1290' \
   8002   "C++ namespace reference errors" "                 " 1
   8003 at_xfail=no
   8004 (
   8005   $as_echo "31. $at_setup_line: testing $at_desc ..."
   8006   $at_traceon
   8007 
   8008 
   8009 # AT_CHECK_NAMESPACE_ERROR(NAMESPACE-DECL, ERROR, [ERROR], ...)
   8010 # -------------------------------------------------------------
   8011 # Make sure Bison reports all ERROR's for %define namespace "NAMESPACE-DECL".
   8012 
   8013 
   8014 
   8015 cat >input.y <<'_ATEOF'
   8016 %language "C++"
   8017 %defines
   8018 %define namespace ""
   8019 %%
   8020 start: ;
   8021 _ATEOF
   8022 
   8023 
   8024 
   8025 { set +x
   8026 $as_echo "$at_srcdir/input.at:1311: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   8027 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:1311"
   8028 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   8029 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8030 at_status=$? at_failed=false
   8031 $at_check_filter
   8032 echo >>"$at_stderr"; $as_echo "input.y:3.9-17: error: namespace reference is empty
   8033 " | \
   8034   $at_diff - "$at_stderr" || at_failed=:
   8035 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8036 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1311"
   8037 $at_failed && at_fn_log_failure
   8038 $at_traceon; }
   8039 
   8040 
   8041 
   8042 
   8043 cat >input.y <<'_ATEOF'
   8044 %language "C++"
   8045 %defines
   8046 %define namespace " 		  	 	"
   8047 %%
   8048 start: ;
   8049 _ATEOF
   8050 
   8051 
   8052 
   8053 { set +x
   8054 $as_echo "$at_srcdir/input.at:1313: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   8055 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:1313"
   8056 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   8057 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8058 at_status=$? at_failed=false
   8059 $at_check_filter
   8060 echo >>"$at_stderr"; $as_echo "input.y:3.9-17: error: namespace reference is empty
   8061 " | \
   8062   $at_diff - "$at_stderr" || at_failed=:
   8063 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8064 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1313"
   8065 $at_failed && at_fn_log_failure
   8066 $at_traceon; }
   8067 
   8068 
   8069 
   8070 
   8071 cat >input.y <<'_ATEOF'
   8072 %language "C++"
   8073 %defines
   8074 %define namespace "foo::::bar"
   8075 %%
   8076 start: ;
   8077 _ATEOF
   8078 
   8079 
   8080 
   8081 { set +x
   8082 $as_echo "$at_srcdir/input.at:1315: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   8083 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:1315"
   8084 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   8085 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8086 at_status=$? at_failed=false
   8087 $at_check_filter
   8088 echo >>"$at_stderr"; $as_echo "input.y:3.9-17: error: namespace reference has consecutive \"::\"
   8089 " | \
   8090   $at_diff - "$at_stderr" || at_failed=:
   8091 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8092 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1315"
   8093 $at_failed && at_fn_log_failure
   8094 $at_traceon; }
   8095 
   8096 
   8097 
   8098 
   8099 cat >input.y <<'_ATEOF'
   8100 %language "C++"
   8101 %defines
   8102 %define namespace "foo:: 	::bar"
   8103 %%
   8104 start: ;
   8105 _ATEOF
   8106 
   8107 
   8108 
   8109 { set +x
   8110 $as_echo "$at_srcdir/input.at:1317: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   8111 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:1317"
   8112 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   8113 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8114 at_status=$? at_failed=false
   8115 $at_check_filter
   8116 echo >>"$at_stderr"; $as_echo "input.y:3.9-17: error: namespace reference has consecutive \"::\"
   8117 " | \
   8118   $at_diff - "$at_stderr" || at_failed=:
   8119 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8120 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1317"
   8121 $at_failed && at_fn_log_failure
   8122 $at_traceon; }
   8123 
   8124 
   8125 
   8126 
   8127 cat >input.y <<'_ATEOF'
   8128 %language "C++"
   8129 %defines
   8130 %define namespace "::::bar"
   8131 %%
   8132 start: ;
   8133 _ATEOF
   8134 
   8135 
   8136 
   8137 { set +x
   8138 $as_echo "$at_srcdir/input.at:1319: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   8139 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:1319"
   8140 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   8141 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8142 at_status=$? at_failed=false
   8143 $at_check_filter
   8144 echo >>"$at_stderr"; $as_echo "input.y:3.9-17: error: namespace reference has consecutive \"::\"
   8145 " | \
   8146   $at_diff - "$at_stderr" || at_failed=:
   8147 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8148 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1319"
   8149 $at_failed && at_fn_log_failure
   8150 $at_traceon; }
   8151 
   8152 
   8153 
   8154 
   8155 cat >input.y <<'_ATEOF'
   8156 %language "C++"
   8157 %defines
   8158 %define namespace ":: ::bar"
   8159 %%
   8160 start: ;
   8161 _ATEOF
   8162 
   8163 
   8164 
   8165 { set +x
   8166 $as_echo "$at_srcdir/input.at:1321: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   8167 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:1321"
   8168 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   8169 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8170 at_status=$? at_failed=false
   8171 $at_check_filter
   8172 echo >>"$at_stderr"; $as_echo "input.y:3.9-17: error: namespace reference has consecutive \"::\"
   8173 " | \
   8174   $at_diff - "$at_stderr" || at_failed=:
   8175 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8176 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1321"
   8177 $at_failed && at_fn_log_failure
   8178 $at_traceon; }
   8179 
   8180 
   8181 
   8182 
   8183 cat >input.y <<'_ATEOF'
   8184 %language "C++"
   8185 %defines
   8186 %define namespace "foo::bar::	::"
   8187 %%
   8188 start: ;
   8189 _ATEOF
   8190 
   8191 
   8192 
   8193 { set +x
   8194 $as_echo "$at_srcdir/input.at:1323: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   8195 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:1323"
   8196 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   8197 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8198 at_status=$? at_failed=false
   8199 $at_check_filter
   8200 echo >>"$at_stderr"; $as_echo "input.y:3.9-17: error: namespace reference has consecutive \"::\"
   8201 input.y:3.9-17: error: namespace reference has a trailing \"::\"
   8202 " | \
   8203   $at_diff - "$at_stderr" || at_failed=:
   8204 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8205 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1323"
   8206 $at_failed && at_fn_log_failure
   8207 $at_traceon; }
   8208 
   8209 
   8210 
   8211 
   8212 cat >input.y <<'_ATEOF'
   8213 %language "C++"
   8214 %defines
   8215 %define namespace "foo::bar::"
   8216 %%
   8217 start: ;
   8218 _ATEOF
   8219 
   8220 
   8221 
   8222 { set +x
   8223 $as_echo "$at_srcdir/input.at:1326: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   8224 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:1326"
   8225 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   8226 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8227 at_status=$? at_failed=false
   8228 $at_check_filter
   8229 echo >>"$at_stderr"; $as_echo "input.y:3.9-17: error: namespace reference has a trailing \"::\"
   8230 " | \
   8231   $at_diff - "$at_stderr" || at_failed=:
   8232 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8233 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1326"
   8234 $at_failed && at_fn_log_failure
   8235 $at_traceon; }
   8236 
   8237 
   8238 
   8239 
   8240 cat >input.y <<'_ATEOF'
   8241 %language "C++"
   8242 %defines
   8243 %define namespace "foo::bar:: 	"
   8244 %%
   8245 start: ;
   8246 _ATEOF
   8247 
   8248 
   8249 
   8250 { set +x
   8251 $as_echo "$at_srcdir/input.at:1328: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   8252 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:1328"
   8253 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   8254 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8255 at_status=$? at_failed=false
   8256 $at_check_filter
   8257 echo >>"$at_stderr"; $as_echo "input.y:3.9-17: error: namespace reference has a trailing \"::\"
   8258 " | \
   8259   $at_diff - "$at_stderr" || at_failed=:
   8260 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8261 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1328"
   8262 $at_failed && at_fn_log_failure
   8263 $at_traceon; }
   8264 
   8265 
   8266 
   8267 
   8268 cat >input.y <<'_ATEOF'
   8269 %language "C++"
   8270 %defines
   8271 %define namespace "::"
   8272 %%
   8273 start: ;
   8274 _ATEOF
   8275 
   8276 
   8277 
   8278 { set +x
   8279 $as_echo "$at_srcdir/input.at:1330: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   8280 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:1330"
   8281 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   8282 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8283 at_status=$? at_failed=false
   8284 $at_check_filter
   8285 echo >>"$at_stderr"; $as_echo "input.y:3.9-17: error: namespace reference has a trailing \"::\"
   8286 " | \
   8287   $at_diff - "$at_stderr" || at_failed=:
   8288 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8289 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1330"
   8290 $at_failed && at_fn_log_failure
   8291 $at_traceon; }
   8292 
   8293 
   8294 
   8295 
   8296   set +x
   8297   $at_times_p && times >"$at_times_file"
   8298 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   8299 read at_status <"$at_status_file"
   8300 #AT_STOP_31
   8301 #AT_START_32
   8302 at_fn_group_banner 32 'input.at:1346' \
   8303   "Bad character literals" "                         " 1
   8304 at_xfail=no
   8305 (
   8306   $as_echo "32. $at_setup_line: testing $at_desc ..."
   8307   $at_traceon
   8308 
   8309 
   8310 cat >empty.y <<'_ATEOF'
   8311 %%
   8312 start: '';
   8313 start: '
   8314 _ATEOF
   8315 
   8316 { set +x
   8317 $as_echo "$at_srcdir/input.at:1353: \$PERL -e \"print 'start: \\'';\" >> empty.y || exit 77"
   8318 at_fn_check_prepare_dynamic "$PERL -e \"print 'start: \\'';\" >> empty.y || exit 77" "input.at:1353"
   8319 ( $at_check_trace; $PERL -e "print 'start: \'';" >> empty.y || exit 77
   8320 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8321 at_status=$? at_failed=false
   8322 $at_check_filter
   8323 at_fn_diff_devnull "$at_stderr" || at_failed=:
   8324 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8325 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1353"
   8326 $at_failed && at_fn_log_failure
   8327 $at_traceon; }
   8328 
   8329 
   8330 
   8331 { set +x
   8332 $as_echo "$at_srcdir/input.at:1355: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison empty.y"
   8333 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison empty.y" "input.at:1355"
   8334 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison empty.y
   8335 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8336 at_status=$? at_failed=false
   8337 $at_check_filter
   8338 echo >>"$at_stderr"; $as_echo "empty.y:2.8-9: warning: empty character literal
   8339 empty.y:3.8-4.0: warning: empty character literal
   8340 empty.y:3.8-4.0: error: missing \"'\" at end of line
   8341 empty.y:4.8: warning: empty character literal
   8342 empty.y:4.8: error: missing \"'\" at end of file
   8343 " | \
   8344   $at_diff - "$at_stderr" || at_failed=:
   8345 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8346 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1355"
   8347 $at_failed && at_fn_log_failure
   8348 $at_traceon; }
   8349 
   8350 
   8351 
   8352 cat >two.y <<'_ATEOF'
   8353 %%
   8354 start: 'ab';
   8355 start: 'ab
   8356 _ATEOF
   8357 
   8358 { set +x
   8359 $as_echo "$at_srcdir/input.at:1368: \$PERL -e \"print 'start: \\'ab';\" >> two.y || exit 77"
   8360 at_fn_check_prepare_dynamic "$PERL -e \"print 'start: \\'ab';\" >> two.y || exit 77" "input.at:1368"
   8361 ( $at_check_trace; $PERL -e "print 'start: \'ab';" >> two.y || exit 77
   8362 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8363 at_status=$? at_failed=false
   8364 $at_check_filter
   8365 at_fn_diff_devnull "$at_stderr" || at_failed=:
   8366 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8367 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1368"
   8368 $at_failed && at_fn_log_failure
   8369 $at_traceon; }
   8370 
   8371 
   8372 
   8373 { set +x
   8374 $as_echo "$at_srcdir/input.at:1370: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison two.y"
   8375 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison two.y" "input.at:1370"
   8376 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison two.y
   8377 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8378 at_status=$? at_failed=false
   8379 $at_check_filter
   8380 echo >>"$at_stderr"; $as_echo "two.y:2.8-11: warning: extra characters in character literal
   8381 two.y:3.8-4.0: warning: extra characters in character literal
   8382 two.y:3.8-4.0: error: missing \"'\" at end of line
   8383 two.y:4.8-10: warning: extra characters in character literal
   8384 two.y:4.8-10: error: missing \"'\" at end of file
   8385 " | \
   8386   $at_diff - "$at_stderr" || at_failed=:
   8387 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8388 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1370"
   8389 $at_failed && at_fn_log_failure
   8390 $at_traceon; }
   8391 
   8392 
   8393 
   8394 cat >three.y <<'_ATEOF'
   8395 %%
   8396 start: 'abc';
   8397 start: 'abc
   8398 _ATEOF
   8399 
   8400 { set +x
   8401 $as_echo "$at_srcdir/input.at:1383: \$PERL -e \"print 'start: \\'abc';\" >> three.y || exit 77"
   8402 at_fn_check_prepare_dynamic "$PERL -e \"print 'start: \\'abc';\" >> three.y || exit 77" "input.at:1383"
   8403 ( $at_check_trace; $PERL -e "print 'start: \'abc';" >> three.y || exit 77
   8404 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8405 at_status=$? at_failed=false
   8406 $at_check_filter
   8407 at_fn_diff_devnull "$at_stderr" || at_failed=:
   8408 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8409 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1383"
   8410 $at_failed && at_fn_log_failure
   8411 $at_traceon; }
   8412 
   8413 
   8414 
   8415 { set +x
   8416 $as_echo "$at_srcdir/input.at:1385: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison three.y"
   8417 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison three.y" "input.at:1385"
   8418 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison three.y
   8419 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8420 at_status=$? at_failed=false
   8421 $at_check_filter
   8422 echo >>"$at_stderr"; $as_echo "three.y:2.8-12: warning: extra characters in character literal
   8423 three.y:3.8-4.0: warning: extra characters in character literal
   8424 three.y:3.8-4.0: error: missing \"'\" at end of line
   8425 three.y:4.8-11: warning: extra characters in character literal
   8426 three.y:4.8-11: error: missing \"'\" at end of file
   8427 " | \
   8428   $at_diff - "$at_stderr" || at_failed=:
   8429 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8430 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1385"
   8431 $at_failed && at_fn_log_failure
   8432 $at_traceon; }
   8433 
   8434 
   8435 
   8436   set +x
   8437   $at_times_p && times >"$at_times_file"
   8438 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   8439 read at_status <"$at_status_file"
   8440 #AT_STOP_32
   8441 #AT_START_33
   8442 at_fn_group_banner 33 'input.at:1399' \
   8443   "Bad escapes in literals" "                        " 1
   8444 at_xfail=no
   8445 (
   8446   $as_echo "33. $at_setup_line: testing $at_desc ..."
   8447   $at_traceon
   8448 
   8449 
   8450 cat >input.y <<'_ATEOF'
   8451 %%
   8452 start: '\777' '\0' '\xfff' '\x0'
   8453        '\uffff' '\u0000' '\Uffffffff' '\U00000000'
   8454        '\ ' '\A';
   8455 _ATEOF
   8456 
   8457 
   8458 # It is not easy to create special characters, we cannot even trust tr.
   8459 # Beside we cannot even expect "echo '\0'" to output two characters
   8460 # (well three with \n): at least Bash 3.2 converts the two-character
   8461 # sequence "\0" into a single NUL character.
   8462 { set +x
   8463 $as_echo "$at_srcdir/input.at:1412: \$PERL -e 'print \"start: \\\"\\\\\\t\\\\\\f\\\\\\0\\\\\\1\\\" ;\";' >> input.y \\
   8464            || exit 77"
   8465 at_fn_check_prepare_notrace 'an embedded newline' "input.at:1412"
   8466 ( $at_check_trace; $PERL -e 'print "start: \"\\\t\\\f\\\0\\\1\" ;";' >> input.y \
   8467            || exit 77
   8468 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8469 at_status=$? at_failed=false
   8470 $at_check_filter
   8471 at_fn_diff_devnull "$at_stderr" || at_failed=:
   8472 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8473 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1412"
   8474 $at_failed && at_fn_log_failure
   8475 $at_traceon; }
   8476 
   8477 
   8478 
   8479 { set +x
   8480 $as_echo "$at_srcdir/input.at:1415: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   8481 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "input.at:1415"
   8482 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   8483 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8484 at_status=$? at_failed=false
   8485 $at_check_filter
   8486 echo >>"$at_stderr"; $as_echo "input.y:2.9-12: error: invalid number after \\-escape: 777
   8487 input.y:2.8-13: warning: empty character literal
   8488 input.y:2.16-17: error: invalid number after \\-escape: 0
   8489 input.y:2.15-18: warning: empty character literal
   8490 input.y:2.21-25: error: invalid number after \\-escape: xfff
   8491 input.y:2.20-26: warning: empty character literal
   8492 input.y:2.29-31: error: invalid number after \\-escape: x0
   8493 input.y:2.28-32: warning: empty character literal
   8494 input.y:3.9-14: error: invalid number after \\-escape: uffff
   8495 input.y:3.8-15: warning: empty character literal
   8496 input.y:3.18-23: error: invalid number after \\-escape: u0000
   8497 input.y:3.17-24: warning: empty character literal
   8498 input.y:3.27-36: error: invalid number after \\-escape: Uffffffff
   8499 input.y:3.26-37: warning: empty character literal
   8500 input.y:3.40-49: error: invalid number after \\-escape: U00000000
   8501 input.y:3.39-50: warning: empty character literal
   8502 input.y:4.9-10: error: invalid character after \\-escape: ' '
   8503 input.y:4.8-11: warning: empty character literal
   8504 input.y:4.14-15: error: invalid character after \\-escape: A
   8505 input.y:4.13-16: warning: empty character literal
   8506 input.y:5.9-16: error: invalid character after \\-escape: \\t
   8507 input.y:5.17: error: invalid character after \\-escape: \\f
   8508 input.y:5.18: error: invalid character after \\-escape: \\0
   8509 input.y:5.19: error: invalid character after \\-escape: \\001
   8510 " | \
   8511   $at_diff - "$at_stderr" || at_failed=:
   8512 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8513 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1415"
   8514 $at_failed && at_fn_log_failure
   8515 $at_traceon; }
   8516 
   8517 
   8518 
   8519   set +x
   8520   $at_times_p && times >"$at_times_file"
   8521 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   8522 read at_status <"$at_status_file"
   8523 #AT_STOP_33
   8524 #AT_START_34
   8525 at_fn_group_banner 34 'input.at:1448' \
   8526   "LAC: Errors for %define" "                        " 1
   8527 at_xfail=no
   8528 (
   8529   $as_echo "34. $at_setup_line: testing $at_desc ..."
   8530   $at_traceon
   8531 
   8532 
   8533 cat >input.y <<'_ATEOF'
   8534 %%
   8535 start: ;
   8536 _ATEOF
   8537 
   8538 
   8539 # parse.lac.* options are useless if LAC isn't actually activated.
   8540 
   8541 { set +x
   8542 $as_echo "$at_srcdir/input.at:1456: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Dparse.lac.es-capacity-initial=1 input.y"
   8543 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Dparse.lac.es-capacity-initial=1 input.y" "input.at:1456"
   8544 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -Dparse.lac.es-capacity-initial=1 input.y
   8545 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8546 at_status=$? at_failed=false
   8547 $at_check_filter
   8548 echo >>"$at_stderr"; $as_echo "<command line>:1: error: %define variable 'parse.lac.es-capacity-initial' is not used
   8549 " | \
   8550   $at_diff - "$at_stderr" || at_failed=:
   8551 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8552 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1456"
   8553 $at_failed && at_fn_log_failure
   8554 $at_traceon; }
   8555 
   8556 
   8557 
   8558 { set +x
   8559 $as_echo "$at_srcdir/input.at:1460: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Dparse.lac.memory-trace=full input.y"
   8560 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Dparse.lac.memory-trace=full input.y" "input.at:1460"
   8561 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -Dparse.lac.memory-trace=full input.y
   8562 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8563 at_status=$? at_failed=false
   8564 $at_check_filter
   8565 echo >>"$at_stderr"; $as_echo "<command line>:1: error: %define variable 'parse.lac.memory-trace' is not used
   8566 " | \
   8567   $at_diff - "$at_stderr" || at_failed=:
   8568 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8569 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1460"
   8570 $at_failed && at_fn_log_failure
   8571 $at_traceon; }
   8572 
   8573 
   8574 
   8575   set +x
   8576   $at_times_p && times >"$at_times_file"
   8577 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   8578 read at_status <"$at_status_file"
   8579 #AT_STOP_34
   8580 #AT_START_35
   8581 at_fn_group_banner 35 'input.at:1471' \
   8582   "-Werror is not affected by -Wnone and -Wall" "    " 1
   8583 at_xfail=no
   8584 (
   8585   $as_echo "35. $at_setup_line: testing $at_desc ..."
   8586   $at_traceon
   8587 
   8588 
   8589 cat >input.y <<'_ATEOF'
   8590 %%
   8591 foo-bar: ;
   8592 _ATEOF
   8593 
   8594 
   8595 # -Werror is not enabled by -Wall or equivalent.
   8596 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   8597   at_save_special_files
   8598   mkdir xml-tests
   8599     # Don't combine these Bison invocations since we want to be sure that
   8600   # --report=all isn't required to get the full XML file.
   8601   { set +x
   8602 $as_echo "$at_srcdir/input.at:1479: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   8603                   --graph=xml-tests/test.dot -Wall input.y"
   8604 at_fn_check_prepare_notrace 'an embedded newline' "input.at:1479"
   8605 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   8606                   --graph=xml-tests/test.dot -Wall input.y
   8607 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8608 at_status=$? at_failed=false
   8609 $at_check_filter
   8610 echo stderr:; cat "$at_stderr"
   8611 echo stdout:; cat "$at_stdout"
   8612 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1479"
   8613 $at_failed && at_fn_log_failure
   8614 $at_traceon; }
   8615 
   8616   { set +x
   8617 $as_echo "$at_srcdir/input.at:1479: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Wall input.y"
   8618 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Wall input.y" "input.at:1479"
   8619 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Wall input.y
   8620 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8621 at_status=$? at_failed=false
   8622 $at_check_filter
   8623 echo stderr:; cat "$at_stderr"
   8624 echo stdout:; cat "$at_stdout"
   8625 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1479"
   8626 $at_failed && at_fn_log_failure
   8627 $at_traceon; }
   8628 
   8629     cp xml-tests/test.output expout
   8630   { set +x
   8631 $as_echo "$at_srcdir/input.at:1479: \$XSLTPROC \\
   8632              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   8633              xml-tests/test.xml"
   8634 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1479"
   8635 ( $at_check_trace; $XSLTPROC \
   8636              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   8637              xml-tests/test.xml
   8638 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8639 at_status=$? at_failed=false
   8640 $at_check_filter
   8641 at_fn_diff_devnull "$at_stderr" || at_failed=:
   8642 $at_diff expout "$at_stdout" || at_failed=:
   8643 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1479"
   8644 $at_failed && at_fn_log_failure
   8645 $at_traceon; }
   8646 
   8647   sort xml-tests/test.dot > expout
   8648   { set +x
   8649 $as_echo "$at_srcdir/input.at:1479: \$XSLTPROC \\
   8650              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   8651              xml-tests/test.xml | sort"
   8652 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1479"
   8653 ( $at_check_trace; $XSLTPROC \
   8654              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   8655              xml-tests/test.xml | sort
   8656 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8657 at_status=$? at_failed=false
   8658 $at_check_filter
   8659 at_fn_diff_devnull "$at_stderr" || at_failed=:
   8660 $at_diff expout "$at_stdout" || at_failed=:
   8661 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1479"
   8662 $at_failed && at_fn_log_failure
   8663 $at_traceon; }
   8664 
   8665   rm -rf xml-tests expout
   8666   at_restore_special_files
   8667 fi
   8668 { set +x
   8669 $as_echo "$at_srcdir/input.at:1479: bison -Wall input.y"
   8670 at_fn_check_prepare_trace "input.at:1479"
   8671 ( $at_check_trace; bison -Wall input.y
   8672 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8673 at_status=$? at_failed=false
   8674 $at_check_filter
   8675 echo >>"$at_stderr"; $as_echo "input.y:2.1-7: warning: POSIX Yacc forbids dashes in symbol names: foo-bar
   8676 " | \
   8677   $at_diff - "$at_stderr" || at_failed=:
   8678 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8679 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1479"
   8680 $at_failed && at_fn_log_failure
   8681 $at_traceon; }
   8682 
   8683 # Defining POSIXLY_CORRECT causes bison to complain if options are
   8684 # added after the grammar file name, so skip these checks in that
   8685 # case.
   8686 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   8687   at_save_special_files
   8688 
   8689   # To avoid expanding it repeatedly, store specified stdout.
   8690   : >expout
   8691 
   8692   # Run with -Werror.
   8693   { set +x
   8694 $as_echo "$at_srcdir/input.at:1479: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wall input.y -Werror"
   8695 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wall input.y -Werror" "input.at:1479"
   8696 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -Wall input.y -Werror
   8697 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8698 at_status=$? at_failed=false
   8699 $at_check_filter
   8700 echo stderr:; tee stderr <"$at_stderr"
   8701 $at_diff expout "$at_stdout" || at_failed=:
   8702 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1479"
   8703 $at_failed && at_fn_log_failure
   8704 $at_traceon; }
   8705 
   8706 
   8707   # Build expected stderr up to and including the "warnings being
   8708   # treated as errors" message.
   8709   cat >at-bison-check-warnings <<'_ATEOF'
   8710 input.y:2.1-7: warning: POSIX Yacc forbids dashes in symbol names: foo-bar
   8711 _ATEOF
   8712 
   8713   at_bison_check_first=`sed -n \
   8714     '/: warning: /{=;q;}' at-bison-check-warnings`
   8715   : ${at_bison_check_first:=1}
   8716   at_bison_check_first_tmp=`sed -n \
   8717     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   8718   : ${at_bison_check_first_tmp:=1}
   8719   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   8720     at_bison_check_first=$at_bison_check_first_tmp
   8721   fi
   8722   if test $at_bison_check_first -gt 1; then
   8723     sed -n "1,`expr $at_bison_check_first - 1`"p \
   8724       at-bison-check-warnings > experr
   8725   fi
   8726   echo 'bison: warnings being treated as errors' >> experr
   8727 
   8728   # Finish building expected stderr and check.  Unlike warnings,
   8729   # complaints cause bison to exit early.  Thus, with -Werror, bison
   8730   # does not necessarily report all warnings that it does without
   8731   # -Werror, but it at least reports one.
   8732   at_bison_check_last=`sed -n '$=' stderr`
   8733   : ${at_bison_check_last:=1}
   8734   at_bison_check_last=`expr $at_bison_check_last - 1`
   8735   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   8736     at-bison-check-warnings >> experr
   8737   { set +x
   8738 $as_echo "$at_srcdir/input.at:1479: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   8739               stderr 1>&2"
   8740 at_fn_check_prepare_notrace 'an embedded newline' "input.at:1479"
   8741 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   8742               stderr 1>&2
   8743 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8744 at_status=$? at_failed=false
   8745 $at_check_filter
   8746 $at_diff experr "$at_stderr" || at_failed=:
   8747 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8748 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1479"
   8749 $at_failed && at_fn_log_failure
   8750 $at_traceon; }
   8751 
   8752 
   8753   # Now check --warnings=error.
   8754   cp stderr experr
   8755   { set +x
   8756 $as_echo "$at_srcdir/input.at:1479: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wall input.y --warnings=error"
   8757 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wall input.y --warnings=error" "input.at:1479"
   8758 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -Wall input.y --warnings=error
   8759 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8760 at_status=$? at_failed=false
   8761 $at_check_filter
   8762 $at_diff experr "$at_stderr" || at_failed=:
   8763 $at_diff expout "$at_stdout" || at_failed=:
   8764 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1479"
   8765 $at_failed && at_fn_log_failure
   8766 $at_traceon; }
   8767 
   8768 
   8769   # Now check -Wnone and --warnings=none by making sure that
   8770   # -Werror doesn't change the exit status when -Wnone or
   8771   # --warnings=none is specified.
   8772   { set +x
   8773 $as_echo "$at_srcdir/input.at:1479: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wall input.y -Wnone -Werror"
   8774 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wall input.y -Wnone -Werror" "input.at:1479"
   8775 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -Wall input.y -Wnone -Werror
   8776 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8777 at_status=$? at_failed=false
   8778 $at_check_filter
   8779 at_fn_diff_devnull "$at_stderr" || at_failed=:
   8780 $at_diff expout "$at_stdout" || at_failed=:
   8781 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1479"
   8782 $at_failed && at_fn_log_failure
   8783 $at_traceon; }
   8784 
   8785   { set +x
   8786 $as_echo "$at_srcdir/input.at:1479: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wall input.y --warnings=none -Werror"
   8787 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wall input.y --warnings=none -Werror" "input.at:1479"
   8788 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -Wall input.y --warnings=none -Werror
   8789 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8790 at_status=$? at_failed=false
   8791 $at_check_filter
   8792 at_fn_diff_devnull "$at_stderr" || at_failed=:
   8793 $at_diff expout "$at_stdout" || at_failed=:
   8794 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1479"
   8795 $at_failed && at_fn_log_failure
   8796 $at_traceon; }
   8797 
   8798 
   8799   at_restore_special_files
   8800 fi
   8801 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   8802   at_save_special_files
   8803   mkdir xml-tests
   8804     # Don't combine these Bison invocations since we want to be sure that
   8805   # --report=all isn't required to get the full XML file.
   8806   { set +x
   8807 $as_echo "$at_srcdir/input.at:1482: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   8808                   --graph=xml-tests/test.dot -W input.y"
   8809 at_fn_check_prepare_notrace 'an embedded newline' "input.at:1482"
   8810 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   8811                   --graph=xml-tests/test.dot -W input.y
   8812 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8813 at_status=$? at_failed=false
   8814 $at_check_filter
   8815 echo stderr:; cat "$at_stderr"
   8816 echo stdout:; cat "$at_stdout"
   8817 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1482"
   8818 $at_failed && at_fn_log_failure
   8819 $at_traceon; }
   8820 
   8821   { set +x
   8822 $as_echo "$at_srcdir/input.at:1482: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -W input.y"
   8823 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -W input.y" "input.at:1482"
   8824 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -W input.y
   8825 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8826 at_status=$? at_failed=false
   8827 $at_check_filter
   8828 echo stderr:; cat "$at_stderr"
   8829 echo stdout:; cat "$at_stdout"
   8830 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1482"
   8831 $at_failed && at_fn_log_failure
   8832 $at_traceon; }
   8833 
   8834     cp xml-tests/test.output expout
   8835   { set +x
   8836 $as_echo "$at_srcdir/input.at:1482: \$XSLTPROC \\
   8837              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   8838              xml-tests/test.xml"
   8839 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1482"
   8840 ( $at_check_trace; $XSLTPROC \
   8841              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   8842              xml-tests/test.xml
   8843 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8844 at_status=$? at_failed=false
   8845 $at_check_filter
   8846 at_fn_diff_devnull "$at_stderr" || at_failed=:
   8847 $at_diff expout "$at_stdout" || at_failed=:
   8848 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1482"
   8849 $at_failed && at_fn_log_failure
   8850 $at_traceon; }
   8851 
   8852   sort xml-tests/test.dot > expout
   8853   { set +x
   8854 $as_echo "$at_srcdir/input.at:1482: \$XSLTPROC \\
   8855              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   8856              xml-tests/test.xml | sort"
   8857 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1482"
   8858 ( $at_check_trace; $XSLTPROC \
   8859              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   8860              xml-tests/test.xml | sort
   8861 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8862 at_status=$? at_failed=false
   8863 $at_check_filter
   8864 at_fn_diff_devnull "$at_stderr" || at_failed=:
   8865 $at_diff expout "$at_stdout" || at_failed=:
   8866 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1482"
   8867 $at_failed && at_fn_log_failure
   8868 $at_traceon; }
   8869 
   8870   rm -rf xml-tests expout
   8871   at_restore_special_files
   8872 fi
   8873 { set +x
   8874 $as_echo "$at_srcdir/input.at:1482: bison -W input.y"
   8875 at_fn_check_prepare_trace "input.at:1482"
   8876 ( $at_check_trace; bison -W input.y
   8877 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8878 at_status=$? at_failed=false
   8879 $at_check_filter
   8880 echo >>"$at_stderr"; $as_echo "input.y:2.1-7: warning: POSIX Yacc forbids dashes in symbol names: foo-bar
   8881 " | \
   8882   $at_diff - "$at_stderr" || at_failed=:
   8883 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8884 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1482"
   8885 $at_failed && at_fn_log_failure
   8886 $at_traceon; }
   8887 
   8888 # Defining POSIXLY_CORRECT causes bison to complain if options are
   8889 # added after the grammar file name, so skip these checks in that
   8890 # case.
   8891 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   8892   at_save_special_files
   8893 
   8894   # To avoid expanding it repeatedly, store specified stdout.
   8895   : >expout
   8896 
   8897   # Run with -Werror.
   8898   { set +x
   8899 $as_echo "$at_srcdir/input.at:1482: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -W input.y -Werror"
   8900 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -W input.y -Werror" "input.at:1482"
   8901 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -W input.y -Werror
   8902 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8903 at_status=$? at_failed=false
   8904 $at_check_filter
   8905 echo stderr:; tee stderr <"$at_stderr"
   8906 $at_diff expout "$at_stdout" || at_failed=:
   8907 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1482"
   8908 $at_failed && at_fn_log_failure
   8909 $at_traceon; }
   8910 
   8911 
   8912   # Build expected stderr up to and including the "warnings being
   8913   # treated as errors" message.
   8914   cat >at-bison-check-warnings <<'_ATEOF'
   8915 input.y:2.1-7: warning: POSIX Yacc forbids dashes in symbol names: foo-bar
   8916 _ATEOF
   8917 
   8918   at_bison_check_first=`sed -n \
   8919     '/: warning: /{=;q;}' at-bison-check-warnings`
   8920   : ${at_bison_check_first:=1}
   8921   at_bison_check_first_tmp=`sed -n \
   8922     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   8923   : ${at_bison_check_first_tmp:=1}
   8924   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   8925     at_bison_check_first=$at_bison_check_first_tmp
   8926   fi
   8927   if test $at_bison_check_first -gt 1; then
   8928     sed -n "1,`expr $at_bison_check_first - 1`"p \
   8929       at-bison-check-warnings > experr
   8930   fi
   8931   echo 'bison: warnings being treated as errors' >> experr
   8932 
   8933   # Finish building expected stderr and check.  Unlike warnings,
   8934   # complaints cause bison to exit early.  Thus, with -Werror, bison
   8935   # does not necessarily report all warnings that it does without
   8936   # -Werror, but it at least reports one.
   8937   at_bison_check_last=`sed -n '$=' stderr`
   8938   : ${at_bison_check_last:=1}
   8939   at_bison_check_last=`expr $at_bison_check_last - 1`
   8940   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   8941     at-bison-check-warnings >> experr
   8942   { set +x
   8943 $as_echo "$at_srcdir/input.at:1482: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   8944               stderr 1>&2"
   8945 at_fn_check_prepare_notrace 'an embedded newline' "input.at:1482"
   8946 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   8947               stderr 1>&2
   8948 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8949 at_status=$? at_failed=false
   8950 $at_check_filter
   8951 $at_diff experr "$at_stderr" || at_failed=:
   8952 at_fn_diff_devnull "$at_stdout" || at_failed=:
   8953 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1482"
   8954 $at_failed && at_fn_log_failure
   8955 $at_traceon; }
   8956 
   8957 
   8958   # Now check --warnings=error.
   8959   cp stderr experr
   8960   { set +x
   8961 $as_echo "$at_srcdir/input.at:1482: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -W input.y --warnings=error"
   8962 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -W input.y --warnings=error" "input.at:1482"
   8963 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -W input.y --warnings=error
   8964 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8965 at_status=$? at_failed=false
   8966 $at_check_filter
   8967 $at_diff experr "$at_stderr" || at_failed=:
   8968 $at_diff expout "$at_stdout" || at_failed=:
   8969 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1482"
   8970 $at_failed && at_fn_log_failure
   8971 $at_traceon; }
   8972 
   8973 
   8974   # Now check -Wnone and --warnings=none by making sure that
   8975   # -Werror doesn't change the exit status when -Wnone or
   8976   # --warnings=none is specified.
   8977   { set +x
   8978 $as_echo "$at_srcdir/input.at:1482: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -W input.y -Wnone -Werror"
   8979 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -W input.y -Wnone -Werror" "input.at:1482"
   8980 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -W input.y -Wnone -Werror
   8981 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8982 at_status=$? at_failed=false
   8983 $at_check_filter
   8984 at_fn_diff_devnull "$at_stderr" || at_failed=:
   8985 $at_diff expout "$at_stdout" || at_failed=:
   8986 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1482"
   8987 $at_failed && at_fn_log_failure
   8988 $at_traceon; }
   8989 
   8990   { set +x
   8991 $as_echo "$at_srcdir/input.at:1482: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -W input.y --warnings=none -Werror"
   8992 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -W input.y --warnings=none -Werror" "input.at:1482"
   8993 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -W input.y --warnings=none -Werror
   8994 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   8995 at_status=$? at_failed=false
   8996 $at_check_filter
   8997 at_fn_diff_devnull "$at_stderr" || at_failed=:
   8998 $at_diff expout "$at_stdout" || at_failed=:
   8999 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1482"
   9000 $at_failed && at_fn_log_failure
   9001 $at_traceon; }
   9002 
   9003 
   9004   at_restore_special_files
   9005 fi
   9006 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   9007   at_save_special_files
   9008   mkdir xml-tests
   9009     # Don't combine these Bison invocations since we want to be sure that
   9010   # --report=all isn't required to get the full XML file.
   9011   { set +x
   9012 $as_echo "$at_srcdir/input.at:1485: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   9013                   --graph=xml-tests/test.dot -Wno-none input.y"
   9014 at_fn_check_prepare_notrace 'an embedded newline' "input.at:1485"
   9015 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   9016                   --graph=xml-tests/test.dot -Wno-none input.y
   9017 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9018 at_status=$? at_failed=false
   9019 $at_check_filter
   9020 echo stderr:; cat "$at_stderr"
   9021 echo stdout:; cat "$at_stdout"
   9022 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1485"
   9023 $at_failed && at_fn_log_failure
   9024 $at_traceon; }
   9025 
   9026   { set +x
   9027 $as_echo "$at_srcdir/input.at:1485: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Wno-none input.y"
   9028 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Wno-none input.y" "input.at:1485"
   9029 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Wno-none input.y
   9030 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9031 at_status=$? at_failed=false
   9032 $at_check_filter
   9033 echo stderr:; cat "$at_stderr"
   9034 echo stdout:; cat "$at_stdout"
   9035 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1485"
   9036 $at_failed && at_fn_log_failure
   9037 $at_traceon; }
   9038 
   9039     cp xml-tests/test.output expout
   9040   { set +x
   9041 $as_echo "$at_srcdir/input.at:1485: \$XSLTPROC \\
   9042              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   9043              xml-tests/test.xml"
   9044 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1485"
   9045 ( $at_check_trace; $XSLTPROC \
   9046              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   9047              xml-tests/test.xml
   9048 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9049 at_status=$? at_failed=false
   9050 $at_check_filter
   9051 at_fn_diff_devnull "$at_stderr" || at_failed=:
   9052 $at_diff expout "$at_stdout" || at_failed=:
   9053 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1485"
   9054 $at_failed && at_fn_log_failure
   9055 $at_traceon; }
   9056 
   9057   sort xml-tests/test.dot > expout
   9058   { set +x
   9059 $as_echo "$at_srcdir/input.at:1485: \$XSLTPROC \\
   9060              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   9061              xml-tests/test.xml | sort"
   9062 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1485"
   9063 ( $at_check_trace; $XSLTPROC \
   9064              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   9065              xml-tests/test.xml | sort
   9066 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9067 at_status=$? at_failed=false
   9068 $at_check_filter
   9069 at_fn_diff_devnull "$at_stderr" || at_failed=:
   9070 $at_diff expout "$at_stdout" || at_failed=:
   9071 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1485"
   9072 $at_failed && at_fn_log_failure
   9073 $at_traceon; }
   9074 
   9075   rm -rf xml-tests expout
   9076   at_restore_special_files
   9077 fi
   9078 { set +x
   9079 $as_echo "$at_srcdir/input.at:1485: bison -Wno-none input.y"
   9080 at_fn_check_prepare_trace "input.at:1485"
   9081 ( $at_check_trace; bison -Wno-none input.y
   9082 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9083 at_status=$? at_failed=false
   9084 $at_check_filter
   9085 echo >>"$at_stderr"; $as_echo "input.y:2.1-7: warning: POSIX Yacc forbids dashes in symbol names: foo-bar
   9086 " | \
   9087   $at_diff - "$at_stderr" || at_failed=:
   9088 at_fn_diff_devnull "$at_stdout" || at_failed=:
   9089 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1485"
   9090 $at_failed && at_fn_log_failure
   9091 $at_traceon; }
   9092 
   9093 # Defining POSIXLY_CORRECT causes bison to complain if options are
   9094 # added after the grammar file name, so skip these checks in that
   9095 # case.
   9096 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   9097   at_save_special_files
   9098 
   9099   # To avoid expanding it repeatedly, store specified stdout.
   9100   : >expout
   9101 
   9102   # Run with -Werror.
   9103   { set +x
   9104 $as_echo "$at_srcdir/input.at:1485: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wno-none input.y -Werror"
   9105 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wno-none input.y -Werror" "input.at:1485"
   9106 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -Wno-none input.y -Werror
   9107 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9108 at_status=$? at_failed=false
   9109 $at_check_filter
   9110 echo stderr:; tee stderr <"$at_stderr"
   9111 $at_diff expout "$at_stdout" || at_failed=:
   9112 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1485"
   9113 $at_failed && at_fn_log_failure
   9114 $at_traceon; }
   9115 
   9116 
   9117   # Build expected stderr up to and including the "warnings being
   9118   # treated as errors" message.
   9119   cat >at-bison-check-warnings <<'_ATEOF'
   9120 input.y:2.1-7: warning: POSIX Yacc forbids dashes in symbol names: foo-bar
   9121 _ATEOF
   9122 
   9123   at_bison_check_first=`sed -n \
   9124     '/: warning: /{=;q;}' at-bison-check-warnings`
   9125   : ${at_bison_check_first:=1}
   9126   at_bison_check_first_tmp=`sed -n \
   9127     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   9128   : ${at_bison_check_first_tmp:=1}
   9129   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   9130     at_bison_check_first=$at_bison_check_first_tmp
   9131   fi
   9132   if test $at_bison_check_first -gt 1; then
   9133     sed -n "1,`expr $at_bison_check_first - 1`"p \
   9134       at-bison-check-warnings > experr
   9135   fi
   9136   echo 'bison: warnings being treated as errors' >> experr
   9137 
   9138   # Finish building expected stderr and check.  Unlike warnings,
   9139   # complaints cause bison to exit early.  Thus, with -Werror, bison
   9140   # does not necessarily report all warnings that it does without
   9141   # -Werror, but it at least reports one.
   9142   at_bison_check_last=`sed -n '$=' stderr`
   9143   : ${at_bison_check_last:=1}
   9144   at_bison_check_last=`expr $at_bison_check_last - 1`
   9145   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   9146     at-bison-check-warnings >> experr
   9147   { set +x
   9148 $as_echo "$at_srcdir/input.at:1485: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   9149               stderr 1>&2"
   9150 at_fn_check_prepare_notrace 'an embedded newline' "input.at:1485"
   9151 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   9152               stderr 1>&2
   9153 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9154 at_status=$? at_failed=false
   9155 $at_check_filter
   9156 $at_diff experr "$at_stderr" || at_failed=:
   9157 at_fn_diff_devnull "$at_stdout" || at_failed=:
   9158 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1485"
   9159 $at_failed && at_fn_log_failure
   9160 $at_traceon; }
   9161 
   9162 
   9163   # Now check --warnings=error.
   9164   cp stderr experr
   9165   { set +x
   9166 $as_echo "$at_srcdir/input.at:1485: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wno-none input.y --warnings=error"
   9167 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wno-none input.y --warnings=error" "input.at:1485"
   9168 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -Wno-none input.y --warnings=error
   9169 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9170 at_status=$? at_failed=false
   9171 $at_check_filter
   9172 $at_diff experr "$at_stderr" || at_failed=:
   9173 $at_diff expout "$at_stdout" || at_failed=:
   9174 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1485"
   9175 $at_failed && at_fn_log_failure
   9176 $at_traceon; }
   9177 
   9178 
   9179   # Now check -Wnone and --warnings=none by making sure that
   9180   # -Werror doesn't change the exit status when -Wnone or
   9181   # --warnings=none is specified.
   9182   { set +x
   9183 $as_echo "$at_srcdir/input.at:1485: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wno-none input.y -Wnone -Werror"
   9184 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wno-none input.y -Wnone -Werror" "input.at:1485"
   9185 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -Wno-none input.y -Wnone -Werror
   9186 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9187 at_status=$? at_failed=false
   9188 $at_check_filter
   9189 at_fn_diff_devnull "$at_stderr" || at_failed=:
   9190 $at_diff expout "$at_stdout" || at_failed=:
   9191 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1485"
   9192 $at_failed && at_fn_log_failure
   9193 $at_traceon; }
   9194 
   9195   { set +x
   9196 $as_echo "$at_srcdir/input.at:1485: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wno-none input.y --warnings=none -Werror"
   9197 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Wno-none input.y --warnings=none -Werror" "input.at:1485"
   9198 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -Wno-none input.y --warnings=none -Werror
   9199 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9200 at_status=$? at_failed=false
   9201 $at_check_filter
   9202 at_fn_diff_devnull "$at_stderr" || at_failed=:
   9203 $at_diff expout "$at_stdout" || at_failed=:
   9204 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1485"
   9205 $at_failed && at_fn_log_failure
   9206 $at_traceon; }
   9207 
   9208 
   9209   at_restore_special_files
   9210 fi
   9211 
   9212 # -Werror is not disabled by -Wnone or equivalent.
   9213 
   9214 { set +x
   9215 $as_echo "$at_srcdir/input.at:1490: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Werror,none,yacc input.y"
   9216 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Werror,none,yacc input.y" "input.at:1490"
   9217 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -Werror,none,yacc input.y
   9218 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9219 at_status=$? at_failed=false
   9220 $at_check_filter
   9221 echo stderr:; tee stderr <"$at_stderr"
   9222 at_fn_diff_devnull "$at_stdout" || at_failed=:
   9223 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1490"
   9224 $at_failed && at_fn_log_failure
   9225 $at_traceon; }
   9226 
   9227 
   9228 { set +x
   9229 $as_echo "$at_srcdir/input.at:1491: sed 's/^.*bison:/bison:/' stderr"
   9230 at_fn_check_prepare_trace "input.at:1491"
   9231 ( $at_check_trace; sed 's/^.*bison:/bison:/' stderr
   9232 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9233 at_status=$? at_failed=false
   9234 $at_check_filter
   9235 at_fn_diff_devnull "$at_stderr" || at_failed=:
   9236 echo >>"$at_stdout"; $as_echo "bison: warnings being treated as errors
   9237 input.y:2.1-7: warning: POSIX Yacc forbids dashes in symbol names: foo-bar
   9238 " | \
   9239   $at_diff - "$at_stdout" || at_failed=:
   9240 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1491"
   9241 $at_failed && at_fn_log_failure
   9242 $at_traceon; }
   9243 
   9244 mv stderr experr
   9245 
   9246 { set +x
   9247 $as_echo "$at_srcdir/input.at:1496: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Werror,no-all,yacc input.y"
   9248 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Werror,no-all,yacc input.y" "input.at:1496"
   9249 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -Werror,no-all,yacc input.y
   9250 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9251 at_status=$? at_failed=false
   9252 $at_check_filter
   9253 $at_diff experr "$at_stderr" || at_failed=:
   9254 at_fn_diff_devnull "$at_stdout" || at_failed=:
   9255 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1496"
   9256 $at_failed && at_fn_log_failure
   9257 $at_traceon; }
   9258 
   9259 
   9260 
   9261   set +x
   9262   $at_times_p && times >"$at_times_file"
   9263 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   9264 read at_status <"$at_status_file"
   9265 #AT_STOP_35
   9266 #AT_START_36
   9267 at_fn_group_banner 36 'input.at:1505' \
   9268   "%name-prefix and %define api.prefix are incompatible" "" 1
   9269 at_xfail=no
   9270 (
   9271   $as_echo "36. $at_setup_line: testing $at_desc ..."
   9272   $at_traceon
   9273 
   9274 
   9275 # AT_TEST(DIRECTIVES, OPTIONS, ERROR-LOCATION)
   9276 # --------------------------------------------
   9277 
   9278 
   9279 cat >input.y <<'_ATEOF'
   9280 %define api.prefix foo %name-prefix "bar"
   9281 %%
   9282 exp:;
   9283 _ATEOF
   9284 
   9285 
   9286 { set +x
   9287 $as_echo "$at_srcdir/input.at:1520: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison  input.y"
   9288 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison  input.y" "input.at:1520"
   9289 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison  input.y
   9290 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9291 at_status=$? at_failed=false
   9292 $at_check_filter
   9293 echo >>"$at_stderr"; $as_echo "input.y:1.9-18: error: '%name-prefix' and '%define api.prefix' cannot be used together
   9294 " | \
   9295   $at_diff - "$at_stderr" || at_failed=:
   9296 at_fn_diff_devnull "$at_stdout" || at_failed=:
   9297 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1520"
   9298 $at_failed && at_fn_log_failure
   9299 $at_traceon; }
   9300 
   9301 
   9302 
   9303 cat >input.y <<'_ATEOF'
   9304 
   9305 %%
   9306 exp:;
   9307 _ATEOF
   9308 
   9309 
   9310 { set +x
   9311 $as_echo "$at_srcdir/input.at:1521: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Dapi.prefix=foo -p bar input.y"
   9312 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Dapi.prefix=foo -p bar input.y" "input.at:1521"
   9313 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -Dapi.prefix=foo -p bar input.y
   9314 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9315 at_status=$? at_failed=false
   9316 $at_check_filter
   9317 echo >>"$at_stderr"; $as_echo "<command line>:1: error: '%name-prefix' and '%define api.prefix' cannot be used together
   9318 " | \
   9319   $at_diff - "$at_stderr" || at_failed=:
   9320 at_fn_diff_devnull "$at_stdout" || at_failed=:
   9321 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1521"
   9322 $at_failed && at_fn_log_failure
   9323 $at_traceon; }
   9324 
   9325 
   9326 
   9327 cat >input.y <<'_ATEOF'
   9328 %name-prefix "bar"
   9329 %%
   9330 exp:;
   9331 _ATEOF
   9332 
   9333 
   9334 { set +x
   9335 $as_echo "$at_srcdir/input.at:1522: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Dapi.prefix=foo input.y"
   9336 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -Dapi.prefix=foo input.y" "input.at:1522"
   9337 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -Dapi.prefix=foo input.y
   9338 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9339 at_status=$? at_failed=false
   9340 $at_check_filter
   9341 echo >>"$at_stderr"; $as_echo "<command line>:1: error: '%name-prefix' and '%define api.prefix' cannot be used together
   9342 " | \
   9343   $at_diff - "$at_stderr" || at_failed=:
   9344 at_fn_diff_devnull "$at_stdout" || at_failed=:
   9345 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1522"
   9346 $at_failed && at_fn_log_failure
   9347 $at_traceon; }
   9348 
   9349 
   9350 
   9351 cat >input.y <<'_ATEOF'
   9352 %define api.prefix foo
   9353 %%
   9354 exp:;
   9355 _ATEOF
   9356 
   9357 
   9358 { set +x
   9359 $as_echo "$at_srcdir/input.at:1523: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -p bar input.y"
   9360 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -p bar input.y" "input.at:1523"
   9361 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -p bar input.y
   9362 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9363 at_status=$? at_failed=false
   9364 $at_check_filter
   9365 echo >>"$at_stderr"; $as_echo "input.y:1.9-18: error: '%name-prefix' and '%define api.prefix' cannot be used together
   9366 " | \
   9367   $at_diff - "$at_stderr" || at_failed=:
   9368 at_fn_diff_devnull "$at_stdout" || at_failed=:
   9369 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1523"
   9370 $at_failed && at_fn_log_failure
   9371 $at_traceon; }
   9372 
   9373 
   9374 
   9375 
   9376 
   9377 
   9378   set +x
   9379   $at_times_p && times >"$at_times_file"
   9380 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   9381 read at_status <"$at_status_file"
   9382 #AT_STOP_36
   9383 #AT_START_37
   9384 at_fn_group_banner 37 'input.at:1534' \
   9385   "Stray \$ or @" "                                   " 1
   9386 at_xfail=no
   9387 (
   9388   $as_echo "37. $at_setup_line: testing $at_desc ..."
   9389   $at_traceon
   9390 
   9391 
   9392 # Give %printer and %destructor "<*> exp TOK" instead of "<*>" to
   9393 # check that the warnings are reported once, not three times.
   9394 
   9395 cat >input.y <<'_ATEOF'
   9396 %code top {
   9397 #include <config.h>
   9398 /* We don't need perfect functions for these tests. */
   9399 #undef malloc
   9400 #undef memcmp
   9401 #undef realloc
   9402 }
   9403 
   9404 %token TOK
   9405 %destructor     { $%; @%; } <*> exp TOK;
   9406 %initial-action { $%; @%; };
   9407 %printer        { $%; @%; } <*> exp TOK;
   9408 %%
   9409 exp: TOK        { $%; @%; $$ = $1; };
   9410 _ATEOF
   9411 
   9412 
   9413 
   9414 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   9415   at_save_special_files
   9416   mkdir xml-tests
   9417     # Don't combine these Bison invocations since we want to be sure that
   9418   # --report=all isn't required to get the full XML file.
   9419   { set +x
   9420 $as_echo "$at_srcdir/input.at:1548: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   9421                   --graph=xml-tests/test.dot input.y"
   9422 at_fn_check_prepare_notrace 'an embedded newline' "input.at:1548"
   9423 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   9424                   --graph=xml-tests/test.dot input.y
   9425 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9426 at_status=$? at_failed=false
   9427 $at_check_filter
   9428 echo stderr:; cat "$at_stderr"
   9429 echo stdout:; cat "$at_stdout"
   9430 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1548"
   9431 $at_failed && at_fn_log_failure
   9432 $at_traceon; }
   9433 
   9434   { set +x
   9435 $as_echo "$at_srcdir/input.at:1548: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y"
   9436 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y" "input.at:1548"
   9437 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y
   9438 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9439 at_status=$? at_failed=false
   9440 $at_check_filter
   9441 echo stderr:; cat "$at_stderr"
   9442 echo stdout:; cat "$at_stdout"
   9443 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1548"
   9444 $at_failed && at_fn_log_failure
   9445 $at_traceon; }
   9446 
   9447     cp xml-tests/test.output expout
   9448   { set +x
   9449 $as_echo "$at_srcdir/input.at:1548: \$XSLTPROC \\
   9450              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   9451              xml-tests/test.xml"
   9452 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1548"
   9453 ( $at_check_trace; $XSLTPROC \
   9454              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   9455              xml-tests/test.xml
   9456 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9457 at_status=$? at_failed=false
   9458 $at_check_filter
   9459 at_fn_diff_devnull "$at_stderr" || at_failed=:
   9460 $at_diff expout "$at_stdout" || at_failed=:
   9461 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1548"
   9462 $at_failed && at_fn_log_failure
   9463 $at_traceon; }
   9464 
   9465   sort xml-tests/test.dot > expout
   9466   { set +x
   9467 $as_echo "$at_srcdir/input.at:1548: \$XSLTPROC \\
   9468              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   9469              xml-tests/test.xml | sort"
   9470 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1548"
   9471 ( $at_check_trace; $XSLTPROC \
   9472              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   9473              xml-tests/test.xml | sort
   9474 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9475 at_status=$? at_failed=false
   9476 $at_check_filter
   9477 at_fn_diff_devnull "$at_stderr" || at_failed=:
   9478 $at_diff expout "$at_stdout" || at_failed=:
   9479 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1548"
   9480 $at_failed && at_fn_log_failure
   9481 $at_traceon; }
   9482 
   9483   rm -rf xml-tests expout
   9484   at_restore_special_files
   9485 fi
   9486 { set +x
   9487 $as_echo "$at_srcdir/input.at:1548: bison input.y"
   9488 at_fn_check_prepare_trace "input.at:1548"
   9489 ( $at_check_trace; bison input.y
   9490 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9491 at_status=$? at_failed=false
   9492 $at_check_filter
   9493 echo >>"$at_stderr"; $as_echo "input.y:10.19: warning: stray '\$'
   9494 input.y:10.23: warning: stray '@'
   9495 input.y:11.19: warning: stray '\$'
   9496 input.y:11.23: warning: stray '@'
   9497 input.y:12.19: warning: stray '\$'
   9498 input.y:12.23: warning: stray '@'
   9499 input.y:14.19: warning: stray '\$'
   9500 input.y:14.23: warning: stray '@'
   9501 " | \
   9502   $at_diff - "$at_stderr" || at_failed=:
   9503 at_fn_diff_devnull "$at_stdout" || at_failed=:
   9504 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1548"
   9505 $at_failed && at_fn_log_failure
   9506 $at_traceon; }
   9507 
   9508 # Defining POSIXLY_CORRECT causes bison to complain if options are
   9509 # added after the grammar file name, so skip these checks in that
   9510 # case.
   9511 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   9512   at_save_special_files
   9513 
   9514   # To avoid expanding it repeatedly, store specified stdout.
   9515   : >expout
   9516 
   9517   # Run with -Werror.
   9518   { set +x
   9519 $as_echo "$at_srcdir/input.at:1548: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Werror"
   9520 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Werror" "input.at:1548"
   9521 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y -Werror
   9522 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9523 at_status=$? at_failed=false
   9524 $at_check_filter
   9525 echo stderr:; tee stderr <"$at_stderr"
   9526 $at_diff expout "$at_stdout" || at_failed=:
   9527 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1548"
   9528 $at_failed && at_fn_log_failure
   9529 $at_traceon; }
   9530 
   9531 
   9532   # Build expected stderr up to and including the "warnings being
   9533   # treated as errors" message.
   9534   cat >at-bison-check-warnings <<'_ATEOF'
   9535 input.y:10.19: warning: stray '$'
   9536 input.y:10.23: warning: stray '@'
   9537 input.y:11.19: warning: stray '$'
   9538 input.y:11.23: warning: stray '@'
   9539 input.y:12.19: warning: stray '$'
   9540 input.y:12.23: warning: stray '@'
   9541 input.y:14.19: warning: stray '$'
   9542 input.y:14.23: warning: stray '@'
   9543 _ATEOF
   9544 
   9545   at_bison_check_first=`sed -n \
   9546     '/: warning: /{=;q;}' at-bison-check-warnings`
   9547   : ${at_bison_check_first:=1}
   9548   at_bison_check_first_tmp=`sed -n \
   9549     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   9550   : ${at_bison_check_first_tmp:=1}
   9551   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   9552     at_bison_check_first=$at_bison_check_first_tmp
   9553   fi
   9554   if test $at_bison_check_first -gt 1; then
   9555     sed -n "1,`expr $at_bison_check_first - 1`"p \
   9556       at-bison-check-warnings > experr
   9557   fi
   9558   echo 'bison: warnings being treated as errors' >> experr
   9559 
   9560   # Finish building expected stderr and check.  Unlike warnings,
   9561   # complaints cause bison to exit early.  Thus, with -Werror, bison
   9562   # does not necessarily report all warnings that it does without
   9563   # -Werror, but it at least reports one.
   9564   at_bison_check_last=`sed -n '$=' stderr`
   9565   : ${at_bison_check_last:=1}
   9566   at_bison_check_last=`expr $at_bison_check_last - 1`
   9567   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   9568     at-bison-check-warnings >> experr
   9569   { set +x
   9570 $as_echo "$at_srcdir/input.at:1548: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   9571               stderr 1>&2"
   9572 at_fn_check_prepare_notrace 'an embedded newline' "input.at:1548"
   9573 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   9574               stderr 1>&2
   9575 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9576 at_status=$? at_failed=false
   9577 $at_check_filter
   9578 $at_diff experr "$at_stderr" || at_failed=:
   9579 at_fn_diff_devnull "$at_stdout" || at_failed=:
   9580 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1548"
   9581 $at_failed && at_fn_log_failure
   9582 $at_traceon; }
   9583 
   9584 
   9585   # Now check --warnings=error.
   9586   cp stderr experr
   9587   { set +x
   9588 $as_echo "$at_srcdir/input.at:1548: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=error"
   9589 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=error" "input.at:1548"
   9590 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y --warnings=error
   9591 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9592 at_status=$? at_failed=false
   9593 $at_check_filter
   9594 $at_diff experr "$at_stderr" || at_failed=:
   9595 $at_diff expout "$at_stdout" || at_failed=:
   9596 at_fn_check_status 1 $at_status "$at_srcdir/input.at:1548"
   9597 $at_failed && at_fn_log_failure
   9598 $at_traceon; }
   9599 
   9600 
   9601   # Now check -Wnone and --warnings=none by making sure that
   9602   # -Werror doesn't change the exit status when -Wnone or
   9603   # --warnings=none is specified.
   9604   { set +x
   9605 $as_echo "$at_srcdir/input.at:1548: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Wnone -Werror"
   9606 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Wnone -Werror" "input.at:1548"
   9607 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y -Wnone -Werror
   9608 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9609 at_status=$? at_failed=false
   9610 $at_check_filter
   9611 at_fn_diff_devnull "$at_stderr" || at_failed=:
   9612 $at_diff expout "$at_stdout" || at_failed=:
   9613 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1548"
   9614 $at_failed && at_fn_log_failure
   9615 $at_traceon; }
   9616 
   9617   { set +x
   9618 $as_echo "$at_srcdir/input.at:1548: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror"
   9619 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror" "input.at:1548"
   9620 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror
   9621 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9622 at_status=$? at_failed=false
   9623 $at_check_filter
   9624 at_fn_diff_devnull "$at_stderr" || at_failed=:
   9625 $at_diff expout "$at_stdout" || at_failed=:
   9626 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1548"
   9627 $at_failed && at_fn_log_failure
   9628 $at_traceon; }
   9629 
   9630 
   9631   at_restore_special_files
   9632 fi
   9633 
   9634   set +x
   9635   $at_times_p && times >"$at_times_file"
   9636 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   9637 read at_status <"$at_status_file"
   9638 #AT_STOP_37
   9639 #AT_START_38
   9640 at_fn_group_banner 38 'input.at:1568' \
   9641   "Code injection" "                                 " 1
   9642 at_xfail=no
   9643 (
   9644   $as_echo "38. $at_setup_line: testing $at_desc ..."
   9645   $at_traceon
   9646 
   9647 
   9648 
   9649 
   9650 # AT_TEST([MACRO])
   9651 # ----------------
   9652 # Try to have MACRO be run by bison.
   9653 
   9654 
   9655 cat >input.y <<'_ATEOF'
   9656 %type <m4_errprintn(DEAD %type)> exp
   9657 %token <m4_errprintn(DEAD %token)> a
   9658 %initial-action
   9659 {
   9660   $$;
   9661   $<m4_errprintn(DEAD %initial-action)>$
   9662 };
   9663 %printer
   9664 {
   9665   $$
   9666   $<m4_errprintn(DEAD %printer)>$
   9667 } <> <*>;
   9668 %lex-param
   9669 {
   9670   m4_errprintn(DEAD %lex-param)
   9671 };
   9672 %parse-param
   9673 {
   9674   m4_errprintn(DEAD %parse-param)
   9675 };
   9676 %%
   9677 exp:
   9678   a a[last]
   9679   {
   9680     $$;
   9681     $1;
   9682     $<m4_errprintn(DEAD action 1)>$
   9683     $<m4_errprintn(DEAD action 2)>1
   9684     $<m4_errprintn(DEAD action 3)>last
   9685     $<m4_errprintn(DEAD action 4)>0
   9686     ;
   9687   };
   9688 _ATEOF
   9689 
   9690 
   9691 # FIXME: Provide a means to iterate over all the skeletons.
   9692 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   9693   at_save_special_files
   9694   mkdir xml-tests
   9695     # Don't combine these Bison invocations since we want to be sure that
   9696   # --report=all isn't required to get the full XML file.
   9697   { set +x
   9698 $as_echo "$at_srcdir/input.at:1619: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   9699                   --graph=xml-tests/test.dot -d               input.y"
   9700 at_fn_check_prepare_notrace 'an embedded newline' "input.at:1619"
   9701 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   9702                   --graph=xml-tests/test.dot -d               input.y
   9703 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9704 at_status=$? at_failed=false
   9705 $at_check_filter
   9706 echo stderr:; cat "$at_stderr"
   9707 echo stdout:; cat "$at_stdout"
   9708 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   9709 $at_failed && at_fn_log_failure
   9710 $at_traceon; }
   9711 
   9712   { set +x
   9713 $as_echo "$at_srcdir/input.at:1619: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d               input.y"
   9714 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d               input.y" "input.at:1619"
   9715 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d               input.y
   9716 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9717 at_status=$? at_failed=false
   9718 $at_check_filter
   9719 echo stderr:; cat "$at_stderr"
   9720 echo stdout:; cat "$at_stdout"
   9721 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   9722 $at_failed && at_fn_log_failure
   9723 $at_traceon; }
   9724 
   9725     cp xml-tests/test.output expout
   9726   { set +x
   9727 $as_echo "$at_srcdir/input.at:1619: \$XSLTPROC \\
   9728              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   9729              xml-tests/test.xml"
   9730 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1619"
   9731 ( $at_check_trace; $XSLTPROC \
   9732              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   9733              xml-tests/test.xml
   9734 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9735 at_status=$? at_failed=false
   9736 $at_check_filter
   9737 at_fn_diff_devnull "$at_stderr" || at_failed=:
   9738 $at_diff expout "$at_stdout" || at_failed=:
   9739 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   9740 $at_failed && at_fn_log_failure
   9741 $at_traceon; }
   9742 
   9743   sort xml-tests/test.dot > expout
   9744   { set +x
   9745 $as_echo "$at_srcdir/input.at:1619: \$XSLTPROC \\
   9746              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   9747              xml-tests/test.xml | sort"
   9748 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1619"
   9749 ( $at_check_trace; $XSLTPROC \
   9750              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   9751              xml-tests/test.xml | sort
   9752 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9753 at_status=$? at_failed=false
   9754 $at_check_filter
   9755 at_fn_diff_devnull "$at_stderr" || at_failed=:
   9756 $at_diff expout "$at_stdout" || at_failed=:
   9757 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   9758 $at_failed && at_fn_log_failure
   9759 $at_traceon; }
   9760 
   9761   rm -rf xml-tests expout
   9762   at_restore_special_files
   9763 fi
   9764 { set +x
   9765 $as_echo "$at_srcdir/input.at:1619: bison -d               input.y"
   9766 at_fn_check_prepare_trace "input.at:1619"
   9767 ( $at_check_trace; bison -d               input.y
   9768 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9769 at_status=$? at_failed=false
   9770 $at_check_filter
   9771 at_fn_diff_devnull "$at_stderr" || at_failed=:
   9772 at_fn_diff_devnull "$at_stdout" || at_failed=:
   9773 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   9774 $at_failed && at_fn_log_failure
   9775 $at_traceon; }
   9776 
   9777 
   9778 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   9779   at_save_special_files
   9780   mkdir xml-tests
   9781     # Don't combine these Bison invocations since we want to be sure that
   9782   # --report=all isn't required to get the full XML file.
   9783   { set +x
   9784 $as_echo "$at_srcdir/input.at:1619: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   9785                   --graph=xml-tests/test.dot -d -S glr.c      input.y"
   9786 at_fn_check_prepare_notrace 'an embedded newline' "input.at:1619"
   9787 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   9788                   --graph=xml-tests/test.dot -d -S glr.c      input.y
   9789 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9790 at_status=$? at_failed=false
   9791 $at_check_filter
   9792 echo stderr:; cat "$at_stderr"
   9793 echo stdout:; cat "$at_stdout"
   9794 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   9795 $at_failed && at_fn_log_failure
   9796 $at_traceon; }
   9797 
   9798   { set +x
   9799 $as_echo "$at_srcdir/input.at:1619: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -S glr.c      input.y"
   9800 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -S glr.c      input.y" "input.at:1619"
   9801 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -S glr.c      input.y
   9802 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9803 at_status=$? at_failed=false
   9804 $at_check_filter
   9805 echo stderr:; cat "$at_stderr"
   9806 echo stdout:; cat "$at_stdout"
   9807 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   9808 $at_failed && at_fn_log_failure
   9809 $at_traceon; }
   9810 
   9811     cp xml-tests/test.output expout
   9812   { set +x
   9813 $as_echo "$at_srcdir/input.at:1619: \$XSLTPROC \\
   9814              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   9815              xml-tests/test.xml"
   9816 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1619"
   9817 ( $at_check_trace; $XSLTPROC \
   9818              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   9819              xml-tests/test.xml
   9820 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9821 at_status=$? at_failed=false
   9822 $at_check_filter
   9823 at_fn_diff_devnull "$at_stderr" || at_failed=:
   9824 $at_diff expout "$at_stdout" || at_failed=:
   9825 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   9826 $at_failed && at_fn_log_failure
   9827 $at_traceon; }
   9828 
   9829   sort xml-tests/test.dot > expout
   9830   { set +x
   9831 $as_echo "$at_srcdir/input.at:1619: \$XSLTPROC \\
   9832              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   9833              xml-tests/test.xml | sort"
   9834 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1619"
   9835 ( $at_check_trace; $XSLTPROC \
   9836              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   9837              xml-tests/test.xml | sort
   9838 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9839 at_status=$? at_failed=false
   9840 $at_check_filter
   9841 at_fn_diff_devnull "$at_stderr" || at_failed=:
   9842 $at_diff expout "$at_stdout" || at_failed=:
   9843 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   9844 $at_failed && at_fn_log_failure
   9845 $at_traceon; }
   9846 
   9847   rm -rf xml-tests expout
   9848   at_restore_special_files
   9849 fi
   9850 { set +x
   9851 $as_echo "$at_srcdir/input.at:1619: bison -d -S glr.c      input.y"
   9852 at_fn_check_prepare_trace "input.at:1619"
   9853 ( $at_check_trace; bison -d -S glr.c      input.y
   9854 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9855 at_status=$? at_failed=false
   9856 $at_check_filter
   9857 at_fn_diff_devnull "$at_stderr" || at_failed=:
   9858 at_fn_diff_devnull "$at_stdout" || at_failed=:
   9859 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   9860 $at_failed && at_fn_log_failure
   9861 $at_traceon; }
   9862 
   9863 
   9864 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   9865   at_save_special_files
   9866   mkdir xml-tests
   9867     # Don't combine these Bison invocations since we want to be sure that
   9868   # --report=all isn't required to get the full XML file.
   9869   { set +x
   9870 $as_echo "$at_srcdir/input.at:1619: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   9871                   --graph=xml-tests/test.dot -d -S lalr1.cc   input.y"
   9872 at_fn_check_prepare_notrace 'an embedded newline' "input.at:1619"
   9873 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   9874                   --graph=xml-tests/test.dot -d -S lalr1.cc   input.y
   9875 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9876 at_status=$? at_failed=false
   9877 $at_check_filter
   9878 echo stderr:; cat "$at_stderr"
   9879 echo stdout:; cat "$at_stdout"
   9880 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   9881 $at_failed && at_fn_log_failure
   9882 $at_traceon; }
   9883 
   9884   { set +x
   9885 $as_echo "$at_srcdir/input.at:1619: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -S lalr1.cc   input.y"
   9886 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -S lalr1.cc   input.y" "input.at:1619"
   9887 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -S lalr1.cc   input.y
   9888 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9889 at_status=$? at_failed=false
   9890 $at_check_filter
   9891 echo stderr:; cat "$at_stderr"
   9892 echo stdout:; cat "$at_stdout"
   9893 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   9894 $at_failed && at_fn_log_failure
   9895 $at_traceon; }
   9896 
   9897     cp xml-tests/test.output expout
   9898   { set +x
   9899 $as_echo "$at_srcdir/input.at:1619: \$XSLTPROC \\
   9900              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   9901              xml-tests/test.xml"
   9902 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1619"
   9903 ( $at_check_trace; $XSLTPROC \
   9904              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   9905              xml-tests/test.xml
   9906 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9907 at_status=$? at_failed=false
   9908 $at_check_filter
   9909 at_fn_diff_devnull "$at_stderr" || at_failed=:
   9910 $at_diff expout "$at_stdout" || at_failed=:
   9911 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   9912 $at_failed && at_fn_log_failure
   9913 $at_traceon; }
   9914 
   9915   sort xml-tests/test.dot > expout
   9916   { set +x
   9917 $as_echo "$at_srcdir/input.at:1619: \$XSLTPROC \\
   9918              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   9919              xml-tests/test.xml | sort"
   9920 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1619"
   9921 ( $at_check_trace; $XSLTPROC \
   9922              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   9923              xml-tests/test.xml | sort
   9924 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9925 at_status=$? at_failed=false
   9926 $at_check_filter
   9927 at_fn_diff_devnull "$at_stderr" || at_failed=:
   9928 $at_diff expout "$at_stdout" || at_failed=:
   9929 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   9930 $at_failed && at_fn_log_failure
   9931 $at_traceon; }
   9932 
   9933   rm -rf xml-tests expout
   9934   at_restore_special_files
   9935 fi
   9936 { set +x
   9937 $as_echo "$at_srcdir/input.at:1619: bison -d -S lalr1.cc   input.y"
   9938 at_fn_check_prepare_trace "input.at:1619"
   9939 ( $at_check_trace; bison -d -S lalr1.cc   input.y
   9940 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9941 at_status=$? at_failed=false
   9942 $at_check_filter
   9943 at_fn_diff_devnull "$at_stderr" || at_failed=:
   9944 at_fn_diff_devnull "$at_stdout" || at_failed=:
   9945 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   9946 $at_failed && at_fn_log_failure
   9947 $at_traceon; }
   9948 
   9949 
   9950 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   9951   at_save_special_files
   9952   mkdir xml-tests
   9953     # Don't combine these Bison invocations since we want to be sure that
   9954   # --report=all isn't required to get the full XML file.
   9955   { set +x
   9956 $as_echo "$at_srcdir/input.at:1619: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   9957                   --graph=xml-tests/test.dot -d -S glr.cc     input.y"
   9958 at_fn_check_prepare_notrace 'an embedded newline' "input.at:1619"
   9959 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   9960                   --graph=xml-tests/test.dot -d -S glr.cc     input.y
   9961 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9962 at_status=$? at_failed=false
   9963 $at_check_filter
   9964 echo stderr:; cat "$at_stderr"
   9965 echo stdout:; cat "$at_stdout"
   9966 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   9967 $at_failed && at_fn_log_failure
   9968 $at_traceon; }
   9969 
   9970   { set +x
   9971 $as_echo "$at_srcdir/input.at:1619: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -S glr.cc     input.y"
   9972 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -S glr.cc     input.y" "input.at:1619"
   9973 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -S glr.cc     input.y
   9974 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9975 at_status=$? at_failed=false
   9976 $at_check_filter
   9977 echo stderr:; cat "$at_stderr"
   9978 echo stdout:; cat "$at_stdout"
   9979 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   9980 $at_failed && at_fn_log_failure
   9981 $at_traceon; }
   9982 
   9983     cp xml-tests/test.output expout
   9984   { set +x
   9985 $as_echo "$at_srcdir/input.at:1619: \$XSLTPROC \\
   9986              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   9987              xml-tests/test.xml"
   9988 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1619"
   9989 ( $at_check_trace; $XSLTPROC \
   9990              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   9991              xml-tests/test.xml
   9992 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   9993 at_status=$? at_failed=false
   9994 $at_check_filter
   9995 at_fn_diff_devnull "$at_stderr" || at_failed=:
   9996 $at_diff expout "$at_stdout" || at_failed=:
   9997 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   9998 $at_failed && at_fn_log_failure
   9999 $at_traceon; }
   10000 
   10001   sort xml-tests/test.dot > expout
   10002   { set +x
   10003 $as_echo "$at_srcdir/input.at:1619: \$XSLTPROC \\
   10004              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   10005              xml-tests/test.xml | sort"
   10006 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1619"
   10007 ( $at_check_trace; $XSLTPROC \
   10008              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   10009              xml-tests/test.xml | sort
   10010 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10011 at_status=$? at_failed=false
   10012 $at_check_filter
   10013 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10014 $at_diff expout "$at_stdout" || at_failed=:
   10015 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   10016 $at_failed && at_fn_log_failure
   10017 $at_traceon; }
   10018 
   10019   rm -rf xml-tests expout
   10020   at_restore_special_files
   10021 fi
   10022 { set +x
   10023 $as_echo "$at_srcdir/input.at:1619: bison -d -S glr.cc     input.y"
   10024 at_fn_check_prepare_trace "input.at:1619"
   10025 ( $at_check_trace; bison -d -S glr.cc     input.y
   10026 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10027 at_status=$? at_failed=false
   10028 $at_check_filter
   10029 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10030 at_fn_diff_devnull "$at_stdout" || at_failed=:
   10031 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   10032 $at_failed && at_fn_log_failure
   10033 $at_traceon; }
   10034 
   10035 
   10036 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   10037   at_save_special_files
   10038   mkdir xml-tests
   10039     # Don't combine these Bison invocations since we want to be sure that
   10040   # --report=all isn't required to get the full XML file.
   10041   { set +x
   10042 $as_echo "$at_srcdir/input.at:1619: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   10043                   --graph=xml-tests/test.dot    -S lalr1.java input.y"
   10044 at_fn_check_prepare_notrace 'an embedded newline' "input.at:1619"
   10045 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   10046                   --graph=xml-tests/test.dot    -S lalr1.java input.y
   10047 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10048 at_status=$? at_failed=false
   10049 $at_check_filter
   10050 echo stderr:; cat "$at_stderr"
   10051 echo stdout:; cat "$at_stdout"
   10052 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   10053 $at_failed && at_fn_log_failure
   10054 $at_traceon; }
   10055 
   10056   { set +x
   10057 $as_echo "$at_srcdir/input.at:1619: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml    -S lalr1.java input.y"
   10058 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml    -S lalr1.java input.y" "input.at:1619"
   10059 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml    -S lalr1.java input.y
   10060 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10061 at_status=$? at_failed=false
   10062 $at_check_filter
   10063 echo stderr:; cat "$at_stderr"
   10064 echo stdout:; cat "$at_stdout"
   10065 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   10066 $at_failed && at_fn_log_failure
   10067 $at_traceon; }
   10068 
   10069     cp xml-tests/test.output expout
   10070   { set +x
   10071 $as_echo "$at_srcdir/input.at:1619: \$XSLTPROC \\
   10072              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   10073              xml-tests/test.xml"
   10074 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1619"
   10075 ( $at_check_trace; $XSLTPROC \
   10076              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   10077              xml-tests/test.xml
   10078 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10079 at_status=$? at_failed=false
   10080 $at_check_filter
   10081 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10082 $at_diff expout "$at_stdout" || at_failed=:
   10083 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   10084 $at_failed && at_fn_log_failure
   10085 $at_traceon; }
   10086 
   10087   sort xml-tests/test.dot > expout
   10088   { set +x
   10089 $as_echo "$at_srcdir/input.at:1619: \$XSLTPROC \\
   10090              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   10091              xml-tests/test.xml | sort"
   10092 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1619"
   10093 ( $at_check_trace; $XSLTPROC \
   10094              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   10095              xml-tests/test.xml | sort
   10096 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10097 at_status=$? at_failed=false
   10098 $at_check_filter
   10099 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10100 $at_diff expout "$at_stdout" || at_failed=:
   10101 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   10102 $at_failed && at_fn_log_failure
   10103 $at_traceon; }
   10104 
   10105   rm -rf xml-tests expout
   10106   at_restore_special_files
   10107 fi
   10108 { set +x
   10109 $as_echo "$at_srcdir/input.at:1619: bison    -S lalr1.java input.y"
   10110 at_fn_check_prepare_trace "input.at:1619"
   10111 ( $at_check_trace; bison    -S lalr1.java input.y
   10112 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10113 at_status=$? at_failed=false
   10114 $at_check_filter
   10115 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10116 at_fn_diff_devnull "$at_stdout" || at_failed=:
   10117 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1619"
   10118 $at_failed && at_fn_log_failure
   10119 $at_traceon; }
   10120 
   10121 
   10122 
   10123 cat >input.y <<'_ATEOF'
   10124 %type <]m4_errprintn(DEAD %type)> exp
   10125 %token <]m4_errprintn(DEAD %token)> a
   10126 %initial-action
   10127 {
   10128   $$;
   10129   $<]m4_errprintn(DEAD %initial-action)>$
   10130 };
   10131 %printer
   10132 {
   10133   $$
   10134   $<]m4_errprintn(DEAD %printer)>$
   10135 } <> <*>;
   10136 %lex-param
   10137 {
   10138   ]m4_errprintn(DEAD %lex-param)
   10139 };
   10140 %parse-param
   10141 {
   10142   ]m4_errprintn(DEAD %parse-param)
   10143 };
   10144 %%
   10145 exp:
   10146   a a[last]
   10147   {
   10148     $$;
   10149     $1;
   10150     $<]m4_errprintn(DEAD action 1)>$
   10151     $<]m4_errprintn(DEAD action 2)>1
   10152     $<]m4_errprintn(DEAD action 3)>last
   10153     $<]m4_errprintn(DEAD action 4)>0
   10154     ;
   10155   };
   10156 _ATEOF
   10157 
   10158 
   10159 # FIXME: Provide a means to iterate over all the skeletons.
   10160 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   10161   at_save_special_files
   10162   mkdir xml-tests
   10163     # Don't combine these Bison invocations since we want to be sure that
   10164   # --report=all isn't required to get the full XML file.
   10165   { set +x
   10166 $as_echo "$at_srcdir/input.at:1620: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   10167                   --graph=xml-tests/test.dot -d               input.y"
   10168 at_fn_check_prepare_notrace 'an embedded newline' "input.at:1620"
   10169 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   10170                   --graph=xml-tests/test.dot -d               input.y
   10171 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10172 at_status=$? at_failed=false
   10173 $at_check_filter
   10174 echo stderr:; cat "$at_stderr"
   10175 echo stdout:; cat "$at_stdout"
   10176 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10177 $at_failed && at_fn_log_failure
   10178 $at_traceon; }
   10179 
   10180   { set +x
   10181 $as_echo "$at_srcdir/input.at:1620: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d               input.y"
   10182 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d               input.y" "input.at:1620"
   10183 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d               input.y
   10184 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10185 at_status=$? at_failed=false
   10186 $at_check_filter
   10187 echo stderr:; cat "$at_stderr"
   10188 echo stdout:; cat "$at_stdout"
   10189 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10190 $at_failed && at_fn_log_failure
   10191 $at_traceon; }
   10192 
   10193     cp xml-tests/test.output expout
   10194   { set +x
   10195 $as_echo "$at_srcdir/input.at:1620: \$XSLTPROC \\
   10196              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   10197              xml-tests/test.xml"
   10198 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1620"
   10199 ( $at_check_trace; $XSLTPROC \
   10200              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   10201              xml-tests/test.xml
   10202 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10203 at_status=$? at_failed=false
   10204 $at_check_filter
   10205 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10206 $at_diff expout "$at_stdout" || at_failed=:
   10207 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10208 $at_failed && at_fn_log_failure
   10209 $at_traceon; }
   10210 
   10211   sort xml-tests/test.dot > expout
   10212   { set +x
   10213 $as_echo "$at_srcdir/input.at:1620: \$XSLTPROC \\
   10214              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   10215              xml-tests/test.xml | sort"
   10216 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1620"
   10217 ( $at_check_trace; $XSLTPROC \
   10218              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   10219              xml-tests/test.xml | sort
   10220 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10221 at_status=$? at_failed=false
   10222 $at_check_filter
   10223 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10224 $at_diff expout "$at_stdout" || at_failed=:
   10225 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10226 $at_failed && at_fn_log_failure
   10227 $at_traceon; }
   10228 
   10229   rm -rf xml-tests expout
   10230   at_restore_special_files
   10231 fi
   10232 { set +x
   10233 $as_echo "$at_srcdir/input.at:1620: bison -d               input.y"
   10234 at_fn_check_prepare_trace "input.at:1620"
   10235 ( $at_check_trace; bison -d               input.y
   10236 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10237 at_status=$? at_failed=false
   10238 $at_check_filter
   10239 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10240 at_fn_diff_devnull "$at_stdout" || at_failed=:
   10241 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10242 $at_failed && at_fn_log_failure
   10243 $at_traceon; }
   10244 
   10245 
   10246 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   10247   at_save_special_files
   10248   mkdir xml-tests
   10249     # Don't combine these Bison invocations since we want to be sure that
   10250   # --report=all isn't required to get the full XML file.
   10251   { set +x
   10252 $as_echo "$at_srcdir/input.at:1620: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   10253                   --graph=xml-tests/test.dot -d -S glr.c      input.y"
   10254 at_fn_check_prepare_notrace 'an embedded newline' "input.at:1620"
   10255 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   10256                   --graph=xml-tests/test.dot -d -S glr.c      input.y
   10257 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10258 at_status=$? at_failed=false
   10259 $at_check_filter
   10260 echo stderr:; cat "$at_stderr"
   10261 echo stdout:; cat "$at_stdout"
   10262 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10263 $at_failed && at_fn_log_failure
   10264 $at_traceon; }
   10265 
   10266   { set +x
   10267 $as_echo "$at_srcdir/input.at:1620: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -S glr.c      input.y"
   10268 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -S glr.c      input.y" "input.at:1620"
   10269 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -S glr.c      input.y
   10270 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10271 at_status=$? at_failed=false
   10272 $at_check_filter
   10273 echo stderr:; cat "$at_stderr"
   10274 echo stdout:; cat "$at_stdout"
   10275 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10276 $at_failed && at_fn_log_failure
   10277 $at_traceon; }
   10278 
   10279     cp xml-tests/test.output expout
   10280   { set +x
   10281 $as_echo "$at_srcdir/input.at:1620: \$XSLTPROC \\
   10282              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   10283              xml-tests/test.xml"
   10284 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1620"
   10285 ( $at_check_trace; $XSLTPROC \
   10286              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   10287              xml-tests/test.xml
   10288 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10289 at_status=$? at_failed=false
   10290 $at_check_filter
   10291 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10292 $at_diff expout "$at_stdout" || at_failed=:
   10293 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10294 $at_failed && at_fn_log_failure
   10295 $at_traceon; }
   10296 
   10297   sort xml-tests/test.dot > expout
   10298   { set +x
   10299 $as_echo "$at_srcdir/input.at:1620: \$XSLTPROC \\
   10300              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   10301              xml-tests/test.xml | sort"
   10302 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1620"
   10303 ( $at_check_trace; $XSLTPROC \
   10304              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   10305              xml-tests/test.xml | sort
   10306 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10307 at_status=$? at_failed=false
   10308 $at_check_filter
   10309 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10310 $at_diff expout "$at_stdout" || at_failed=:
   10311 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10312 $at_failed && at_fn_log_failure
   10313 $at_traceon; }
   10314 
   10315   rm -rf xml-tests expout
   10316   at_restore_special_files
   10317 fi
   10318 { set +x
   10319 $as_echo "$at_srcdir/input.at:1620: bison -d -S glr.c      input.y"
   10320 at_fn_check_prepare_trace "input.at:1620"
   10321 ( $at_check_trace; bison -d -S glr.c      input.y
   10322 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10323 at_status=$? at_failed=false
   10324 $at_check_filter
   10325 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10326 at_fn_diff_devnull "$at_stdout" || at_failed=:
   10327 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10328 $at_failed && at_fn_log_failure
   10329 $at_traceon; }
   10330 
   10331 
   10332 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   10333   at_save_special_files
   10334   mkdir xml-tests
   10335     # Don't combine these Bison invocations since we want to be sure that
   10336   # --report=all isn't required to get the full XML file.
   10337   { set +x
   10338 $as_echo "$at_srcdir/input.at:1620: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   10339                   --graph=xml-tests/test.dot -d -S lalr1.cc   input.y"
   10340 at_fn_check_prepare_notrace 'an embedded newline' "input.at:1620"
   10341 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   10342                   --graph=xml-tests/test.dot -d -S lalr1.cc   input.y
   10343 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10344 at_status=$? at_failed=false
   10345 $at_check_filter
   10346 echo stderr:; cat "$at_stderr"
   10347 echo stdout:; cat "$at_stdout"
   10348 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10349 $at_failed && at_fn_log_failure
   10350 $at_traceon; }
   10351 
   10352   { set +x
   10353 $as_echo "$at_srcdir/input.at:1620: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -S lalr1.cc   input.y"
   10354 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -S lalr1.cc   input.y" "input.at:1620"
   10355 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -S lalr1.cc   input.y
   10356 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10357 at_status=$? at_failed=false
   10358 $at_check_filter
   10359 echo stderr:; cat "$at_stderr"
   10360 echo stdout:; cat "$at_stdout"
   10361 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10362 $at_failed && at_fn_log_failure
   10363 $at_traceon; }
   10364 
   10365     cp xml-tests/test.output expout
   10366   { set +x
   10367 $as_echo "$at_srcdir/input.at:1620: \$XSLTPROC \\
   10368              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   10369              xml-tests/test.xml"
   10370 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1620"
   10371 ( $at_check_trace; $XSLTPROC \
   10372              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   10373              xml-tests/test.xml
   10374 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10375 at_status=$? at_failed=false
   10376 $at_check_filter
   10377 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10378 $at_diff expout "$at_stdout" || at_failed=:
   10379 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10380 $at_failed && at_fn_log_failure
   10381 $at_traceon; }
   10382 
   10383   sort xml-tests/test.dot > expout
   10384   { set +x
   10385 $as_echo "$at_srcdir/input.at:1620: \$XSLTPROC \\
   10386              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   10387              xml-tests/test.xml | sort"
   10388 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1620"
   10389 ( $at_check_trace; $XSLTPROC \
   10390              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   10391              xml-tests/test.xml | sort
   10392 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10393 at_status=$? at_failed=false
   10394 $at_check_filter
   10395 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10396 $at_diff expout "$at_stdout" || at_failed=:
   10397 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10398 $at_failed && at_fn_log_failure
   10399 $at_traceon; }
   10400 
   10401   rm -rf xml-tests expout
   10402   at_restore_special_files
   10403 fi
   10404 { set +x
   10405 $as_echo "$at_srcdir/input.at:1620: bison -d -S lalr1.cc   input.y"
   10406 at_fn_check_prepare_trace "input.at:1620"
   10407 ( $at_check_trace; bison -d -S lalr1.cc   input.y
   10408 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10409 at_status=$? at_failed=false
   10410 $at_check_filter
   10411 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10412 at_fn_diff_devnull "$at_stdout" || at_failed=:
   10413 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10414 $at_failed && at_fn_log_failure
   10415 $at_traceon; }
   10416 
   10417 
   10418 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   10419   at_save_special_files
   10420   mkdir xml-tests
   10421     # Don't combine these Bison invocations since we want to be sure that
   10422   # --report=all isn't required to get the full XML file.
   10423   { set +x
   10424 $as_echo "$at_srcdir/input.at:1620: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   10425                   --graph=xml-tests/test.dot -d -S glr.cc     input.y"
   10426 at_fn_check_prepare_notrace 'an embedded newline' "input.at:1620"
   10427 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   10428                   --graph=xml-tests/test.dot -d -S glr.cc     input.y
   10429 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10430 at_status=$? at_failed=false
   10431 $at_check_filter
   10432 echo stderr:; cat "$at_stderr"
   10433 echo stdout:; cat "$at_stdout"
   10434 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10435 $at_failed && at_fn_log_failure
   10436 $at_traceon; }
   10437 
   10438   { set +x
   10439 $as_echo "$at_srcdir/input.at:1620: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -S glr.cc     input.y"
   10440 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -S glr.cc     input.y" "input.at:1620"
   10441 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -S glr.cc     input.y
   10442 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10443 at_status=$? at_failed=false
   10444 $at_check_filter
   10445 echo stderr:; cat "$at_stderr"
   10446 echo stdout:; cat "$at_stdout"
   10447 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10448 $at_failed && at_fn_log_failure
   10449 $at_traceon; }
   10450 
   10451     cp xml-tests/test.output expout
   10452   { set +x
   10453 $as_echo "$at_srcdir/input.at:1620: \$XSLTPROC \\
   10454              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   10455              xml-tests/test.xml"
   10456 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1620"
   10457 ( $at_check_trace; $XSLTPROC \
   10458              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   10459              xml-tests/test.xml
   10460 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10461 at_status=$? at_failed=false
   10462 $at_check_filter
   10463 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10464 $at_diff expout "$at_stdout" || at_failed=:
   10465 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10466 $at_failed && at_fn_log_failure
   10467 $at_traceon; }
   10468 
   10469   sort xml-tests/test.dot > expout
   10470   { set +x
   10471 $as_echo "$at_srcdir/input.at:1620: \$XSLTPROC \\
   10472              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   10473              xml-tests/test.xml | sort"
   10474 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1620"
   10475 ( $at_check_trace; $XSLTPROC \
   10476              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   10477              xml-tests/test.xml | sort
   10478 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10479 at_status=$? at_failed=false
   10480 $at_check_filter
   10481 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10482 $at_diff expout "$at_stdout" || at_failed=:
   10483 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10484 $at_failed && at_fn_log_failure
   10485 $at_traceon; }
   10486 
   10487   rm -rf xml-tests expout
   10488   at_restore_special_files
   10489 fi
   10490 { set +x
   10491 $as_echo "$at_srcdir/input.at:1620: bison -d -S glr.cc     input.y"
   10492 at_fn_check_prepare_trace "input.at:1620"
   10493 ( $at_check_trace; bison -d -S glr.cc     input.y
   10494 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10495 at_status=$? at_failed=false
   10496 $at_check_filter
   10497 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10498 at_fn_diff_devnull "$at_stdout" || at_failed=:
   10499 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10500 $at_failed && at_fn_log_failure
   10501 $at_traceon; }
   10502 
   10503 
   10504 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   10505   at_save_special_files
   10506   mkdir xml-tests
   10507     # Don't combine these Bison invocations since we want to be sure that
   10508   # --report=all isn't required to get the full XML file.
   10509   { set +x
   10510 $as_echo "$at_srcdir/input.at:1620: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   10511                   --graph=xml-tests/test.dot    -S lalr1.java input.y"
   10512 at_fn_check_prepare_notrace 'an embedded newline' "input.at:1620"
   10513 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   10514                   --graph=xml-tests/test.dot    -S lalr1.java input.y
   10515 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10516 at_status=$? at_failed=false
   10517 $at_check_filter
   10518 echo stderr:; cat "$at_stderr"
   10519 echo stdout:; cat "$at_stdout"
   10520 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10521 $at_failed && at_fn_log_failure
   10522 $at_traceon; }
   10523 
   10524   { set +x
   10525 $as_echo "$at_srcdir/input.at:1620: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml    -S lalr1.java input.y"
   10526 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml    -S lalr1.java input.y" "input.at:1620"
   10527 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml    -S lalr1.java input.y
   10528 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10529 at_status=$? at_failed=false
   10530 $at_check_filter
   10531 echo stderr:; cat "$at_stderr"
   10532 echo stdout:; cat "$at_stdout"
   10533 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10534 $at_failed && at_fn_log_failure
   10535 $at_traceon; }
   10536 
   10537     cp xml-tests/test.output expout
   10538   { set +x
   10539 $as_echo "$at_srcdir/input.at:1620: \$XSLTPROC \\
   10540              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   10541              xml-tests/test.xml"
   10542 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1620"
   10543 ( $at_check_trace; $XSLTPROC \
   10544              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   10545              xml-tests/test.xml
   10546 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10547 at_status=$? at_failed=false
   10548 $at_check_filter
   10549 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10550 $at_diff expout "$at_stdout" || at_failed=:
   10551 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10552 $at_failed && at_fn_log_failure
   10553 $at_traceon; }
   10554 
   10555   sort xml-tests/test.dot > expout
   10556   { set +x
   10557 $as_echo "$at_srcdir/input.at:1620: \$XSLTPROC \\
   10558              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   10559              xml-tests/test.xml | sort"
   10560 at_fn_check_prepare_notrace 'a `...` command substitution' "input.at:1620"
   10561 ( $at_check_trace; $XSLTPROC \
   10562              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   10563              xml-tests/test.xml | sort
   10564 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10565 at_status=$? at_failed=false
   10566 $at_check_filter
   10567 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10568 $at_diff expout "$at_stdout" || at_failed=:
   10569 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10570 $at_failed && at_fn_log_failure
   10571 $at_traceon; }
   10572 
   10573   rm -rf xml-tests expout
   10574   at_restore_special_files
   10575 fi
   10576 { set +x
   10577 $as_echo "$at_srcdir/input.at:1620: bison    -S lalr1.java input.y"
   10578 at_fn_check_prepare_trace "input.at:1620"
   10579 ( $at_check_trace; bison    -S lalr1.java input.y
   10580 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10581 at_status=$? at_failed=false
   10582 $at_check_filter
   10583 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10584 at_fn_diff_devnull "$at_stdout" || at_failed=:
   10585 at_fn_check_status 0 $at_status "$at_srcdir/input.at:1620"
   10586 $at_failed && at_fn_log_failure
   10587 $at_traceon; }
   10588 
   10589 
   10590 
   10591 
   10592 
   10593 
   10594   set +x
   10595   $at_times_p && times >"$at_times_file"
   10596 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   10597 read at_status <"$at_status_file"
   10598 #AT_STOP_38
   10599 #AT_START_39
   10600 at_fn_group_banner 39 'named-refs.at:21' \
   10601   "Tutorial calculator" "                            " 2
   10602 at_xfail=no
   10603 (
   10604   $as_echo "39. $at_setup_line: testing $at_desc ..."
   10605   $at_traceon
   10606 
   10607 
   10608 cat >test.y <<'_ATEOF'
   10609 %code top {
   10610 #include <config.h>
   10611 /* We don't need perfect functions for these tests. */
   10612 #undef malloc
   10613 #undef memcmp
   10614 #undef realloc
   10615 }
   10616 
   10617 
   10618 %{
   10619 #include <assert.h>
   10620 #include <stdio.h>
   10621 #include <stdlib.h>
   10622 #include <string.h>
   10623 #include <ctype.h>
   10624 typedef int semantic_value;
   10625 FILE *input;
   10626 static semantic_value global_result = 0;
   10627 static int global_count = 0;
   10628 static int power (int base, int exponent);
   10629 static void yyerror ( const char *msg);
   10630 static int yylex (void);
   10631 %}
   10632 
   10633 %union
   10634 {
   10635   semantic_value ival;
   10636 };
   10637 
   10638 %token CALC_EOF 0 "end of input"
   10639 %token <ival> NUM "number"
   10640 %type  <ival> exp
   10641 
   10642 %nonassoc '='   /* comparison	       */
   10643 %left '-' '+'
   10644 %left '*' '/'
   10645 %left NEG       /* negation--unary minus */
   10646 %right '^'      /* exponentiation        */
   10647 
   10648 %%
   10649 input:
   10650   line
   10651 | input line         {}
   10652 ;
   10653 
   10654 line:
   10655   '\n'
   10656 | exp '\n'           {}
   10657 ;
   10658 
   10659 exp:
   10660   NUM                { $$ = $NUM; }
   10661 | exp[l] '=' exp[r]
   10662   {
   10663     if ($l != $r)
   10664       fprintf (stderr, "calc: error: %d != %d\n", $l, $r);
   10665     $$ = $l;
   10666   }
   10667 | exp[x] '+' { $<ival>$ = $x; } [l] exp[r]  { $$ = $<ival>l + $r;    }
   10668 | exp[l] '-' exp[r]  { $$ = $l - $r;        }
   10669 | exp[l] '*' exp[r]  { $$ = $l * $r;        }
   10670 | exp[l] '/' exp[r]  { $$ = $l / $r;        }
   10671 | '-' exp  %prec NEG { $$ = -$2;            }
   10672 | exp[l] '^' exp[r]  { $$ = power ($l, $r); }
   10673 | '(' exp[e] ')'     { $$ = $e;           }
   10674 | '(' error ')'      { $$ = 1111; yyerrok;  }
   10675 | '!'                { $$ = 0; YYERROR;     }
   10676 | '-' error          { $$ = 0; YYERROR;     }
   10677 ;
   10678 %%
   10679 #include <stdio.h>
   10680 /* A C error reporting function.  */
   10681 static
   10682 void yyerror ( const char *msg)
   10683 {
   10684   fprintf (stderr, "%s\n", msg);
   10685 }
   10686 static int get_char (void)
   10687 {
   10688   int res = getc (input);
   10689   return res;
   10690 }
   10691 
   10692 static void unget_char (int c)
   10693 {
   10694   ungetc (c, input);
   10695 }
   10696 
   10697 static int read_signed_integer (void)
   10698 {
   10699   int c = get_char ();
   10700   int sign = 1;
   10701   int n = 0;
   10702   if (c == '-')
   10703     {
   10704       c = get_char ();
   10705       sign = -1;
   10706     }
   10707   while (isdigit (c))
   10708     {
   10709       n = 10 * n + (c - '0');
   10710       c = get_char ();
   10711     }
   10712   unget_char ( c);
   10713   return sign * n;
   10714 }
   10715 
   10716 static int
   10717 yylex (void)
   10718 {
   10719   int c;
   10720   /* Skip white space.  */
   10721   while ((c = get_char ()) == ' ' || c == '\t') {}
   10722 
   10723   /* process numbers   */
   10724   if (c == '.' || isdigit (c))
   10725     {
   10726       unget_char ( c);
   10727       (yylval).ival = read_signed_integer ();
   10728       return NUM;
   10729     }
   10730 
   10731   /* Return end-of-file.  */
   10732   if (c == EOF)
   10733     return CALC_EOF;
   10734 
   10735   /* Return single chars. */
   10736   return c;
   10737 }
   10738 
   10739 static int power (int base, int exponent)
   10740 {
   10741   int res = 1;
   10742   assert (0 <= exponent);
   10743   for (/* Niente */; exponent; --exponent)
   10744     res *= base;
   10745   return res;
   10746 }
   10747 
   10748 int main (int argc, const char **argv)
   10749 {
   10750   semantic_value result = 0;
   10751   int count = 0;
   10752   int status;
   10753   if (argc == 2)
   10754     input = fopen (argv[1], "r");
   10755   else
   10756     input = stdin;
   10757   if (!input)
   10758     {
   10759       perror (argv[1]);
   10760       return 3;
   10761     }
   10762   status = yyparse ();
   10763   fclose (input);
   10764   assert (global_result == result);
   10765   assert (global_count == count);
   10766   return status;
   10767 }
   10768 _ATEOF
   10769 
   10770 
   10771 
   10772 cat >input.txt <<'_ATEOF'
   10773 
   10774 1 + 2 * 3 = 7
   10775 1 + 2 * -3 = -5
   10776 -1^2 = -1
   10777 (-1)^2 = 1
   10778 ---1 = -1
   10779 1 - 2 - 3 = -4
   10780 1 - (2 - 3) = 2
   10781 2^2^3 = 256
   10782 (2^2)^3 = 64
   10783 _ATEOF
   10784 
   10785 
   10786 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   10787   at_save_special_files
   10788   mkdir xml-tests
   10789     # Don't combine these Bison invocations since we want to be sure that
   10790   # --report=all isn't required to get the full XML file.
   10791   { set +x
   10792 $as_echo "$at_srcdir/named-refs.at:184: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   10793                   --graph=xml-tests/test.dot -o test.c test.y"
   10794 at_fn_check_prepare_notrace 'an embedded newline' "named-refs.at:184"
   10795 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   10796                   --graph=xml-tests/test.dot -o test.c test.y
   10797 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10798 at_status=$? at_failed=false
   10799 $at_check_filter
   10800 echo stderr:; cat "$at_stderr"
   10801 echo stdout:; cat "$at_stdout"
   10802 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:184"
   10803 $at_failed && at_fn_log_failure
   10804 $at_traceon; }
   10805 
   10806   { set +x
   10807 $as_echo "$at_srcdir/named-refs.at:184: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o test.c test.y"
   10808 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o test.c test.y" "named-refs.at:184"
   10809 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o test.c test.y
   10810 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10811 at_status=$? at_failed=false
   10812 $at_check_filter
   10813 echo stderr:; cat "$at_stderr"
   10814 echo stdout:; cat "$at_stdout"
   10815 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:184"
   10816 $at_failed && at_fn_log_failure
   10817 $at_traceon; }
   10818 
   10819     cp xml-tests/test.output expout
   10820   { set +x
   10821 $as_echo "$at_srcdir/named-refs.at:184: \$XSLTPROC \\
   10822              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   10823              xml-tests/test.xml"
   10824 at_fn_check_prepare_notrace 'a `...` command substitution' "named-refs.at:184"
   10825 ( $at_check_trace; $XSLTPROC \
   10826              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   10827              xml-tests/test.xml
   10828 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10829 at_status=$? at_failed=false
   10830 $at_check_filter
   10831 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10832 $at_diff expout "$at_stdout" || at_failed=:
   10833 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:184"
   10834 $at_failed && at_fn_log_failure
   10835 $at_traceon; }
   10836 
   10837   sort xml-tests/test.dot > expout
   10838   { set +x
   10839 $as_echo "$at_srcdir/named-refs.at:184: \$XSLTPROC \\
   10840              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   10841              xml-tests/test.xml | sort"
   10842 at_fn_check_prepare_notrace 'a `...` command substitution' "named-refs.at:184"
   10843 ( $at_check_trace; $XSLTPROC \
   10844              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   10845              xml-tests/test.xml | sort
   10846 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10847 at_status=$? at_failed=false
   10848 $at_check_filter
   10849 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10850 $at_diff expout "$at_stdout" || at_failed=:
   10851 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:184"
   10852 $at_failed && at_fn_log_failure
   10853 $at_traceon; }
   10854 
   10855   rm -rf xml-tests expout
   10856   at_restore_special_files
   10857 fi
   10858 { set +x
   10859 $as_echo "$at_srcdir/named-refs.at:184: bison -o test.c test.y"
   10860 at_fn_check_prepare_trace "named-refs.at:184"
   10861 ( $at_check_trace; bison -o test.c test.y
   10862 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10863 at_status=$? at_failed=false
   10864 $at_check_filter
   10865 at_fn_diff_devnull "$at_stderr" || at_failed=:
   10866 at_fn_diff_devnull "$at_stdout" || at_failed=:
   10867 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:184"
   10868 $at_failed && at_fn_log_failure
   10869 $at_traceon; }
   10870 
   10871 
   10872 { set +x
   10873 $as_echo "$at_srcdir/named-refs.at:185: \$BISON_C_WORKS"
   10874 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "named-refs.at:185"
   10875 ( $at_check_trace; $BISON_C_WORKS
   10876 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10877 at_status=$? at_failed=false
   10878 $at_check_filter
   10879 echo stderr:; cat "$at_stderr"
   10880 echo stdout:; cat "$at_stdout"
   10881 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:185"
   10882 $at_failed && at_fn_log_failure
   10883 $at_traceon; }
   10884 
   10885 { set +x
   10886 $as_echo "$at_srcdir/named-refs.at:185: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o test test.c \$LIBS"
   10887 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o test test.c $LIBS" "named-refs.at:185"
   10888 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o test test.c $LIBS
   10889 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10890 at_status=$? at_failed=false
   10891 $at_check_filter
   10892 echo stderr:; cat "$at_stderr"
   10893 echo stdout:; cat "$at_stdout"
   10894 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:185"
   10895 $at_failed && at_fn_log_failure
   10896 $at_traceon; }
   10897 
   10898 { set +x
   10899 $as_echo "$at_srcdir/named-refs.at:186:  \$PREPARSER ./test input.txt"
   10900 at_fn_check_prepare_dynamic " $PREPARSER ./test input.txt" "named-refs.at:186"
   10901 ( $at_check_trace;  $PREPARSER ./test input.txt
   10902 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10903 at_status=$? at_failed=false
   10904 $at_check_filter
   10905 echo stderr:; tee stderr <"$at_stderr"
   10906 at_fn_diff_devnull "$at_stdout" || at_failed=:
   10907 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:186"
   10908 $at_failed && at_fn_log_failure
   10909 $at_traceon; }
   10910 
   10911 { set +x
   10912 $as_echo "$at_srcdir/named-refs.at:186: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   10913 at_fn_check_prepare_trace "named-refs.at:186"
   10914 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   10915 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   10916 at_status=$? at_failed=false
   10917 $at_check_filter
   10918 echo stderr:; tee stderr <"$at_stderr"
   10919 at_fn_diff_devnull "$at_stdout" || at_failed=:
   10920 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:186"
   10921 $at_failed && at_fn_log_failure
   10922 $at_traceon; }
   10923 
   10924 
   10925 
   10926   set +x
   10927   $at_times_p && times >"$at_times_file"
   10928 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   10929 read at_status <"$at_status_file"
   10930 #AT_STOP_39
   10931 #AT_START_40
   10932 at_fn_group_banner 40 'named-refs.at:195' \
   10933   "Undefined and ambiguous references" "             " 2
   10934 at_xfail=no
   10935 (
   10936   $as_echo "40. $at_setup_line: testing $at_desc ..."
   10937   $at_traceon
   10938 
   10939 
   10940 cat >test.y <<'_ATEOF'
   10941 %code top {
   10942 #include <config.h>
   10943 /* We don't need perfect functions for these tests. */
   10944 #undef malloc
   10945 #undef memcmp
   10946 #undef realloc
   10947 }
   10948 
   10949 
   10950 %{
   10951 static int power (int base, int exponent);
   10952 static void yyerror ( const char *msg);
   10953 static int yylex (void);
   10954 %}
   10955 
   10956 %union
   10957 {
   10958   int ival;
   10959 };
   10960 
   10961 %token CALC_EOF 0 "end of input"
   10962 %token <ival> NUM "number"
   10963 %type  <ival> exp
   10964 
   10965 %nonassoc '='   /* comparison	       */
   10966 %left '-' '+'
   10967 %left '*' '/'
   10968 %left NEG       /* negation--unary minus */
   10969 %right '^'      /* exponentiation        */
   10970 
   10971 %%
   10972 input:
   10973   line
   10974 | input line         {}
   10975 ;
   10976 
   10977 line:
   10978   '\n'
   10979 | exp '\n'           {}
   10980 ;
   10981 
   10982 exp:
   10983   NUM { $$ = $NUM; }
   10984 | exp[l] '=' exp[r]
   10985   {
   10986     if ($l != $r)
   10987       fprintf (stderr, "calc: error: %d != %d\n", $l, $r);
   10988     $$ = $l;
   10989   }
   10990 | exp[x] '+' { $<ival>$ = $x; } [l] exp[r] { $$ = $<ival>lo9 + $r; }
   10991 | exp[x] '-' { $<ival>$ = $x; } [l] exp[r] { $$ = $<ival>exp - $r; }
   10992 | exp[x] '*' { $<ival>$ = $x; } [l] exp[r] { $$ = $l * $r; }
   10993 | exp[l] '/' exp[r]  { $$ = $l / $r;        }
   10994 | '-' exp  %prec NEG { $$ = -$2;            }
   10995 | exp[l] '^' exp[r]  { $$ = power ($l, $r12); }
   10996 | '(' exp ')'        { $$ = $expo;           }
   10997 | '(' error ')'      { $$ = 1111; yyerrok;  }
   10998 | '!'                { $$ = 0; YYERROR;     }
   10999 | '-' error          { $$ = 0; YYERROR;     }
   11000 ;
   11001 %%
   11002 _ATEOF
   11003 
   11004 
   11005 
   11006 
   11007 { set +x
   11008 $as_echo "$at_srcdir/named-refs.at:253: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y"
   11009 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y" "named-refs.at:253"
   11010 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o test.c test.y
   11011 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11012 at_status=$? at_failed=false
   11013 $at_check_filter
   11014 echo >>"$at_stderr"; $as_echo "test.y:50.51-60: error: invalid reference: '\$<ival>lo9'
   11015 test.y:50.3-68:      symbol not found in production: lo9
   11016 test.y:51.51-60: warning: misleading reference: '\$<ival>exp'
   11017 test.y:42.1-3:       refers to: \$exp at \$\$
   11018 test.y:51.7:         possibly meant: \$x, hiding \$exp at \$1
   11019 test.y:51.41:        possibly meant: \$r, hiding \$exp at \$4
   11020 test.y:52.51-52: error: \$l of 'exp' has no declared type
   11021 test.y:55.40-43: error: invalid reference: '\$r12'
   11022 test.y:55.3-47:      symbol not found in production: r12
   11023 test.y:56.29-33: error: invalid reference: '\$expo'
   11024 test.y:56.3-46:      symbol not found in production: expo
   11025 " | \
   11026   $at_diff - "$at_stderr" || at_failed=:
   11027 at_fn_diff_devnull "$at_stdout" || at_failed=:
   11028 at_fn_check_status 1 $at_status "$at_srcdir/named-refs.at:253"
   11029 $at_failed && at_fn_log_failure
   11030 $at_traceon; }
   11031 
   11032 
   11033 
   11034   set +x
   11035   $at_times_p && times >"$at_times_file"
   11036 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   11037 read at_status <"$at_status_file"
   11038 #AT_STOP_40
   11039 #AT_START_41
   11040 at_fn_group_banner 41 'named-refs.at:271' \
   11041   "Misleading references" "                          " 2
   11042 at_xfail=no
   11043 (
   11044   $as_echo "41. $at_setup_line: testing $at_desc ..."
   11045   $at_traceon
   11046 
   11047 cat >test.y <<'_ATEOF'
   11048 %code top {
   11049 #include <config.h>
   11050 /* We don't need perfect functions for these tests. */
   11051 #undef malloc
   11052 #undef memcmp
   11053 #undef realloc
   11054 }
   11055 
   11056 
   11057 %%
   11058 start: foo foo.bar { $foo.bar; }
   11059 foo: '1'
   11060 foo.bar: '2'
   11061 _ATEOF
   11062 
   11063 
   11064 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   11065   at_save_special_files
   11066   mkdir xml-tests
   11067     # Don't combine these Bison invocations since we want to be sure that
   11068   # --report=all isn't required to get the full XML file.
   11069   { set +x
   11070 $as_echo "$at_srcdir/named-refs.at:279: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   11071                   --graph=xml-tests/test.dot -o test.c test.y"
   11072 at_fn_check_prepare_notrace 'an embedded newline' "named-refs.at:279"
   11073 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   11074                   --graph=xml-tests/test.dot -o test.c test.y
   11075 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11076 at_status=$? at_failed=false
   11077 $at_check_filter
   11078 echo stderr:; cat "$at_stderr"
   11079 echo stdout:; cat "$at_stdout"
   11080 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:279"
   11081 $at_failed && at_fn_log_failure
   11082 $at_traceon; }
   11083 
   11084   { set +x
   11085 $as_echo "$at_srcdir/named-refs.at:279: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o test.c test.y"
   11086 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o test.c test.y" "named-refs.at:279"
   11087 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o test.c test.y
   11088 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11089 at_status=$? at_failed=false
   11090 $at_check_filter
   11091 echo stderr:; cat "$at_stderr"
   11092 echo stdout:; cat "$at_stdout"
   11093 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:279"
   11094 $at_failed && at_fn_log_failure
   11095 $at_traceon; }
   11096 
   11097     cp xml-tests/test.output expout
   11098   { set +x
   11099 $as_echo "$at_srcdir/named-refs.at:279: \$XSLTPROC \\
   11100              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   11101              xml-tests/test.xml"
   11102 at_fn_check_prepare_notrace 'a `...` command substitution' "named-refs.at:279"
   11103 ( $at_check_trace; $XSLTPROC \
   11104              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   11105              xml-tests/test.xml
   11106 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11107 at_status=$? at_failed=false
   11108 $at_check_filter
   11109 at_fn_diff_devnull "$at_stderr" || at_failed=:
   11110 $at_diff expout "$at_stdout" || at_failed=:
   11111 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:279"
   11112 $at_failed && at_fn_log_failure
   11113 $at_traceon; }
   11114 
   11115   sort xml-tests/test.dot > expout
   11116   { set +x
   11117 $as_echo "$at_srcdir/named-refs.at:279: \$XSLTPROC \\
   11118              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   11119              xml-tests/test.xml | sort"
   11120 at_fn_check_prepare_notrace 'a `...` command substitution' "named-refs.at:279"
   11121 ( $at_check_trace; $XSLTPROC \
   11122              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   11123              xml-tests/test.xml | sort
   11124 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11125 at_status=$? at_failed=false
   11126 $at_check_filter
   11127 at_fn_diff_devnull "$at_stderr" || at_failed=:
   11128 $at_diff expout "$at_stdout" || at_failed=:
   11129 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:279"
   11130 $at_failed && at_fn_log_failure
   11131 $at_traceon; }
   11132 
   11133   rm -rf xml-tests expout
   11134   at_restore_special_files
   11135 fi
   11136 { set +x
   11137 $as_echo "$at_srcdir/named-refs.at:279: bison -o test.c test.y"
   11138 at_fn_check_prepare_trace "named-refs.at:279"
   11139 ( $at_check_trace; bison -o test.c test.y
   11140 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11141 at_status=$? at_failed=false
   11142 $at_check_filter
   11143 echo >>"$at_stderr"; $as_echo "test.y:11.22-29: warning: misleading reference: '\$foo.bar'
   11144 test.y:11.8-10:      refers to: \$foo at \$1
   11145 test.y:11.12-18:     possibly meant: \$[foo.bar] at \$2
   11146 " | \
   11147   $at_diff - "$at_stderr" || at_failed=:
   11148 at_fn_diff_devnull "$at_stdout" || at_failed=:
   11149 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:279"
   11150 $at_failed && at_fn_log_failure
   11151 $at_traceon; }
   11152 
   11153 # Defining POSIXLY_CORRECT causes bison to complain if options are
   11154 # added after the grammar file name, so skip these checks in that
   11155 # case.
   11156 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   11157   at_save_special_files
   11158 
   11159   # To avoid expanding it repeatedly, store specified stdout.
   11160   : >expout
   11161 
   11162   # Run with -Werror.
   11163   { set +x
   11164 $as_echo "$at_srcdir/named-refs.at:279: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y -Werror"
   11165 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y -Werror" "named-refs.at:279"
   11166 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o test.c test.y -Werror
   11167 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11168 at_status=$? at_failed=false
   11169 $at_check_filter
   11170 echo stderr:; tee stderr <"$at_stderr"
   11171 $at_diff expout "$at_stdout" || at_failed=:
   11172 at_fn_check_status 1 $at_status "$at_srcdir/named-refs.at:279"
   11173 $at_failed && at_fn_log_failure
   11174 $at_traceon; }
   11175 
   11176 
   11177   # Build expected stderr up to and including the "warnings being
   11178   # treated as errors" message.
   11179   cat >at-bison-check-warnings <<'_ATEOF'
   11180 test.y:11.22-29: warning: misleading reference: '$foo.bar'
   11181 test.y:11.8-10:      refers to: $foo at $1
   11182 test.y:11.12-18:     possibly meant: $[foo.bar] at $2
   11183 _ATEOF
   11184 
   11185   at_bison_check_first=`sed -n \
   11186     '/: warning: /{=;q;}' at-bison-check-warnings`
   11187   : ${at_bison_check_first:=1}
   11188   at_bison_check_first_tmp=`sed -n \
   11189     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   11190   : ${at_bison_check_first_tmp:=1}
   11191   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   11192     at_bison_check_first=$at_bison_check_first_tmp
   11193   fi
   11194   if test $at_bison_check_first -gt 1; then
   11195     sed -n "1,`expr $at_bison_check_first - 1`"p \
   11196       at-bison-check-warnings > experr
   11197   fi
   11198   echo 'bison: warnings being treated as errors' >> experr
   11199 
   11200   # Finish building expected stderr and check.  Unlike warnings,
   11201   # complaints cause bison to exit early.  Thus, with -Werror, bison
   11202   # does not necessarily report all warnings that it does without
   11203   # -Werror, but it at least reports one.
   11204   at_bison_check_last=`sed -n '$=' stderr`
   11205   : ${at_bison_check_last:=1}
   11206   at_bison_check_last=`expr $at_bison_check_last - 1`
   11207   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   11208     at-bison-check-warnings >> experr
   11209   { set +x
   11210 $as_echo "$at_srcdir/named-refs.at:279: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   11211               stderr 1>&2"
   11212 at_fn_check_prepare_notrace 'an embedded newline' "named-refs.at:279"
   11213 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   11214               stderr 1>&2
   11215 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11216 at_status=$? at_failed=false
   11217 $at_check_filter
   11218 $at_diff experr "$at_stderr" || at_failed=:
   11219 at_fn_diff_devnull "$at_stdout" || at_failed=:
   11220 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:279"
   11221 $at_failed && at_fn_log_failure
   11222 $at_traceon; }
   11223 
   11224 
   11225   # Now check --warnings=error.
   11226   cp stderr experr
   11227   { set +x
   11228 $as_echo "$at_srcdir/named-refs.at:279: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y --warnings=error"
   11229 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y --warnings=error" "named-refs.at:279"
   11230 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o test.c test.y --warnings=error
   11231 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11232 at_status=$? at_failed=false
   11233 $at_check_filter
   11234 $at_diff experr "$at_stderr" || at_failed=:
   11235 $at_diff expout "$at_stdout" || at_failed=:
   11236 at_fn_check_status 1 $at_status "$at_srcdir/named-refs.at:279"
   11237 $at_failed && at_fn_log_failure
   11238 $at_traceon; }
   11239 
   11240 
   11241   # Now check -Wnone and --warnings=none by making sure that
   11242   # -Werror doesn't change the exit status when -Wnone or
   11243   # --warnings=none is specified.
   11244   { set +x
   11245 $as_echo "$at_srcdir/named-refs.at:279: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y -Wnone -Werror"
   11246 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y -Wnone -Werror" "named-refs.at:279"
   11247 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o test.c test.y -Wnone -Werror
   11248 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11249 at_status=$? at_failed=false
   11250 $at_check_filter
   11251 at_fn_diff_devnull "$at_stderr" || at_failed=:
   11252 $at_diff expout "$at_stdout" || at_failed=:
   11253 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:279"
   11254 $at_failed && at_fn_log_failure
   11255 $at_traceon; }
   11256 
   11257   { set +x
   11258 $as_echo "$at_srcdir/named-refs.at:279: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y --warnings=none -Werror"
   11259 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y --warnings=none -Werror" "named-refs.at:279"
   11260 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o test.c test.y --warnings=none -Werror
   11261 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11262 at_status=$? at_failed=false
   11263 $at_check_filter
   11264 at_fn_diff_devnull "$at_stderr" || at_failed=:
   11265 $at_diff expout "$at_stdout" || at_failed=:
   11266 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:279"
   11267 $at_failed && at_fn_log_failure
   11268 $at_traceon; }
   11269 
   11270 
   11271   at_restore_special_files
   11272 fi
   11273   set +x
   11274   $at_times_p && times >"$at_times_file"
   11275 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   11276 read at_status <"$at_status_file"
   11277 #AT_STOP_41
   11278 #AT_START_42
   11279 at_fn_group_banner 42 'named-refs.at:288' \
   11280   "Many kinds of errors" "                           " 2
   11281 at_xfail=no
   11282 (
   11283   $as_echo "42. $at_setup_line: testing $at_desc ..."
   11284   $at_traceon
   11285 
   11286 cat >test.y <<'_ATEOF'
   11287 %code top {
   11288 #include <config.h>
   11289 /* We don't need perfect functions for these tests. */
   11290 #undef malloc
   11291 #undef memcmp
   11292 #undef realloc
   11293 }
   11294 
   11295 
   11296 %token IDENT
   11297 %token NUMBER
   11298 %token ASSIGNOP
   11299 %token IF
   11300 %token IF1
   11301 %token THEN
   11302 %token ELSE
   11303 %token FI
   11304 %token WHILE
   11305 %token DO
   11306 %token OD
   11307 %start program
   11308 %%
   11309 if_stmt1: IF expr[cond] THEN stmt[then] ELSE stmt.list[else] FI
   11310           { $if_stmt1 = new IfStmt($cond1, $then.f1, $else); };
   11311 if_stmt2: IF expr[cond] THEN stmt[then] FI
   11312           { $if_stmt2 = new IfStmt($cond, $stmt.field, 0); };
   11313 if_stmt3: IF expr[cond] THEN stmt.list FI
   11314           { $if_stmt3 = new IfStmt($cond, $stmt.list, 0); };
   11315 if_stmt4: IF expr[cond] THEN stmt[xyz] ELSE stmt[xyz] FI
   11316           { $if_stmt4 = new IfStmt($cond, $xyz, $cond); };
   11317 if_stmt5: IF expr[cond] THEN stmt.list[then] ELSE stmt.list[else] FI
   11318           { $if_stmt5 = new IfStmt($cond, $stmt.list, $else); };
   11319 if_stmt6: IF expr[cond] THEN stmt.list[then] ELSE stmt.list[else] FI
   11320           { $if_stmt6 = new IfStmt($cond, $stmt.list.field, $else); };
   11321 if_stmt7: IF expr[cond] THEN stmt.list[then] ELSE stmt.list[else] FI
   11322           { $if_stmt7 = new IfStmt($cond, $[stmt.list].field, $else); };
   11323 if_stmt8: IF expr[cond] THEN stmt.list[then.1] ELSE stmt.list[else] FI
   11324           { $if_stmt8 = new IfStmt($cond, $then.1, $else); };
   11325 if_stmt9: IF expr[cond] THEN stmt.list[then.1] ELSE stmt.list[else] FI
   11326           { $if_stmt9 = new IfStmt($cond, $then.1.field, $else); };
   11327 if_stmt10: IF expr[cond] THEN stmt[stmt.x] FI
   11328           { $if_stmt10 = new IfStmt($cond, $stmt.x, 0); };
   11329 if-stmt-a: IF expr[cond] THEN stmt.list[then] ELSE stmt.list[else] FI
   11330           { $if-stmt-a = new IfStmt($cond, $then, $else); };
   11331 if-stmt-b: IF expr[cond] THEN if-stmt-a[then-a] ELSE stmt.list[else] FI
   11332           { $[if-stmt-b] = new IfStmt($cond, $then-a.f, $else); };
   11333 program: stmt.list;
   11334 stmt.list:  stmt ';' stmt.list { $3->insert($stmt); $$ = $3; }
   11335         |   stmt ';' { SL = new StmtList();  SL->insert($1); $$ = SL; }
   11336         ;
   11337 stmt:  assign_stmt { $$ = $1; }
   11338     |  if_stmt { $$ = $1; }
   11339     |  if_stmt1 { $$ = $1; }
   11340     |  while_stmt { $$ = $1; }
   11341     ;
   11342 assign_stmt: IDENT ASSIGNOP expr
   11343        { $$ = new AssignStmt(string($1),$3); };
   11344 if_stmt: IF expr[cond] THEN stmt.list FI
   11345        { $if_stmt = new IfStmt($cond, $[stmt.list], 0); };
   11346 while_stmt[res]: WHILE expr DO stmt.list OD
   11347        { $res = new WhileStmt($[expr], $[stmt.list]); };
   11348 expr: expr '+' term   { $$ = new Plus($1,$3); }
   11349     | expr '-' term   { $$ = new Minus($1,$3); }
   11350     | term            { $$ = $1; }
   11351     ;
   11352 term: term '*' factor   { $$ = new Times($1,$3); }
   11353     | factor            { $$ = $1; }
   11354     ;
   11355 factor:     '(' expr ')'  { $$ = $2; }
   11356     |       NUMBER { $$ = new Number($1); }
   11357     |       IDENT { $$ = new Ident(string($1)); }
   11358     ;
   11359 _ATEOF
   11360 
   11361 
   11362 
   11363 { set +x
   11364 $as_echo "$at_srcdir/named-refs.at:355: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y"
   11365 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y" "named-refs.at:355"
   11366 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o test.c test.y
   11367 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11368 at_status=$? at_failed=false
   11369 $at_check_filter
   11370 echo >>"$at_stderr"; $as_echo "test.y:24.36-41: error: invalid reference: '\$cond1'
   11371 test.y:23.11-24.62:  symbol not found in production: cond1
   11372 test.y:26.43-53: error: invalid reference: '\$stmt.field'
   11373 test.y:25.11-26.60:  symbol not found in production: stmt
   11374 test.y:25.35-38:     possibly meant: \$then.field, hiding \$stmt.field at \$4
   11375 test.y:28.43-52: error: invalid reference: '\$stmt.list'
   11376 test.y:27.11-28.59:  symbol not found in production: stmt
   11377 test.y:27.30-38:     possibly meant: \$[stmt.list] at \$4
   11378 test.y:30.43-46: error: ambiguous reference: '\$xyz'
   11379 test.y:29.35-37:     refers to: \$xyz at \$4
   11380 test.y:29.50-52:     refers to: \$xyz at \$6
   11381 test.y:32.43-52: error: invalid reference: '\$stmt.list'
   11382 test.y:31.11-32.63:  symbol not found in production: stmt
   11383 test.y:31.40-43:     possibly meant: \$then, hiding \$[stmt.list] at \$4
   11384 test.y:31.61-64:     possibly meant: \$else, hiding \$[stmt.list] at \$6
   11385 test.y:34.43-58: error: invalid reference: '\$stmt.list.field'
   11386 test.y:33.11-34.69:  symbol not found in production: stmt
   11387 test.y:33.40-43:     possibly meant: \$then.field, hiding \$[stmt.list].field at \$4
   11388 test.y:33.61-64:     possibly meant: \$else.field, hiding \$[stmt.list].field at \$6
   11389 test.y:36.43-54: error: invalid reference: '\$[stmt.list]'
   11390 test.y:35.11-36.71:  symbol not found in production: stmt.list
   11391 test.y:35.40-43:     possibly meant: \$then, hiding \$[stmt.list] at \$4
   11392 test.y:35.61-64:     possibly meant: \$else, hiding \$[stmt.list] at \$6
   11393 test.y:38.43-49: error: invalid reference: '\$then.1'
   11394 test.y:37.11-38.60:  symbol not found in production: then
   11395 test.y:37.40-45:     possibly meant: \$[then.1] at \$4
   11396 test.y:40.43-55: error: invalid reference: '\$then.1.field'
   11397 test.y:39.11-40.66:  symbol not found in production: then
   11398 test.y:39.40-45:     possibly meant: \$[then.1].field at \$4
   11399 test.y:42.44-50: error: invalid reference: '\$stmt.x'
   11400 test.y:41.12-42.57:  symbol not found in production: stmt
   11401 test.y:41.36-41:     possibly meant: \$[stmt.x].x, hiding \$stmt.x at \$4
   11402 test.y:41.36-41:     possibly meant: \$[stmt.x] at \$4
   11403 test.y:44.13-22: error: invalid reference: '\$if-stmt-a'
   11404 test.y:43.12-44.59:  symbol not found in production: if
   11405 test.y:43.1-9:       possibly meant: \$[if-stmt-a] at \$\$
   11406 test.y:46.46-54: error: invalid reference: '\$then-a.f'
   11407 test.y:45.12-46.65:  symbol not found in production: then
   11408 test.y:45.41-46:     possibly meant: \$[then-a].f at \$4
   11409 " | \
   11410   $at_diff - "$at_stderr" || at_failed=:
   11411 at_fn_diff_devnull "$at_stdout" || at_failed=:
   11412 at_fn_check_status 1 $at_status "$at_srcdir/named-refs.at:355"
   11413 $at_failed && at_fn_log_failure
   11414 $at_traceon; }
   11415 
   11416 
   11417 
   11418 
   11419 { set +x
   11420 $as_echo "$at_srcdir/named-refs.at:397: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret -o test.c test.y"
   11421 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret -o test.c test.y" "named-refs.at:397"
   11422 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret -o test.c test.y
   11423 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11424 at_status=$? at_failed=false
   11425 $at_check_filter
   11426 echo >>"$at_stderr"; $as_echo "test.y:24.36-41: error: invalid reference: '\$cond1'
   11427            { \$if_stmt1 = new IfStmt(\$cond1, \$then.f1, \$else); };
   11428                                     ^^^^^^
   11429 test.y:23.11-24.62:  symbol not found in production: cond1
   11430  if_stmt1: IF expr[cond] THEN stmt[then] ELSE stmt.list[else] FI
   11431            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   11432 test.y:26.43-53: error: invalid reference: '\$stmt.field'
   11433            { \$if_stmt2 = new IfStmt(\$cond, \$stmt.field, 0); };
   11434                                            ^^^^^^^^^^^
   11435 test.y:25.11-26.60:  symbol not found in production: stmt
   11436  if_stmt2: IF expr[cond] THEN stmt[then] FI
   11437            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   11438 test.y:25.35-38:     possibly meant: \$then.field, hiding \$stmt.field at \$4
   11439  if_stmt2: IF expr[cond] THEN stmt[then] FI
   11440                                    ^^^^
   11441 test.y:28.43-52: error: invalid reference: '\$stmt.list'
   11442            { \$if_stmt3 = new IfStmt(\$cond, \$stmt.list, 0); };
   11443                                            ^^^^^^^^^^
   11444 test.y:27.11-28.59:  symbol not found in production: stmt
   11445  if_stmt3: IF expr[cond] THEN stmt.list FI
   11446            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   11447 test.y:27.30-38:     possibly meant: \$[stmt.list] at \$4
   11448  if_stmt3: IF expr[cond] THEN stmt.list FI
   11449                               ^^^^^^^^^
   11450 test.y:30.43-46: error: ambiguous reference: '\$xyz'
   11451            { \$if_stmt4 = new IfStmt(\$cond, \$xyz, \$cond); };
   11452                                            ^^^^
   11453 test.y:29.35-37:     refers to: \$xyz at \$4
   11454  if_stmt4: IF expr[cond] THEN stmt[xyz] ELSE stmt[xyz] FI
   11455                                    ^^^
   11456 test.y:29.50-52:     refers to: \$xyz at \$6
   11457  if_stmt4: IF expr[cond] THEN stmt[xyz] ELSE stmt[xyz] FI
   11458                                                   ^^^
   11459 test.y:32.43-52: error: invalid reference: '\$stmt.list'
   11460            { \$if_stmt5 = new IfStmt(\$cond, \$stmt.list, \$else); };
   11461                                            ^^^^^^^^^^
   11462 test.y:31.11-32.63:  symbol not found in production: stmt
   11463  if_stmt5: IF expr[cond] THEN stmt.list[then] ELSE stmt.list[else] FI
   11464            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   11465 test.y:31.40-43:     possibly meant: \$then, hiding \$[stmt.list] at \$4
   11466  if_stmt5: IF expr[cond] THEN stmt.list[then] ELSE stmt.list[else] FI
   11467                                         ^^^^
   11468 test.y:31.61-64:     possibly meant: \$else, hiding \$[stmt.list] at \$6
   11469  if_stmt5: IF expr[cond] THEN stmt.list[then] ELSE stmt.list[else] FI
   11470                                                              ^^^^
   11471 test.y:34.43-58: error: invalid reference: '\$stmt.list.field'
   11472            { \$if_stmt6 = new IfStmt(\$cond, \$stmt.list.field, \$else); };
   11473                                            ^^^^^^^^^^^^^^^^
   11474 test.y:33.11-34.69:  symbol not found in production: stmt
   11475  if_stmt6: IF expr[cond] THEN stmt.list[then] ELSE stmt.list[else] FI
   11476            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   11477 test.y:33.40-43:     possibly meant: \$then.field, hiding \$[stmt.list].field at \$4
   11478  if_stmt6: IF expr[cond] THEN stmt.list[then] ELSE stmt.list[else] FI
   11479                                         ^^^^
   11480 test.y:33.61-64:     possibly meant: \$else.field, hiding \$[stmt.list].field at \$6
   11481  if_stmt6: IF expr[cond] THEN stmt.list[then] ELSE stmt.list[else] FI
   11482                                                              ^^^^
   11483 test.y:36.43-54: error: invalid reference: '\$[stmt.list]'
   11484            { \$if_stmt7 = new IfStmt(\$cond, \$[stmt.list].field, \$else); };
   11485                                            ^^^^^^^^^^^^
   11486 test.y:35.11-36.71:  symbol not found in production: stmt.list
   11487  if_stmt7: IF expr[cond] THEN stmt.list[then] ELSE stmt.list[else] FI
   11488            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   11489 test.y:35.40-43:     possibly meant: \$then, hiding \$[stmt.list] at \$4
   11490  if_stmt7: IF expr[cond] THEN stmt.list[then] ELSE stmt.list[else] FI
   11491                                         ^^^^
   11492 test.y:35.61-64:     possibly meant: \$else, hiding \$[stmt.list] at \$6
   11493  if_stmt7: IF expr[cond] THEN stmt.list[then] ELSE stmt.list[else] FI
   11494                                                              ^^^^
   11495 test.y:38.43-49: error: invalid reference: '\$then.1'
   11496            { \$if_stmt8 = new IfStmt(\$cond, \$then.1, \$else); };
   11497                                            ^^^^^^^
   11498 test.y:37.11-38.60:  symbol not found in production: then
   11499  if_stmt8: IF expr[cond] THEN stmt.list[then.1] ELSE stmt.list[else] FI
   11500            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   11501 test.y:37.40-45:     possibly meant: \$[then.1] at \$4
   11502  if_stmt8: IF expr[cond] THEN stmt.list[then.1] ELSE stmt.list[else] FI
   11503                                         ^^^^^^
   11504 test.y:40.43-55: error: invalid reference: '\$then.1.field'
   11505            { \$if_stmt9 = new IfStmt(\$cond, \$then.1.field, \$else); };
   11506                                            ^^^^^^^^^^^^^
   11507 test.y:39.11-40.66:  symbol not found in production: then
   11508  if_stmt9: IF expr[cond] THEN stmt.list[then.1] ELSE stmt.list[else] FI
   11509            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   11510 test.y:39.40-45:     possibly meant: \$[then.1].field at \$4
   11511  if_stmt9: IF expr[cond] THEN stmt.list[then.1] ELSE stmt.list[else] FI
   11512                                         ^^^^^^
   11513 test.y:42.44-50: error: invalid reference: '\$stmt.x'
   11514            { \$if_stmt10 = new IfStmt(\$cond, \$stmt.x, 0); };
   11515                                             ^^^^^^^
   11516 test.y:41.12-42.57:  symbol not found in production: stmt
   11517  if_stmt10: IF expr[cond] THEN stmt[stmt.x] FI
   11518             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   11519 test.y:41.36-41:     possibly meant: \$[stmt.x].x, hiding \$stmt.x at \$4
   11520  if_stmt10: IF expr[cond] THEN stmt[stmt.x] FI
   11521                                     ^^^^^^
   11522 test.y:41.36-41:     possibly meant: \$[stmt.x] at \$4
   11523  if_stmt10: IF expr[cond] THEN stmt[stmt.x] FI
   11524                                     ^^^^^^
   11525 test.y:44.13-22: error: invalid reference: '\$if-stmt-a'
   11526            { \$if-stmt-a = new IfStmt(\$cond, \$then, \$else); };
   11527              ^^^^^^^^^^
   11528 test.y:43.12-44.59:  symbol not found in production: if
   11529  if-stmt-a: IF expr[cond] THEN stmt.list[then] ELSE stmt.list[else] FI
   11530             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   11531 test.y:43.1-9:       possibly meant: \$[if-stmt-a] at \$\$
   11532  if-stmt-a: IF expr[cond] THEN stmt.list[then] ELSE stmt.list[else] FI
   11533  ^^^^^^^^^
   11534 test.y:46.46-54: error: invalid reference: '\$then-a.f'
   11535            { \$[if-stmt-b] = new IfStmt(\$cond, \$then-a.f, \$else); };
   11536                                               ^^^^^^^^^
   11537 test.y:45.12-46.65:  symbol not found in production: then
   11538  if-stmt-b: IF expr[cond] THEN if-stmt-a[then-a] ELSE stmt.list[else] FI
   11539             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   11540 test.y:45.41-46:     possibly meant: \$[then-a].f at \$4
   11541  if-stmt-b: IF expr[cond] THEN if-stmt-a[then-a] ELSE stmt.list[else] FI
   11542                                          ^^^^^^
   11543 " | \
   11544   $at_diff - "$at_stderr" || at_failed=:
   11545 at_fn_diff_devnull "$at_stdout" || at_failed=:
   11546 at_fn_check_status 1 $at_status "$at_srcdir/named-refs.at:397"
   11547 $at_failed && at_fn_log_failure
   11548 $at_traceon; }
   11549 
   11550 
   11551 
   11552   set +x
   11553   $at_times_p && times >"$at_times_file"
   11554 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   11555 read at_status <"$at_status_file"
   11556 #AT_STOP_42
   11557 #AT_START_43
   11558 at_fn_group_banner 43 'named-refs.at:521' \
   11559   "Missing identifiers in brackets" "                " 2
   11560 at_xfail=no
   11561 (
   11562   $as_echo "43. $at_setup_line: testing $at_desc ..."
   11563   $at_traceon
   11564 
   11565 cat >test.y <<'_ATEOF'
   11566 %code top {
   11567 #include <config.h>
   11568 /* We don't need perfect functions for these tests. */
   11569 #undef malloc
   11570 #undef memcmp
   11571 #undef realloc
   11572 }
   11573 
   11574 
   11575 %%
   11576 start: foo[] bar
   11577   { s = $foo; }
   11578 _ATEOF
   11579 
   11580 
   11581 
   11582 { set +x
   11583 $as_echo "$at_srcdir/named-refs.at:528: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y"
   11584 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y" "named-refs.at:528"
   11585 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o test.c test.y
   11586 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11587 at_status=$? at_failed=false
   11588 $at_check_filter
   11589 echo >>"$at_stderr"; $as_echo "test.y:11.12: error: an identifier expected
   11590 " | \
   11591   $at_diff - "$at_stderr" || at_failed=:
   11592 at_fn_diff_devnull "$at_stdout" || at_failed=:
   11593 at_fn_check_status 1 $at_status "$at_srcdir/named-refs.at:528"
   11594 $at_failed && at_fn_log_failure
   11595 $at_traceon; }
   11596 
   11597 
   11598   set +x
   11599   $at_times_p && times >"$at_times_file"
   11600 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   11601 read at_status <"$at_status_file"
   11602 #AT_STOP_43
   11603 #AT_START_44
   11604 at_fn_group_banner 44 'named-refs.at:535' \
   11605   "Redundant words in brackets" "                    " 2
   11606 at_xfail=no
   11607 (
   11608   $as_echo "44. $at_setup_line: testing $at_desc ..."
   11609   $at_traceon
   11610 
   11611 cat >test.y <<'_ATEOF'
   11612 %code top {
   11613 #include <config.h>
   11614 /* We don't need perfect functions for these tests. */
   11615 #undef malloc
   11616 #undef memcmp
   11617 #undef realloc
   11618 }
   11619 
   11620 
   11621 %%
   11622 start: foo[ a d ] bar
   11623   { s = $foo; }
   11624 _ATEOF
   11625 
   11626 
   11627 
   11628 { set +x
   11629 $as_echo "$at_srcdir/named-refs.at:542: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y"
   11630 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y" "named-refs.at:542"
   11631 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o test.c test.y
   11632 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11633 at_status=$? at_failed=false
   11634 $at_check_filter
   11635 echo >>"$at_stderr"; $as_echo "test.y:11.15: error: unexpected identifier in bracketed name: 'd'
   11636 " | \
   11637   $at_diff - "$at_stderr" || at_failed=:
   11638 at_fn_diff_devnull "$at_stdout" || at_failed=:
   11639 at_fn_check_status 1 $at_status "$at_srcdir/named-refs.at:542"
   11640 $at_failed && at_fn_log_failure
   11641 $at_traceon; }
   11642 
   11643 
   11644   set +x
   11645   $at_times_p && times >"$at_times_file"
   11646 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   11647 read at_status <"$at_status_file"
   11648 #AT_STOP_44
   11649 #AT_START_45
   11650 at_fn_group_banner 45 'named-refs.at:549' \
   11651   "Comments in brackets" "                           " 2
   11652 at_xfail=no
   11653 (
   11654   $as_echo "45. $at_setup_line: testing $at_desc ..."
   11655   $at_traceon
   11656 
   11657 cat >test.y <<'_ATEOF'
   11658 %code top {
   11659 #include <config.h>
   11660 /* We don't need perfect functions for these tests. */
   11661 #undef malloc
   11662 #undef memcmp
   11663 #undef realloc
   11664 }
   11665 
   11666 
   11667 %%
   11668 start: foo[/* comment */] bar
   11669   { s = $foo; }
   11670 _ATEOF
   11671 
   11672 
   11673 
   11674 { set +x
   11675 $as_echo "$at_srcdir/named-refs.at:556: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y"
   11676 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y" "named-refs.at:556"
   11677 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o test.c test.y
   11678 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11679 at_status=$? at_failed=false
   11680 $at_check_filter
   11681 echo >>"$at_stderr"; $as_echo "test.y:11.25: error: an identifier expected
   11682 " | \
   11683   $at_diff - "$at_stderr" || at_failed=:
   11684 at_fn_diff_devnull "$at_stdout" || at_failed=:
   11685 at_fn_check_status 1 $at_status "$at_srcdir/named-refs.at:556"
   11686 $at_failed && at_fn_log_failure
   11687 $at_traceon; }
   11688 
   11689 
   11690   set +x
   11691   $at_times_p && times >"$at_times_file"
   11692 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   11693 read at_status <"$at_status_file"
   11694 #AT_STOP_45
   11695 #AT_START_46
   11696 at_fn_group_banner 46 'named-refs.at:563' \
   11697   "Stray symbols in brackets" "                      " 2
   11698 at_xfail=no
   11699 (
   11700   $as_echo "46. $at_setup_line: testing $at_desc ..."
   11701   $at_traceon
   11702 
   11703 cat >test.y <<'_ATEOF'
   11704 %code top {
   11705 #include <config.h>
   11706 /* We don't need perfect functions for these tests. */
   11707 #undef malloc
   11708 #undef memcmp
   11709 #undef realloc
   11710 }
   11711 
   11712 
   11713 %%
   11714 start: foo[ % /* aaa */ *&-.+\000\001\002\377 ] bar
   11715   { s = $foo; }
   11716 _ATEOF
   11717 
   11718 
   11719 { set +x
   11720 $as_echo "$at_srcdir/named-refs.at:570: \$PERL -pi -e 's/\\\\(\\d{3})/chr(oct(\$1))/ge' test.y || exit 77"
   11721 at_fn_check_prepare_dynamic "$PERL -pi -e 's/\\\\(\\d{3})/chr(oct($1))/ge' test.y || exit 77" "named-refs.at:570"
   11722 ( $at_check_trace; $PERL -pi -e 's/\\(\d{3})/chr(oct($1))/ge' test.y || exit 77
   11723 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11724 at_status=$? at_failed=false
   11725 $at_check_filter
   11726 at_fn_diff_devnull "$at_stderr" || at_failed=:
   11727 at_fn_diff_devnull "$at_stdout" || at_failed=:
   11728 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:570"
   11729 $at_failed && at_fn_log_failure
   11730 $at_traceon; }
   11731 
   11732 
   11733 { set +x
   11734 $as_echo "$at_srcdir/named-refs.at:571: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y"
   11735 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y" "named-refs.at:571"
   11736 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o test.c test.y
   11737 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11738 at_status=$? at_failed=false
   11739 $at_check_filter
   11740 echo >>"$at_stderr"; $as_echo "test.y:11.13: error: invalid character in bracketed name: '%'
   11741 test.y:11.25-27: error: invalid characters in bracketed name: '*&-'
   11742 test.y:11.29-30: error: invalid characters in bracketed name: '+\\0\\001\\002\\377'
   11743 " | \
   11744   $at_diff - "$at_stderr" || at_failed=:
   11745 at_fn_diff_devnull "$at_stdout" || at_failed=:
   11746 at_fn_check_status 1 $at_status "$at_srcdir/named-refs.at:571"
   11747 $at_failed && at_fn_log_failure
   11748 $at_traceon; }
   11749 
   11750 
   11751   set +x
   11752   $at_times_p && times >"$at_times_file"
   11753 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   11754 read at_status <"$at_status_file"
   11755 #AT_STOP_46
   11756 #AT_START_47
   11757 at_fn_group_banner 47 'named-refs.at:580' \
   11758   "Redundant words in LHS brackets" "                " 2
   11759 at_xfail=no
   11760 (
   11761   $as_echo "47. $at_setup_line: testing $at_desc ..."
   11762   $at_traceon
   11763 
   11764 cat >test.y <<'_ATEOF'
   11765 %code top {
   11766 #include <config.h>
   11767 /* We don't need perfect functions for these tests. */
   11768 #undef malloc
   11769 #undef memcmp
   11770 #undef realloc
   11771 }
   11772 
   11773 
   11774 %%
   11775 start[a s]: foo;
   11776 _ATEOF
   11777 
   11778 
   11779 
   11780 { set +x
   11781 $as_echo "$at_srcdir/named-refs.at:586: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y"
   11782 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y" "named-refs.at:586"
   11783 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o test.c test.y
   11784 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11785 at_status=$? at_failed=false
   11786 $at_check_filter
   11787 echo >>"$at_stderr"; $as_echo "test.y:11.9: error: unexpected identifier in bracketed name: 's'
   11788 " | \
   11789   $at_diff - "$at_stderr" || at_failed=:
   11790 at_fn_diff_devnull "$at_stdout" || at_failed=:
   11791 at_fn_check_status 1 $at_status "$at_srcdir/named-refs.at:586"
   11792 $at_failed && at_fn_log_failure
   11793 $at_traceon; }
   11794 
   11795 
   11796   set +x
   11797   $at_times_p && times >"$at_times_file"
   11798 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   11799 read at_status <"$at_status_file"
   11800 #AT_STOP_47
   11801 #AT_START_48
   11802 at_fn_group_banner 48 'named-refs.at:595' \
   11803   "Factored LHS" "                                   " 2
   11804 at_xfail=no
   11805 (
   11806   $as_echo "48. $at_setup_line: testing $at_desc ..."
   11807   $at_traceon
   11808 
   11809 cat >test.y <<'_ATEOF'
   11810 %code top {
   11811 #include <config.h>
   11812 /* We don't need perfect functions for these tests. */
   11813 #undef malloc
   11814 #undef memcmp
   11815 #undef realloc
   11816 }
   11817 
   11818 
   11819 %%
   11820 start[a]: "foo" | "bar";
   11821 _ATEOF
   11822 
   11823 
   11824 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   11825   at_save_special_files
   11826   mkdir xml-tests
   11827     # Don't combine these Bison invocations since we want to be sure that
   11828   # --report=all isn't required to get the full XML file.
   11829   { set +x
   11830 $as_echo "$at_srcdir/named-refs.at:601: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   11831                   --graph=xml-tests/test.dot -o test.c test.y"
   11832 at_fn_check_prepare_notrace 'an embedded newline' "named-refs.at:601"
   11833 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   11834                   --graph=xml-tests/test.dot -o test.c test.y
   11835 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11836 at_status=$? at_failed=false
   11837 $at_check_filter
   11838 echo stderr:; cat "$at_stderr"
   11839 echo stdout:; cat "$at_stdout"
   11840 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:601"
   11841 $at_failed && at_fn_log_failure
   11842 $at_traceon; }
   11843 
   11844   { set +x
   11845 $as_echo "$at_srcdir/named-refs.at:601: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o test.c test.y"
   11846 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o test.c test.y" "named-refs.at:601"
   11847 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o test.c test.y
   11848 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11849 at_status=$? at_failed=false
   11850 $at_check_filter
   11851 echo stderr:; cat "$at_stderr"
   11852 echo stdout:; cat "$at_stdout"
   11853 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:601"
   11854 $at_failed && at_fn_log_failure
   11855 $at_traceon; }
   11856 
   11857     cp xml-tests/test.output expout
   11858   { set +x
   11859 $as_echo "$at_srcdir/named-refs.at:601: \$XSLTPROC \\
   11860              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   11861              xml-tests/test.xml"
   11862 at_fn_check_prepare_notrace 'a `...` command substitution' "named-refs.at:601"
   11863 ( $at_check_trace; $XSLTPROC \
   11864              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   11865              xml-tests/test.xml
   11866 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11867 at_status=$? at_failed=false
   11868 $at_check_filter
   11869 at_fn_diff_devnull "$at_stderr" || at_failed=:
   11870 $at_diff expout "$at_stdout" || at_failed=:
   11871 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:601"
   11872 $at_failed && at_fn_log_failure
   11873 $at_traceon; }
   11874 
   11875   sort xml-tests/test.dot > expout
   11876   { set +x
   11877 $as_echo "$at_srcdir/named-refs.at:601: \$XSLTPROC \\
   11878              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   11879              xml-tests/test.xml | sort"
   11880 at_fn_check_prepare_notrace 'a `...` command substitution' "named-refs.at:601"
   11881 ( $at_check_trace; $XSLTPROC \
   11882              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   11883              xml-tests/test.xml | sort
   11884 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11885 at_status=$? at_failed=false
   11886 $at_check_filter
   11887 at_fn_diff_devnull "$at_stderr" || at_failed=:
   11888 $at_diff expout "$at_stdout" || at_failed=:
   11889 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:601"
   11890 $at_failed && at_fn_log_failure
   11891 $at_traceon; }
   11892 
   11893   rm -rf xml-tests expout
   11894   at_restore_special_files
   11895 fi
   11896 { set +x
   11897 $as_echo "$at_srcdir/named-refs.at:601: bison -o test.c test.y"
   11898 at_fn_check_prepare_trace "named-refs.at:601"
   11899 ( $at_check_trace; bison -o test.c test.y
   11900 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11901 at_status=$? at_failed=false
   11902 $at_check_filter
   11903 at_fn_diff_devnull "$at_stderr" || at_failed=:
   11904 at_fn_diff_devnull "$at_stdout" || at_failed=:
   11905 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:601"
   11906 $at_failed && at_fn_log_failure
   11907 $at_traceon; }
   11908 
   11909 
   11910   set +x
   11911   $at_times_p && times >"$at_times_file"
   11912 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   11913 read at_status <"$at_status_file"
   11914 #AT_STOP_48
   11915 #AT_START_49
   11916 at_fn_group_banner 49 'named-refs.at:606' \
   11917   "Unresolved references" "                          " 2
   11918 at_xfail=no
   11919 (
   11920   $as_echo "49. $at_setup_line: testing $at_desc ..."
   11921   $at_traceon
   11922 
   11923 cat >test.y <<'_ATEOF'
   11924 %code top {
   11925 #include <config.h>
   11926 /* We don't need perfect functions for these tests. */
   11927 #undef malloc
   11928 #undef memcmp
   11929 #undef realloc
   11930 }
   11931 
   11932 
   11933 %%
   11934 stat:
   11935   sym_a sym_b { func($sym.field); }
   11936 | sym_a sym_b { func($<aa>sym.field); }
   11937 | sym_a sym_b { func($[sym.field]); }
   11938 | sym_a sym_b { func($<aa>[sym.field]); }
   11939 | sym_a sym_b { func($sym); }
   11940 | sym_a sym_b { func($<aa>sym); }
   11941 | sym_a sym_b { func($[sym]); } sym_a sym_b { func($<aa>[sym]); }
   11942 ;
   11943 
   11944 stat1:
   11945   sym_a sym_b { func($sym-field); }
   11946 | sym_a sym_b { func($<aa>sym-field); }
   11947 | sym_a sym_b { func($[sym-field]); }
   11948 | sym_a sym_b { func($<aa>[sym-field]); }
   11949 | sym_a sym_b { func($sym); }
   11950 | sym_a sym_b { func($<aa>sym); }
   11951 | sym_a sym_b { func($[sym]); } sym_a sym_b { func($<aa>[sym]); }
   11952 ;
   11953 
   11954 sym_a: 'a';
   11955 sym_b: 'b';
   11956 _ATEOF
   11957 
   11958 
   11959 
   11960 { set +x
   11961 $as_echo "$at_srcdir/named-refs.at:633: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y"
   11962 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o test.c test.y" "named-refs.at:633"
   11963 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o test.c test.y
   11964 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   11965 at_status=$? at_failed=false
   11966 $at_check_filter
   11967 echo >>"$at_stderr"; $as_echo "test.y:12.22-31: error: invalid reference: '\$sym.field'
   11968 test.y:12.3-35:      symbol not found in production: sym
   11969 test.y:13.22-35: error: invalid reference: '\$<aa>sym.field'
   11970 test.y:13.3-39:      symbol not found in production: sym
   11971 test.y:14.22-33: error: invalid reference: '\$[sym.field]'
   11972 test.y:14.3-37:      symbol not found in production: sym.field
   11973 test.y:15.22-37: error: invalid reference: '\$<aa>[sym.field]'
   11974 test.y:15.3-41:      symbol not found in production: sym.field
   11975 test.y:16.22-25: error: invalid reference: '\$sym'
   11976 test.y:16.3-29:      symbol not found in production: sym
   11977 test.y:17.22-29: error: invalid reference: '\$<aa>sym'
   11978 test.y:17.3-33:      symbol not found in production: sym
   11979 test.y:18.22-27: error: invalid reference: '\$[sym]'
   11980 test.y:18.3-65:      symbol not found in production before \$3: sym
   11981 test.y:18.52-61: error: invalid reference: '\$<aa>[sym]'
   11982 test.y:18.3-65:      symbol not found in production: sym
   11983 test.y:22.22-31: error: invalid reference: '\$sym-field'
   11984 test.y:22.3-35:      symbol not found in production: sym
   11985 test.y:23.22-35: error: invalid reference: '\$<aa>sym-field'
   11986 test.y:23.3-39:      symbol not found in production: sym
   11987 test.y:24.22-33: error: invalid reference: '\$[sym-field]'
   11988 test.y:24.3-37:      symbol not found in production: sym-field
   11989 test.y:25.22-37: error: invalid reference: '\$<aa>[sym-field]'
   11990 test.y:25.3-41:      symbol not found in production: sym-field
   11991 test.y:26.22-25: error: invalid reference: '\$sym'
   11992 test.y:26.3-29:      symbol not found in production: sym
   11993 test.y:27.22-29: error: invalid reference: '\$<aa>sym'
   11994 test.y:27.3-33:      symbol not found in production: sym
   11995 test.y:28.22-27: error: invalid reference: '\$[sym]'
   11996 test.y:28.3-65:      symbol not found in production before \$3: sym
   11997 test.y:28.52-61: error: invalid reference: '\$<aa>[sym]'
   11998 test.y:28.3-65:      symbol not found in production: sym
   11999 " | \
   12000   $at_diff - "$at_stderr" || at_failed=:
   12001 at_fn_diff_devnull "$at_stdout" || at_failed=:
   12002 at_fn_check_status 1 $at_status "$at_srcdir/named-refs.at:633"
   12003 $at_failed && at_fn_log_failure
   12004 $at_traceon; }
   12005 
   12006 
   12007   set +x
   12008   $at_times_p && times >"$at_times_file"
   12009 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   12010 read at_status <"$at_status_file"
   12011 #AT_STOP_49
   12012 #AT_START_50
   12013 at_fn_group_banner 50 'named-refs.at:671' \
   12014   "\$ or @ followed by . or -" "                      " 2
   12015 at_xfail=no
   12016 (
   12017   $as_echo "50. $at_setup_line: testing $at_desc ..."
   12018   $at_traceon
   12019 
   12020 cat >test.y <<'_ATEOF'
   12021 
   12022 %%
   12023 start:
   12024   .field { $.field; }
   12025 | 'a'    { @.field; }
   12026 ;
   12027 .field: ;
   12028 _ATEOF
   12029 
   12030 
   12031 { set +x
   12032 $as_echo "$at_srcdir/named-refs.at:681: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison test.y"
   12033 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison test.y" "named-refs.at:681"
   12034 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison test.y
   12035 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12036 at_status=$? at_failed=false
   12037 $at_check_filter
   12038 echo >>"$at_stderr"; $as_echo "test.y:4.12-18: error: invalid reference: '\$.field'
   12039 test.y:4.13:        syntax error after '\$', expecting integer, letter, '_', '[', or '\$'
   12040 test.y:4.3-8:       possibly meant: \$[.field] at \$1
   12041 test.y:5.12-18: error: invalid reference: '@.field'
   12042 test.y:5.13:        syntax error after '@', expecting integer, letter, '_', '[', or '\$'
   12043 " | \
   12044   $at_diff - "$at_stderr" || at_failed=:
   12045 at_fn_diff_devnull "$at_stdout" || at_failed=:
   12046 at_fn_check_status 1 $at_status "$at_srcdir/named-refs.at:681"
   12047 $at_failed && at_fn_log_failure
   12048 $at_traceon; }
   12049 
   12050 
   12051 cat >test.y <<'_ATEOF'
   12052 
   12053 %%
   12054 start:
   12055   'a' { $-field; }
   12056 | 'b' { @-field; }
   12057 ;
   12058 _ATEOF
   12059 
   12060 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   12061   at_save_special_files
   12062   mkdir xml-tests
   12063     # Don't combine these Bison invocations since we want to be sure that
   12064   # --report=all isn't required to get the full XML file.
   12065   { set +x
   12066 $as_echo "$at_srcdir/named-refs.at:696: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   12067                   --graph=xml-tests/test.dot test.y"
   12068 at_fn_check_prepare_notrace 'an embedded newline' "named-refs.at:696"
   12069 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   12070                   --graph=xml-tests/test.dot test.y
   12071 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12072 at_status=$? at_failed=false
   12073 $at_check_filter
   12074 echo stderr:; cat "$at_stderr"
   12075 echo stdout:; cat "$at_stdout"
   12076 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:696"
   12077 $at_failed && at_fn_log_failure
   12078 $at_traceon; }
   12079 
   12080   { set +x
   12081 $as_echo "$at_srcdir/named-refs.at:696: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml test.y"
   12082 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml test.y" "named-refs.at:696"
   12083 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml test.y
   12084 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12085 at_status=$? at_failed=false
   12086 $at_check_filter
   12087 echo stderr:; cat "$at_stderr"
   12088 echo stdout:; cat "$at_stdout"
   12089 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:696"
   12090 $at_failed && at_fn_log_failure
   12091 $at_traceon; }
   12092 
   12093     cp xml-tests/test.output expout
   12094   { set +x
   12095 $as_echo "$at_srcdir/named-refs.at:696: \$XSLTPROC \\
   12096              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   12097              xml-tests/test.xml"
   12098 at_fn_check_prepare_notrace 'a `...` command substitution' "named-refs.at:696"
   12099 ( $at_check_trace; $XSLTPROC \
   12100              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   12101              xml-tests/test.xml
   12102 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12103 at_status=$? at_failed=false
   12104 $at_check_filter
   12105 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12106 $at_diff expout "$at_stdout" || at_failed=:
   12107 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:696"
   12108 $at_failed && at_fn_log_failure
   12109 $at_traceon; }
   12110 
   12111   sort xml-tests/test.dot > expout
   12112   { set +x
   12113 $as_echo "$at_srcdir/named-refs.at:696: \$XSLTPROC \\
   12114              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   12115              xml-tests/test.xml | sort"
   12116 at_fn_check_prepare_notrace 'a `...` command substitution' "named-refs.at:696"
   12117 ( $at_check_trace; $XSLTPROC \
   12118              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   12119              xml-tests/test.xml | sort
   12120 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12121 at_status=$? at_failed=false
   12122 $at_check_filter
   12123 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12124 $at_diff expout "$at_stdout" || at_failed=:
   12125 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:696"
   12126 $at_failed && at_fn_log_failure
   12127 $at_traceon; }
   12128 
   12129   rm -rf xml-tests expout
   12130   at_restore_special_files
   12131 fi
   12132 { set +x
   12133 $as_echo "$at_srcdir/named-refs.at:696: bison test.y"
   12134 at_fn_check_prepare_trace "named-refs.at:696"
   12135 ( $at_check_trace; bison test.y
   12136 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12137 at_status=$? at_failed=false
   12138 $at_check_filter
   12139 echo >>"$at_stderr"; $as_echo "test.y:4.9: warning: stray '\$'
   12140 test.y:5.9: warning: stray '@'
   12141 " | \
   12142   $at_diff - "$at_stderr" || at_failed=:
   12143 at_fn_diff_devnull "$at_stdout" || at_failed=:
   12144 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:696"
   12145 $at_failed && at_fn_log_failure
   12146 $at_traceon; }
   12147 
   12148 # Defining POSIXLY_CORRECT causes bison to complain if options are
   12149 # added after the grammar file name, so skip these checks in that
   12150 # case.
   12151 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   12152   at_save_special_files
   12153 
   12154   # To avoid expanding it repeatedly, store specified stdout.
   12155   : >expout
   12156 
   12157   # Run with -Werror.
   12158   { set +x
   12159 $as_echo "$at_srcdir/named-refs.at:696: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison test.y -Werror"
   12160 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison test.y -Werror" "named-refs.at:696"
   12161 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison test.y -Werror
   12162 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12163 at_status=$? at_failed=false
   12164 $at_check_filter
   12165 echo stderr:; tee stderr <"$at_stderr"
   12166 $at_diff expout "$at_stdout" || at_failed=:
   12167 at_fn_check_status 1 $at_status "$at_srcdir/named-refs.at:696"
   12168 $at_failed && at_fn_log_failure
   12169 $at_traceon; }
   12170 
   12171 
   12172   # Build expected stderr up to and including the "warnings being
   12173   # treated as errors" message.
   12174   cat >at-bison-check-warnings <<'_ATEOF'
   12175 test.y:4.9: warning: stray '$'
   12176 test.y:5.9: warning: stray '@'
   12177 _ATEOF
   12178 
   12179   at_bison_check_first=`sed -n \
   12180     '/: warning: /{=;q;}' at-bison-check-warnings`
   12181   : ${at_bison_check_first:=1}
   12182   at_bison_check_first_tmp=`sed -n \
   12183     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   12184   : ${at_bison_check_first_tmp:=1}
   12185   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   12186     at_bison_check_first=$at_bison_check_first_tmp
   12187   fi
   12188   if test $at_bison_check_first -gt 1; then
   12189     sed -n "1,`expr $at_bison_check_first - 1`"p \
   12190       at-bison-check-warnings > experr
   12191   fi
   12192   echo 'bison: warnings being treated as errors' >> experr
   12193 
   12194   # Finish building expected stderr and check.  Unlike warnings,
   12195   # complaints cause bison to exit early.  Thus, with -Werror, bison
   12196   # does not necessarily report all warnings that it does without
   12197   # -Werror, but it at least reports one.
   12198   at_bison_check_last=`sed -n '$=' stderr`
   12199   : ${at_bison_check_last:=1}
   12200   at_bison_check_last=`expr $at_bison_check_last - 1`
   12201   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   12202     at-bison-check-warnings >> experr
   12203   { set +x
   12204 $as_echo "$at_srcdir/named-refs.at:696: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   12205               stderr 1>&2"
   12206 at_fn_check_prepare_notrace 'an embedded newline' "named-refs.at:696"
   12207 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   12208               stderr 1>&2
   12209 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12210 at_status=$? at_failed=false
   12211 $at_check_filter
   12212 $at_diff experr "$at_stderr" || at_failed=:
   12213 at_fn_diff_devnull "$at_stdout" || at_failed=:
   12214 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:696"
   12215 $at_failed && at_fn_log_failure
   12216 $at_traceon; }
   12217 
   12218 
   12219   # Now check --warnings=error.
   12220   cp stderr experr
   12221   { set +x
   12222 $as_echo "$at_srcdir/named-refs.at:696: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison test.y --warnings=error"
   12223 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison test.y --warnings=error" "named-refs.at:696"
   12224 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison test.y --warnings=error
   12225 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12226 at_status=$? at_failed=false
   12227 $at_check_filter
   12228 $at_diff experr "$at_stderr" || at_failed=:
   12229 $at_diff expout "$at_stdout" || at_failed=:
   12230 at_fn_check_status 1 $at_status "$at_srcdir/named-refs.at:696"
   12231 $at_failed && at_fn_log_failure
   12232 $at_traceon; }
   12233 
   12234 
   12235   # Now check -Wnone and --warnings=none by making sure that
   12236   # -Werror doesn't change the exit status when -Wnone or
   12237   # --warnings=none is specified.
   12238   { set +x
   12239 $as_echo "$at_srcdir/named-refs.at:696: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison test.y -Wnone -Werror"
   12240 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison test.y -Wnone -Werror" "named-refs.at:696"
   12241 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison test.y -Wnone -Werror
   12242 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12243 at_status=$? at_failed=false
   12244 $at_check_filter
   12245 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12246 $at_diff expout "$at_stdout" || at_failed=:
   12247 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:696"
   12248 $at_failed && at_fn_log_failure
   12249 $at_traceon; }
   12250 
   12251   { set +x
   12252 $as_echo "$at_srcdir/named-refs.at:696: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison test.y --warnings=none -Werror"
   12253 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison test.y --warnings=none -Werror" "named-refs.at:696"
   12254 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison test.y --warnings=none -Werror
   12255 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12256 at_status=$? at_failed=false
   12257 $at_check_filter
   12258 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12259 $at_diff expout "$at_stdout" || at_failed=:
   12260 at_fn_check_status 0 $at_status "$at_srcdir/named-refs.at:696"
   12261 $at_failed && at_fn_log_failure
   12262 $at_traceon; }
   12263 
   12264 
   12265   at_restore_special_files
   12266 fi
   12267   set +x
   12268   $at_times_p && times >"$at_times_file"
   12269 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   12270 read at_status <"$at_status_file"
   12271 #AT_STOP_50
   12272 #AT_START_51
   12273 at_fn_group_banner 51 'output.at:44' \
   12274   "Output files:  -dv " "                            " 3
   12275 at_xfail=no
   12276 (
   12277   $as_echo "51. $at_setup_line: testing $at_desc ..."
   12278   $at_traceon
   12279 
   12280 
   12281 for file in foo.y foo.output foo.tab.c foo.tab.h; do
   12282   case "$file" in
   12283     */*) mkdir -p `echo "$file" | sed 's,/.*,,'`;;
   12284   esac
   12285 done
   12286 cat >foo.y <<'_ATEOF'
   12287 
   12288 %%
   12289 foo: {};
   12290 _ATEOF
   12291 
   12292 
   12293 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   12294   at_save_special_files
   12295   mkdir xml-tests
   12296     # Don't combine these Bison invocations since we want to be sure that
   12297   # --report=all isn't required to get the full XML file.
   12298   { set +x
   12299 $as_echo "$at_srcdir/output.at:44: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   12300                   --graph=xml-tests/test.dot -dv foo.y "
   12301 at_fn_check_prepare_notrace 'an embedded newline' "output.at:44"
   12302 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   12303                   --graph=xml-tests/test.dot -dv foo.y
   12304 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12305 at_status=$? at_failed=false
   12306 $at_check_filter
   12307 echo stderr:; cat "$at_stderr"
   12308 echo stdout:; cat "$at_stdout"
   12309 at_fn_check_status 0 $at_status "$at_srcdir/output.at:44"
   12310 $at_failed && at_fn_log_failure
   12311 $at_traceon; }
   12312 
   12313   { set +x
   12314 $as_echo "$at_srcdir/output.at:44: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -dv foo.y "
   12315 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -dv foo.y " "output.at:44"
   12316 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -dv foo.y
   12317 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12318 at_status=$? at_failed=false
   12319 $at_check_filter
   12320 echo stderr:; cat "$at_stderr"
   12321 echo stdout:; cat "$at_stdout"
   12322 at_fn_check_status 0 $at_status "$at_srcdir/output.at:44"
   12323 $at_failed && at_fn_log_failure
   12324 $at_traceon; }
   12325 
   12326     cp xml-tests/test.output expout
   12327   { set +x
   12328 $as_echo "$at_srcdir/output.at:44: \$XSLTPROC \\
   12329              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   12330              xml-tests/test.xml"
   12331 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:44"
   12332 ( $at_check_trace; $XSLTPROC \
   12333              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   12334              xml-tests/test.xml
   12335 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12336 at_status=$? at_failed=false
   12337 $at_check_filter
   12338 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12339 $at_diff expout "$at_stdout" || at_failed=:
   12340 at_fn_check_status 0 $at_status "$at_srcdir/output.at:44"
   12341 $at_failed && at_fn_log_failure
   12342 $at_traceon; }
   12343 
   12344   sort xml-tests/test.dot > expout
   12345   { set +x
   12346 $as_echo "$at_srcdir/output.at:44: \$XSLTPROC \\
   12347              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   12348              xml-tests/test.xml | sort"
   12349 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:44"
   12350 ( $at_check_trace; $XSLTPROC \
   12351              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   12352              xml-tests/test.xml | sort
   12353 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12354 at_status=$? at_failed=false
   12355 $at_check_filter
   12356 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12357 $at_diff expout "$at_stdout" || at_failed=:
   12358 at_fn_check_status 0 $at_status "$at_srcdir/output.at:44"
   12359 $at_failed && at_fn_log_failure
   12360 $at_traceon; }
   12361 
   12362   rm -rf xml-tests expout
   12363   at_restore_special_files
   12364 fi
   12365 { set +x
   12366 $as_echo "$at_srcdir/output.at:44: bison -dv foo.y "
   12367 at_fn_check_prepare_trace "output.at:44"
   12368 ( $at_check_trace; bison -dv foo.y
   12369 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12370 at_status=$? at_failed=false
   12371 $at_check_filter
   12372 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12373 at_fn_diff_devnull "$at_stdout" || at_failed=:
   12374 at_fn_check_status 0 $at_status "$at_srcdir/output.at:44"
   12375 $at_failed && at_fn_log_failure
   12376 $at_traceon; }
   12377 
   12378 
   12379 { set +x
   12380 $as_echo "$at_srcdir/output.at:44: ls foo.output foo.tab.c foo.tab.h"
   12381 at_fn_check_prepare_trace "output.at:44"
   12382 ( $at_check_trace; ls foo.output foo.tab.c foo.tab.h
   12383 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12384 at_status=$? at_failed=false
   12385 $at_check_filter
   12386 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12387 echo stdout:; cat "$at_stdout"
   12388 at_fn_check_status 0 $at_status "$at_srcdir/output.at:44"
   12389 $at_failed && at_fn_log_failure
   12390 $at_traceon; }
   12391 
   12392 
   12393   set +x
   12394   $at_times_p && times >"$at_times_file"
   12395 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   12396 read at_status <"$at_status_file"
   12397 #AT_STOP_51
   12398 #AT_START_52
   12399 at_fn_group_banner 52 'output.at:50' \
   12400   "Output files:  -dv >&-" "                         " 3
   12401 at_xfail=no
   12402 (
   12403   $as_echo "52. $at_setup_line: testing $at_desc ..."
   12404   $at_traceon
   12405 
   12406 { set +x
   12407 $as_echo "$at_srcdir/output.at:50: case \"\$PREBISON\" in *valgrind*) exit 77;; esac"
   12408 at_fn_check_prepare_dynamic "case \"$PREBISON\" in *valgrind*) exit 77;; esac" "output.at:50"
   12409 ( $at_check_trace; case "$PREBISON" in *valgrind*) exit 77;; esac
   12410 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12411 at_status=$? at_failed=false
   12412 $at_check_filter
   12413 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12414 at_fn_diff_devnull "$at_stdout" || at_failed=:
   12415 at_fn_check_status 0 $at_status "$at_srcdir/output.at:50"
   12416 $at_failed && at_fn_log_failure
   12417 $at_traceon; }
   12418 
   12419 for file in foo.y foo.output foo.tab.c foo.tab.h; do
   12420   case "$file" in
   12421     */*) mkdir -p `echo "$file" | sed 's,/.*,,'`;;
   12422   esac
   12423 done
   12424 cat >foo.y <<'_ATEOF'
   12425 
   12426 %%
   12427 foo: {};
   12428 _ATEOF
   12429 
   12430 
   12431 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   12432   at_save_special_files
   12433   mkdir xml-tests
   12434     # Don't combine these Bison invocations since we want to be sure that
   12435   # --report=all isn't required to get the full XML file.
   12436   { set +x
   12437 $as_echo "$at_srcdir/output.at:50: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   12438                   --graph=xml-tests/test.dot -dv foo.y >&-"
   12439 at_fn_check_prepare_notrace 'an embedded newline' "output.at:50"
   12440 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   12441                   --graph=xml-tests/test.dot -dv foo.y >&-
   12442 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12443 at_status=$? at_failed=false
   12444 $at_check_filter
   12445 echo stderr:; cat "$at_stderr"
   12446 echo stdout:; cat "$at_stdout"
   12447 at_fn_check_status 0 $at_status "$at_srcdir/output.at:50"
   12448 $at_failed && at_fn_log_failure
   12449 $at_traceon; }
   12450 
   12451   { set +x
   12452 $as_echo "$at_srcdir/output.at:50: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -dv foo.y >&-"
   12453 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -dv foo.y >&-" "output.at:50"
   12454 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -dv foo.y >&-
   12455 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12456 at_status=$? at_failed=false
   12457 $at_check_filter
   12458 echo stderr:; cat "$at_stderr"
   12459 echo stdout:; cat "$at_stdout"
   12460 at_fn_check_status 0 $at_status "$at_srcdir/output.at:50"
   12461 $at_failed && at_fn_log_failure
   12462 $at_traceon; }
   12463 
   12464     cp xml-tests/test.output expout
   12465   { set +x
   12466 $as_echo "$at_srcdir/output.at:50: \$XSLTPROC \\
   12467              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   12468              xml-tests/test.xml"
   12469 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:50"
   12470 ( $at_check_trace; $XSLTPROC \
   12471              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   12472              xml-tests/test.xml
   12473 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12474 at_status=$? at_failed=false
   12475 $at_check_filter
   12476 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12477 $at_diff expout "$at_stdout" || at_failed=:
   12478 at_fn_check_status 0 $at_status "$at_srcdir/output.at:50"
   12479 $at_failed && at_fn_log_failure
   12480 $at_traceon; }
   12481 
   12482   sort xml-tests/test.dot > expout
   12483   { set +x
   12484 $as_echo "$at_srcdir/output.at:50: \$XSLTPROC \\
   12485              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   12486              xml-tests/test.xml | sort"
   12487 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:50"
   12488 ( $at_check_trace; $XSLTPROC \
   12489              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   12490              xml-tests/test.xml | sort
   12491 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12492 at_status=$? at_failed=false
   12493 $at_check_filter
   12494 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12495 $at_diff expout "$at_stdout" || at_failed=:
   12496 at_fn_check_status 0 $at_status "$at_srcdir/output.at:50"
   12497 $at_failed && at_fn_log_failure
   12498 $at_traceon; }
   12499 
   12500   rm -rf xml-tests expout
   12501   at_restore_special_files
   12502 fi
   12503 { set +x
   12504 $as_echo "$at_srcdir/output.at:50: bison -dv foo.y >&-"
   12505 at_fn_check_prepare_trace "output.at:50"
   12506 ( $at_check_trace; bison -dv foo.y >&-
   12507 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12508 at_status=$? at_failed=false
   12509 $at_check_filter
   12510 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12511 at_fn_diff_devnull "$at_stdout" || at_failed=:
   12512 at_fn_check_status 0 $at_status "$at_srcdir/output.at:50"
   12513 $at_failed && at_fn_log_failure
   12514 $at_traceon; }
   12515 
   12516 
   12517 { set +x
   12518 $as_echo "$at_srcdir/output.at:50: ls foo.output foo.tab.c foo.tab.h"
   12519 at_fn_check_prepare_trace "output.at:50"
   12520 ( $at_check_trace; ls foo.output foo.tab.c foo.tab.h
   12521 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12522 at_status=$? at_failed=false
   12523 $at_check_filter
   12524 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12525 echo stdout:; cat "$at_stdout"
   12526 at_fn_check_status 0 $at_status "$at_srcdir/output.at:50"
   12527 $at_failed && at_fn_log_failure
   12528 $at_traceon; }
   12529 
   12530 
   12531   set +x
   12532   $at_times_p && times >"$at_times_file"
   12533 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   12534 read at_status <"$at_status_file"
   12535 #AT_STOP_52
   12536 #AT_START_53
   12537 at_fn_group_banner 53 'output.at:55' \
   12538   "Output files:  -dv -o foo.c " "                   " 3
   12539 at_xfail=no
   12540 (
   12541   $as_echo "53. $at_setup_line: testing $at_desc ..."
   12542   $at_traceon
   12543 
   12544 
   12545 for file in foo.y foo.c foo.h foo.output; do
   12546   case "$file" in
   12547     */*) mkdir -p `echo "$file" | sed 's,/.*,,'`;;
   12548   esac
   12549 done
   12550 cat >foo.y <<'_ATEOF'
   12551 
   12552 %%
   12553 foo: {};
   12554 _ATEOF
   12555 
   12556 
   12557 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   12558   at_save_special_files
   12559   mkdir xml-tests
   12560     # Don't combine these Bison invocations since we want to be sure that
   12561   # --report=all isn't required to get the full XML file.
   12562   { set +x
   12563 $as_echo "$at_srcdir/output.at:55: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   12564                   --graph=xml-tests/test.dot -dv -o foo.c foo.y "
   12565 at_fn_check_prepare_notrace 'an embedded newline' "output.at:55"
   12566 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   12567                   --graph=xml-tests/test.dot -dv -o foo.c foo.y
   12568 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12569 at_status=$? at_failed=false
   12570 $at_check_filter
   12571 echo stderr:; cat "$at_stderr"
   12572 echo stdout:; cat "$at_stdout"
   12573 at_fn_check_status 0 $at_status "$at_srcdir/output.at:55"
   12574 $at_failed && at_fn_log_failure
   12575 $at_traceon; }
   12576 
   12577   { set +x
   12578 $as_echo "$at_srcdir/output.at:55: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -dv -o foo.c foo.y "
   12579 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -dv -o foo.c foo.y " "output.at:55"
   12580 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -dv -o foo.c foo.y
   12581 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12582 at_status=$? at_failed=false
   12583 $at_check_filter
   12584 echo stderr:; cat "$at_stderr"
   12585 echo stdout:; cat "$at_stdout"
   12586 at_fn_check_status 0 $at_status "$at_srcdir/output.at:55"
   12587 $at_failed && at_fn_log_failure
   12588 $at_traceon; }
   12589 
   12590     cp xml-tests/test.output expout
   12591   { set +x
   12592 $as_echo "$at_srcdir/output.at:55: \$XSLTPROC \\
   12593              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   12594              xml-tests/test.xml"
   12595 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:55"
   12596 ( $at_check_trace; $XSLTPROC \
   12597              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   12598              xml-tests/test.xml
   12599 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12600 at_status=$? at_failed=false
   12601 $at_check_filter
   12602 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12603 $at_diff expout "$at_stdout" || at_failed=:
   12604 at_fn_check_status 0 $at_status "$at_srcdir/output.at:55"
   12605 $at_failed && at_fn_log_failure
   12606 $at_traceon; }
   12607 
   12608   sort xml-tests/test.dot > expout
   12609   { set +x
   12610 $as_echo "$at_srcdir/output.at:55: \$XSLTPROC \\
   12611              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   12612              xml-tests/test.xml | sort"
   12613 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:55"
   12614 ( $at_check_trace; $XSLTPROC \
   12615              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   12616              xml-tests/test.xml | sort
   12617 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12618 at_status=$? at_failed=false
   12619 $at_check_filter
   12620 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12621 $at_diff expout "$at_stdout" || at_failed=:
   12622 at_fn_check_status 0 $at_status "$at_srcdir/output.at:55"
   12623 $at_failed && at_fn_log_failure
   12624 $at_traceon; }
   12625 
   12626   rm -rf xml-tests expout
   12627   at_restore_special_files
   12628 fi
   12629 { set +x
   12630 $as_echo "$at_srcdir/output.at:55: bison -dv -o foo.c foo.y "
   12631 at_fn_check_prepare_trace "output.at:55"
   12632 ( $at_check_trace; bison -dv -o foo.c foo.y
   12633 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12634 at_status=$? at_failed=false
   12635 $at_check_filter
   12636 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12637 at_fn_diff_devnull "$at_stdout" || at_failed=:
   12638 at_fn_check_status 0 $at_status "$at_srcdir/output.at:55"
   12639 $at_failed && at_fn_log_failure
   12640 $at_traceon; }
   12641 
   12642 
   12643 { set +x
   12644 $as_echo "$at_srcdir/output.at:55: ls foo.c foo.h foo.output"
   12645 at_fn_check_prepare_trace "output.at:55"
   12646 ( $at_check_trace; ls foo.c foo.h foo.output
   12647 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12648 at_status=$? at_failed=false
   12649 $at_check_filter
   12650 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12651 echo stdout:; cat "$at_stdout"
   12652 at_fn_check_status 0 $at_status "$at_srcdir/output.at:55"
   12653 $at_failed && at_fn_log_failure
   12654 $at_traceon; }
   12655 
   12656 
   12657   set +x
   12658   $at_times_p && times >"$at_times_file"
   12659 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   12660 read at_status <"$at_status_file"
   12661 #AT_STOP_53
   12662 #AT_START_54
   12663 at_fn_group_banner 54 'output.at:57' \
   12664   "Output files:  -dv -o foo.tab.c " "               " 3
   12665 at_xfail=no
   12666 (
   12667   $as_echo "54. $at_setup_line: testing $at_desc ..."
   12668   $at_traceon
   12669 
   12670 
   12671 for file in foo.y foo.output foo.tab.c foo.tab.h; do
   12672   case "$file" in
   12673     */*) mkdir -p `echo "$file" | sed 's,/.*,,'`;;
   12674   esac
   12675 done
   12676 cat >foo.y <<'_ATEOF'
   12677 
   12678 %%
   12679 foo: {};
   12680 _ATEOF
   12681 
   12682 
   12683 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   12684   at_save_special_files
   12685   mkdir xml-tests
   12686     # Don't combine these Bison invocations since we want to be sure that
   12687   # --report=all isn't required to get the full XML file.
   12688   { set +x
   12689 $as_echo "$at_srcdir/output.at:57: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   12690                   --graph=xml-tests/test.dot -dv -o foo.tab.c foo.y "
   12691 at_fn_check_prepare_notrace 'an embedded newline' "output.at:57"
   12692 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   12693                   --graph=xml-tests/test.dot -dv -o foo.tab.c foo.y
   12694 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12695 at_status=$? at_failed=false
   12696 $at_check_filter
   12697 echo stderr:; cat "$at_stderr"
   12698 echo stdout:; cat "$at_stdout"
   12699 at_fn_check_status 0 $at_status "$at_srcdir/output.at:57"
   12700 $at_failed && at_fn_log_failure
   12701 $at_traceon; }
   12702 
   12703   { set +x
   12704 $as_echo "$at_srcdir/output.at:57: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -dv -o foo.tab.c foo.y "
   12705 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -dv -o foo.tab.c foo.y " "output.at:57"
   12706 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -dv -o foo.tab.c foo.y
   12707 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12708 at_status=$? at_failed=false
   12709 $at_check_filter
   12710 echo stderr:; cat "$at_stderr"
   12711 echo stdout:; cat "$at_stdout"
   12712 at_fn_check_status 0 $at_status "$at_srcdir/output.at:57"
   12713 $at_failed && at_fn_log_failure
   12714 $at_traceon; }
   12715 
   12716     cp xml-tests/test.output expout
   12717   { set +x
   12718 $as_echo "$at_srcdir/output.at:57: \$XSLTPROC \\
   12719              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   12720              xml-tests/test.xml"
   12721 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:57"
   12722 ( $at_check_trace; $XSLTPROC \
   12723              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   12724              xml-tests/test.xml
   12725 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12726 at_status=$? at_failed=false
   12727 $at_check_filter
   12728 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12729 $at_diff expout "$at_stdout" || at_failed=:
   12730 at_fn_check_status 0 $at_status "$at_srcdir/output.at:57"
   12731 $at_failed && at_fn_log_failure
   12732 $at_traceon; }
   12733 
   12734   sort xml-tests/test.dot > expout
   12735   { set +x
   12736 $as_echo "$at_srcdir/output.at:57: \$XSLTPROC \\
   12737              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   12738              xml-tests/test.xml | sort"
   12739 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:57"
   12740 ( $at_check_trace; $XSLTPROC \
   12741              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   12742              xml-tests/test.xml | sort
   12743 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12744 at_status=$? at_failed=false
   12745 $at_check_filter
   12746 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12747 $at_diff expout "$at_stdout" || at_failed=:
   12748 at_fn_check_status 0 $at_status "$at_srcdir/output.at:57"
   12749 $at_failed && at_fn_log_failure
   12750 $at_traceon; }
   12751 
   12752   rm -rf xml-tests expout
   12753   at_restore_special_files
   12754 fi
   12755 { set +x
   12756 $as_echo "$at_srcdir/output.at:57: bison -dv -o foo.tab.c foo.y "
   12757 at_fn_check_prepare_trace "output.at:57"
   12758 ( $at_check_trace; bison -dv -o foo.tab.c foo.y
   12759 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12760 at_status=$? at_failed=false
   12761 $at_check_filter
   12762 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12763 at_fn_diff_devnull "$at_stdout" || at_failed=:
   12764 at_fn_check_status 0 $at_status "$at_srcdir/output.at:57"
   12765 $at_failed && at_fn_log_failure
   12766 $at_traceon; }
   12767 
   12768 
   12769 { set +x
   12770 $as_echo "$at_srcdir/output.at:57: ls foo.output foo.tab.c foo.tab.h"
   12771 at_fn_check_prepare_trace "output.at:57"
   12772 ( $at_check_trace; ls foo.output foo.tab.c foo.tab.h
   12773 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12774 at_status=$? at_failed=false
   12775 $at_check_filter
   12776 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12777 echo stdout:; cat "$at_stdout"
   12778 at_fn_check_status 0 $at_status "$at_srcdir/output.at:57"
   12779 $at_failed && at_fn_log_failure
   12780 $at_traceon; }
   12781 
   12782 
   12783   set +x
   12784   $at_times_p && times >"$at_times_file"
   12785 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   12786 read at_status <"$at_status_file"
   12787 #AT_STOP_54
   12788 #AT_START_55
   12789 at_fn_group_banner 55 'output.at:59' \
   12790   "Output files:  -dv -y " "                         " 3
   12791 at_xfail=no
   12792 (
   12793   $as_echo "55. $at_setup_line: testing $at_desc ..."
   12794   $at_traceon
   12795 
   12796 
   12797 for file in foo.y y.output y.tab.c y.tab.h; do
   12798   case "$file" in
   12799     */*) mkdir -p `echo "$file" | sed 's,/.*,,'`;;
   12800   esac
   12801 done
   12802 cat >foo.y <<'_ATEOF'
   12803 
   12804 %%
   12805 foo: {};
   12806 _ATEOF
   12807 
   12808 
   12809 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   12810   at_save_special_files
   12811   mkdir xml-tests
   12812     # Don't combine these Bison invocations since we want to be sure that
   12813   # --report=all isn't required to get the full XML file.
   12814   { set +x
   12815 $as_echo "$at_srcdir/output.at:59: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   12816                   --graph=xml-tests/test.dot -dv -y foo.y "
   12817 at_fn_check_prepare_notrace 'an embedded newline' "output.at:59"
   12818 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   12819                   --graph=xml-tests/test.dot -dv -y foo.y
   12820 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12821 at_status=$? at_failed=false
   12822 $at_check_filter
   12823 echo stderr:; cat "$at_stderr"
   12824 echo stdout:; cat "$at_stdout"
   12825 at_fn_check_status 0 $at_status "$at_srcdir/output.at:59"
   12826 $at_failed && at_fn_log_failure
   12827 $at_traceon; }
   12828 
   12829   { set +x
   12830 $as_echo "$at_srcdir/output.at:59: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -dv -y foo.y "
   12831 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -dv -y foo.y " "output.at:59"
   12832 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -dv -y foo.y
   12833 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12834 at_status=$? at_failed=false
   12835 $at_check_filter
   12836 echo stderr:; cat "$at_stderr"
   12837 echo stdout:; cat "$at_stdout"
   12838 at_fn_check_status 0 $at_status "$at_srcdir/output.at:59"
   12839 $at_failed && at_fn_log_failure
   12840 $at_traceon; }
   12841 
   12842     cp xml-tests/test.output expout
   12843   { set +x
   12844 $as_echo "$at_srcdir/output.at:59: \$XSLTPROC \\
   12845              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   12846              xml-tests/test.xml"
   12847 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:59"
   12848 ( $at_check_trace; $XSLTPROC \
   12849              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   12850              xml-tests/test.xml
   12851 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12852 at_status=$? at_failed=false
   12853 $at_check_filter
   12854 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12855 $at_diff expout "$at_stdout" || at_failed=:
   12856 at_fn_check_status 0 $at_status "$at_srcdir/output.at:59"
   12857 $at_failed && at_fn_log_failure
   12858 $at_traceon; }
   12859 
   12860   sort xml-tests/test.dot > expout
   12861   { set +x
   12862 $as_echo "$at_srcdir/output.at:59: \$XSLTPROC \\
   12863              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   12864              xml-tests/test.xml | sort"
   12865 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:59"
   12866 ( $at_check_trace; $XSLTPROC \
   12867              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   12868              xml-tests/test.xml | sort
   12869 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12870 at_status=$? at_failed=false
   12871 $at_check_filter
   12872 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12873 $at_diff expout "$at_stdout" || at_failed=:
   12874 at_fn_check_status 0 $at_status "$at_srcdir/output.at:59"
   12875 $at_failed && at_fn_log_failure
   12876 $at_traceon; }
   12877 
   12878   rm -rf xml-tests expout
   12879   at_restore_special_files
   12880 fi
   12881 { set +x
   12882 $as_echo "$at_srcdir/output.at:59: bison -dv -y foo.y "
   12883 at_fn_check_prepare_trace "output.at:59"
   12884 ( $at_check_trace; bison -dv -y foo.y
   12885 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12886 at_status=$? at_failed=false
   12887 $at_check_filter
   12888 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12889 at_fn_diff_devnull "$at_stdout" || at_failed=:
   12890 at_fn_check_status 0 $at_status "$at_srcdir/output.at:59"
   12891 $at_failed && at_fn_log_failure
   12892 $at_traceon; }
   12893 
   12894 
   12895 { set +x
   12896 $as_echo "$at_srcdir/output.at:59: ls y.output y.tab.c y.tab.h"
   12897 at_fn_check_prepare_trace "output.at:59"
   12898 ( $at_check_trace; ls y.output y.tab.c y.tab.h
   12899 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12900 at_status=$? at_failed=false
   12901 $at_check_filter
   12902 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12903 echo stdout:; cat "$at_stdout"
   12904 at_fn_check_status 0 $at_status "$at_srcdir/output.at:59"
   12905 $at_failed && at_fn_log_failure
   12906 $at_traceon; }
   12907 
   12908 
   12909   set +x
   12910   $at_times_p && times >"$at_times_file"
   12911 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   12912 read at_status <"$at_status_file"
   12913 #AT_STOP_55
   12914 #AT_START_56
   12915 at_fn_group_banner 56 'output.at:61' \
   12916   "Output files:  -dv -b bar " "                     " 3
   12917 at_xfail=no
   12918 (
   12919   $as_echo "56. $at_setup_line: testing $at_desc ..."
   12920   $at_traceon
   12921 
   12922 
   12923 for file in foo.y bar.output bar.tab.c bar.tab.h; do
   12924   case "$file" in
   12925     */*) mkdir -p `echo "$file" | sed 's,/.*,,'`;;
   12926   esac
   12927 done
   12928 cat >foo.y <<'_ATEOF'
   12929 
   12930 %%
   12931 foo: {};
   12932 _ATEOF
   12933 
   12934 
   12935 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   12936   at_save_special_files
   12937   mkdir xml-tests
   12938     # Don't combine these Bison invocations since we want to be sure that
   12939   # --report=all isn't required to get the full XML file.
   12940   { set +x
   12941 $as_echo "$at_srcdir/output.at:61: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   12942                   --graph=xml-tests/test.dot -dv -b bar foo.y "
   12943 at_fn_check_prepare_notrace 'an embedded newline' "output.at:61"
   12944 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   12945                   --graph=xml-tests/test.dot -dv -b bar foo.y
   12946 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12947 at_status=$? at_failed=false
   12948 $at_check_filter
   12949 echo stderr:; cat "$at_stderr"
   12950 echo stdout:; cat "$at_stdout"
   12951 at_fn_check_status 0 $at_status "$at_srcdir/output.at:61"
   12952 $at_failed && at_fn_log_failure
   12953 $at_traceon; }
   12954 
   12955   { set +x
   12956 $as_echo "$at_srcdir/output.at:61: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -dv -b bar foo.y "
   12957 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -dv -b bar foo.y " "output.at:61"
   12958 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -dv -b bar foo.y
   12959 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12960 at_status=$? at_failed=false
   12961 $at_check_filter
   12962 echo stderr:; cat "$at_stderr"
   12963 echo stdout:; cat "$at_stdout"
   12964 at_fn_check_status 0 $at_status "$at_srcdir/output.at:61"
   12965 $at_failed && at_fn_log_failure
   12966 $at_traceon; }
   12967 
   12968     cp xml-tests/test.output expout
   12969   { set +x
   12970 $as_echo "$at_srcdir/output.at:61: \$XSLTPROC \\
   12971              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   12972              xml-tests/test.xml"
   12973 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:61"
   12974 ( $at_check_trace; $XSLTPROC \
   12975              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   12976              xml-tests/test.xml
   12977 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12978 at_status=$? at_failed=false
   12979 $at_check_filter
   12980 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12981 $at_diff expout "$at_stdout" || at_failed=:
   12982 at_fn_check_status 0 $at_status "$at_srcdir/output.at:61"
   12983 $at_failed && at_fn_log_failure
   12984 $at_traceon; }
   12985 
   12986   sort xml-tests/test.dot > expout
   12987   { set +x
   12988 $as_echo "$at_srcdir/output.at:61: \$XSLTPROC \\
   12989              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   12990              xml-tests/test.xml | sort"
   12991 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:61"
   12992 ( $at_check_trace; $XSLTPROC \
   12993              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   12994              xml-tests/test.xml | sort
   12995 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   12996 at_status=$? at_failed=false
   12997 $at_check_filter
   12998 at_fn_diff_devnull "$at_stderr" || at_failed=:
   12999 $at_diff expout "$at_stdout" || at_failed=:
   13000 at_fn_check_status 0 $at_status "$at_srcdir/output.at:61"
   13001 $at_failed && at_fn_log_failure
   13002 $at_traceon; }
   13003 
   13004   rm -rf xml-tests expout
   13005   at_restore_special_files
   13006 fi
   13007 { set +x
   13008 $as_echo "$at_srcdir/output.at:61: bison -dv -b bar foo.y "
   13009 at_fn_check_prepare_trace "output.at:61"
   13010 ( $at_check_trace; bison -dv -b bar foo.y
   13011 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13012 at_status=$? at_failed=false
   13013 $at_check_filter
   13014 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13015 at_fn_diff_devnull "$at_stdout" || at_failed=:
   13016 at_fn_check_status 0 $at_status "$at_srcdir/output.at:61"
   13017 $at_failed && at_fn_log_failure
   13018 $at_traceon; }
   13019 
   13020 
   13021 { set +x
   13022 $as_echo "$at_srcdir/output.at:61: ls bar.output bar.tab.c bar.tab.h"
   13023 at_fn_check_prepare_trace "output.at:61"
   13024 ( $at_check_trace; ls bar.output bar.tab.c bar.tab.h
   13025 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13026 at_status=$? at_failed=false
   13027 $at_check_filter
   13028 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13029 echo stdout:; cat "$at_stdout"
   13030 at_fn_check_status 0 $at_status "$at_srcdir/output.at:61"
   13031 $at_failed && at_fn_log_failure
   13032 $at_traceon; }
   13033 
   13034 
   13035   set +x
   13036   $at_times_p && times >"$at_times_file"
   13037 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   13038 read at_status <"$at_status_file"
   13039 #AT_STOP_56
   13040 #AT_START_57
   13041 at_fn_group_banner 57 'output.at:63' \
   13042   "Output files:  -dv -g -o foo.c " "                " 3
   13043 at_xfail=no
   13044 (
   13045   $as_echo "57. $at_setup_line: testing $at_desc ..."
   13046   $at_traceon
   13047 
   13048 
   13049 for file in foo.y foo.c foo.dot foo.h foo.output; do
   13050   case "$file" in
   13051     */*) mkdir -p `echo "$file" | sed 's,/.*,,'`;;
   13052   esac
   13053 done
   13054 cat >foo.y <<'_ATEOF'
   13055 
   13056 %%
   13057 foo: {};
   13058 _ATEOF
   13059 
   13060 
   13061 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   13062   at_save_special_files
   13063   mkdir xml-tests
   13064     # Don't combine these Bison invocations since we want to be sure that
   13065   # --report=all isn't required to get the full XML file.
   13066   { set +x
   13067 $as_echo "$at_srcdir/output.at:63: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   13068                   --graph=xml-tests/test.dot -dv -g -o foo.c foo.y "
   13069 at_fn_check_prepare_notrace 'an embedded newline' "output.at:63"
   13070 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   13071                   --graph=xml-tests/test.dot -dv -g -o foo.c foo.y
   13072 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13073 at_status=$? at_failed=false
   13074 $at_check_filter
   13075 echo stderr:; cat "$at_stderr"
   13076 echo stdout:; cat "$at_stdout"
   13077 at_fn_check_status 0 $at_status "$at_srcdir/output.at:63"
   13078 $at_failed && at_fn_log_failure
   13079 $at_traceon; }
   13080 
   13081   { set +x
   13082 $as_echo "$at_srcdir/output.at:63: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -dv -g -o foo.c foo.y "
   13083 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -dv -g -o foo.c foo.y " "output.at:63"
   13084 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -dv -g -o foo.c foo.y
   13085 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13086 at_status=$? at_failed=false
   13087 $at_check_filter
   13088 echo stderr:; cat "$at_stderr"
   13089 echo stdout:; cat "$at_stdout"
   13090 at_fn_check_status 0 $at_status "$at_srcdir/output.at:63"
   13091 $at_failed && at_fn_log_failure
   13092 $at_traceon; }
   13093 
   13094     cp xml-tests/test.output expout
   13095   { set +x
   13096 $as_echo "$at_srcdir/output.at:63: \$XSLTPROC \\
   13097              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   13098              xml-tests/test.xml"
   13099 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:63"
   13100 ( $at_check_trace; $XSLTPROC \
   13101              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   13102              xml-tests/test.xml
   13103 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13104 at_status=$? at_failed=false
   13105 $at_check_filter
   13106 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13107 $at_diff expout "$at_stdout" || at_failed=:
   13108 at_fn_check_status 0 $at_status "$at_srcdir/output.at:63"
   13109 $at_failed && at_fn_log_failure
   13110 $at_traceon; }
   13111 
   13112   sort xml-tests/test.dot > expout
   13113   { set +x
   13114 $as_echo "$at_srcdir/output.at:63: \$XSLTPROC \\
   13115              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   13116              xml-tests/test.xml | sort"
   13117 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:63"
   13118 ( $at_check_trace; $XSLTPROC \
   13119              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   13120              xml-tests/test.xml | sort
   13121 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13122 at_status=$? at_failed=false
   13123 $at_check_filter
   13124 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13125 $at_diff expout "$at_stdout" || at_failed=:
   13126 at_fn_check_status 0 $at_status "$at_srcdir/output.at:63"
   13127 $at_failed && at_fn_log_failure
   13128 $at_traceon; }
   13129 
   13130   rm -rf xml-tests expout
   13131   at_restore_special_files
   13132 fi
   13133 { set +x
   13134 $as_echo "$at_srcdir/output.at:63: bison -dv -g -o foo.c foo.y "
   13135 at_fn_check_prepare_trace "output.at:63"
   13136 ( $at_check_trace; bison -dv -g -o foo.c foo.y
   13137 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13138 at_status=$? at_failed=false
   13139 $at_check_filter
   13140 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13141 at_fn_diff_devnull "$at_stdout" || at_failed=:
   13142 at_fn_check_status 0 $at_status "$at_srcdir/output.at:63"
   13143 $at_failed && at_fn_log_failure
   13144 $at_traceon; }
   13145 
   13146 
   13147 { set +x
   13148 $as_echo "$at_srcdir/output.at:63: ls foo.c foo.dot foo.h foo.output"
   13149 at_fn_check_prepare_trace "output.at:63"
   13150 ( $at_check_trace; ls foo.c foo.dot foo.h foo.output
   13151 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13152 at_status=$? at_failed=false
   13153 $at_check_filter
   13154 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13155 echo stdout:; cat "$at_stdout"
   13156 at_fn_check_status 0 $at_status "$at_srcdir/output.at:63"
   13157 $at_failed && at_fn_log_failure
   13158 $at_traceon; }
   13159 
   13160 
   13161   set +x
   13162   $at_times_p && times >"$at_times_file"
   13163 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   13164 read at_status <"$at_status_file"
   13165 #AT_STOP_57
   13166 #AT_START_58
   13167 at_fn_group_banner 58 'output.at:67' \
   13168   "Output files: %defines %verbose  " "              " 3
   13169 at_xfail=no
   13170 (
   13171   $as_echo "58. $at_setup_line: testing $at_desc ..."
   13172   $at_traceon
   13173 
   13174 
   13175 for file in foo.y foo.output foo.tab.c foo.tab.h; do
   13176   case "$file" in
   13177     */*) mkdir -p `echo "$file" | sed 's,/.*,,'`;;
   13178   esac
   13179 done
   13180 cat >foo.y <<'_ATEOF'
   13181 %defines %verbose
   13182 %%
   13183 foo: {};
   13184 _ATEOF
   13185 
   13186 
   13187 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   13188   at_save_special_files
   13189   mkdir xml-tests
   13190     # Don't combine these Bison invocations since we want to be sure that
   13191   # --report=all isn't required to get the full XML file.
   13192   { set +x
   13193 $as_echo "$at_srcdir/output.at:67: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   13194                   --graph=xml-tests/test.dot  foo.y "
   13195 at_fn_check_prepare_notrace 'an embedded newline' "output.at:67"
   13196 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   13197                   --graph=xml-tests/test.dot  foo.y
   13198 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13199 at_status=$? at_failed=false
   13200 $at_check_filter
   13201 echo stderr:; cat "$at_stderr"
   13202 echo stdout:; cat "$at_stdout"
   13203 at_fn_check_status 0 $at_status "$at_srcdir/output.at:67"
   13204 $at_failed && at_fn_log_failure
   13205 $at_traceon; }
   13206 
   13207   { set +x
   13208 $as_echo "$at_srcdir/output.at:67: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.y "
   13209 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.y " "output.at:67"
   13210 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.y
   13211 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13212 at_status=$? at_failed=false
   13213 $at_check_filter
   13214 echo stderr:; cat "$at_stderr"
   13215 echo stdout:; cat "$at_stdout"
   13216 at_fn_check_status 0 $at_status "$at_srcdir/output.at:67"
   13217 $at_failed && at_fn_log_failure
   13218 $at_traceon; }
   13219 
   13220     cp xml-tests/test.output expout
   13221   { set +x
   13222 $as_echo "$at_srcdir/output.at:67: \$XSLTPROC \\
   13223              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   13224              xml-tests/test.xml"
   13225 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:67"
   13226 ( $at_check_trace; $XSLTPROC \
   13227              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   13228              xml-tests/test.xml
   13229 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13230 at_status=$? at_failed=false
   13231 $at_check_filter
   13232 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13233 $at_diff expout "$at_stdout" || at_failed=:
   13234 at_fn_check_status 0 $at_status "$at_srcdir/output.at:67"
   13235 $at_failed && at_fn_log_failure
   13236 $at_traceon; }
   13237 
   13238   sort xml-tests/test.dot > expout
   13239   { set +x
   13240 $as_echo "$at_srcdir/output.at:67: \$XSLTPROC \\
   13241              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   13242              xml-tests/test.xml | sort"
   13243 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:67"
   13244 ( $at_check_trace; $XSLTPROC \
   13245              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   13246              xml-tests/test.xml | sort
   13247 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13248 at_status=$? at_failed=false
   13249 $at_check_filter
   13250 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13251 $at_diff expout "$at_stdout" || at_failed=:
   13252 at_fn_check_status 0 $at_status "$at_srcdir/output.at:67"
   13253 $at_failed && at_fn_log_failure
   13254 $at_traceon; }
   13255 
   13256   rm -rf xml-tests expout
   13257   at_restore_special_files
   13258 fi
   13259 { set +x
   13260 $as_echo "$at_srcdir/output.at:67: bison  foo.y "
   13261 at_fn_check_prepare_trace "output.at:67"
   13262 ( $at_check_trace; bison  foo.y
   13263 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13264 at_status=$? at_failed=false
   13265 $at_check_filter
   13266 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13267 at_fn_diff_devnull "$at_stdout" || at_failed=:
   13268 at_fn_check_status 0 $at_status "$at_srcdir/output.at:67"
   13269 $at_failed && at_fn_log_failure
   13270 $at_traceon; }
   13271 
   13272 
   13273 { set +x
   13274 $as_echo "$at_srcdir/output.at:67: ls foo.output foo.tab.c foo.tab.h"
   13275 at_fn_check_prepare_trace "output.at:67"
   13276 ( $at_check_trace; ls foo.output foo.tab.c foo.tab.h
   13277 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13278 at_status=$? at_failed=false
   13279 $at_check_filter
   13280 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13281 echo stdout:; cat "$at_stdout"
   13282 at_fn_check_status 0 $at_status "$at_srcdir/output.at:67"
   13283 $at_failed && at_fn_log_failure
   13284 $at_traceon; }
   13285 
   13286 
   13287   set +x
   13288   $at_times_p && times >"$at_times_file"
   13289 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   13290 read at_status <"$at_status_file"
   13291 #AT_STOP_58
   13292 #AT_START_59
   13293 at_fn_group_banner 59 'output.at:69' \
   13294   "Output files: %defines %verbose %yacc  " "        " 3
   13295 at_xfail=no
   13296 (
   13297   $as_echo "59. $at_setup_line: testing $at_desc ..."
   13298   $at_traceon
   13299 
   13300 
   13301 for file in foo.y y.output y.tab.c y.tab.h; do
   13302   case "$file" in
   13303     */*) mkdir -p `echo "$file" | sed 's,/.*,,'`;;
   13304   esac
   13305 done
   13306 cat >foo.y <<'_ATEOF'
   13307 %defines %verbose %yacc
   13308 %%
   13309 foo: {};
   13310 _ATEOF
   13311 
   13312 
   13313 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   13314   at_save_special_files
   13315   mkdir xml-tests
   13316     # Don't combine these Bison invocations since we want to be sure that
   13317   # --report=all isn't required to get the full XML file.
   13318   { set +x
   13319 $as_echo "$at_srcdir/output.at:69: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   13320                   --graph=xml-tests/test.dot  foo.y "
   13321 at_fn_check_prepare_notrace 'an embedded newline' "output.at:69"
   13322 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   13323                   --graph=xml-tests/test.dot  foo.y
   13324 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13325 at_status=$? at_failed=false
   13326 $at_check_filter
   13327 echo stderr:; cat "$at_stderr"
   13328 echo stdout:; cat "$at_stdout"
   13329 at_fn_check_status 0 $at_status "$at_srcdir/output.at:69"
   13330 $at_failed && at_fn_log_failure
   13331 $at_traceon; }
   13332 
   13333   { set +x
   13334 $as_echo "$at_srcdir/output.at:69: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.y "
   13335 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.y " "output.at:69"
   13336 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.y
   13337 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13338 at_status=$? at_failed=false
   13339 $at_check_filter
   13340 echo stderr:; cat "$at_stderr"
   13341 echo stdout:; cat "$at_stdout"
   13342 at_fn_check_status 0 $at_status "$at_srcdir/output.at:69"
   13343 $at_failed && at_fn_log_failure
   13344 $at_traceon; }
   13345 
   13346     cp xml-tests/test.output expout
   13347   { set +x
   13348 $as_echo "$at_srcdir/output.at:69: \$XSLTPROC \\
   13349              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   13350              xml-tests/test.xml"
   13351 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:69"
   13352 ( $at_check_trace; $XSLTPROC \
   13353              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   13354              xml-tests/test.xml
   13355 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13356 at_status=$? at_failed=false
   13357 $at_check_filter
   13358 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13359 $at_diff expout "$at_stdout" || at_failed=:
   13360 at_fn_check_status 0 $at_status "$at_srcdir/output.at:69"
   13361 $at_failed && at_fn_log_failure
   13362 $at_traceon; }
   13363 
   13364   sort xml-tests/test.dot > expout
   13365   { set +x
   13366 $as_echo "$at_srcdir/output.at:69: \$XSLTPROC \\
   13367              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   13368              xml-tests/test.xml | sort"
   13369 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:69"
   13370 ( $at_check_trace; $XSLTPROC \
   13371              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   13372              xml-tests/test.xml | sort
   13373 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13374 at_status=$? at_failed=false
   13375 $at_check_filter
   13376 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13377 $at_diff expout "$at_stdout" || at_failed=:
   13378 at_fn_check_status 0 $at_status "$at_srcdir/output.at:69"
   13379 $at_failed && at_fn_log_failure
   13380 $at_traceon; }
   13381 
   13382   rm -rf xml-tests expout
   13383   at_restore_special_files
   13384 fi
   13385 { set +x
   13386 $as_echo "$at_srcdir/output.at:69: bison  foo.y "
   13387 at_fn_check_prepare_trace "output.at:69"
   13388 ( $at_check_trace; bison  foo.y
   13389 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13390 at_status=$? at_failed=false
   13391 $at_check_filter
   13392 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13393 at_fn_diff_devnull "$at_stdout" || at_failed=:
   13394 at_fn_check_status 0 $at_status "$at_srcdir/output.at:69"
   13395 $at_failed && at_fn_log_failure
   13396 $at_traceon; }
   13397 
   13398 
   13399 { set +x
   13400 $as_echo "$at_srcdir/output.at:69: ls y.output y.tab.c y.tab.h"
   13401 at_fn_check_prepare_trace "output.at:69"
   13402 ( $at_check_trace; ls y.output y.tab.c y.tab.h
   13403 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13404 at_status=$? at_failed=false
   13405 $at_check_filter
   13406 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13407 echo stdout:; cat "$at_stdout"
   13408 at_fn_check_status 0 $at_status "$at_srcdir/output.at:69"
   13409 $at_failed && at_fn_log_failure
   13410 $at_traceon; }
   13411 
   13412 
   13413   set +x
   13414   $at_times_p && times >"$at_times_file"
   13415 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   13416 read at_status <"$at_status_file"
   13417 #AT_STOP_59
   13418 #AT_START_60
   13419 at_fn_group_banner 60 'output.at:72' \
   13420   "Output files: %defines %verbose %yacc  " "        " 3
   13421 at_xfail=no
   13422 (
   13423   $as_echo "60. $at_setup_line: testing $at_desc ..."
   13424   $at_traceon
   13425 
   13426 
   13427 for file in foo.yy y.output y.tab.c y.tab.h; do
   13428   case "$file" in
   13429     */*) mkdir -p `echo "$file" | sed 's,/.*,,'`;;
   13430   esac
   13431 done
   13432 cat >foo.yy <<'_ATEOF'
   13433 %defines %verbose %yacc
   13434 %%
   13435 foo: {};
   13436 _ATEOF
   13437 
   13438 
   13439 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   13440   at_save_special_files
   13441   mkdir xml-tests
   13442     # Don't combine these Bison invocations since we want to be sure that
   13443   # --report=all isn't required to get the full XML file.
   13444   { set +x
   13445 $as_echo "$at_srcdir/output.at:72: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   13446                   --graph=xml-tests/test.dot  foo.yy "
   13447 at_fn_check_prepare_notrace 'an embedded newline' "output.at:72"
   13448 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   13449                   --graph=xml-tests/test.dot  foo.yy
   13450 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13451 at_status=$? at_failed=false
   13452 $at_check_filter
   13453 echo stderr:; cat "$at_stderr"
   13454 echo stdout:; cat "$at_stdout"
   13455 at_fn_check_status 0 $at_status "$at_srcdir/output.at:72"
   13456 $at_failed && at_fn_log_failure
   13457 $at_traceon; }
   13458 
   13459   { set +x
   13460 $as_echo "$at_srcdir/output.at:72: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.yy "
   13461 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.yy " "output.at:72"
   13462 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.yy
   13463 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13464 at_status=$? at_failed=false
   13465 $at_check_filter
   13466 echo stderr:; cat "$at_stderr"
   13467 echo stdout:; cat "$at_stdout"
   13468 at_fn_check_status 0 $at_status "$at_srcdir/output.at:72"
   13469 $at_failed && at_fn_log_failure
   13470 $at_traceon; }
   13471 
   13472     cp xml-tests/test.output expout
   13473   { set +x
   13474 $as_echo "$at_srcdir/output.at:72: \$XSLTPROC \\
   13475              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   13476              xml-tests/test.xml"
   13477 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:72"
   13478 ( $at_check_trace; $XSLTPROC \
   13479              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   13480              xml-tests/test.xml
   13481 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13482 at_status=$? at_failed=false
   13483 $at_check_filter
   13484 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13485 $at_diff expout "$at_stdout" || at_failed=:
   13486 at_fn_check_status 0 $at_status "$at_srcdir/output.at:72"
   13487 $at_failed && at_fn_log_failure
   13488 $at_traceon; }
   13489 
   13490   sort xml-tests/test.dot > expout
   13491   { set +x
   13492 $as_echo "$at_srcdir/output.at:72: \$XSLTPROC \\
   13493              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   13494              xml-tests/test.xml | sort"
   13495 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:72"
   13496 ( $at_check_trace; $XSLTPROC \
   13497              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   13498              xml-tests/test.xml | sort
   13499 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13500 at_status=$? at_failed=false
   13501 $at_check_filter
   13502 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13503 $at_diff expout "$at_stdout" || at_failed=:
   13504 at_fn_check_status 0 $at_status "$at_srcdir/output.at:72"
   13505 $at_failed && at_fn_log_failure
   13506 $at_traceon; }
   13507 
   13508   rm -rf xml-tests expout
   13509   at_restore_special_files
   13510 fi
   13511 { set +x
   13512 $as_echo "$at_srcdir/output.at:72: bison  foo.yy "
   13513 at_fn_check_prepare_trace "output.at:72"
   13514 ( $at_check_trace; bison  foo.yy
   13515 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13516 at_status=$? at_failed=false
   13517 $at_check_filter
   13518 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13519 at_fn_diff_devnull "$at_stdout" || at_failed=:
   13520 at_fn_check_status 0 $at_status "$at_srcdir/output.at:72"
   13521 $at_failed && at_fn_log_failure
   13522 $at_traceon; }
   13523 
   13524 
   13525 { set +x
   13526 $as_echo "$at_srcdir/output.at:72: ls y.output y.tab.c y.tab.h"
   13527 at_fn_check_prepare_trace "output.at:72"
   13528 ( $at_check_trace; ls y.output y.tab.c y.tab.h
   13529 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13530 at_status=$? at_failed=false
   13531 $at_check_filter
   13532 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13533 echo stdout:; cat "$at_stdout"
   13534 at_fn_check_status 0 $at_status "$at_srcdir/output.at:72"
   13535 $at_failed && at_fn_log_failure
   13536 $at_traceon; }
   13537 
   13538 
   13539   set +x
   13540   $at_times_p && times >"$at_times_file"
   13541 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   13542 read at_status <"$at_status_file"
   13543 #AT_STOP_60
   13544 #AT_START_61
   13545 at_fn_group_banner 61 'output.at:76' \
   13546   "Output files: %file-prefix \"bar\" %defines %verbose  " "" 3
   13547 at_xfail=no
   13548 (
   13549   $as_echo "61. $at_setup_line: testing $at_desc ..."
   13550   $at_traceon
   13551 
   13552 
   13553 for file in foo.y bar.output bar.tab.c bar.tab.h; do
   13554   case "$file" in
   13555     */*) mkdir -p `echo "$file" | sed 's,/.*,,'`;;
   13556   esac
   13557 done
   13558 cat >foo.y <<'_ATEOF'
   13559 %file-prefix "bar" %defines %verbose
   13560 %%
   13561 foo: {};
   13562 _ATEOF
   13563 
   13564 
   13565 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   13566   at_save_special_files
   13567   mkdir xml-tests
   13568     # Don't combine these Bison invocations since we want to be sure that
   13569   # --report=all isn't required to get the full XML file.
   13570   { set +x
   13571 $as_echo "$at_srcdir/output.at:76: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   13572                   --graph=xml-tests/test.dot  foo.y "
   13573 at_fn_check_prepare_notrace 'an embedded newline' "output.at:76"
   13574 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   13575                   --graph=xml-tests/test.dot  foo.y
   13576 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13577 at_status=$? at_failed=false
   13578 $at_check_filter
   13579 echo stderr:; cat "$at_stderr"
   13580 echo stdout:; cat "$at_stdout"
   13581 at_fn_check_status 0 $at_status "$at_srcdir/output.at:76"
   13582 $at_failed && at_fn_log_failure
   13583 $at_traceon; }
   13584 
   13585   { set +x
   13586 $as_echo "$at_srcdir/output.at:76: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.y "
   13587 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.y " "output.at:76"
   13588 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.y
   13589 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13590 at_status=$? at_failed=false
   13591 $at_check_filter
   13592 echo stderr:; cat "$at_stderr"
   13593 echo stdout:; cat "$at_stdout"
   13594 at_fn_check_status 0 $at_status "$at_srcdir/output.at:76"
   13595 $at_failed && at_fn_log_failure
   13596 $at_traceon; }
   13597 
   13598     cp xml-tests/test.output expout
   13599   { set +x
   13600 $as_echo "$at_srcdir/output.at:76: \$XSLTPROC \\
   13601              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   13602              xml-tests/test.xml"
   13603 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:76"
   13604 ( $at_check_trace; $XSLTPROC \
   13605              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   13606              xml-tests/test.xml
   13607 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13608 at_status=$? at_failed=false
   13609 $at_check_filter
   13610 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13611 $at_diff expout "$at_stdout" || at_failed=:
   13612 at_fn_check_status 0 $at_status "$at_srcdir/output.at:76"
   13613 $at_failed && at_fn_log_failure
   13614 $at_traceon; }
   13615 
   13616   sort xml-tests/test.dot > expout
   13617   { set +x
   13618 $as_echo "$at_srcdir/output.at:76: \$XSLTPROC \\
   13619              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   13620              xml-tests/test.xml | sort"
   13621 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:76"
   13622 ( $at_check_trace; $XSLTPROC \
   13623              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   13624              xml-tests/test.xml | sort
   13625 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13626 at_status=$? at_failed=false
   13627 $at_check_filter
   13628 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13629 $at_diff expout "$at_stdout" || at_failed=:
   13630 at_fn_check_status 0 $at_status "$at_srcdir/output.at:76"
   13631 $at_failed && at_fn_log_failure
   13632 $at_traceon; }
   13633 
   13634   rm -rf xml-tests expout
   13635   at_restore_special_files
   13636 fi
   13637 { set +x
   13638 $as_echo "$at_srcdir/output.at:76: bison  foo.y "
   13639 at_fn_check_prepare_trace "output.at:76"
   13640 ( $at_check_trace; bison  foo.y
   13641 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13642 at_status=$? at_failed=false
   13643 $at_check_filter
   13644 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13645 at_fn_diff_devnull "$at_stdout" || at_failed=:
   13646 at_fn_check_status 0 $at_status "$at_srcdir/output.at:76"
   13647 $at_failed && at_fn_log_failure
   13648 $at_traceon; }
   13649 
   13650 
   13651 { set +x
   13652 $as_echo "$at_srcdir/output.at:76: ls bar.output bar.tab.c bar.tab.h"
   13653 at_fn_check_prepare_trace "output.at:76"
   13654 ( $at_check_trace; ls bar.output bar.tab.c bar.tab.h
   13655 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13656 at_status=$? at_failed=false
   13657 $at_check_filter
   13658 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13659 echo stdout:; cat "$at_stdout"
   13660 at_fn_check_status 0 $at_status "$at_srcdir/output.at:76"
   13661 $at_failed && at_fn_log_failure
   13662 $at_traceon; }
   13663 
   13664 
   13665   set +x
   13666   $at_times_p && times >"$at_times_file"
   13667 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   13668 read at_status <"$at_status_file"
   13669 #AT_STOP_61
   13670 #AT_START_62
   13671 at_fn_group_banner 62 'output.at:78' \
   13672   "Output files: %output=\"bar.c\" %defines %verbose %yacc  " "" 3
   13673 at_xfail=no
   13674 (
   13675   $as_echo "62. $at_setup_line: testing $at_desc ..."
   13676   $at_traceon
   13677 
   13678 
   13679 for file in foo.y bar.output bar.c bar.h; do
   13680   case "$file" in
   13681     */*) mkdir -p `echo "$file" | sed 's,/.*,,'`;;
   13682   esac
   13683 done
   13684 cat >foo.y <<'_ATEOF'
   13685 %output="bar.c" %defines %verbose %yacc
   13686 %%
   13687 foo: {};
   13688 _ATEOF
   13689 
   13690 
   13691 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   13692   at_save_special_files
   13693   mkdir xml-tests
   13694     # Don't combine these Bison invocations since we want to be sure that
   13695   # --report=all isn't required to get the full XML file.
   13696   { set +x
   13697 $as_echo "$at_srcdir/output.at:78: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   13698                   --graph=xml-tests/test.dot  foo.y "
   13699 at_fn_check_prepare_notrace 'an embedded newline' "output.at:78"
   13700 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   13701                   --graph=xml-tests/test.dot  foo.y
   13702 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13703 at_status=$? at_failed=false
   13704 $at_check_filter
   13705 echo stderr:; cat "$at_stderr"
   13706 echo stdout:; cat "$at_stdout"
   13707 at_fn_check_status 0 $at_status "$at_srcdir/output.at:78"
   13708 $at_failed && at_fn_log_failure
   13709 $at_traceon; }
   13710 
   13711   { set +x
   13712 $as_echo "$at_srcdir/output.at:78: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.y "
   13713 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.y " "output.at:78"
   13714 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.y
   13715 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13716 at_status=$? at_failed=false
   13717 $at_check_filter
   13718 echo stderr:; cat "$at_stderr"
   13719 echo stdout:; cat "$at_stdout"
   13720 at_fn_check_status 0 $at_status "$at_srcdir/output.at:78"
   13721 $at_failed && at_fn_log_failure
   13722 $at_traceon; }
   13723 
   13724     cp xml-tests/test.output expout
   13725   { set +x
   13726 $as_echo "$at_srcdir/output.at:78: \$XSLTPROC \\
   13727              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   13728              xml-tests/test.xml"
   13729 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:78"
   13730 ( $at_check_trace; $XSLTPROC \
   13731              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   13732              xml-tests/test.xml
   13733 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13734 at_status=$? at_failed=false
   13735 $at_check_filter
   13736 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13737 $at_diff expout "$at_stdout" || at_failed=:
   13738 at_fn_check_status 0 $at_status "$at_srcdir/output.at:78"
   13739 $at_failed && at_fn_log_failure
   13740 $at_traceon; }
   13741 
   13742   sort xml-tests/test.dot > expout
   13743   { set +x
   13744 $as_echo "$at_srcdir/output.at:78: \$XSLTPROC \\
   13745              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   13746              xml-tests/test.xml | sort"
   13747 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:78"
   13748 ( $at_check_trace; $XSLTPROC \
   13749              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   13750              xml-tests/test.xml | sort
   13751 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13752 at_status=$? at_failed=false
   13753 $at_check_filter
   13754 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13755 $at_diff expout "$at_stdout" || at_failed=:
   13756 at_fn_check_status 0 $at_status "$at_srcdir/output.at:78"
   13757 $at_failed && at_fn_log_failure
   13758 $at_traceon; }
   13759 
   13760   rm -rf xml-tests expout
   13761   at_restore_special_files
   13762 fi
   13763 { set +x
   13764 $as_echo "$at_srcdir/output.at:78: bison  foo.y "
   13765 at_fn_check_prepare_trace "output.at:78"
   13766 ( $at_check_trace; bison  foo.y
   13767 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13768 at_status=$? at_failed=false
   13769 $at_check_filter
   13770 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13771 at_fn_diff_devnull "$at_stdout" || at_failed=:
   13772 at_fn_check_status 0 $at_status "$at_srcdir/output.at:78"
   13773 $at_failed && at_fn_log_failure
   13774 $at_traceon; }
   13775 
   13776 
   13777 { set +x
   13778 $as_echo "$at_srcdir/output.at:78: ls bar.output bar.c bar.h"
   13779 at_fn_check_prepare_trace "output.at:78"
   13780 ( $at_check_trace; ls bar.output bar.c bar.h
   13781 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13782 at_status=$? at_failed=false
   13783 $at_check_filter
   13784 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13785 echo stdout:; cat "$at_stdout"
   13786 at_fn_check_status 0 $at_status "$at_srcdir/output.at:78"
   13787 $at_failed && at_fn_log_failure
   13788 $at_traceon; }
   13789 
   13790 
   13791   set +x
   13792   $at_times_p && times >"$at_times_file"
   13793 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   13794 read at_status <"$at_status_file"
   13795 #AT_STOP_62
   13796 #AT_START_63
   13797 at_fn_group_banner 63 'output.at:80' \
   13798   "Output files: %file-prefix=\"baz\" %output \"bar.c\" %defines %verbose %yacc  " "" 3
   13799 at_xfail=no
   13800 (
   13801   $as_echo "63. $at_setup_line: testing $at_desc ..."
   13802   $at_traceon
   13803 
   13804 
   13805 for file in foo.y bar.output bar.c bar.h; do
   13806   case "$file" in
   13807     */*) mkdir -p `echo "$file" | sed 's,/.*,,'`;;
   13808   esac
   13809 done
   13810 cat >foo.y <<'_ATEOF'
   13811 %file-prefix="baz" %output "bar.c" %defines %verbose %yacc
   13812 %%
   13813 foo: {};
   13814 _ATEOF
   13815 
   13816 
   13817 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   13818   at_save_special_files
   13819   mkdir xml-tests
   13820     # Don't combine these Bison invocations since we want to be sure that
   13821   # --report=all isn't required to get the full XML file.
   13822   { set +x
   13823 $as_echo "$at_srcdir/output.at:80: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   13824                   --graph=xml-tests/test.dot  foo.y "
   13825 at_fn_check_prepare_notrace 'an embedded newline' "output.at:80"
   13826 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   13827                   --graph=xml-tests/test.dot  foo.y
   13828 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13829 at_status=$? at_failed=false
   13830 $at_check_filter
   13831 echo stderr:; cat "$at_stderr"
   13832 echo stdout:; cat "$at_stdout"
   13833 at_fn_check_status 0 $at_status "$at_srcdir/output.at:80"
   13834 $at_failed && at_fn_log_failure
   13835 $at_traceon; }
   13836 
   13837   { set +x
   13838 $as_echo "$at_srcdir/output.at:80: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.y "
   13839 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.y " "output.at:80"
   13840 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.y
   13841 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13842 at_status=$? at_failed=false
   13843 $at_check_filter
   13844 echo stderr:; cat "$at_stderr"
   13845 echo stdout:; cat "$at_stdout"
   13846 at_fn_check_status 0 $at_status "$at_srcdir/output.at:80"
   13847 $at_failed && at_fn_log_failure
   13848 $at_traceon; }
   13849 
   13850     cp xml-tests/test.output expout
   13851   { set +x
   13852 $as_echo "$at_srcdir/output.at:80: \$XSLTPROC \\
   13853              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   13854              xml-tests/test.xml"
   13855 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:80"
   13856 ( $at_check_trace; $XSLTPROC \
   13857              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   13858              xml-tests/test.xml
   13859 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13860 at_status=$? at_failed=false
   13861 $at_check_filter
   13862 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13863 $at_diff expout "$at_stdout" || at_failed=:
   13864 at_fn_check_status 0 $at_status "$at_srcdir/output.at:80"
   13865 $at_failed && at_fn_log_failure
   13866 $at_traceon; }
   13867 
   13868   sort xml-tests/test.dot > expout
   13869   { set +x
   13870 $as_echo "$at_srcdir/output.at:80: \$XSLTPROC \\
   13871              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   13872              xml-tests/test.xml | sort"
   13873 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:80"
   13874 ( $at_check_trace; $XSLTPROC \
   13875              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   13876              xml-tests/test.xml | sort
   13877 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13878 at_status=$? at_failed=false
   13879 $at_check_filter
   13880 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13881 $at_diff expout "$at_stdout" || at_failed=:
   13882 at_fn_check_status 0 $at_status "$at_srcdir/output.at:80"
   13883 $at_failed && at_fn_log_failure
   13884 $at_traceon; }
   13885 
   13886   rm -rf xml-tests expout
   13887   at_restore_special_files
   13888 fi
   13889 { set +x
   13890 $as_echo "$at_srcdir/output.at:80: bison  foo.y "
   13891 at_fn_check_prepare_trace "output.at:80"
   13892 ( $at_check_trace; bison  foo.y
   13893 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13894 at_status=$? at_failed=false
   13895 $at_check_filter
   13896 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13897 at_fn_diff_devnull "$at_stdout" || at_failed=:
   13898 at_fn_check_status 0 $at_status "$at_srcdir/output.at:80"
   13899 $at_failed && at_fn_log_failure
   13900 $at_traceon; }
   13901 
   13902 
   13903 { set +x
   13904 $as_echo "$at_srcdir/output.at:80: ls bar.output bar.c bar.h"
   13905 at_fn_check_prepare_trace "output.at:80"
   13906 ( $at_check_trace; ls bar.output bar.c bar.h
   13907 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13908 at_status=$? at_failed=false
   13909 $at_check_filter
   13910 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13911 echo stdout:; cat "$at_stdout"
   13912 at_fn_check_status 0 $at_status "$at_srcdir/output.at:80"
   13913 $at_failed && at_fn_log_failure
   13914 $at_traceon; }
   13915 
   13916 
   13917   set +x
   13918   $at_times_p && times >"$at_times_file"
   13919 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   13920 read at_status <"$at_status_file"
   13921 #AT_STOP_63
   13922 #AT_START_64
   13923 at_fn_group_banner 64 'output.at:87' \
   13924   "Output files: %defines %verbose  " "              " 3
   13925 at_xfail=no
   13926 (
   13927   $as_echo "64. $at_setup_line: testing $at_desc ..."
   13928   $at_traceon
   13929 
   13930 
   13931 for file in foo.yy foo.output foo.tab.cc foo.tab.hh; do
   13932   case "$file" in
   13933     */*) mkdir -p `echo "$file" | sed 's,/.*,,'`;;
   13934   esac
   13935 done
   13936 cat >foo.yy <<'_ATEOF'
   13937 %defines %verbose
   13938 %%
   13939 foo: {};
   13940 _ATEOF
   13941 
   13942 
   13943 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   13944   at_save_special_files
   13945   mkdir xml-tests
   13946     # Don't combine these Bison invocations since we want to be sure that
   13947   # --report=all isn't required to get the full XML file.
   13948   { set +x
   13949 $as_echo "$at_srcdir/output.at:87: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   13950                   --graph=xml-tests/test.dot  foo.yy "
   13951 at_fn_check_prepare_notrace 'an embedded newline' "output.at:87"
   13952 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   13953                   --graph=xml-tests/test.dot  foo.yy
   13954 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13955 at_status=$? at_failed=false
   13956 $at_check_filter
   13957 echo stderr:; cat "$at_stderr"
   13958 echo stdout:; cat "$at_stdout"
   13959 at_fn_check_status 0 $at_status "$at_srcdir/output.at:87"
   13960 $at_failed && at_fn_log_failure
   13961 $at_traceon; }
   13962 
   13963   { set +x
   13964 $as_echo "$at_srcdir/output.at:87: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.yy "
   13965 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.yy " "output.at:87"
   13966 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.yy
   13967 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13968 at_status=$? at_failed=false
   13969 $at_check_filter
   13970 echo stderr:; cat "$at_stderr"
   13971 echo stdout:; cat "$at_stdout"
   13972 at_fn_check_status 0 $at_status "$at_srcdir/output.at:87"
   13973 $at_failed && at_fn_log_failure
   13974 $at_traceon; }
   13975 
   13976     cp xml-tests/test.output expout
   13977   { set +x
   13978 $as_echo "$at_srcdir/output.at:87: \$XSLTPROC \\
   13979              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   13980              xml-tests/test.xml"
   13981 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:87"
   13982 ( $at_check_trace; $XSLTPROC \
   13983              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   13984              xml-tests/test.xml
   13985 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   13986 at_status=$? at_failed=false
   13987 $at_check_filter
   13988 at_fn_diff_devnull "$at_stderr" || at_failed=:
   13989 $at_diff expout "$at_stdout" || at_failed=:
   13990 at_fn_check_status 0 $at_status "$at_srcdir/output.at:87"
   13991 $at_failed && at_fn_log_failure
   13992 $at_traceon; }
   13993 
   13994   sort xml-tests/test.dot > expout
   13995   { set +x
   13996 $as_echo "$at_srcdir/output.at:87: \$XSLTPROC \\
   13997              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   13998              xml-tests/test.xml | sort"
   13999 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:87"
   14000 ( $at_check_trace; $XSLTPROC \
   14001              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   14002              xml-tests/test.xml | sort
   14003 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14004 at_status=$? at_failed=false
   14005 $at_check_filter
   14006 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14007 $at_diff expout "$at_stdout" || at_failed=:
   14008 at_fn_check_status 0 $at_status "$at_srcdir/output.at:87"
   14009 $at_failed && at_fn_log_failure
   14010 $at_traceon; }
   14011 
   14012   rm -rf xml-tests expout
   14013   at_restore_special_files
   14014 fi
   14015 { set +x
   14016 $as_echo "$at_srcdir/output.at:87: bison  foo.yy "
   14017 at_fn_check_prepare_trace "output.at:87"
   14018 ( $at_check_trace; bison  foo.yy
   14019 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14020 at_status=$? at_failed=false
   14021 $at_check_filter
   14022 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14023 at_fn_diff_devnull "$at_stdout" || at_failed=:
   14024 at_fn_check_status 0 $at_status "$at_srcdir/output.at:87"
   14025 $at_failed && at_fn_log_failure
   14026 $at_traceon; }
   14027 
   14028 
   14029 { set +x
   14030 $as_echo "$at_srcdir/output.at:87: ls foo.output foo.tab.cc foo.tab.hh"
   14031 at_fn_check_prepare_trace "output.at:87"
   14032 ( $at_check_trace; ls foo.output foo.tab.cc foo.tab.hh
   14033 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14034 at_status=$? at_failed=false
   14035 $at_check_filter
   14036 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14037 echo stdout:; cat "$at_stdout"
   14038 at_fn_check_status 0 $at_status "$at_srcdir/output.at:87"
   14039 $at_failed && at_fn_log_failure
   14040 $at_traceon; }
   14041 
   14042 
   14043   set +x
   14044   $at_times_p && times >"$at_times_file"
   14045 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   14046 read at_status <"$at_status_file"
   14047 #AT_STOP_64
   14048 #AT_START_65
   14049 at_fn_group_banner 65 'output.at:90' \
   14050   "Output files: %defines %verbose  -o foo.c " "     " 3
   14051 at_xfail=no
   14052 (
   14053   $as_echo "65. $at_setup_line: testing $at_desc ..."
   14054   $at_traceon
   14055 
   14056 
   14057 for file in foo.yy foo.c foo.h foo.output; do
   14058   case "$file" in
   14059     */*) mkdir -p `echo "$file" | sed 's,/.*,,'`;;
   14060   esac
   14061 done
   14062 cat >foo.yy <<'_ATEOF'
   14063 %defines %verbose
   14064 %%
   14065 foo: {};
   14066 _ATEOF
   14067 
   14068 
   14069 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   14070   at_save_special_files
   14071   mkdir xml-tests
   14072     # Don't combine these Bison invocations since we want to be sure that
   14073   # --report=all isn't required to get the full XML file.
   14074   { set +x
   14075 $as_echo "$at_srcdir/output.at:90: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   14076                   --graph=xml-tests/test.dot -o foo.c foo.yy "
   14077 at_fn_check_prepare_notrace 'an embedded newline' "output.at:90"
   14078 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   14079                   --graph=xml-tests/test.dot -o foo.c foo.yy
   14080 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14081 at_status=$? at_failed=false
   14082 $at_check_filter
   14083 echo stderr:; cat "$at_stderr"
   14084 echo stdout:; cat "$at_stdout"
   14085 at_fn_check_status 0 $at_status "$at_srcdir/output.at:90"
   14086 $at_failed && at_fn_log_failure
   14087 $at_traceon; }
   14088 
   14089   { set +x
   14090 $as_echo "$at_srcdir/output.at:90: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o foo.c foo.yy "
   14091 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o foo.c foo.yy " "output.at:90"
   14092 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o foo.c foo.yy
   14093 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14094 at_status=$? at_failed=false
   14095 $at_check_filter
   14096 echo stderr:; cat "$at_stderr"
   14097 echo stdout:; cat "$at_stdout"
   14098 at_fn_check_status 0 $at_status "$at_srcdir/output.at:90"
   14099 $at_failed && at_fn_log_failure
   14100 $at_traceon; }
   14101 
   14102     cp xml-tests/test.output expout
   14103   { set +x
   14104 $as_echo "$at_srcdir/output.at:90: \$XSLTPROC \\
   14105              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   14106              xml-tests/test.xml"
   14107 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:90"
   14108 ( $at_check_trace; $XSLTPROC \
   14109              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   14110              xml-tests/test.xml
   14111 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14112 at_status=$? at_failed=false
   14113 $at_check_filter
   14114 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14115 $at_diff expout "$at_stdout" || at_failed=:
   14116 at_fn_check_status 0 $at_status "$at_srcdir/output.at:90"
   14117 $at_failed && at_fn_log_failure
   14118 $at_traceon; }
   14119 
   14120   sort xml-tests/test.dot > expout
   14121   { set +x
   14122 $as_echo "$at_srcdir/output.at:90: \$XSLTPROC \\
   14123              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   14124              xml-tests/test.xml | sort"
   14125 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:90"
   14126 ( $at_check_trace; $XSLTPROC \
   14127              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   14128              xml-tests/test.xml | sort
   14129 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14130 at_status=$? at_failed=false
   14131 $at_check_filter
   14132 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14133 $at_diff expout "$at_stdout" || at_failed=:
   14134 at_fn_check_status 0 $at_status "$at_srcdir/output.at:90"
   14135 $at_failed && at_fn_log_failure
   14136 $at_traceon; }
   14137 
   14138   rm -rf xml-tests expout
   14139   at_restore_special_files
   14140 fi
   14141 { set +x
   14142 $as_echo "$at_srcdir/output.at:90: bison -o foo.c foo.yy "
   14143 at_fn_check_prepare_trace "output.at:90"
   14144 ( $at_check_trace; bison -o foo.c foo.yy
   14145 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14146 at_status=$? at_failed=false
   14147 $at_check_filter
   14148 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14149 at_fn_diff_devnull "$at_stdout" || at_failed=:
   14150 at_fn_check_status 0 $at_status "$at_srcdir/output.at:90"
   14151 $at_failed && at_fn_log_failure
   14152 $at_traceon; }
   14153 
   14154 
   14155 { set +x
   14156 $as_echo "$at_srcdir/output.at:90: ls foo.c foo.h foo.output"
   14157 at_fn_check_prepare_trace "output.at:90"
   14158 ( $at_check_trace; ls foo.c foo.h foo.output
   14159 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14160 at_status=$? at_failed=false
   14161 $at_check_filter
   14162 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14163 echo stdout:; cat "$at_stdout"
   14164 at_fn_check_status 0 $at_status "$at_srcdir/output.at:90"
   14165 $at_failed && at_fn_log_failure
   14166 $at_traceon; }
   14167 
   14168 
   14169   set +x
   14170   $at_times_p && times >"$at_times_file"
   14171 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   14172 read at_status <"$at_status_file"
   14173 #AT_STOP_65
   14174 #AT_START_66
   14175 at_fn_group_banner 66 'output.at:93' \
   14176   "Output files:  --defines=foo.hpp -o foo.c++ " "   " 3
   14177 at_xfail=no
   14178 (
   14179   $as_echo "66. $at_setup_line: testing $at_desc ..."
   14180   $at_traceon
   14181 
   14182 
   14183 for file in foo.yy foo.c++ foo.hpp; do
   14184   case "$file" in
   14185     */*) mkdir -p `echo "$file" | sed 's,/.*,,'`;;
   14186   esac
   14187 done
   14188 cat >foo.yy <<'_ATEOF'
   14189 
   14190 %%
   14191 foo: {};
   14192 _ATEOF
   14193 
   14194 
   14195 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   14196   at_save_special_files
   14197   mkdir xml-tests
   14198     # Don't combine these Bison invocations since we want to be sure that
   14199   # --report=all isn't required to get the full XML file.
   14200   { set +x
   14201 $as_echo "$at_srcdir/output.at:93: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   14202                   --graph=xml-tests/test.dot --defines=foo.hpp -o foo.c++ foo.yy "
   14203 at_fn_check_prepare_notrace 'an embedded newline' "output.at:93"
   14204 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   14205                   --graph=xml-tests/test.dot --defines=foo.hpp -o foo.c++ foo.yy
   14206 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14207 at_status=$? at_failed=false
   14208 $at_check_filter
   14209 echo stderr:; cat "$at_stderr"
   14210 echo stdout:; cat "$at_stdout"
   14211 at_fn_check_status 0 $at_status "$at_srcdir/output.at:93"
   14212 $at_failed && at_fn_log_failure
   14213 $at_traceon; }
   14214 
   14215   { set +x
   14216 $as_echo "$at_srcdir/output.at:93: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --defines=foo.hpp -o foo.c++ foo.yy "
   14217 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --defines=foo.hpp -o foo.c++ foo.yy " "output.at:93"
   14218 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --defines=foo.hpp -o foo.c++ foo.yy
   14219 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14220 at_status=$? at_failed=false
   14221 $at_check_filter
   14222 echo stderr:; cat "$at_stderr"
   14223 echo stdout:; cat "$at_stdout"
   14224 at_fn_check_status 0 $at_status "$at_srcdir/output.at:93"
   14225 $at_failed && at_fn_log_failure
   14226 $at_traceon; }
   14227 
   14228     cp xml-tests/test.output expout
   14229   { set +x
   14230 $as_echo "$at_srcdir/output.at:93: \$XSLTPROC \\
   14231              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   14232              xml-tests/test.xml"
   14233 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:93"
   14234 ( $at_check_trace; $XSLTPROC \
   14235              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   14236              xml-tests/test.xml
   14237 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14238 at_status=$? at_failed=false
   14239 $at_check_filter
   14240 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14241 $at_diff expout "$at_stdout" || at_failed=:
   14242 at_fn_check_status 0 $at_status "$at_srcdir/output.at:93"
   14243 $at_failed && at_fn_log_failure
   14244 $at_traceon; }
   14245 
   14246   sort xml-tests/test.dot > expout
   14247   { set +x
   14248 $as_echo "$at_srcdir/output.at:93: \$XSLTPROC \\
   14249              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   14250              xml-tests/test.xml | sort"
   14251 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:93"
   14252 ( $at_check_trace; $XSLTPROC \
   14253              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   14254              xml-tests/test.xml | sort
   14255 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14256 at_status=$? at_failed=false
   14257 $at_check_filter
   14258 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14259 $at_diff expout "$at_stdout" || at_failed=:
   14260 at_fn_check_status 0 $at_status "$at_srcdir/output.at:93"
   14261 $at_failed && at_fn_log_failure
   14262 $at_traceon; }
   14263 
   14264   rm -rf xml-tests expout
   14265   at_restore_special_files
   14266 fi
   14267 { set +x
   14268 $as_echo "$at_srcdir/output.at:93: bison --defines=foo.hpp -o foo.c++ foo.yy "
   14269 at_fn_check_prepare_trace "output.at:93"
   14270 ( $at_check_trace; bison --defines=foo.hpp -o foo.c++ foo.yy
   14271 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14272 at_status=$? at_failed=false
   14273 $at_check_filter
   14274 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14275 at_fn_diff_devnull "$at_stdout" || at_failed=:
   14276 at_fn_check_status 0 $at_status "$at_srcdir/output.at:93"
   14277 $at_failed && at_fn_log_failure
   14278 $at_traceon; }
   14279 
   14280 
   14281 { set +x
   14282 $as_echo "$at_srcdir/output.at:93: ls foo.c++ foo.hpp"
   14283 at_fn_check_prepare_trace "output.at:93"
   14284 ( $at_check_trace; ls foo.c++ foo.hpp
   14285 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14286 at_status=$? at_failed=false
   14287 $at_check_filter
   14288 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14289 echo stdout:; cat "$at_stdout"
   14290 at_fn_check_status 0 $at_status "$at_srcdir/output.at:93"
   14291 $at_failed && at_fn_log_failure
   14292 $at_traceon; }
   14293 
   14294 
   14295   set +x
   14296   $at_times_p && times >"$at_times_file"
   14297 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   14298 read at_status <"$at_status_file"
   14299 #AT_STOP_66
   14300 #AT_START_67
   14301 at_fn_group_banner 67 'output.at:97' \
   14302   "Output files: %defines \"foo.hpp\" -o foo.c++ " "   " 3
   14303 at_xfail=no
   14304 (
   14305   $as_echo "67. $at_setup_line: testing $at_desc ..."
   14306   $at_traceon
   14307 
   14308 
   14309 for file in foo.yy foo.c++ foo.hpp; do
   14310   case "$file" in
   14311     */*) mkdir -p `echo "$file" | sed 's,/.*,,'`;;
   14312   esac
   14313 done
   14314 cat >foo.yy <<'_ATEOF'
   14315 %defines "foo.hpp"
   14316 %%
   14317 foo: {};
   14318 _ATEOF
   14319 
   14320 
   14321 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   14322   at_save_special_files
   14323   mkdir xml-tests
   14324     # Don't combine these Bison invocations since we want to be sure that
   14325   # --report=all isn't required to get the full XML file.
   14326   { set +x
   14327 $as_echo "$at_srcdir/output.at:97: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   14328                   --graph=xml-tests/test.dot -o foo.c++ foo.yy "
   14329 at_fn_check_prepare_notrace 'an embedded newline' "output.at:97"
   14330 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   14331                   --graph=xml-tests/test.dot -o foo.c++ foo.yy
   14332 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14333 at_status=$? at_failed=false
   14334 $at_check_filter
   14335 echo stderr:; cat "$at_stderr"
   14336 echo stdout:; cat "$at_stdout"
   14337 at_fn_check_status 0 $at_status "$at_srcdir/output.at:97"
   14338 $at_failed && at_fn_log_failure
   14339 $at_traceon; }
   14340 
   14341   { set +x
   14342 $as_echo "$at_srcdir/output.at:97: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o foo.c++ foo.yy "
   14343 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o foo.c++ foo.yy " "output.at:97"
   14344 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o foo.c++ foo.yy
   14345 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14346 at_status=$? at_failed=false
   14347 $at_check_filter
   14348 echo stderr:; cat "$at_stderr"
   14349 echo stdout:; cat "$at_stdout"
   14350 at_fn_check_status 0 $at_status "$at_srcdir/output.at:97"
   14351 $at_failed && at_fn_log_failure
   14352 $at_traceon; }
   14353 
   14354     cp xml-tests/test.output expout
   14355   { set +x
   14356 $as_echo "$at_srcdir/output.at:97: \$XSLTPROC \\
   14357              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   14358              xml-tests/test.xml"
   14359 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:97"
   14360 ( $at_check_trace; $XSLTPROC \
   14361              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   14362              xml-tests/test.xml
   14363 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14364 at_status=$? at_failed=false
   14365 $at_check_filter
   14366 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14367 $at_diff expout "$at_stdout" || at_failed=:
   14368 at_fn_check_status 0 $at_status "$at_srcdir/output.at:97"
   14369 $at_failed && at_fn_log_failure
   14370 $at_traceon; }
   14371 
   14372   sort xml-tests/test.dot > expout
   14373   { set +x
   14374 $as_echo "$at_srcdir/output.at:97: \$XSLTPROC \\
   14375              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   14376              xml-tests/test.xml | sort"
   14377 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:97"
   14378 ( $at_check_trace; $XSLTPROC \
   14379              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   14380              xml-tests/test.xml | sort
   14381 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14382 at_status=$? at_failed=false
   14383 $at_check_filter
   14384 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14385 $at_diff expout "$at_stdout" || at_failed=:
   14386 at_fn_check_status 0 $at_status "$at_srcdir/output.at:97"
   14387 $at_failed && at_fn_log_failure
   14388 $at_traceon; }
   14389 
   14390   rm -rf xml-tests expout
   14391   at_restore_special_files
   14392 fi
   14393 { set +x
   14394 $as_echo "$at_srcdir/output.at:97: bison -o foo.c++ foo.yy "
   14395 at_fn_check_prepare_trace "output.at:97"
   14396 ( $at_check_trace; bison -o foo.c++ foo.yy
   14397 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14398 at_status=$? at_failed=false
   14399 $at_check_filter
   14400 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14401 at_fn_diff_devnull "$at_stdout" || at_failed=:
   14402 at_fn_check_status 0 $at_status "$at_srcdir/output.at:97"
   14403 $at_failed && at_fn_log_failure
   14404 $at_traceon; }
   14405 
   14406 
   14407 { set +x
   14408 $as_echo "$at_srcdir/output.at:97: ls foo.c++ foo.hpp"
   14409 at_fn_check_prepare_trace "output.at:97"
   14410 ( $at_check_trace; ls foo.c++ foo.hpp
   14411 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14412 at_status=$? at_failed=false
   14413 $at_check_filter
   14414 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14415 echo stdout:; cat "$at_stdout"
   14416 at_fn_check_status 0 $at_status "$at_srcdir/output.at:97"
   14417 $at_failed && at_fn_log_failure
   14418 $at_traceon; }
   14419 
   14420 
   14421   set +x
   14422   $at_times_p && times >"$at_times_file"
   14423 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   14424 read at_status <"$at_status_file"
   14425 #AT_STOP_67
   14426 #AT_START_68
   14427 at_fn_group_banner 68 'output.at:101' \
   14428   "Output files:  -o foo.c++ --graph=foo.gph " "     " 3
   14429 at_xfail=no
   14430 (
   14431   $as_echo "68. $at_setup_line: testing $at_desc ..."
   14432   $at_traceon
   14433 
   14434 
   14435 for file in foo.yy foo.c++ foo.gph; do
   14436   case "$file" in
   14437     */*) mkdir -p `echo "$file" | sed 's,/.*,,'`;;
   14438   esac
   14439 done
   14440 cat >foo.yy <<'_ATEOF'
   14441 
   14442 %%
   14443 foo: {};
   14444 _ATEOF
   14445 
   14446 
   14447 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   14448   at_save_special_files
   14449   mkdir xml-tests
   14450     # Don't combine these Bison invocations since we want to be sure that
   14451   # --report=all isn't required to get the full XML file.
   14452   { set +x
   14453 $as_echo "$at_srcdir/output.at:101: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   14454                   --graph=xml-tests/test.dot -o foo.c++  foo.yy "
   14455 at_fn_check_prepare_notrace 'an embedded newline' "output.at:101"
   14456 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   14457                   --graph=xml-tests/test.dot -o foo.c++  foo.yy
   14458 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14459 at_status=$? at_failed=false
   14460 $at_check_filter
   14461 echo stderr:; cat "$at_stderr"
   14462 echo stdout:; cat "$at_stdout"
   14463 at_fn_check_status 0 $at_status "$at_srcdir/output.at:101"
   14464 $at_failed && at_fn_log_failure
   14465 $at_traceon; }
   14466 
   14467   { set +x
   14468 $as_echo "$at_srcdir/output.at:101: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o foo.c++  foo.yy "
   14469 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o foo.c++  foo.yy " "output.at:101"
   14470 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o foo.c++  foo.yy
   14471 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14472 at_status=$? at_failed=false
   14473 $at_check_filter
   14474 echo stderr:; cat "$at_stderr"
   14475 echo stdout:; cat "$at_stdout"
   14476 at_fn_check_status 0 $at_status "$at_srcdir/output.at:101"
   14477 $at_failed && at_fn_log_failure
   14478 $at_traceon; }
   14479 
   14480     cp xml-tests/test.output expout
   14481   { set +x
   14482 $as_echo "$at_srcdir/output.at:101: \$XSLTPROC \\
   14483              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   14484              xml-tests/test.xml"
   14485 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:101"
   14486 ( $at_check_trace; $XSLTPROC \
   14487              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   14488              xml-tests/test.xml
   14489 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14490 at_status=$? at_failed=false
   14491 $at_check_filter
   14492 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14493 $at_diff expout "$at_stdout" || at_failed=:
   14494 at_fn_check_status 0 $at_status "$at_srcdir/output.at:101"
   14495 $at_failed && at_fn_log_failure
   14496 $at_traceon; }
   14497 
   14498   sort xml-tests/test.dot > expout
   14499   { set +x
   14500 $as_echo "$at_srcdir/output.at:101: \$XSLTPROC \\
   14501              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   14502              xml-tests/test.xml | sort"
   14503 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:101"
   14504 ( $at_check_trace; $XSLTPROC \
   14505              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   14506              xml-tests/test.xml | sort
   14507 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14508 at_status=$? at_failed=false
   14509 $at_check_filter
   14510 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14511 $at_diff expout "$at_stdout" || at_failed=:
   14512 at_fn_check_status 0 $at_status "$at_srcdir/output.at:101"
   14513 $at_failed && at_fn_log_failure
   14514 $at_traceon; }
   14515 
   14516   rm -rf xml-tests expout
   14517   at_restore_special_files
   14518 fi
   14519 { set +x
   14520 $as_echo "$at_srcdir/output.at:101: bison -o foo.c++ --graph=foo.gph foo.yy "
   14521 at_fn_check_prepare_trace "output.at:101"
   14522 ( $at_check_trace; bison -o foo.c++ --graph=foo.gph foo.yy
   14523 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14524 at_status=$? at_failed=false
   14525 $at_check_filter
   14526 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14527 at_fn_diff_devnull "$at_stdout" || at_failed=:
   14528 at_fn_check_status 0 $at_status "$at_srcdir/output.at:101"
   14529 $at_failed && at_fn_log_failure
   14530 $at_traceon; }
   14531 
   14532 
   14533 { set +x
   14534 $as_echo "$at_srcdir/output.at:101: ls foo.c++ foo.gph"
   14535 at_fn_check_prepare_trace "output.at:101"
   14536 ( $at_check_trace; ls foo.c++ foo.gph
   14537 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14538 at_status=$? at_failed=false
   14539 $at_check_filter
   14540 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14541 echo stdout:; cat "$at_stdout"
   14542 at_fn_check_status 0 $at_status "$at_srcdir/output.at:101"
   14543 $at_failed && at_fn_log_failure
   14544 $at_traceon; }
   14545 
   14546 
   14547   set +x
   14548   $at_times_p && times >"$at_times_file"
   14549 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   14550 read at_status <"$at_status_file"
   14551 #AT_STOP_68
   14552 #AT_START_69
   14553 at_fn_group_banner 69 'output.at:116' \
   14554   "Output files: %skeleton \"lalr1.cc\" %defines %verbose  " "" 3
   14555 at_xfail=no
   14556 (
   14557   $as_echo "69. $at_setup_line: testing $at_desc ..."
   14558   $at_traceon
   14559 
   14560 
   14561 for file in foo.yy foo.tab.cc foo.tab.hh foo.output location.hh stack.hh position.hh; do
   14562   case "$file" in
   14563     */*) mkdir -p `echo "$file" | sed 's,/.*,,'`;;
   14564   esac
   14565 done
   14566 cat >foo.yy <<'_ATEOF'
   14567 %skeleton "lalr1.cc" %defines %verbose
   14568 %%
   14569 foo: {};
   14570 _ATEOF
   14571 
   14572 
   14573 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   14574   at_save_special_files
   14575   mkdir xml-tests
   14576     # Don't combine these Bison invocations since we want to be sure that
   14577   # --report=all isn't required to get the full XML file.
   14578   { set +x
   14579 $as_echo "$at_srcdir/output.at:116: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   14580                   --graph=xml-tests/test.dot  foo.yy "
   14581 at_fn_check_prepare_notrace 'an embedded newline' "output.at:116"
   14582 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   14583                   --graph=xml-tests/test.dot  foo.yy
   14584 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14585 at_status=$? at_failed=false
   14586 $at_check_filter
   14587 echo stderr:; cat "$at_stderr"
   14588 echo stdout:; cat "$at_stdout"
   14589 at_fn_check_status 0 $at_status "$at_srcdir/output.at:116"
   14590 $at_failed && at_fn_log_failure
   14591 $at_traceon; }
   14592 
   14593   { set +x
   14594 $as_echo "$at_srcdir/output.at:116: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.yy "
   14595 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.yy " "output.at:116"
   14596 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  foo.yy
   14597 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14598 at_status=$? at_failed=false
   14599 $at_check_filter
   14600 echo stderr:; cat "$at_stderr"
   14601 echo stdout:; cat "$at_stdout"
   14602 at_fn_check_status 0 $at_status "$at_srcdir/output.at:116"
   14603 $at_failed && at_fn_log_failure
   14604 $at_traceon; }
   14605 
   14606     cp xml-tests/test.output expout
   14607   { set +x
   14608 $as_echo "$at_srcdir/output.at:116: \$XSLTPROC \\
   14609              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   14610              xml-tests/test.xml"
   14611 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:116"
   14612 ( $at_check_trace; $XSLTPROC \
   14613              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   14614              xml-tests/test.xml
   14615 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14616 at_status=$? at_failed=false
   14617 $at_check_filter
   14618 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14619 $at_diff expout "$at_stdout" || at_failed=:
   14620 at_fn_check_status 0 $at_status "$at_srcdir/output.at:116"
   14621 $at_failed && at_fn_log_failure
   14622 $at_traceon; }
   14623 
   14624   sort xml-tests/test.dot > expout
   14625   { set +x
   14626 $as_echo "$at_srcdir/output.at:116: \$XSLTPROC \\
   14627              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   14628              xml-tests/test.xml | sort"
   14629 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:116"
   14630 ( $at_check_trace; $XSLTPROC \
   14631              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   14632              xml-tests/test.xml | sort
   14633 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14634 at_status=$? at_failed=false
   14635 $at_check_filter
   14636 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14637 $at_diff expout "$at_stdout" || at_failed=:
   14638 at_fn_check_status 0 $at_status "$at_srcdir/output.at:116"
   14639 $at_failed && at_fn_log_failure
   14640 $at_traceon; }
   14641 
   14642   rm -rf xml-tests expout
   14643   at_restore_special_files
   14644 fi
   14645 { set +x
   14646 $as_echo "$at_srcdir/output.at:116: bison  foo.yy "
   14647 at_fn_check_prepare_trace "output.at:116"
   14648 ( $at_check_trace; bison  foo.yy
   14649 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14650 at_status=$? at_failed=false
   14651 $at_check_filter
   14652 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14653 at_fn_diff_devnull "$at_stdout" || at_failed=:
   14654 at_fn_check_status 0 $at_status "$at_srcdir/output.at:116"
   14655 $at_failed && at_fn_log_failure
   14656 $at_traceon; }
   14657 
   14658 
   14659 { set +x
   14660 $as_echo "$at_srcdir/output.at:116: ls foo.tab.cc foo.tab.hh foo.output location.hh stack.hh position.hh"
   14661 at_fn_check_prepare_trace "output.at:116"
   14662 ( $at_check_trace; ls foo.tab.cc foo.tab.hh foo.output location.hh stack.hh position.hh
   14663 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14664 at_status=$? at_failed=false
   14665 $at_check_filter
   14666 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14667 echo stdout:; cat "$at_stdout"
   14668 at_fn_check_status 0 $at_status "$at_srcdir/output.at:116"
   14669 $at_failed && at_fn_log_failure
   14670 $at_traceon; }
   14671 
   14672 
   14673   set +x
   14674   $at_times_p && times >"$at_times_file"
   14675 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   14676 read at_status <"$at_status_file"
   14677 #AT_STOP_69
   14678 #AT_START_70
   14679 at_fn_group_banner 70 'output.at:119' \
   14680   "Output files: %skeleton \"lalr1.cc\" %defines %verbose  " "" 3
   14681 at_xfail=no
   14682 (
   14683   $as_echo "70. $at_setup_line: testing $at_desc ..."
   14684   $at_traceon
   14685 
   14686 
   14687 for file in subdir/foo.yy foo.tab.cc foo.tab.hh foo.output location.hh stack.hh position.hh; do
   14688   case "$file" in
   14689     */*) mkdir -p `echo "$file" | sed 's,/.*,,'`;;
   14690   esac
   14691 done
   14692 cat >subdir/foo.yy <<'_ATEOF'
   14693 %skeleton "lalr1.cc" %defines %verbose
   14694 %%
   14695 foo: {};
   14696 _ATEOF
   14697 
   14698 
   14699 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   14700   at_save_special_files
   14701   mkdir xml-tests
   14702     # Don't combine these Bison invocations since we want to be sure that
   14703   # --report=all isn't required to get the full XML file.
   14704   { set +x
   14705 $as_echo "$at_srcdir/output.at:119: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   14706                   --graph=xml-tests/test.dot  subdir/foo.yy "
   14707 at_fn_check_prepare_notrace 'an embedded newline' "output.at:119"
   14708 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   14709                   --graph=xml-tests/test.dot  subdir/foo.yy
   14710 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14711 at_status=$? at_failed=false
   14712 $at_check_filter
   14713 echo stderr:; cat "$at_stderr"
   14714 echo stdout:; cat "$at_stdout"
   14715 at_fn_check_status 0 $at_status "$at_srcdir/output.at:119"
   14716 $at_failed && at_fn_log_failure
   14717 $at_traceon; }
   14718 
   14719   { set +x
   14720 $as_echo "$at_srcdir/output.at:119: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  subdir/foo.yy "
   14721 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  subdir/foo.yy " "output.at:119"
   14722 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  subdir/foo.yy
   14723 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14724 at_status=$? at_failed=false
   14725 $at_check_filter
   14726 echo stderr:; cat "$at_stderr"
   14727 echo stdout:; cat "$at_stdout"
   14728 at_fn_check_status 0 $at_status "$at_srcdir/output.at:119"
   14729 $at_failed && at_fn_log_failure
   14730 $at_traceon; }
   14731 
   14732     cp xml-tests/test.output expout
   14733   { set +x
   14734 $as_echo "$at_srcdir/output.at:119: \$XSLTPROC \\
   14735              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   14736              xml-tests/test.xml"
   14737 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:119"
   14738 ( $at_check_trace; $XSLTPROC \
   14739              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   14740              xml-tests/test.xml
   14741 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14742 at_status=$? at_failed=false
   14743 $at_check_filter
   14744 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14745 $at_diff expout "$at_stdout" || at_failed=:
   14746 at_fn_check_status 0 $at_status "$at_srcdir/output.at:119"
   14747 $at_failed && at_fn_log_failure
   14748 $at_traceon; }
   14749 
   14750   sort xml-tests/test.dot > expout
   14751   { set +x
   14752 $as_echo "$at_srcdir/output.at:119: \$XSLTPROC \\
   14753              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   14754              xml-tests/test.xml | sort"
   14755 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:119"
   14756 ( $at_check_trace; $XSLTPROC \
   14757              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   14758              xml-tests/test.xml | sort
   14759 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14760 at_status=$? at_failed=false
   14761 $at_check_filter
   14762 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14763 $at_diff expout "$at_stdout" || at_failed=:
   14764 at_fn_check_status 0 $at_status "$at_srcdir/output.at:119"
   14765 $at_failed && at_fn_log_failure
   14766 $at_traceon; }
   14767 
   14768   rm -rf xml-tests expout
   14769   at_restore_special_files
   14770 fi
   14771 { set +x
   14772 $as_echo "$at_srcdir/output.at:119: bison  subdir/foo.yy "
   14773 at_fn_check_prepare_trace "output.at:119"
   14774 ( $at_check_trace; bison  subdir/foo.yy
   14775 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14776 at_status=$? at_failed=false
   14777 $at_check_filter
   14778 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14779 at_fn_diff_devnull "$at_stdout" || at_failed=:
   14780 at_fn_check_status 0 $at_status "$at_srcdir/output.at:119"
   14781 $at_failed && at_fn_log_failure
   14782 $at_traceon; }
   14783 
   14784 
   14785 { set +x
   14786 $as_echo "$at_srcdir/output.at:119: ls foo.tab.cc foo.tab.hh foo.output location.hh stack.hh position.hh"
   14787 at_fn_check_prepare_trace "output.at:119"
   14788 ( $at_check_trace; ls foo.tab.cc foo.tab.hh foo.output location.hh stack.hh position.hh
   14789 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14790 at_status=$? at_failed=false
   14791 $at_check_filter
   14792 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14793 echo stdout:; cat "$at_stdout"
   14794 at_fn_check_status 0 $at_status "$at_srcdir/output.at:119"
   14795 $at_failed && at_fn_log_failure
   14796 $at_traceon; }
   14797 
   14798 # Also make sure that the includes do not refer to the subdirectory.
   14799 { set +x
   14800 $as_echo "$at_srcdir/output.at:119: grep 'include .subdir/' foo.tab.cc"
   14801 at_fn_check_prepare_trace "output.at:119"
   14802 ( $at_check_trace; grep 'include .subdir/' foo.tab.cc
   14803 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14804 at_status=$? at_failed=false
   14805 $at_check_filter
   14806 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14807 at_fn_diff_devnull "$at_stdout" || at_failed=:
   14808 at_fn_check_status 1 $at_status "$at_srcdir/output.at:119"
   14809 $at_failed && at_fn_log_failure
   14810 $at_traceon; }
   14811 
   14812 { set +x
   14813 $as_echo "$at_srcdir/output.at:119: grep 'include .subdir/' foo.tab.hh"
   14814 at_fn_check_prepare_trace "output.at:119"
   14815 ( $at_check_trace; grep 'include .subdir/' foo.tab.hh
   14816 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14817 at_status=$? at_failed=false
   14818 $at_check_filter
   14819 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14820 at_fn_diff_devnull "$at_stdout" || at_failed=:
   14821 at_fn_check_status 1 $at_status "$at_srcdir/output.at:119"
   14822 $at_failed && at_fn_log_failure
   14823 $at_traceon; }
   14824 
   14825 
   14826   set +x
   14827   $at_times_p && times >"$at_times_file"
   14828 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   14829 read at_status <"$at_status_file"
   14830 #AT_STOP_70
   14831 #AT_START_71
   14832 at_fn_group_banner 71 'output.at:123' \
   14833   "Output files: %skeleton \"lalr1.cc\" %defines %verbose -o subdir/foo.cc " "" 3
   14834 at_xfail=no
   14835 (
   14836   $as_echo "71. $at_setup_line: testing $at_desc ..."
   14837   $at_traceon
   14838 
   14839 
   14840 for file in subdir/foo.yy subdir/foo.cc subdir/foo.hh subdir/foo.output subdir/location.hh subdir/stack.hh subdir/position.hh; do
   14841   case "$file" in
   14842     */*) mkdir -p `echo "$file" | sed 's,/.*,,'`;;
   14843   esac
   14844 done
   14845 cat >subdir/foo.yy <<'_ATEOF'
   14846 %skeleton "lalr1.cc" %defines %verbose
   14847 %%
   14848 foo: {};
   14849 _ATEOF
   14850 
   14851 
   14852 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   14853   at_save_special_files
   14854   mkdir xml-tests
   14855     # Don't combine these Bison invocations since we want to be sure that
   14856   # --report=all isn't required to get the full XML file.
   14857   { set +x
   14858 $as_echo "$at_srcdir/output.at:123: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   14859                   --graph=xml-tests/test.dot -o subdir/foo.cc subdir/foo.yy "
   14860 at_fn_check_prepare_notrace 'an embedded newline' "output.at:123"
   14861 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   14862                   --graph=xml-tests/test.dot -o subdir/foo.cc subdir/foo.yy
   14863 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14864 at_status=$? at_failed=false
   14865 $at_check_filter
   14866 echo stderr:; cat "$at_stderr"
   14867 echo stdout:; cat "$at_stdout"
   14868 at_fn_check_status 0 $at_status "$at_srcdir/output.at:123"
   14869 $at_failed && at_fn_log_failure
   14870 $at_traceon; }
   14871 
   14872   { set +x
   14873 $as_echo "$at_srcdir/output.at:123: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o subdir/foo.cc subdir/foo.yy "
   14874 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o subdir/foo.cc subdir/foo.yy " "output.at:123"
   14875 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o subdir/foo.cc subdir/foo.yy
   14876 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14877 at_status=$? at_failed=false
   14878 $at_check_filter
   14879 echo stderr:; cat "$at_stderr"
   14880 echo stdout:; cat "$at_stdout"
   14881 at_fn_check_status 0 $at_status "$at_srcdir/output.at:123"
   14882 $at_failed && at_fn_log_failure
   14883 $at_traceon; }
   14884 
   14885     cp xml-tests/test.output expout
   14886   { set +x
   14887 $as_echo "$at_srcdir/output.at:123: \$XSLTPROC \\
   14888              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   14889              xml-tests/test.xml"
   14890 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:123"
   14891 ( $at_check_trace; $XSLTPROC \
   14892              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   14893              xml-tests/test.xml
   14894 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14895 at_status=$? at_failed=false
   14896 $at_check_filter
   14897 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14898 $at_diff expout "$at_stdout" || at_failed=:
   14899 at_fn_check_status 0 $at_status "$at_srcdir/output.at:123"
   14900 $at_failed && at_fn_log_failure
   14901 $at_traceon; }
   14902 
   14903   sort xml-tests/test.dot > expout
   14904   { set +x
   14905 $as_echo "$at_srcdir/output.at:123: \$XSLTPROC \\
   14906              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   14907              xml-tests/test.xml | sort"
   14908 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:123"
   14909 ( $at_check_trace; $XSLTPROC \
   14910              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   14911              xml-tests/test.xml | sort
   14912 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14913 at_status=$? at_failed=false
   14914 $at_check_filter
   14915 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14916 $at_diff expout "$at_stdout" || at_failed=:
   14917 at_fn_check_status 0 $at_status "$at_srcdir/output.at:123"
   14918 $at_failed && at_fn_log_failure
   14919 $at_traceon; }
   14920 
   14921   rm -rf xml-tests expout
   14922   at_restore_special_files
   14923 fi
   14924 { set +x
   14925 $as_echo "$at_srcdir/output.at:123: bison -o subdir/foo.cc subdir/foo.yy "
   14926 at_fn_check_prepare_trace "output.at:123"
   14927 ( $at_check_trace; bison -o subdir/foo.cc subdir/foo.yy
   14928 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14929 at_status=$? at_failed=false
   14930 $at_check_filter
   14931 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14932 at_fn_diff_devnull "$at_stdout" || at_failed=:
   14933 at_fn_check_status 0 $at_status "$at_srcdir/output.at:123"
   14934 $at_failed && at_fn_log_failure
   14935 $at_traceon; }
   14936 
   14937 
   14938 { set +x
   14939 $as_echo "$at_srcdir/output.at:123: ls subdir/foo.cc subdir/foo.hh subdir/foo.output subdir/location.hh subdir/stack.hh subdir/position.hh"
   14940 at_fn_check_prepare_trace "output.at:123"
   14941 ( $at_check_trace; ls subdir/foo.cc subdir/foo.hh subdir/foo.output subdir/location.hh subdir/stack.hh subdir/position.hh
   14942 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14943 at_status=$? at_failed=false
   14944 $at_check_filter
   14945 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14946 echo stdout:; cat "$at_stdout"
   14947 at_fn_check_status 0 $at_status "$at_srcdir/output.at:123"
   14948 $at_failed && at_fn_log_failure
   14949 $at_traceon; }
   14950 
   14951 # Also make sure that the includes do not refer to the subdirectory.
   14952 { set +x
   14953 $as_echo "$at_srcdir/output.at:123: grep 'include .subdir/' subdir/foo.cc"
   14954 at_fn_check_prepare_trace "output.at:123"
   14955 ( $at_check_trace; grep 'include .subdir/' subdir/foo.cc
   14956 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14957 at_status=$? at_failed=false
   14958 $at_check_filter
   14959 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14960 at_fn_diff_devnull "$at_stdout" || at_failed=:
   14961 at_fn_check_status 1 $at_status "$at_srcdir/output.at:123"
   14962 $at_failed && at_fn_log_failure
   14963 $at_traceon; }
   14964 
   14965 { set +x
   14966 $as_echo "$at_srcdir/output.at:123: grep 'include .subdir/' subdir/foo.hh"
   14967 at_fn_check_prepare_trace "output.at:123"
   14968 ( $at_check_trace; grep 'include .subdir/' subdir/foo.hh
   14969 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   14970 at_status=$? at_failed=false
   14971 $at_check_filter
   14972 at_fn_diff_devnull "$at_stderr" || at_failed=:
   14973 at_fn_diff_devnull "$at_stdout" || at_failed=:
   14974 at_fn_check_status 1 $at_status "$at_srcdir/output.at:123"
   14975 $at_failed && at_fn_log_failure
   14976 $at_traceon; }
   14977 
   14978 
   14979   set +x
   14980   $at_times_p && times >"$at_times_file"
   14981 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   14982 read at_status <"$at_status_file"
   14983 #AT_STOP_71
   14984 #AT_START_72
   14985 at_fn_group_banner 72 'output.at:128' \
   14986   "Output files: %skeleton \"lalr1.cc\" %defines %verbose %file-prefix \"output_dir/foo\"  " "" 3
   14987 at_xfail=no
   14988 (
   14989   $as_echo "72. $at_setup_line: testing $at_desc ..."
   14990   $at_traceon
   14991 
   14992 
   14993 for file in gram_dir/foo.yy output_dir/foo.tab.cc output_dir/foo.tab.hh output_dir/foo.output output_dir/location.hh output_dir/stack.hh output_dir/position.hh; do
   14994   case "$file" in
   14995     */*) mkdir -p `echo "$file" | sed 's,/.*,,'`;;
   14996   esac
   14997 done
   14998 cat >gram_dir/foo.yy <<'_ATEOF'
   14999 %skeleton "lalr1.cc" %defines %verbose %file-prefix "output_dir/foo"
   15000 %%
   15001 foo: {};
   15002 _ATEOF
   15003 
   15004 
   15005 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   15006   at_save_special_files
   15007   mkdir xml-tests
   15008     # Don't combine these Bison invocations since we want to be sure that
   15009   # --report=all isn't required to get the full XML file.
   15010   { set +x
   15011 $as_echo "$at_srcdir/output.at:128: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   15012                   --graph=xml-tests/test.dot  gram_dir/foo.yy "
   15013 at_fn_check_prepare_notrace 'an embedded newline' "output.at:128"
   15014 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   15015                   --graph=xml-tests/test.dot  gram_dir/foo.yy
   15016 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15017 at_status=$? at_failed=false
   15018 $at_check_filter
   15019 echo stderr:; cat "$at_stderr"
   15020 echo stdout:; cat "$at_stdout"
   15021 at_fn_check_status 0 $at_status "$at_srcdir/output.at:128"
   15022 $at_failed && at_fn_log_failure
   15023 $at_traceon; }
   15024 
   15025   { set +x
   15026 $as_echo "$at_srcdir/output.at:128: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  gram_dir/foo.yy "
   15027 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  gram_dir/foo.yy " "output.at:128"
   15028 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  gram_dir/foo.yy
   15029 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15030 at_status=$? at_failed=false
   15031 $at_check_filter
   15032 echo stderr:; cat "$at_stderr"
   15033 echo stdout:; cat "$at_stdout"
   15034 at_fn_check_status 0 $at_status "$at_srcdir/output.at:128"
   15035 $at_failed && at_fn_log_failure
   15036 $at_traceon; }
   15037 
   15038     cp xml-tests/test.output expout
   15039   { set +x
   15040 $as_echo "$at_srcdir/output.at:128: \$XSLTPROC \\
   15041              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   15042              xml-tests/test.xml"
   15043 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:128"
   15044 ( $at_check_trace; $XSLTPROC \
   15045              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   15046              xml-tests/test.xml
   15047 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15048 at_status=$? at_failed=false
   15049 $at_check_filter
   15050 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15051 $at_diff expout "$at_stdout" || at_failed=:
   15052 at_fn_check_status 0 $at_status "$at_srcdir/output.at:128"
   15053 $at_failed && at_fn_log_failure
   15054 $at_traceon; }
   15055 
   15056   sort xml-tests/test.dot > expout
   15057   { set +x
   15058 $as_echo "$at_srcdir/output.at:128: \$XSLTPROC \\
   15059              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   15060              xml-tests/test.xml | sort"
   15061 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:128"
   15062 ( $at_check_trace; $XSLTPROC \
   15063              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   15064              xml-tests/test.xml | sort
   15065 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15066 at_status=$? at_failed=false
   15067 $at_check_filter
   15068 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15069 $at_diff expout "$at_stdout" || at_failed=:
   15070 at_fn_check_status 0 $at_status "$at_srcdir/output.at:128"
   15071 $at_failed && at_fn_log_failure
   15072 $at_traceon; }
   15073 
   15074   rm -rf xml-tests expout
   15075   at_restore_special_files
   15076 fi
   15077 { set +x
   15078 $as_echo "$at_srcdir/output.at:128: bison  gram_dir/foo.yy "
   15079 at_fn_check_prepare_trace "output.at:128"
   15080 ( $at_check_trace; bison  gram_dir/foo.yy
   15081 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15082 at_status=$? at_failed=false
   15083 $at_check_filter
   15084 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15085 at_fn_diff_devnull "$at_stdout" || at_failed=:
   15086 at_fn_check_status 0 $at_status "$at_srcdir/output.at:128"
   15087 $at_failed && at_fn_log_failure
   15088 $at_traceon; }
   15089 
   15090 
   15091 { set +x
   15092 $as_echo "$at_srcdir/output.at:128: ls output_dir/foo.tab.cc output_dir/foo.tab.hh output_dir/foo.output output_dir/location.hh output_dir/stack.hh output_dir/position.hh"
   15093 at_fn_check_prepare_trace "output.at:128"
   15094 ( $at_check_trace; ls output_dir/foo.tab.cc output_dir/foo.tab.hh output_dir/foo.output output_dir/location.hh output_dir/stack.hh output_dir/position.hh
   15095 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15096 at_status=$? at_failed=false
   15097 $at_check_filter
   15098 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15099 echo stdout:; cat "$at_stdout"
   15100 at_fn_check_status 0 $at_status "$at_srcdir/output.at:128"
   15101 $at_failed && at_fn_log_failure
   15102 $at_traceon; }
   15103 
   15104 
   15105   set +x
   15106   $at_times_p && times >"$at_times_file"
   15107 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   15108 read at_status <"$at_status_file"
   15109 #AT_STOP_72
   15110 #AT_START_73
   15111 at_fn_group_banner 73 'output.at:158' \
   15112   "Conflicting output files:  --graph=\"foo.tab.c\"" " " 3
   15113 at_xfail=no
   15114 (
   15115   $as_echo "73. $at_setup_line: testing $at_desc ..."
   15116   $at_traceon
   15117 
   15118 case "foo.y" in
   15119   */*) mkdir `echo "foo.y" | sed 's,/.*,,'`;;
   15120 esac
   15121 cat >foo.y <<'_ATEOF'
   15122 
   15123 %%
   15124 foo: {};
   15125 _ATEOF
   15126 
   15127 
   15128 cp foo.y expout
   15129 # Because an output file name conflict is still a warning, Bison exits
   15130 # with status 0, so AT_BISON_CHECK does not realize that there may be no
   15131 # output file against which to check the XML.  AT_BISON_CHECK_NO_XML
   15132 # avoids that problem.
   15133 { set +x
   15134 $as_echo "$at_srcdir/output.at:158: bison --graph=\"foo.tab.c\" foo.y"
   15135 at_fn_check_prepare_trace "output.at:158"
   15136 ( $at_check_trace; bison --graph="foo.tab.c" foo.y
   15137 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15138 at_status=$? at_failed=false
   15139 $at_check_filter
   15140 echo >>"$at_stderr"; $as_echo "foo.y: warning: conflicting outputs to file 'foo.tab.c'
   15141 " | \
   15142   $at_diff - "$at_stderr" || at_failed=:
   15143 at_fn_diff_devnull "$at_stdout" || at_failed=:
   15144 at_fn_check_status 0 $at_status "$at_srcdir/output.at:158"
   15145 $at_failed && at_fn_log_failure
   15146 $at_traceon; }
   15147 
   15148 # Defining POSIXLY_CORRECT causes bison to complain if options are
   15149 # added after the grammar file name, so skip these checks in that
   15150 # case.
   15151 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   15152   at_save_special_files
   15153 
   15154   # To avoid expanding it repeatedly, store specified stdout.
   15155   : >expout
   15156 
   15157   # Run with -Werror.
   15158   { set +x
   15159 $as_echo "$at_srcdir/output.at:158: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --graph=\"foo.tab.c\" foo.y -Werror"
   15160 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --graph=\"foo.tab.c\" foo.y -Werror" "output.at:158"
   15161 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --graph="foo.tab.c" foo.y -Werror
   15162 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15163 at_status=$? at_failed=false
   15164 $at_check_filter
   15165 echo stderr:; tee stderr <"$at_stderr"
   15166 $at_diff expout "$at_stdout" || at_failed=:
   15167 at_fn_check_status 1 $at_status "$at_srcdir/output.at:158"
   15168 $at_failed && at_fn_log_failure
   15169 $at_traceon; }
   15170 
   15171 
   15172   # Build expected stderr up to and including the "warnings being
   15173   # treated as errors" message.
   15174   cat >at-bison-check-warnings <<'_ATEOF'
   15175 foo.y: warning: conflicting outputs to file 'foo.tab.c'
   15176 _ATEOF
   15177 
   15178   at_bison_check_first=`sed -n \
   15179     '/: warning: /{=;q;}' at-bison-check-warnings`
   15180   : ${at_bison_check_first:=1}
   15181   at_bison_check_first_tmp=`sed -n \
   15182     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   15183   : ${at_bison_check_first_tmp:=1}
   15184   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   15185     at_bison_check_first=$at_bison_check_first_tmp
   15186   fi
   15187   if test $at_bison_check_first -gt 1; then
   15188     sed -n "1,`expr $at_bison_check_first - 1`"p \
   15189       at-bison-check-warnings > experr
   15190   fi
   15191   echo 'bison: warnings being treated as errors' >> experr
   15192 
   15193   # Finish building expected stderr and check.  Unlike warnings,
   15194   # complaints cause bison to exit early.  Thus, with -Werror, bison
   15195   # does not necessarily report all warnings that it does without
   15196   # -Werror, but it at least reports one.
   15197   at_bison_check_last=`sed -n '$=' stderr`
   15198   : ${at_bison_check_last:=1}
   15199   at_bison_check_last=`expr $at_bison_check_last - 1`
   15200   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   15201     at-bison-check-warnings >> experr
   15202   { set +x
   15203 $as_echo "$at_srcdir/output.at:158: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   15204               stderr 1>&2"
   15205 at_fn_check_prepare_notrace 'an embedded newline' "output.at:158"
   15206 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   15207               stderr 1>&2
   15208 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15209 at_status=$? at_failed=false
   15210 $at_check_filter
   15211 $at_diff experr "$at_stderr" || at_failed=:
   15212 at_fn_diff_devnull "$at_stdout" || at_failed=:
   15213 at_fn_check_status 0 $at_status "$at_srcdir/output.at:158"
   15214 $at_failed && at_fn_log_failure
   15215 $at_traceon; }
   15216 
   15217 
   15218   # Now check --warnings=error.
   15219   cp stderr experr
   15220   { set +x
   15221 $as_echo "$at_srcdir/output.at:158: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --graph=\"foo.tab.c\" foo.y --warnings=error"
   15222 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --graph=\"foo.tab.c\" foo.y --warnings=error" "output.at:158"
   15223 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --graph="foo.tab.c" foo.y --warnings=error
   15224 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15225 at_status=$? at_failed=false
   15226 $at_check_filter
   15227 $at_diff experr "$at_stderr" || at_failed=:
   15228 $at_diff expout "$at_stdout" || at_failed=:
   15229 at_fn_check_status 1 $at_status "$at_srcdir/output.at:158"
   15230 $at_failed && at_fn_log_failure
   15231 $at_traceon; }
   15232 
   15233 
   15234   # Now check -Wnone and --warnings=none by making sure that
   15235   # -Werror doesn't change the exit status when -Wnone or
   15236   # --warnings=none is specified.
   15237   { set +x
   15238 $as_echo "$at_srcdir/output.at:158: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --graph=\"foo.tab.c\" foo.y -Wnone -Werror"
   15239 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --graph=\"foo.tab.c\" foo.y -Wnone -Werror" "output.at:158"
   15240 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --graph="foo.tab.c" foo.y -Wnone -Werror
   15241 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15242 at_status=$? at_failed=false
   15243 $at_check_filter
   15244 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15245 $at_diff expout "$at_stdout" || at_failed=:
   15246 at_fn_check_status 0 $at_status "$at_srcdir/output.at:158"
   15247 $at_failed && at_fn_log_failure
   15248 $at_traceon; }
   15249 
   15250   { set +x
   15251 $as_echo "$at_srcdir/output.at:158: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --graph=\"foo.tab.c\" foo.y --warnings=none -Werror"
   15252 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --graph=\"foo.tab.c\" foo.y --warnings=none -Werror" "output.at:158"
   15253 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --graph="foo.tab.c" foo.y --warnings=none -Werror
   15254 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15255 at_status=$? at_failed=false
   15256 $at_check_filter
   15257 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15258 $at_diff expout "$at_stdout" || at_failed=:
   15259 at_fn_check_status 0 $at_status "$at_srcdir/output.at:158"
   15260 $at_failed && at_fn_log_failure
   15261 $at_traceon; }
   15262 
   15263 
   15264   at_restore_special_files
   15265 fi
   15266 { set +x
   15267 $as_echo "$at_srcdir/output.at:158: cat foo.y"
   15268 at_fn_check_prepare_trace "output.at:158"
   15269 ( $at_check_trace; cat foo.y
   15270 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15271 at_status=$? at_failed=false
   15272 $at_check_filter
   15273 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15274 $at_diff expout "$at_stdout" || at_failed=:
   15275 at_fn_check_status 0 $at_status "$at_srcdir/output.at:158"
   15276 $at_failed && at_fn_log_failure
   15277 $at_traceon; }
   15278 
   15279   set +x
   15280   $at_times_p && times >"$at_times_file"
   15281 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   15282 read at_status <"$at_status_file"
   15283 #AT_STOP_73
   15284 #AT_START_74
   15285 at_fn_group_banner 74 'output.at:163' \
   15286   "Conflicting output files: %defines \"foo.output\" -v" "" 3
   15287 at_xfail=no
   15288 (
   15289   $as_echo "74. $at_setup_line: testing $at_desc ..."
   15290   $at_traceon
   15291 
   15292 case "foo.y" in
   15293   */*) mkdir `echo "foo.y" | sed 's,/.*,,'`;;
   15294 esac
   15295 cat >foo.y <<'_ATEOF'
   15296 %defines "foo.output"
   15297 %%
   15298 foo: {};
   15299 _ATEOF
   15300 
   15301 
   15302 cp foo.y expout
   15303 # Because an output file name conflict is still a warning, Bison exits
   15304 # with status 0, so AT_BISON_CHECK does not realize that there may be no
   15305 # output file against which to check the XML.  AT_BISON_CHECK_NO_XML
   15306 # avoids that problem.
   15307 { set +x
   15308 $as_echo "$at_srcdir/output.at:163: bison -v foo.y"
   15309 at_fn_check_prepare_trace "output.at:163"
   15310 ( $at_check_trace; bison -v foo.y
   15311 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15312 at_status=$? at_failed=false
   15313 $at_check_filter
   15314 echo >>"$at_stderr"; $as_echo "foo.y: warning: conflicting outputs to file 'foo.output'
   15315 " | \
   15316   $at_diff - "$at_stderr" || at_failed=:
   15317 at_fn_diff_devnull "$at_stdout" || at_failed=:
   15318 at_fn_check_status 0 $at_status "$at_srcdir/output.at:163"
   15319 $at_failed && at_fn_log_failure
   15320 $at_traceon; }
   15321 
   15322 # Defining POSIXLY_CORRECT causes bison to complain if options are
   15323 # added after the grammar file name, so skip these checks in that
   15324 # case.
   15325 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   15326   at_save_special_files
   15327 
   15328   # To avoid expanding it repeatedly, store specified stdout.
   15329   : >expout
   15330 
   15331   # Run with -Werror.
   15332   { set +x
   15333 $as_echo "$at_srcdir/output.at:163: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -v foo.y -Werror"
   15334 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -v foo.y -Werror" "output.at:163"
   15335 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -v foo.y -Werror
   15336 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15337 at_status=$? at_failed=false
   15338 $at_check_filter
   15339 echo stderr:; tee stderr <"$at_stderr"
   15340 $at_diff expout "$at_stdout" || at_failed=:
   15341 at_fn_check_status 1 $at_status "$at_srcdir/output.at:163"
   15342 $at_failed && at_fn_log_failure
   15343 $at_traceon; }
   15344 
   15345 
   15346   # Build expected stderr up to and including the "warnings being
   15347   # treated as errors" message.
   15348   cat >at-bison-check-warnings <<'_ATEOF'
   15349 foo.y: warning: conflicting outputs to file 'foo.output'
   15350 _ATEOF
   15351 
   15352   at_bison_check_first=`sed -n \
   15353     '/: warning: /{=;q;}' at-bison-check-warnings`
   15354   : ${at_bison_check_first:=1}
   15355   at_bison_check_first_tmp=`sed -n \
   15356     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   15357   : ${at_bison_check_first_tmp:=1}
   15358   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   15359     at_bison_check_first=$at_bison_check_first_tmp
   15360   fi
   15361   if test $at_bison_check_first -gt 1; then
   15362     sed -n "1,`expr $at_bison_check_first - 1`"p \
   15363       at-bison-check-warnings > experr
   15364   fi
   15365   echo 'bison: warnings being treated as errors' >> experr
   15366 
   15367   # Finish building expected stderr and check.  Unlike warnings,
   15368   # complaints cause bison to exit early.  Thus, with -Werror, bison
   15369   # does not necessarily report all warnings that it does without
   15370   # -Werror, but it at least reports one.
   15371   at_bison_check_last=`sed -n '$=' stderr`
   15372   : ${at_bison_check_last:=1}
   15373   at_bison_check_last=`expr $at_bison_check_last - 1`
   15374   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   15375     at-bison-check-warnings >> experr
   15376   { set +x
   15377 $as_echo "$at_srcdir/output.at:163: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   15378               stderr 1>&2"
   15379 at_fn_check_prepare_notrace 'an embedded newline' "output.at:163"
   15380 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   15381               stderr 1>&2
   15382 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15383 at_status=$? at_failed=false
   15384 $at_check_filter
   15385 $at_diff experr "$at_stderr" || at_failed=:
   15386 at_fn_diff_devnull "$at_stdout" || at_failed=:
   15387 at_fn_check_status 0 $at_status "$at_srcdir/output.at:163"
   15388 $at_failed && at_fn_log_failure
   15389 $at_traceon; }
   15390 
   15391 
   15392   # Now check --warnings=error.
   15393   cp stderr experr
   15394   { set +x
   15395 $as_echo "$at_srcdir/output.at:163: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -v foo.y --warnings=error"
   15396 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -v foo.y --warnings=error" "output.at:163"
   15397 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -v foo.y --warnings=error
   15398 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15399 at_status=$? at_failed=false
   15400 $at_check_filter
   15401 $at_diff experr "$at_stderr" || at_failed=:
   15402 $at_diff expout "$at_stdout" || at_failed=:
   15403 at_fn_check_status 1 $at_status "$at_srcdir/output.at:163"
   15404 $at_failed && at_fn_log_failure
   15405 $at_traceon; }
   15406 
   15407 
   15408   # Now check -Wnone and --warnings=none by making sure that
   15409   # -Werror doesn't change the exit status when -Wnone or
   15410   # --warnings=none is specified.
   15411   { set +x
   15412 $as_echo "$at_srcdir/output.at:163: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -v foo.y -Wnone -Werror"
   15413 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -v foo.y -Wnone -Werror" "output.at:163"
   15414 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -v foo.y -Wnone -Werror
   15415 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15416 at_status=$? at_failed=false
   15417 $at_check_filter
   15418 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15419 $at_diff expout "$at_stdout" || at_failed=:
   15420 at_fn_check_status 0 $at_status "$at_srcdir/output.at:163"
   15421 $at_failed && at_fn_log_failure
   15422 $at_traceon; }
   15423 
   15424   { set +x
   15425 $as_echo "$at_srcdir/output.at:163: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -v foo.y --warnings=none -Werror"
   15426 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -v foo.y --warnings=none -Werror" "output.at:163"
   15427 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -v foo.y --warnings=none -Werror
   15428 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15429 at_status=$? at_failed=false
   15430 $at_check_filter
   15431 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15432 $at_diff expout "$at_stdout" || at_failed=:
   15433 at_fn_check_status 0 $at_status "$at_srcdir/output.at:163"
   15434 $at_failed && at_fn_log_failure
   15435 $at_traceon; }
   15436 
   15437 
   15438   at_restore_special_files
   15439 fi
   15440 { set +x
   15441 $as_echo "$at_srcdir/output.at:163: cat foo.y"
   15442 at_fn_check_prepare_trace "output.at:163"
   15443 ( $at_check_trace; cat foo.y
   15444 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15445 at_status=$? at_failed=false
   15446 $at_check_filter
   15447 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15448 $at_diff expout "$at_stdout" || at_failed=:
   15449 at_fn_check_status 0 $at_status "$at_srcdir/output.at:163"
   15450 $at_failed && at_fn_log_failure
   15451 $at_traceon; }
   15452 
   15453   set +x
   15454   $at_times_p && times >"$at_times_file"
   15455 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   15456 read at_status <"$at_status_file"
   15457 #AT_STOP_74
   15458 #AT_START_75
   15459 at_fn_group_banner 75 'output.at:168' \
   15460   "Conflicting output files: %skeleton \"lalr1.cc\" %defines --graph=\"location.hh\"" "" 3
   15461 at_xfail=no
   15462 (
   15463   $as_echo "75. $at_setup_line: testing $at_desc ..."
   15464   $at_traceon
   15465 
   15466 case "foo.y" in
   15467   */*) mkdir `echo "foo.y" | sed 's,/.*,,'`;;
   15468 esac
   15469 cat >foo.y <<'_ATEOF'
   15470 %skeleton "lalr1.cc" %defines
   15471 %%
   15472 foo: {};
   15473 _ATEOF
   15474 
   15475 
   15476 cp foo.y expout
   15477 # Because an output file name conflict is still a warning, Bison exits
   15478 # with status 0, so AT_BISON_CHECK does not realize that there may be no
   15479 # output file against which to check the XML.  AT_BISON_CHECK_NO_XML
   15480 # avoids that problem.
   15481 { set +x
   15482 $as_echo "$at_srcdir/output.at:168: bison --graph=\"location.hh\" foo.y"
   15483 at_fn_check_prepare_trace "output.at:168"
   15484 ( $at_check_trace; bison --graph="location.hh" foo.y
   15485 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15486 at_status=$? at_failed=false
   15487 $at_check_filter
   15488 echo >>"$at_stderr"; $as_echo "foo.y: warning: conflicting outputs to file 'location.hh'
   15489 " | \
   15490   $at_diff - "$at_stderr" || at_failed=:
   15491 at_fn_diff_devnull "$at_stdout" || at_failed=:
   15492 at_fn_check_status 0 $at_status "$at_srcdir/output.at:168"
   15493 $at_failed && at_fn_log_failure
   15494 $at_traceon; }
   15495 
   15496 # Defining POSIXLY_CORRECT causes bison to complain if options are
   15497 # added after the grammar file name, so skip these checks in that
   15498 # case.
   15499 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   15500   at_save_special_files
   15501 
   15502   # To avoid expanding it repeatedly, store specified stdout.
   15503   : >expout
   15504 
   15505   # Run with -Werror.
   15506   { set +x
   15507 $as_echo "$at_srcdir/output.at:168: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --graph=\"location.hh\" foo.y -Werror"
   15508 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --graph=\"location.hh\" foo.y -Werror" "output.at:168"
   15509 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --graph="location.hh" foo.y -Werror
   15510 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15511 at_status=$? at_failed=false
   15512 $at_check_filter
   15513 echo stderr:; tee stderr <"$at_stderr"
   15514 $at_diff expout "$at_stdout" || at_failed=:
   15515 at_fn_check_status 1 $at_status "$at_srcdir/output.at:168"
   15516 $at_failed && at_fn_log_failure
   15517 $at_traceon; }
   15518 
   15519 
   15520   # Build expected stderr up to and including the "warnings being
   15521   # treated as errors" message.
   15522   cat >at-bison-check-warnings <<'_ATEOF'
   15523 foo.y: warning: conflicting outputs to file 'location.hh'
   15524 _ATEOF
   15525 
   15526   at_bison_check_first=`sed -n \
   15527     '/: warning: /{=;q;}' at-bison-check-warnings`
   15528   : ${at_bison_check_first:=1}
   15529   at_bison_check_first_tmp=`sed -n \
   15530     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   15531   : ${at_bison_check_first_tmp:=1}
   15532   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   15533     at_bison_check_first=$at_bison_check_first_tmp
   15534   fi
   15535   if test $at_bison_check_first -gt 1; then
   15536     sed -n "1,`expr $at_bison_check_first - 1`"p \
   15537       at-bison-check-warnings > experr
   15538   fi
   15539   echo 'bison: warnings being treated as errors' >> experr
   15540 
   15541   # Finish building expected stderr and check.  Unlike warnings,
   15542   # complaints cause bison to exit early.  Thus, with -Werror, bison
   15543   # does not necessarily report all warnings that it does without
   15544   # -Werror, but it at least reports one.
   15545   at_bison_check_last=`sed -n '$=' stderr`
   15546   : ${at_bison_check_last:=1}
   15547   at_bison_check_last=`expr $at_bison_check_last - 1`
   15548   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   15549     at-bison-check-warnings >> experr
   15550   { set +x
   15551 $as_echo "$at_srcdir/output.at:168: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   15552               stderr 1>&2"
   15553 at_fn_check_prepare_notrace 'an embedded newline' "output.at:168"
   15554 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   15555               stderr 1>&2
   15556 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15557 at_status=$? at_failed=false
   15558 $at_check_filter
   15559 $at_diff experr "$at_stderr" || at_failed=:
   15560 at_fn_diff_devnull "$at_stdout" || at_failed=:
   15561 at_fn_check_status 0 $at_status "$at_srcdir/output.at:168"
   15562 $at_failed && at_fn_log_failure
   15563 $at_traceon; }
   15564 
   15565 
   15566   # Now check --warnings=error.
   15567   cp stderr experr
   15568   { set +x
   15569 $as_echo "$at_srcdir/output.at:168: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --graph=\"location.hh\" foo.y --warnings=error"
   15570 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --graph=\"location.hh\" foo.y --warnings=error" "output.at:168"
   15571 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --graph="location.hh" foo.y --warnings=error
   15572 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15573 at_status=$? at_failed=false
   15574 $at_check_filter
   15575 $at_diff experr "$at_stderr" || at_failed=:
   15576 $at_diff expout "$at_stdout" || at_failed=:
   15577 at_fn_check_status 1 $at_status "$at_srcdir/output.at:168"
   15578 $at_failed && at_fn_log_failure
   15579 $at_traceon; }
   15580 
   15581 
   15582   # Now check -Wnone and --warnings=none by making sure that
   15583   # -Werror doesn't change the exit status when -Wnone or
   15584   # --warnings=none is specified.
   15585   { set +x
   15586 $as_echo "$at_srcdir/output.at:168: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --graph=\"location.hh\" foo.y -Wnone -Werror"
   15587 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --graph=\"location.hh\" foo.y -Wnone -Werror" "output.at:168"
   15588 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --graph="location.hh" foo.y -Wnone -Werror
   15589 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15590 at_status=$? at_failed=false
   15591 $at_check_filter
   15592 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15593 $at_diff expout "$at_stdout" || at_failed=:
   15594 at_fn_check_status 0 $at_status "$at_srcdir/output.at:168"
   15595 $at_failed && at_fn_log_failure
   15596 $at_traceon; }
   15597 
   15598   { set +x
   15599 $as_echo "$at_srcdir/output.at:168: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --graph=\"location.hh\" foo.y --warnings=none -Werror"
   15600 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --graph=\"location.hh\" foo.y --warnings=none -Werror" "output.at:168"
   15601 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --graph="location.hh" foo.y --warnings=none -Werror
   15602 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15603 at_status=$? at_failed=false
   15604 $at_check_filter
   15605 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15606 $at_diff expout "$at_stdout" || at_failed=:
   15607 at_fn_check_status 0 $at_status "$at_srcdir/output.at:168"
   15608 $at_failed && at_fn_log_failure
   15609 $at_traceon; }
   15610 
   15611 
   15612   at_restore_special_files
   15613 fi
   15614 { set +x
   15615 $as_echo "$at_srcdir/output.at:168: cat foo.y"
   15616 at_fn_check_prepare_trace "output.at:168"
   15617 ( $at_check_trace; cat foo.y
   15618 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15619 at_status=$? at_failed=false
   15620 $at_check_filter
   15621 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15622 $at_diff expout "$at_stdout" || at_failed=:
   15623 at_fn_check_status 0 $at_status "$at_srcdir/output.at:168"
   15624 $at_failed && at_fn_log_failure
   15625 $at_traceon; }
   15626 
   15627   set +x
   15628   $at_times_p && times >"$at_times_file"
   15629 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   15630 read at_status <"$at_status_file"
   15631 #AT_STOP_75
   15632 #AT_START_76
   15633 at_fn_group_banner 76 'output.at:173' \
   15634   "Conflicting output files:  -o foo.y" "            " 3
   15635 at_xfail=no
   15636 (
   15637   $as_echo "76. $at_setup_line: testing $at_desc ..."
   15638   $at_traceon
   15639 
   15640 case "foo.y" in
   15641   */*) mkdir `echo "foo.y" | sed 's,/.*,,'`;;
   15642 esac
   15643 cat >foo.y <<'_ATEOF'
   15644 
   15645 %%
   15646 foo: {};
   15647 _ATEOF
   15648 
   15649 
   15650 cp foo.y expout
   15651 # Because an output file name conflict is still a warning, Bison exits
   15652 # with status 0, so AT_BISON_CHECK does not realize that there may be no
   15653 # output file against which to check the XML.  AT_BISON_CHECK_NO_XML
   15654 # avoids that problem.
   15655 { set +x
   15656 $as_echo "$at_srcdir/output.at:173: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o foo.y foo.y"
   15657 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o foo.y foo.y" "output.at:173"
   15658 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o foo.y foo.y
   15659 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15660 at_status=$? at_failed=false
   15661 $at_check_filter
   15662 echo >>"$at_stderr"; $as_echo "foo.y: error: refusing to overwrite the input file 'foo.y'
   15663 " | \
   15664   $at_diff - "$at_stderr" || at_failed=:
   15665 at_fn_diff_devnull "$at_stdout" || at_failed=:
   15666 at_fn_check_status 1 $at_status "$at_srcdir/output.at:173"
   15667 $at_failed && at_fn_log_failure
   15668 $at_traceon; }
   15669 
   15670 
   15671 { set +x
   15672 $as_echo "$at_srcdir/output.at:173: cat foo.y"
   15673 at_fn_check_prepare_trace "output.at:173"
   15674 ( $at_check_trace; cat foo.y
   15675 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15676 at_status=$? at_failed=false
   15677 $at_check_filter
   15678 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15679 $at_diff expout "$at_stdout" || at_failed=:
   15680 at_fn_check_status 0 $at_status "$at_srcdir/output.at:173"
   15681 $at_failed && at_fn_log_failure
   15682 $at_traceon; }
   15683 
   15684   set +x
   15685   $at_times_p && times >"$at_times_file"
   15686 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   15687 read at_status <"$at_status_file"
   15688 #AT_STOP_76
   15689 #AT_START_77
   15690 at_fn_group_banner 77 'output.at:219' \
   15691   "Output file name: \`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'" "" 3
   15692 at_xfail=no
   15693 (
   15694   $as_echo "77. $at_setup_line: testing $at_desc ..."
   15695   $at_traceon
   15696 
   15697 
   15698 
   15699 # Skip if platform doesn't support file name.  For example, Cygwin
   15700 # doesn't support file names containing ":" or "\".
   15701 { set +x
   15702 $as_echo "$at_srcdir/output.at:219: touch \"\\\`~!@#\\\$%^&*()-=_+{}[]|\\\\:;<>, .'.tmp\" || exit 77"
   15703 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:219"
   15704 ( $at_check_trace; touch "\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.tmp" || exit 77
   15705 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15706 at_status=$? at_failed=false
   15707 $at_check_filter
   15708 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15709 at_fn_diff_devnull "$at_stdout" || at_failed=:
   15710 at_fn_check_status 0 $at_status "$at_srcdir/output.at:219"
   15711 $at_failed && at_fn_log_failure
   15712 $at_traceon; }
   15713 
   15714 
   15715 cat >glr.y <<'_ATEOF'
   15716 %code top {
   15717 #include <config.h>
   15718 /* We don't need perfect functions for these tests. */
   15719 #undef malloc
   15720 #undef memcmp
   15721 #undef realloc
   15722 }
   15723 
   15724 %glr-parser
   15725 %code {
   15726 void yyerror ( const char *msg);
   15727 int yylex (void);
   15728 }
   15729 %%
   15730 start: {};
   15731 _ATEOF
   15732 
   15733 
   15734 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   15735   at_save_special_files
   15736   mkdir xml-tests
   15737     # Don't combine these Bison invocations since we want to be sure that
   15738   # --report=all isn't required to get the full XML file.
   15739   { set +x
   15740 $as_echo "$at_srcdir/output.at:219: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   15741                   --graph=xml-tests/test.dot -o \"\\\`~!@#\\\$%^&*()-=_+{}[]|\\\\:;<>, .'.c\" --defines=\"\\\`~!@#\\\$%^&*()-=_+{}[]|\\\\:;<>, .'.h\" glr.y"
   15742 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:219"
   15743 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   15744                   --graph=xml-tests/test.dot -o "\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.c" --defines="\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.h" glr.y
   15745 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15746 at_status=$? at_failed=false
   15747 $at_check_filter
   15748 echo stderr:; cat "$at_stderr"
   15749 echo stdout:; cat "$at_stdout"
   15750 at_fn_check_status 0 $at_status "$at_srcdir/output.at:219"
   15751 $at_failed && at_fn_log_failure
   15752 $at_traceon; }
   15753 
   15754   { set +x
   15755 $as_echo "$at_srcdir/output.at:219: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"\\\`~!@#\\\$%^&*()-=_+{}[]|\\\\:;<>, .'.c\" --defines=\"\\\`~!@#\\\$%^&*()-=_+{}[]|\\\\:;<>, .'.h\" glr.y"
   15756 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:219"
   15757 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o "\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.c" --defines="\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.h" glr.y
   15758 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15759 at_status=$? at_failed=false
   15760 $at_check_filter
   15761 echo stderr:; cat "$at_stderr"
   15762 echo stdout:; cat "$at_stdout"
   15763 at_fn_check_status 0 $at_status "$at_srcdir/output.at:219"
   15764 $at_failed && at_fn_log_failure
   15765 $at_traceon; }
   15766 
   15767     cp xml-tests/test.output expout
   15768   { set +x
   15769 $as_echo "$at_srcdir/output.at:219: \$XSLTPROC \\
   15770              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   15771              xml-tests/test.xml"
   15772 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:219"
   15773 ( $at_check_trace; $XSLTPROC \
   15774              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   15775              xml-tests/test.xml
   15776 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15777 at_status=$? at_failed=false
   15778 $at_check_filter
   15779 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15780 $at_diff expout "$at_stdout" || at_failed=:
   15781 at_fn_check_status 0 $at_status "$at_srcdir/output.at:219"
   15782 $at_failed && at_fn_log_failure
   15783 $at_traceon; }
   15784 
   15785   sort xml-tests/test.dot > expout
   15786   { set +x
   15787 $as_echo "$at_srcdir/output.at:219: \$XSLTPROC \\
   15788              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   15789              xml-tests/test.xml | sort"
   15790 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:219"
   15791 ( $at_check_trace; $XSLTPROC \
   15792              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   15793              xml-tests/test.xml | sort
   15794 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15795 at_status=$? at_failed=false
   15796 $at_check_filter
   15797 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15798 $at_diff expout "$at_stdout" || at_failed=:
   15799 at_fn_check_status 0 $at_status "$at_srcdir/output.at:219"
   15800 $at_failed && at_fn_log_failure
   15801 $at_traceon; }
   15802 
   15803   rm -rf xml-tests expout
   15804   at_restore_special_files
   15805 fi
   15806 { set +x
   15807 $as_echo "$at_srcdir/output.at:219: bison -o \"\\\`~!@#\\\$%^&*()-=_+{}[]|\\\\:;<>, .'.c\" --defines=\"\\\`~!@#\\\$%^&*()-=_+{}[]|\\\\:;<>, .'.h\" glr.y"
   15808 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:219"
   15809 ( $at_check_trace; bison -o "\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.c" --defines="\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.h" glr.y
   15810 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15811 at_status=$? at_failed=false
   15812 $at_check_filter
   15813 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15814 at_fn_diff_devnull "$at_stdout" || at_failed=:
   15815 at_fn_check_status 0 $at_status "$at_srcdir/output.at:219"
   15816 $at_failed && at_fn_log_failure
   15817 $at_traceon; }
   15818 
   15819 
   15820 { set +x
   15821 $as_echo "$at_srcdir/output.at:219: ls \"\\\`~!@#\\\$%^&*()-=_+{}[]|\\\\:;<>, .'.c\" \"\\\`~!@#\\\$%^&*()-=_+{}[]|\\\\:;<>, .'.h\""
   15822 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:219"
   15823 ( $at_check_trace; ls "\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.c" "\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.h"
   15824 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15825 at_status=$? at_failed=false
   15826 $at_check_filter
   15827 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15828 echo stdout:; cat "$at_stdout"
   15829 at_fn_check_status 0 $at_status "$at_srcdir/output.at:219"
   15830 $at_failed && at_fn_log_failure
   15831 $at_traceon; }
   15832 
   15833 { set +x
   15834 $as_echo "$at_srcdir/output.at:219: \$BISON_C_WORKS"
   15835 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "output.at:219"
   15836 ( $at_check_trace; $BISON_C_WORKS
   15837 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15838 at_status=$? at_failed=false
   15839 $at_check_filter
   15840 echo stderr:; cat "$at_stderr"
   15841 echo stdout:; cat "$at_stdout"
   15842 at_fn_check_status 0 $at_status "$at_srcdir/output.at:219"
   15843 $at_failed && at_fn_log_failure
   15844 $at_traceon; }
   15845 
   15846 { set +x
   15847 $as_echo "$at_srcdir/output.at:219: \$CC \$CFLAGS \$CPPFLAGS -c -o glr.o -c \"\\\`~!@#\\\$%^&*()-=_+{}[]|\\\\:;<>, .'.c\" "
   15848 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:219"
   15849 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o glr.o -c "\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.c"
   15850 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15851 at_status=$? at_failed=false
   15852 $at_check_filter
   15853 echo stderr:; cat "$at_stderr"
   15854 echo stdout:; cat "$at_stdout"
   15855 at_fn_check_status 0 $at_status "$at_srcdir/output.at:219"
   15856 $at_failed && at_fn_log_failure
   15857 $at_traceon; }
   15858 
   15859 
   15860 
   15861 cat >cxx.y <<'_ATEOF'
   15862 %code top {
   15863 #include <config.h>
   15864 /* We don't need perfect functions for these tests. */
   15865 #undef malloc
   15866 #undef memcmp
   15867 #undef realloc
   15868 }
   15869 
   15870 %skeleton "lalr1.cc"
   15871 %code { int yylex (yy::parser::semantic_type*); }
   15872 %%
   15873 start: {};
   15874 _ATEOF
   15875 
   15876 
   15877 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   15878   at_save_special_files
   15879   mkdir xml-tests
   15880     # Don't combine these Bison invocations since we want to be sure that
   15881   # --report=all isn't required to get the full XML file.
   15882   { set +x
   15883 $as_echo "$at_srcdir/output.at:219: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   15884                   --graph=xml-tests/test.dot -o \"\\\`~!@#\\\$%^&*()-=_+{}[]|\\\\:;<>, .'.c\" --defines=\"\\\`~!@#\\\$%^&*()-=_+{}[]|\\\\:;<>, .'.h\" cxx.y"
   15885 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:219"
   15886 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   15887                   --graph=xml-tests/test.dot -o "\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.c" --defines="\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.h" cxx.y
   15888 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15889 at_status=$? at_failed=false
   15890 $at_check_filter
   15891 echo stderr:; cat "$at_stderr"
   15892 echo stdout:; cat "$at_stdout"
   15893 at_fn_check_status 0 $at_status "$at_srcdir/output.at:219"
   15894 $at_failed && at_fn_log_failure
   15895 $at_traceon; }
   15896 
   15897   { set +x
   15898 $as_echo "$at_srcdir/output.at:219: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"\\\`~!@#\\\$%^&*()-=_+{}[]|\\\\:;<>, .'.c\" --defines=\"\\\`~!@#\\\$%^&*()-=_+{}[]|\\\\:;<>, .'.h\" cxx.y"
   15899 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:219"
   15900 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o "\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.c" --defines="\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.h" cxx.y
   15901 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15902 at_status=$? at_failed=false
   15903 $at_check_filter
   15904 echo stderr:; cat "$at_stderr"
   15905 echo stdout:; cat "$at_stdout"
   15906 at_fn_check_status 0 $at_status "$at_srcdir/output.at:219"
   15907 $at_failed && at_fn_log_failure
   15908 $at_traceon; }
   15909 
   15910     cp xml-tests/test.output expout
   15911   { set +x
   15912 $as_echo "$at_srcdir/output.at:219: \$XSLTPROC \\
   15913              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   15914              xml-tests/test.xml"
   15915 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:219"
   15916 ( $at_check_trace; $XSLTPROC \
   15917              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   15918              xml-tests/test.xml
   15919 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15920 at_status=$? at_failed=false
   15921 $at_check_filter
   15922 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15923 $at_diff expout "$at_stdout" || at_failed=:
   15924 at_fn_check_status 0 $at_status "$at_srcdir/output.at:219"
   15925 $at_failed && at_fn_log_failure
   15926 $at_traceon; }
   15927 
   15928   sort xml-tests/test.dot > expout
   15929   { set +x
   15930 $as_echo "$at_srcdir/output.at:219: \$XSLTPROC \\
   15931              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   15932              xml-tests/test.xml | sort"
   15933 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:219"
   15934 ( $at_check_trace; $XSLTPROC \
   15935              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   15936              xml-tests/test.xml | sort
   15937 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15938 at_status=$? at_failed=false
   15939 $at_check_filter
   15940 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15941 $at_diff expout "$at_stdout" || at_failed=:
   15942 at_fn_check_status 0 $at_status "$at_srcdir/output.at:219"
   15943 $at_failed && at_fn_log_failure
   15944 $at_traceon; }
   15945 
   15946   rm -rf xml-tests expout
   15947   at_restore_special_files
   15948 fi
   15949 { set +x
   15950 $as_echo "$at_srcdir/output.at:219: bison -o \"\\\`~!@#\\\$%^&*()-=_+{}[]|\\\\:;<>, .'.c\" --defines=\"\\\`~!@#\\\$%^&*()-=_+{}[]|\\\\:;<>, .'.h\" cxx.y"
   15951 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:219"
   15952 ( $at_check_trace; bison -o "\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.c" --defines="\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.h" cxx.y
   15953 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15954 at_status=$? at_failed=false
   15955 $at_check_filter
   15956 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15957 at_fn_diff_devnull "$at_stdout" || at_failed=:
   15958 at_fn_check_status 0 $at_status "$at_srcdir/output.at:219"
   15959 $at_failed && at_fn_log_failure
   15960 $at_traceon; }
   15961 
   15962 
   15963 { set +x
   15964 $as_echo "$at_srcdir/output.at:219: ls \"\\\`~!@#\\\$%^&*()-=_+{}[]|\\\\:;<>, .'.c\" \"\\\`~!@#\\\$%^&*()-=_+{}[]|\\\\:;<>, .'.h\""
   15965 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:219"
   15966 ( $at_check_trace; ls "\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.c" "\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.h"
   15967 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15968 at_status=$? at_failed=false
   15969 $at_check_filter
   15970 at_fn_diff_devnull "$at_stderr" || at_failed=:
   15971 echo stdout:; cat "$at_stdout"
   15972 at_fn_check_status 0 $at_status "$at_srcdir/output.at:219"
   15973 $at_failed && at_fn_log_failure
   15974 $at_traceon; }
   15975 
   15976 
   15977 { set +x
   15978 $as_echo "$at_srcdir/output.at:219: \$BISON_CXX_WORKS"
   15979 at_fn_check_prepare_dynamic "$BISON_CXX_WORKS" "output.at:219"
   15980 ( $at_check_trace; $BISON_CXX_WORKS
   15981 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15982 at_status=$? at_failed=false
   15983 $at_check_filter
   15984 echo stderr:; cat "$at_stderr"
   15985 echo stdout:; cat "$at_stdout"
   15986 at_fn_check_status 0 $at_status "$at_srcdir/output.at:219"
   15987 $at_failed && at_fn_log_failure
   15988 $at_traceon; }
   15989 
   15990 { set +x
   15991 $as_echo "$at_srcdir/output.at:219: \$CXX \$CXXFLAGS \$CPPFLAGS -c -o cxx.o -c \"\\\`~!@#\\\$%^&*()-=_+{}[]|\\\\:;<>, .'.c\" "
   15992 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:219"
   15993 ( $at_check_trace; $CXX $CXXFLAGS $CPPFLAGS -c -o cxx.o -c "\`~!@#\$%^&*()-=_+{}[]|\\:;<>, .'.c"
   15994 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   15995 at_status=$? at_failed=false
   15996 $at_check_filter
   15997 echo stderr:; cat "$at_stderr"
   15998 echo stdout:; cat "$at_stdout"
   15999 at_fn_check_status 0 $at_status "$at_srcdir/output.at:219"
   16000 $at_failed && at_fn_log_failure
   16001 $at_traceon; }
   16002 
   16003 
   16004 
   16005 
   16006   set +x
   16007   $at_times_p && times >"$at_times_file"
   16008 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   16009 read at_status <"$at_status_file"
   16010 #AT_STOP_77
   16011 #AT_START_78
   16012 at_fn_group_banner 78 'output.at:226' \
   16013   "Output file name: (" "                            " 3
   16014 at_xfail=no
   16015 (
   16016   $as_echo "78. $at_setup_line: testing $at_desc ..."
   16017   $at_traceon
   16018 
   16019 
   16020 
   16021 # Skip if platform doesn't support file name.  For example, Cygwin
   16022 # doesn't support file names containing ":" or "\".
   16023 { set +x
   16024 $as_echo "$at_srcdir/output.at:226: touch \"(.tmp\" || exit 77"
   16025 at_fn_check_prepare_trace "output.at:226"
   16026 ( $at_check_trace; touch "(.tmp" || exit 77
   16027 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16028 at_status=$? at_failed=false
   16029 $at_check_filter
   16030 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16031 at_fn_diff_devnull "$at_stdout" || at_failed=:
   16032 at_fn_check_status 0 $at_status "$at_srcdir/output.at:226"
   16033 $at_failed && at_fn_log_failure
   16034 $at_traceon; }
   16035 
   16036 
   16037 cat >glr.y <<'_ATEOF'
   16038 %code top {
   16039 #include <config.h>
   16040 /* We don't need perfect functions for these tests. */
   16041 #undef malloc
   16042 #undef memcmp
   16043 #undef realloc
   16044 }
   16045 
   16046 %glr-parser
   16047 %code {
   16048 void yyerror ( const char *msg);
   16049 int yylex (void);
   16050 }
   16051 %%
   16052 start: {};
   16053 _ATEOF
   16054 
   16055 
   16056 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   16057   at_save_special_files
   16058   mkdir xml-tests
   16059     # Don't combine these Bison invocations since we want to be sure that
   16060   # --report=all isn't required to get the full XML file.
   16061   { set +x
   16062 $as_echo "$at_srcdir/output.at:226: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   16063                   --graph=xml-tests/test.dot -o \"(.c\" --defines=\"(.h\" glr.y"
   16064 at_fn_check_prepare_notrace 'an embedded newline' "output.at:226"
   16065 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   16066                   --graph=xml-tests/test.dot -o "(.c" --defines="(.h" glr.y
   16067 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16068 at_status=$? at_failed=false
   16069 $at_check_filter
   16070 echo stderr:; cat "$at_stderr"
   16071 echo stdout:; cat "$at_stdout"
   16072 at_fn_check_status 0 $at_status "$at_srcdir/output.at:226"
   16073 $at_failed && at_fn_log_failure
   16074 $at_traceon; }
   16075 
   16076   { set +x
   16077 $as_echo "$at_srcdir/output.at:226: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"(.c\" --defines=\"(.h\" glr.y"
   16078 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"(.c\" --defines=\"(.h\" glr.y" "output.at:226"
   16079 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o "(.c" --defines="(.h" glr.y
   16080 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16081 at_status=$? at_failed=false
   16082 $at_check_filter
   16083 echo stderr:; cat "$at_stderr"
   16084 echo stdout:; cat "$at_stdout"
   16085 at_fn_check_status 0 $at_status "$at_srcdir/output.at:226"
   16086 $at_failed && at_fn_log_failure
   16087 $at_traceon; }
   16088 
   16089     cp xml-tests/test.output expout
   16090   { set +x
   16091 $as_echo "$at_srcdir/output.at:226: \$XSLTPROC \\
   16092              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   16093              xml-tests/test.xml"
   16094 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:226"
   16095 ( $at_check_trace; $XSLTPROC \
   16096              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   16097              xml-tests/test.xml
   16098 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16099 at_status=$? at_failed=false
   16100 $at_check_filter
   16101 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16102 $at_diff expout "$at_stdout" || at_failed=:
   16103 at_fn_check_status 0 $at_status "$at_srcdir/output.at:226"
   16104 $at_failed && at_fn_log_failure
   16105 $at_traceon; }
   16106 
   16107   sort xml-tests/test.dot > expout
   16108   { set +x
   16109 $as_echo "$at_srcdir/output.at:226: \$XSLTPROC \\
   16110              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   16111              xml-tests/test.xml | sort"
   16112 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:226"
   16113 ( $at_check_trace; $XSLTPROC \
   16114              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   16115              xml-tests/test.xml | sort
   16116 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16117 at_status=$? at_failed=false
   16118 $at_check_filter
   16119 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16120 $at_diff expout "$at_stdout" || at_failed=:
   16121 at_fn_check_status 0 $at_status "$at_srcdir/output.at:226"
   16122 $at_failed && at_fn_log_failure
   16123 $at_traceon; }
   16124 
   16125   rm -rf xml-tests expout
   16126   at_restore_special_files
   16127 fi
   16128 { set +x
   16129 $as_echo "$at_srcdir/output.at:226: bison -o \"(.c\" --defines=\"(.h\" glr.y"
   16130 at_fn_check_prepare_trace "output.at:226"
   16131 ( $at_check_trace; bison -o "(.c" --defines="(.h" glr.y
   16132 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16133 at_status=$? at_failed=false
   16134 $at_check_filter
   16135 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16136 at_fn_diff_devnull "$at_stdout" || at_failed=:
   16137 at_fn_check_status 0 $at_status "$at_srcdir/output.at:226"
   16138 $at_failed && at_fn_log_failure
   16139 $at_traceon; }
   16140 
   16141 
   16142 { set +x
   16143 $as_echo "$at_srcdir/output.at:226: ls \"(.c\" \"(.h\""
   16144 at_fn_check_prepare_trace "output.at:226"
   16145 ( $at_check_trace; ls "(.c" "(.h"
   16146 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16147 at_status=$? at_failed=false
   16148 $at_check_filter
   16149 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16150 echo stdout:; cat "$at_stdout"
   16151 at_fn_check_status 0 $at_status "$at_srcdir/output.at:226"
   16152 $at_failed && at_fn_log_failure
   16153 $at_traceon; }
   16154 
   16155 { set +x
   16156 $as_echo "$at_srcdir/output.at:226: \$BISON_C_WORKS"
   16157 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "output.at:226"
   16158 ( $at_check_trace; $BISON_C_WORKS
   16159 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16160 at_status=$? at_failed=false
   16161 $at_check_filter
   16162 echo stderr:; cat "$at_stderr"
   16163 echo stdout:; cat "$at_stdout"
   16164 at_fn_check_status 0 $at_status "$at_srcdir/output.at:226"
   16165 $at_failed && at_fn_log_failure
   16166 $at_traceon; }
   16167 
   16168 { set +x
   16169 $as_echo "$at_srcdir/output.at:226: \$CC \$CFLAGS \$CPPFLAGS -c -o glr.o -c \"(.c\" "
   16170 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o glr.o -c \"(.c\" " "output.at:226"
   16171 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o glr.o -c "(.c"
   16172 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16173 at_status=$? at_failed=false
   16174 $at_check_filter
   16175 echo stderr:; cat "$at_stderr"
   16176 echo stdout:; cat "$at_stdout"
   16177 at_fn_check_status 0 $at_status "$at_srcdir/output.at:226"
   16178 $at_failed && at_fn_log_failure
   16179 $at_traceon; }
   16180 
   16181 
   16182 
   16183 cat >cxx.y <<'_ATEOF'
   16184 %code top {
   16185 #include <config.h>
   16186 /* We don't need perfect functions for these tests. */
   16187 #undef malloc
   16188 #undef memcmp
   16189 #undef realloc
   16190 }
   16191 
   16192 %skeleton "lalr1.cc"
   16193 %code { int yylex (yy::parser::semantic_type*); }
   16194 %%
   16195 start: {};
   16196 _ATEOF
   16197 
   16198 
   16199 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   16200   at_save_special_files
   16201   mkdir xml-tests
   16202     # Don't combine these Bison invocations since we want to be sure that
   16203   # --report=all isn't required to get the full XML file.
   16204   { set +x
   16205 $as_echo "$at_srcdir/output.at:226: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   16206                   --graph=xml-tests/test.dot -o \"(.c\" --defines=\"(.h\" cxx.y"
   16207 at_fn_check_prepare_notrace 'an embedded newline' "output.at:226"
   16208 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   16209                   --graph=xml-tests/test.dot -o "(.c" --defines="(.h" cxx.y
   16210 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16211 at_status=$? at_failed=false
   16212 $at_check_filter
   16213 echo stderr:; cat "$at_stderr"
   16214 echo stdout:; cat "$at_stdout"
   16215 at_fn_check_status 0 $at_status "$at_srcdir/output.at:226"
   16216 $at_failed && at_fn_log_failure
   16217 $at_traceon; }
   16218 
   16219   { set +x
   16220 $as_echo "$at_srcdir/output.at:226: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"(.c\" --defines=\"(.h\" cxx.y"
   16221 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"(.c\" --defines=\"(.h\" cxx.y" "output.at:226"
   16222 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o "(.c" --defines="(.h" cxx.y
   16223 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16224 at_status=$? at_failed=false
   16225 $at_check_filter
   16226 echo stderr:; cat "$at_stderr"
   16227 echo stdout:; cat "$at_stdout"
   16228 at_fn_check_status 0 $at_status "$at_srcdir/output.at:226"
   16229 $at_failed && at_fn_log_failure
   16230 $at_traceon; }
   16231 
   16232     cp xml-tests/test.output expout
   16233   { set +x
   16234 $as_echo "$at_srcdir/output.at:226: \$XSLTPROC \\
   16235              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   16236              xml-tests/test.xml"
   16237 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:226"
   16238 ( $at_check_trace; $XSLTPROC \
   16239              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   16240              xml-tests/test.xml
   16241 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16242 at_status=$? at_failed=false
   16243 $at_check_filter
   16244 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16245 $at_diff expout "$at_stdout" || at_failed=:
   16246 at_fn_check_status 0 $at_status "$at_srcdir/output.at:226"
   16247 $at_failed && at_fn_log_failure
   16248 $at_traceon; }
   16249 
   16250   sort xml-tests/test.dot > expout
   16251   { set +x
   16252 $as_echo "$at_srcdir/output.at:226: \$XSLTPROC \\
   16253              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   16254              xml-tests/test.xml | sort"
   16255 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:226"
   16256 ( $at_check_trace; $XSLTPROC \
   16257              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   16258              xml-tests/test.xml | sort
   16259 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16260 at_status=$? at_failed=false
   16261 $at_check_filter
   16262 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16263 $at_diff expout "$at_stdout" || at_failed=:
   16264 at_fn_check_status 0 $at_status "$at_srcdir/output.at:226"
   16265 $at_failed && at_fn_log_failure
   16266 $at_traceon; }
   16267 
   16268   rm -rf xml-tests expout
   16269   at_restore_special_files
   16270 fi
   16271 { set +x
   16272 $as_echo "$at_srcdir/output.at:226: bison -o \"(.c\" --defines=\"(.h\" cxx.y"
   16273 at_fn_check_prepare_trace "output.at:226"
   16274 ( $at_check_trace; bison -o "(.c" --defines="(.h" cxx.y
   16275 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16276 at_status=$? at_failed=false
   16277 $at_check_filter
   16278 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16279 at_fn_diff_devnull "$at_stdout" || at_failed=:
   16280 at_fn_check_status 0 $at_status "$at_srcdir/output.at:226"
   16281 $at_failed && at_fn_log_failure
   16282 $at_traceon; }
   16283 
   16284 
   16285 { set +x
   16286 $as_echo "$at_srcdir/output.at:226: ls \"(.c\" \"(.h\""
   16287 at_fn_check_prepare_trace "output.at:226"
   16288 ( $at_check_trace; ls "(.c" "(.h"
   16289 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16290 at_status=$? at_failed=false
   16291 $at_check_filter
   16292 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16293 echo stdout:; cat "$at_stdout"
   16294 at_fn_check_status 0 $at_status "$at_srcdir/output.at:226"
   16295 $at_failed && at_fn_log_failure
   16296 $at_traceon; }
   16297 
   16298 
   16299 { set +x
   16300 $as_echo "$at_srcdir/output.at:226: \$BISON_CXX_WORKS"
   16301 at_fn_check_prepare_dynamic "$BISON_CXX_WORKS" "output.at:226"
   16302 ( $at_check_trace; $BISON_CXX_WORKS
   16303 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16304 at_status=$? at_failed=false
   16305 $at_check_filter
   16306 echo stderr:; cat "$at_stderr"
   16307 echo stdout:; cat "$at_stdout"
   16308 at_fn_check_status 0 $at_status "$at_srcdir/output.at:226"
   16309 $at_failed && at_fn_log_failure
   16310 $at_traceon; }
   16311 
   16312 { set +x
   16313 $as_echo "$at_srcdir/output.at:226: \$CXX \$CXXFLAGS \$CPPFLAGS -c -o cxx.o -c \"(.c\" "
   16314 at_fn_check_prepare_dynamic "$CXX $CXXFLAGS $CPPFLAGS -c -o cxx.o -c \"(.c\" " "output.at:226"
   16315 ( $at_check_trace; $CXX $CXXFLAGS $CPPFLAGS -c -o cxx.o -c "(.c"
   16316 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16317 at_status=$? at_failed=false
   16318 $at_check_filter
   16319 echo stderr:; cat "$at_stderr"
   16320 echo stdout:; cat "$at_stdout"
   16321 at_fn_check_status 0 $at_status "$at_srcdir/output.at:226"
   16322 $at_failed && at_fn_log_failure
   16323 $at_traceon; }
   16324 
   16325 
   16326 
   16327 
   16328   set +x
   16329   $at_times_p && times >"$at_times_file"
   16330 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   16331 read at_status <"$at_status_file"
   16332 #AT_STOP_78
   16333 #AT_START_79
   16334 at_fn_group_banner 79 'output.at:227' \
   16335   "Output file name: )" "                            " 3
   16336 at_xfail=no
   16337 (
   16338   $as_echo "79. $at_setup_line: testing $at_desc ..."
   16339   $at_traceon
   16340 
   16341 
   16342 
   16343 # Skip if platform doesn't support file name.  For example, Cygwin
   16344 # doesn't support file names containing ":" or "\".
   16345 { set +x
   16346 $as_echo "$at_srcdir/output.at:227: touch \").tmp\" || exit 77"
   16347 at_fn_check_prepare_trace "output.at:227"
   16348 ( $at_check_trace; touch ").tmp" || exit 77
   16349 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16350 at_status=$? at_failed=false
   16351 $at_check_filter
   16352 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16353 at_fn_diff_devnull "$at_stdout" || at_failed=:
   16354 at_fn_check_status 0 $at_status "$at_srcdir/output.at:227"
   16355 $at_failed && at_fn_log_failure
   16356 $at_traceon; }
   16357 
   16358 
   16359 cat >glr.y <<'_ATEOF'
   16360 %code top {
   16361 #include <config.h>
   16362 /* We don't need perfect functions for these tests. */
   16363 #undef malloc
   16364 #undef memcmp
   16365 #undef realloc
   16366 }
   16367 
   16368 %glr-parser
   16369 %code {
   16370 void yyerror ( const char *msg);
   16371 int yylex (void);
   16372 }
   16373 %%
   16374 start: {};
   16375 _ATEOF
   16376 
   16377 
   16378 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   16379   at_save_special_files
   16380   mkdir xml-tests
   16381     # Don't combine these Bison invocations since we want to be sure that
   16382   # --report=all isn't required to get the full XML file.
   16383   { set +x
   16384 $as_echo "$at_srcdir/output.at:227: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   16385                   --graph=xml-tests/test.dot -o \").c\" --defines=\").h\" glr.y"
   16386 at_fn_check_prepare_notrace 'an embedded newline' "output.at:227"
   16387 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   16388                   --graph=xml-tests/test.dot -o ").c" --defines=").h" glr.y
   16389 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16390 at_status=$? at_failed=false
   16391 $at_check_filter
   16392 echo stderr:; cat "$at_stderr"
   16393 echo stdout:; cat "$at_stdout"
   16394 at_fn_check_status 0 $at_status "$at_srcdir/output.at:227"
   16395 $at_failed && at_fn_log_failure
   16396 $at_traceon; }
   16397 
   16398   { set +x
   16399 $as_echo "$at_srcdir/output.at:227: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \").c\" --defines=\").h\" glr.y"
   16400 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \").c\" --defines=\").h\" glr.y" "output.at:227"
   16401 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o ").c" --defines=").h" glr.y
   16402 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16403 at_status=$? at_failed=false
   16404 $at_check_filter
   16405 echo stderr:; cat "$at_stderr"
   16406 echo stdout:; cat "$at_stdout"
   16407 at_fn_check_status 0 $at_status "$at_srcdir/output.at:227"
   16408 $at_failed && at_fn_log_failure
   16409 $at_traceon; }
   16410 
   16411     cp xml-tests/test.output expout
   16412   { set +x
   16413 $as_echo "$at_srcdir/output.at:227: \$XSLTPROC \\
   16414              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   16415              xml-tests/test.xml"
   16416 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:227"
   16417 ( $at_check_trace; $XSLTPROC \
   16418              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   16419              xml-tests/test.xml
   16420 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16421 at_status=$? at_failed=false
   16422 $at_check_filter
   16423 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16424 $at_diff expout "$at_stdout" || at_failed=:
   16425 at_fn_check_status 0 $at_status "$at_srcdir/output.at:227"
   16426 $at_failed && at_fn_log_failure
   16427 $at_traceon; }
   16428 
   16429   sort xml-tests/test.dot > expout
   16430   { set +x
   16431 $as_echo "$at_srcdir/output.at:227: \$XSLTPROC \\
   16432              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   16433              xml-tests/test.xml | sort"
   16434 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:227"
   16435 ( $at_check_trace; $XSLTPROC \
   16436              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   16437              xml-tests/test.xml | sort
   16438 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16439 at_status=$? at_failed=false
   16440 $at_check_filter
   16441 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16442 $at_diff expout "$at_stdout" || at_failed=:
   16443 at_fn_check_status 0 $at_status "$at_srcdir/output.at:227"
   16444 $at_failed && at_fn_log_failure
   16445 $at_traceon; }
   16446 
   16447   rm -rf xml-tests expout
   16448   at_restore_special_files
   16449 fi
   16450 { set +x
   16451 $as_echo "$at_srcdir/output.at:227: bison -o \").c\" --defines=\").h\" glr.y"
   16452 at_fn_check_prepare_trace "output.at:227"
   16453 ( $at_check_trace; bison -o ").c" --defines=").h" glr.y
   16454 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16455 at_status=$? at_failed=false
   16456 $at_check_filter
   16457 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16458 at_fn_diff_devnull "$at_stdout" || at_failed=:
   16459 at_fn_check_status 0 $at_status "$at_srcdir/output.at:227"
   16460 $at_failed && at_fn_log_failure
   16461 $at_traceon; }
   16462 
   16463 
   16464 { set +x
   16465 $as_echo "$at_srcdir/output.at:227: ls \").c\" \").h\""
   16466 at_fn_check_prepare_trace "output.at:227"
   16467 ( $at_check_trace; ls ").c" ").h"
   16468 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16469 at_status=$? at_failed=false
   16470 $at_check_filter
   16471 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16472 echo stdout:; cat "$at_stdout"
   16473 at_fn_check_status 0 $at_status "$at_srcdir/output.at:227"
   16474 $at_failed && at_fn_log_failure
   16475 $at_traceon; }
   16476 
   16477 { set +x
   16478 $as_echo "$at_srcdir/output.at:227: \$BISON_C_WORKS"
   16479 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "output.at:227"
   16480 ( $at_check_trace; $BISON_C_WORKS
   16481 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16482 at_status=$? at_failed=false
   16483 $at_check_filter
   16484 echo stderr:; cat "$at_stderr"
   16485 echo stdout:; cat "$at_stdout"
   16486 at_fn_check_status 0 $at_status "$at_srcdir/output.at:227"
   16487 $at_failed && at_fn_log_failure
   16488 $at_traceon; }
   16489 
   16490 { set +x
   16491 $as_echo "$at_srcdir/output.at:227: \$CC \$CFLAGS \$CPPFLAGS -c -o glr.o -c \").c\" "
   16492 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o glr.o -c \").c\" " "output.at:227"
   16493 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o glr.o -c ").c"
   16494 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16495 at_status=$? at_failed=false
   16496 $at_check_filter
   16497 echo stderr:; cat "$at_stderr"
   16498 echo stdout:; cat "$at_stdout"
   16499 at_fn_check_status 0 $at_status "$at_srcdir/output.at:227"
   16500 $at_failed && at_fn_log_failure
   16501 $at_traceon; }
   16502 
   16503 
   16504 
   16505 cat >cxx.y <<'_ATEOF'
   16506 %code top {
   16507 #include <config.h>
   16508 /* We don't need perfect functions for these tests. */
   16509 #undef malloc
   16510 #undef memcmp
   16511 #undef realloc
   16512 }
   16513 
   16514 %skeleton "lalr1.cc"
   16515 %code { int yylex (yy::parser::semantic_type*); }
   16516 %%
   16517 start: {};
   16518 _ATEOF
   16519 
   16520 
   16521 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   16522   at_save_special_files
   16523   mkdir xml-tests
   16524     # Don't combine these Bison invocations since we want to be sure that
   16525   # --report=all isn't required to get the full XML file.
   16526   { set +x
   16527 $as_echo "$at_srcdir/output.at:227: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   16528                   --graph=xml-tests/test.dot -o \").c\" --defines=\").h\" cxx.y"
   16529 at_fn_check_prepare_notrace 'an embedded newline' "output.at:227"
   16530 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   16531                   --graph=xml-tests/test.dot -o ").c" --defines=").h" cxx.y
   16532 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16533 at_status=$? at_failed=false
   16534 $at_check_filter
   16535 echo stderr:; cat "$at_stderr"
   16536 echo stdout:; cat "$at_stdout"
   16537 at_fn_check_status 0 $at_status "$at_srcdir/output.at:227"
   16538 $at_failed && at_fn_log_failure
   16539 $at_traceon; }
   16540 
   16541   { set +x
   16542 $as_echo "$at_srcdir/output.at:227: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \").c\" --defines=\").h\" cxx.y"
   16543 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \").c\" --defines=\").h\" cxx.y" "output.at:227"
   16544 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o ").c" --defines=").h" cxx.y
   16545 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16546 at_status=$? at_failed=false
   16547 $at_check_filter
   16548 echo stderr:; cat "$at_stderr"
   16549 echo stdout:; cat "$at_stdout"
   16550 at_fn_check_status 0 $at_status "$at_srcdir/output.at:227"
   16551 $at_failed && at_fn_log_failure
   16552 $at_traceon; }
   16553 
   16554     cp xml-tests/test.output expout
   16555   { set +x
   16556 $as_echo "$at_srcdir/output.at:227: \$XSLTPROC \\
   16557              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   16558              xml-tests/test.xml"
   16559 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:227"
   16560 ( $at_check_trace; $XSLTPROC \
   16561              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   16562              xml-tests/test.xml
   16563 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16564 at_status=$? at_failed=false
   16565 $at_check_filter
   16566 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16567 $at_diff expout "$at_stdout" || at_failed=:
   16568 at_fn_check_status 0 $at_status "$at_srcdir/output.at:227"
   16569 $at_failed && at_fn_log_failure
   16570 $at_traceon; }
   16571 
   16572   sort xml-tests/test.dot > expout
   16573   { set +x
   16574 $as_echo "$at_srcdir/output.at:227: \$XSLTPROC \\
   16575              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   16576              xml-tests/test.xml | sort"
   16577 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:227"
   16578 ( $at_check_trace; $XSLTPROC \
   16579              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   16580              xml-tests/test.xml | sort
   16581 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16582 at_status=$? at_failed=false
   16583 $at_check_filter
   16584 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16585 $at_diff expout "$at_stdout" || at_failed=:
   16586 at_fn_check_status 0 $at_status "$at_srcdir/output.at:227"
   16587 $at_failed && at_fn_log_failure
   16588 $at_traceon; }
   16589 
   16590   rm -rf xml-tests expout
   16591   at_restore_special_files
   16592 fi
   16593 { set +x
   16594 $as_echo "$at_srcdir/output.at:227: bison -o \").c\" --defines=\").h\" cxx.y"
   16595 at_fn_check_prepare_trace "output.at:227"
   16596 ( $at_check_trace; bison -o ").c" --defines=").h" cxx.y
   16597 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16598 at_status=$? at_failed=false
   16599 $at_check_filter
   16600 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16601 at_fn_diff_devnull "$at_stdout" || at_failed=:
   16602 at_fn_check_status 0 $at_status "$at_srcdir/output.at:227"
   16603 $at_failed && at_fn_log_failure
   16604 $at_traceon; }
   16605 
   16606 
   16607 { set +x
   16608 $as_echo "$at_srcdir/output.at:227: ls \").c\" \").h\""
   16609 at_fn_check_prepare_trace "output.at:227"
   16610 ( $at_check_trace; ls ").c" ").h"
   16611 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16612 at_status=$? at_failed=false
   16613 $at_check_filter
   16614 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16615 echo stdout:; cat "$at_stdout"
   16616 at_fn_check_status 0 $at_status "$at_srcdir/output.at:227"
   16617 $at_failed && at_fn_log_failure
   16618 $at_traceon; }
   16619 
   16620 
   16621 { set +x
   16622 $as_echo "$at_srcdir/output.at:227: \$BISON_CXX_WORKS"
   16623 at_fn_check_prepare_dynamic "$BISON_CXX_WORKS" "output.at:227"
   16624 ( $at_check_trace; $BISON_CXX_WORKS
   16625 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16626 at_status=$? at_failed=false
   16627 $at_check_filter
   16628 echo stderr:; cat "$at_stderr"
   16629 echo stdout:; cat "$at_stdout"
   16630 at_fn_check_status 0 $at_status "$at_srcdir/output.at:227"
   16631 $at_failed && at_fn_log_failure
   16632 $at_traceon; }
   16633 
   16634 { set +x
   16635 $as_echo "$at_srcdir/output.at:227: \$CXX \$CXXFLAGS \$CPPFLAGS -c -o cxx.o -c \").c\" "
   16636 at_fn_check_prepare_dynamic "$CXX $CXXFLAGS $CPPFLAGS -c -o cxx.o -c \").c\" " "output.at:227"
   16637 ( $at_check_trace; $CXX $CXXFLAGS $CPPFLAGS -c -o cxx.o -c ").c"
   16638 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16639 at_status=$? at_failed=false
   16640 $at_check_filter
   16641 echo stderr:; cat "$at_stderr"
   16642 echo stdout:; cat "$at_stdout"
   16643 at_fn_check_status 0 $at_status "$at_srcdir/output.at:227"
   16644 $at_failed && at_fn_log_failure
   16645 $at_traceon; }
   16646 
   16647 
   16648 
   16649 
   16650   set +x
   16651   $at_times_p && times >"$at_times_file"
   16652 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   16653 read at_status <"$at_status_file"
   16654 #AT_STOP_79
   16655 #AT_START_80
   16656 at_fn_group_banner 80 'output.at:228' \
   16657   "Output file name: #" "                            " 3
   16658 at_xfail=no
   16659 (
   16660   $as_echo "80. $at_setup_line: testing $at_desc ..."
   16661   $at_traceon
   16662 
   16663 
   16664 
   16665 # Skip if platform doesn't support file name.  For example, Cygwin
   16666 # doesn't support file names containing ":" or "\".
   16667 { set +x
   16668 $as_echo "$at_srcdir/output.at:228: touch \"#.tmp\" || exit 77"
   16669 at_fn_check_prepare_trace "output.at:228"
   16670 ( $at_check_trace; touch "#.tmp" || exit 77
   16671 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16672 at_status=$? at_failed=false
   16673 $at_check_filter
   16674 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16675 at_fn_diff_devnull "$at_stdout" || at_failed=:
   16676 at_fn_check_status 0 $at_status "$at_srcdir/output.at:228"
   16677 $at_failed && at_fn_log_failure
   16678 $at_traceon; }
   16679 
   16680 
   16681 cat >glr.y <<'_ATEOF'
   16682 %code top {
   16683 #include <config.h>
   16684 /* We don't need perfect functions for these tests. */
   16685 #undef malloc
   16686 #undef memcmp
   16687 #undef realloc
   16688 }
   16689 
   16690 %glr-parser
   16691 %code {
   16692 void yyerror ( const char *msg);
   16693 int yylex (void);
   16694 }
   16695 %%
   16696 start: {};
   16697 _ATEOF
   16698 
   16699 
   16700 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   16701   at_save_special_files
   16702   mkdir xml-tests
   16703     # Don't combine these Bison invocations since we want to be sure that
   16704   # --report=all isn't required to get the full XML file.
   16705   { set +x
   16706 $as_echo "$at_srcdir/output.at:228: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   16707                   --graph=xml-tests/test.dot -o \"#.c\" --defines=\"#.h\" glr.y"
   16708 at_fn_check_prepare_notrace 'an embedded newline' "output.at:228"
   16709 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   16710                   --graph=xml-tests/test.dot -o "#.c" --defines="#.h" glr.y
   16711 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16712 at_status=$? at_failed=false
   16713 $at_check_filter
   16714 echo stderr:; cat "$at_stderr"
   16715 echo stdout:; cat "$at_stdout"
   16716 at_fn_check_status 0 $at_status "$at_srcdir/output.at:228"
   16717 $at_failed && at_fn_log_failure
   16718 $at_traceon; }
   16719 
   16720   { set +x
   16721 $as_echo "$at_srcdir/output.at:228: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"#.c\" --defines=\"#.h\" glr.y"
   16722 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"#.c\" --defines=\"#.h\" glr.y" "output.at:228"
   16723 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o "#.c" --defines="#.h" glr.y
   16724 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16725 at_status=$? at_failed=false
   16726 $at_check_filter
   16727 echo stderr:; cat "$at_stderr"
   16728 echo stdout:; cat "$at_stdout"
   16729 at_fn_check_status 0 $at_status "$at_srcdir/output.at:228"
   16730 $at_failed && at_fn_log_failure
   16731 $at_traceon; }
   16732 
   16733     cp xml-tests/test.output expout
   16734   { set +x
   16735 $as_echo "$at_srcdir/output.at:228: \$XSLTPROC \\
   16736              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   16737              xml-tests/test.xml"
   16738 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:228"
   16739 ( $at_check_trace; $XSLTPROC \
   16740              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   16741              xml-tests/test.xml
   16742 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16743 at_status=$? at_failed=false
   16744 $at_check_filter
   16745 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16746 $at_diff expout "$at_stdout" || at_failed=:
   16747 at_fn_check_status 0 $at_status "$at_srcdir/output.at:228"
   16748 $at_failed && at_fn_log_failure
   16749 $at_traceon; }
   16750 
   16751   sort xml-tests/test.dot > expout
   16752   { set +x
   16753 $as_echo "$at_srcdir/output.at:228: \$XSLTPROC \\
   16754              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   16755              xml-tests/test.xml | sort"
   16756 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:228"
   16757 ( $at_check_trace; $XSLTPROC \
   16758              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   16759              xml-tests/test.xml | sort
   16760 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16761 at_status=$? at_failed=false
   16762 $at_check_filter
   16763 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16764 $at_diff expout "$at_stdout" || at_failed=:
   16765 at_fn_check_status 0 $at_status "$at_srcdir/output.at:228"
   16766 $at_failed && at_fn_log_failure
   16767 $at_traceon; }
   16768 
   16769   rm -rf xml-tests expout
   16770   at_restore_special_files
   16771 fi
   16772 { set +x
   16773 $as_echo "$at_srcdir/output.at:228: bison -o \"#.c\" --defines=\"#.h\" glr.y"
   16774 at_fn_check_prepare_trace "output.at:228"
   16775 ( $at_check_trace; bison -o "#.c" --defines="#.h" glr.y
   16776 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16777 at_status=$? at_failed=false
   16778 $at_check_filter
   16779 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16780 at_fn_diff_devnull "$at_stdout" || at_failed=:
   16781 at_fn_check_status 0 $at_status "$at_srcdir/output.at:228"
   16782 $at_failed && at_fn_log_failure
   16783 $at_traceon; }
   16784 
   16785 
   16786 { set +x
   16787 $as_echo "$at_srcdir/output.at:228: ls \"#.c\" \"#.h\""
   16788 at_fn_check_prepare_trace "output.at:228"
   16789 ( $at_check_trace; ls "#.c" "#.h"
   16790 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16791 at_status=$? at_failed=false
   16792 $at_check_filter
   16793 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16794 echo stdout:; cat "$at_stdout"
   16795 at_fn_check_status 0 $at_status "$at_srcdir/output.at:228"
   16796 $at_failed && at_fn_log_failure
   16797 $at_traceon; }
   16798 
   16799 { set +x
   16800 $as_echo "$at_srcdir/output.at:228: \$BISON_C_WORKS"
   16801 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "output.at:228"
   16802 ( $at_check_trace; $BISON_C_WORKS
   16803 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16804 at_status=$? at_failed=false
   16805 $at_check_filter
   16806 echo stderr:; cat "$at_stderr"
   16807 echo stdout:; cat "$at_stdout"
   16808 at_fn_check_status 0 $at_status "$at_srcdir/output.at:228"
   16809 $at_failed && at_fn_log_failure
   16810 $at_traceon; }
   16811 
   16812 { set +x
   16813 $as_echo "$at_srcdir/output.at:228: \$CC \$CFLAGS \$CPPFLAGS -c -o glr.o -c \"#.c\" "
   16814 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o glr.o -c \"#.c\" " "output.at:228"
   16815 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o glr.o -c "#.c"
   16816 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16817 at_status=$? at_failed=false
   16818 $at_check_filter
   16819 echo stderr:; cat "$at_stderr"
   16820 echo stdout:; cat "$at_stdout"
   16821 at_fn_check_status 0 $at_status "$at_srcdir/output.at:228"
   16822 $at_failed && at_fn_log_failure
   16823 $at_traceon; }
   16824 
   16825 
   16826 
   16827 cat >cxx.y <<'_ATEOF'
   16828 %code top {
   16829 #include <config.h>
   16830 /* We don't need perfect functions for these tests. */
   16831 #undef malloc
   16832 #undef memcmp
   16833 #undef realloc
   16834 }
   16835 
   16836 %skeleton "lalr1.cc"
   16837 %code { int yylex (yy::parser::semantic_type*); }
   16838 %%
   16839 start: {};
   16840 _ATEOF
   16841 
   16842 
   16843 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   16844   at_save_special_files
   16845   mkdir xml-tests
   16846     # Don't combine these Bison invocations since we want to be sure that
   16847   # --report=all isn't required to get the full XML file.
   16848   { set +x
   16849 $as_echo "$at_srcdir/output.at:228: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   16850                   --graph=xml-tests/test.dot -o \"#.c\" --defines=\"#.h\" cxx.y"
   16851 at_fn_check_prepare_notrace 'an embedded newline' "output.at:228"
   16852 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   16853                   --graph=xml-tests/test.dot -o "#.c" --defines="#.h" cxx.y
   16854 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16855 at_status=$? at_failed=false
   16856 $at_check_filter
   16857 echo stderr:; cat "$at_stderr"
   16858 echo stdout:; cat "$at_stdout"
   16859 at_fn_check_status 0 $at_status "$at_srcdir/output.at:228"
   16860 $at_failed && at_fn_log_failure
   16861 $at_traceon; }
   16862 
   16863   { set +x
   16864 $as_echo "$at_srcdir/output.at:228: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"#.c\" --defines=\"#.h\" cxx.y"
   16865 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"#.c\" --defines=\"#.h\" cxx.y" "output.at:228"
   16866 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o "#.c" --defines="#.h" cxx.y
   16867 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16868 at_status=$? at_failed=false
   16869 $at_check_filter
   16870 echo stderr:; cat "$at_stderr"
   16871 echo stdout:; cat "$at_stdout"
   16872 at_fn_check_status 0 $at_status "$at_srcdir/output.at:228"
   16873 $at_failed && at_fn_log_failure
   16874 $at_traceon; }
   16875 
   16876     cp xml-tests/test.output expout
   16877   { set +x
   16878 $as_echo "$at_srcdir/output.at:228: \$XSLTPROC \\
   16879              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   16880              xml-tests/test.xml"
   16881 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:228"
   16882 ( $at_check_trace; $XSLTPROC \
   16883              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   16884              xml-tests/test.xml
   16885 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16886 at_status=$? at_failed=false
   16887 $at_check_filter
   16888 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16889 $at_diff expout "$at_stdout" || at_failed=:
   16890 at_fn_check_status 0 $at_status "$at_srcdir/output.at:228"
   16891 $at_failed && at_fn_log_failure
   16892 $at_traceon; }
   16893 
   16894   sort xml-tests/test.dot > expout
   16895   { set +x
   16896 $as_echo "$at_srcdir/output.at:228: \$XSLTPROC \\
   16897              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   16898              xml-tests/test.xml | sort"
   16899 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:228"
   16900 ( $at_check_trace; $XSLTPROC \
   16901              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   16902              xml-tests/test.xml | sort
   16903 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16904 at_status=$? at_failed=false
   16905 $at_check_filter
   16906 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16907 $at_diff expout "$at_stdout" || at_failed=:
   16908 at_fn_check_status 0 $at_status "$at_srcdir/output.at:228"
   16909 $at_failed && at_fn_log_failure
   16910 $at_traceon; }
   16911 
   16912   rm -rf xml-tests expout
   16913   at_restore_special_files
   16914 fi
   16915 { set +x
   16916 $as_echo "$at_srcdir/output.at:228: bison -o \"#.c\" --defines=\"#.h\" cxx.y"
   16917 at_fn_check_prepare_trace "output.at:228"
   16918 ( $at_check_trace; bison -o "#.c" --defines="#.h" cxx.y
   16919 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16920 at_status=$? at_failed=false
   16921 $at_check_filter
   16922 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16923 at_fn_diff_devnull "$at_stdout" || at_failed=:
   16924 at_fn_check_status 0 $at_status "$at_srcdir/output.at:228"
   16925 $at_failed && at_fn_log_failure
   16926 $at_traceon; }
   16927 
   16928 
   16929 { set +x
   16930 $as_echo "$at_srcdir/output.at:228: ls \"#.c\" \"#.h\""
   16931 at_fn_check_prepare_trace "output.at:228"
   16932 ( $at_check_trace; ls "#.c" "#.h"
   16933 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16934 at_status=$? at_failed=false
   16935 $at_check_filter
   16936 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16937 echo stdout:; cat "$at_stdout"
   16938 at_fn_check_status 0 $at_status "$at_srcdir/output.at:228"
   16939 $at_failed && at_fn_log_failure
   16940 $at_traceon; }
   16941 
   16942 
   16943 { set +x
   16944 $as_echo "$at_srcdir/output.at:228: \$BISON_CXX_WORKS"
   16945 at_fn_check_prepare_dynamic "$BISON_CXX_WORKS" "output.at:228"
   16946 ( $at_check_trace; $BISON_CXX_WORKS
   16947 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16948 at_status=$? at_failed=false
   16949 $at_check_filter
   16950 echo stderr:; cat "$at_stderr"
   16951 echo stdout:; cat "$at_stdout"
   16952 at_fn_check_status 0 $at_status "$at_srcdir/output.at:228"
   16953 $at_failed && at_fn_log_failure
   16954 $at_traceon; }
   16955 
   16956 { set +x
   16957 $as_echo "$at_srcdir/output.at:228: \$CXX \$CXXFLAGS \$CPPFLAGS -c -o cxx.o -c \"#.c\" "
   16958 at_fn_check_prepare_dynamic "$CXX $CXXFLAGS $CPPFLAGS -c -o cxx.o -c \"#.c\" " "output.at:228"
   16959 ( $at_check_trace; $CXX $CXXFLAGS $CPPFLAGS -c -o cxx.o -c "#.c"
   16960 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16961 at_status=$? at_failed=false
   16962 $at_check_filter
   16963 echo stderr:; cat "$at_stderr"
   16964 echo stdout:; cat "$at_stdout"
   16965 at_fn_check_status 0 $at_status "$at_srcdir/output.at:228"
   16966 $at_failed && at_fn_log_failure
   16967 $at_traceon; }
   16968 
   16969 
   16970 
   16971 
   16972   set +x
   16973   $at_times_p && times >"$at_times_file"
   16974 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   16975 read at_status <"$at_status_file"
   16976 #AT_STOP_80
   16977 #AT_START_81
   16978 at_fn_group_banner 81 'output.at:229' \
   16979   "Output file name: @@" "                           " 3
   16980 at_xfail=no
   16981 (
   16982   $as_echo "81. $at_setup_line: testing $at_desc ..."
   16983   $at_traceon
   16984 
   16985 
   16986 
   16987 # Skip if platform doesn't support file name.  For example, Cygwin
   16988 # doesn't support file names containing ":" or "\".
   16989 { set +x
   16990 $as_echo "$at_srcdir/output.at:229: touch \"@@.tmp\" || exit 77"
   16991 at_fn_check_prepare_trace "output.at:229"
   16992 ( $at_check_trace; touch "@@.tmp" || exit 77
   16993 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   16994 at_status=$? at_failed=false
   16995 $at_check_filter
   16996 at_fn_diff_devnull "$at_stderr" || at_failed=:
   16997 at_fn_diff_devnull "$at_stdout" || at_failed=:
   16998 at_fn_check_status 0 $at_status "$at_srcdir/output.at:229"
   16999 $at_failed && at_fn_log_failure
   17000 $at_traceon; }
   17001 
   17002 
   17003 cat >glr.y <<'_ATEOF'
   17004 %code top {
   17005 #include <config.h>
   17006 /* We don't need perfect functions for these tests. */
   17007 #undef malloc
   17008 #undef memcmp
   17009 #undef realloc
   17010 }
   17011 
   17012 %glr-parser
   17013 %code {
   17014 void yyerror ( const char *msg);
   17015 int yylex (void);
   17016 }
   17017 %%
   17018 start: {};
   17019 _ATEOF
   17020 
   17021 
   17022 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   17023   at_save_special_files
   17024   mkdir xml-tests
   17025     # Don't combine these Bison invocations since we want to be sure that
   17026   # --report=all isn't required to get the full XML file.
   17027   { set +x
   17028 $as_echo "$at_srcdir/output.at:229: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   17029                   --graph=xml-tests/test.dot -o \"@@.c\" --defines=\"@@.h\" glr.y"
   17030 at_fn_check_prepare_notrace 'an embedded newline' "output.at:229"
   17031 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   17032                   --graph=xml-tests/test.dot -o "@@.c" --defines="@@.h" glr.y
   17033 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17034 at_status=$? at_failed=false
   17035 $at_check_filter
   17036 echo stderr:; cat "$at_stderr"
   17037 echo stdout:; cat "$at_stdout"
   17038 at_fn_check_status 0 $at_status "$at_srcdir/output.at:229"
   17039 $at_failed && at_fn_log_failure
   17040 $at_traceon; }
   17041 
   17042   { set +x
   17043 $as_echo "$at_srcdir/output.at:229: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"@@.c\" --defines=\"@@.h\" glr.y"
   17044 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"@@.c\" --defines=\"@@.h\" glr.y" "output.at:229"
   17045 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o "@@.c" --defines="@@.h" glr.y
   17046 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17047 at_status=$? at_failed=false
   17048 $at_check_filter
   17049 echo stderr:; cat "$at_stderr"
   17050 echo stdout:; cat "$at_stdout"
   17051 at_fn_check_status 0 $at_status "$at_srcdir/output.at:229"
   17052 $at_failed && at_fn_log_failure
   17053 $at_traceon; }
   17054 
   17055     cp xml-tests/test.output expout
   17056   { set +x
   17057 $as_echo "$at_srcdir/output.at:229: \$XSLTPROC \\
   17058              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   17059              xml-tests/test.xml"
   17060 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:229"
   17061 ( $at_check_trace; $XSLTPROC \
   17062              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   17063              xml-tests/test.xml
   17064 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17065 at_status=$? at_failed=false
   17066 $at_check_filter
   17067 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17068 $at_diff expout "$at_stdout" || at_failed=:
   17069 at_fn_check_status 0 $at_status "$at_srcdir/output.at:229"
   17070 $at_failed && at_fn_log_failure
   17071 $at_traceon; }
   17072 
   17073   sort xml-tests/test.dot > expout
   17074   { set +x
   17075 $as_echo "$at_srcdir/output.at:229: \$XSLTPROC \\
   17076              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   17077              xml-tests/test.xml | sort"
   17078 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:229"
   17079 ( $at_check_trace; $XSLTPROC \
   17080              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   17081              xml-tests/test.xml | sort
   17082 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17083 at_status=$? at_failed=false
   17084 $at_check_filter
   17085 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17086 $at_diff expout "$at_stdout" || at_failed=:
   17087 at_fn_check_status 0 $at_status "$at_srcdir/output.at:229"
   17088 $at_failed && at_fn_log_failure
   17089 $at_traceon; }
   17090 
   17091   rm -rf xml-tests expout
   17092   at_restore_special_files
   17093 fi
   17094 { set +x
   17095 $as_echo "$at_srcdir/output.at:229: bison -o \"@@.c\" --defines=\"@@.h\" glr.y"
   17096 at_fn_check_prepare_trace "output.at:229"
   17097 ( $at_check_trace; bison -o "@@.c" --defines="@@.h" glr.y
   17098 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17099 at_status=$? at_failed=false
   17100 $at_check_filter
   17101 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17102 at_fn_diff_devnull "$at_stdout" || at_failed=:
   17103 at_fn_check_status 0 $at_status "$at_srcdir/output.at:229"
   17104 $at_failed && at_fn_log_failure
   17105 $at_traceon; }
   17106 
   17107 
   17108 { set +x
   17109 $as_echo "$at_srcdir/output.at:229: ls \"@@.c\" \"@@.h\""
   17110 at_fn_check_prepare_trace "output.at:229"
   17111 ( $at_check_trace; ls "@@.c" "@@.h"
   17112 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17113 at_status=$? at_failed=false
   17114 $at_check_filter
   17115 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17116 echo stdout:; cat "$at_stdout"
   17117 at_fn_check_status 0 $at_status "$at_srcdir/output.at:229"
   17118 $at_failed && at_fn_log_failure
   17119 $at_traceon; }
   17120 
   17121 { set +x
   17122 $as_echo "$at_srcdir/output.at:229: \$BISON_C_WORKS"
   17123 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "output.at:229"
   17124 ( $at_check_trace; $BISON_C_WORKS
   17125 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17126 at_status=$? at_failed=false
   17127 $at_check_filter
   17128 echo stderr:; cat "$at_stderr"
   17129 echo stdout:; cat "$at_stdout"
   17130 at_fn_check_status 0 $at_status "$at_srcdir/output.at:229"
   17131 $at_failed && at_fn_log_failure
   17132 $at_traceon; }
   17133 
   17134 { set +x
   17135 $as_echo "$at_srcdir/output.at:229: \$CC \$CFLAGS \$CPPFLAGS -c -o glr.o -c \"@@.c\" "
   17136 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o glr.o -c \"@@.c\" " "output.at:229"
   17137 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o glr.o -c "@@.c"
   17138 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17139 at_status=$? at_failed=false
   17140 $at_check_filter
   17141 echo stderr:; cat "$at_stderr"
   17142 echo stdout:; cat "$at_stdout"
   17143 at_fn_check_status 0 $at_status "$at_srcdir/output.at:229"
   17144 $at_failed && at_fn_log_failure
   17145 $at_traceon; }
   17146 
   17147 
   17148 
   17149 cat >cxx.y <<'_ATEOF'
   17150 %code top {
   17151 #include <config.h>
   17152 /* We don't need perfect functions for these tests. */
   17153 #undef malloc
   17154 #undef memcmp
   17155 #undef realloc
   17156 }
   17157 
   17158 %skeleton "lalr1.cc"
   17159 %code { int yylex (yy::parser::semantic_type*); }
   17160 %%
   17161 start: {};
   17162 _ATEOF
   17163 
   17164 
   17165 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   17166   at_save_special_files
   17167   mkdir xml-tests
   17168     # Don't combine these Bison invocations since we want to be sure that
   17169   # --report=all isn't required to get the full XML file.
   17170   { set +x
   17171 $as_echo "$at_srcdir/output.at:229: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   17172                   --graph=xml-tests/test.dot -o \"@@.c\" --defines=\"@@.h\" cxx.y"
   17173 at_fn_check_prepare_notrace 'an embedded newline' "output.at:229"
   17174 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   17175                   --graph=xml-tests/test.dot -o "@@.c" --defines="@@.h" cxx.y
   17176 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17177 at_status=$? at_failed=false
   17178 $at_check_filter
   17179 echo stderr:; cat "$at_stderr"
   17180 echo stdout:; cat "$at_stdout"
   17181 at_fn_check_status 0 $at_status "$at_srcdir/output.at:229"
   17182 $at_failed && at_fn_log_failure
   17183 $at_traceon; }
   17184 
   17185   { set +x
   17186 $as_echo "$at_srcdir/output.at:229: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"@@.c\" --defines=\"@@.h\" cxx.y"
   17187 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"@@.c\" --defines=\"@@.h\" cxx.y" "output.at:229"
   17188 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o "@@.c" --defines="@@.h" cxx.y
   17189 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17190 at_status=$? at_failed=false
   17191 $at_check_filter
   17192 echo stderr:; cat "$at_stderr"
   17193 echo stdout:; cat "$at_stdout"
   17194 at_fn_check_status 0 $at_status "$at_srcdir/output.at:229"
   17195 $at_failed && at_fn_log_failure
   17196 $at_traceon; }
   17197 
   17198     cp xml-tests/test.output expout
   17199   { set +x
   17200 $as_echo "$at_srcdir/output.at:229: \$XSLTPROC \\
   17201              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   17202              xml-tests/test.xml"
   17203 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:229"
   17204 ( $at_check_trace; $XSLTPROC \
   17205              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   17206              xml-tests/test.xml
   17207 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17208 at_status=$? at_failed=false
   17209 $at_check_filter
   17210 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17211 $at_diff expout "$at_stdout" || at_failed=:
   17212 at_fn_check_status 0 $at_status "$at_srcdir/output.at:229"
   17213 $at_failed && at_fn_log_failure
   17214 $at_traceon; }
   17215 
   17216   sort xml-tests/test.dot > expout
   17217   { set +x
   17218 $as_echo "$at_srcdir/output.at:229: \$XSLTPROC \\
   17219              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   17220              xml-tests/test.xml | sort"
   17221 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:229"
   17222 ( $at_check_trace; $XSLTPROC \
   17223              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   17224              xml-tests/test.xml | sort
   17225 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17226 at_status=$? at_failed=false
   17227 $at_check_filter
   17228 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17229 $at_diff expout "$at_stdout" || at_failed=:
   17230 at_fn_check_status 0 $at_status "$at_srcdir/output.at:229"
   17231 $at_failed && at_fn_log_failure
   17232 $at_traceon; }
   17233 
   17234   rm -rf xml-tests expout
   17235   at_restore_special_files
   17236 fi
   17237 { set +x
   17238 $as_echo "$at_srcdir/output.at:229: bison -o \"@@.c\" --defines=\"@@.h\" cxx.y"
   17239 at_fn_check_prepare_trace "output.at:229"
   17240 ( $at_check_trace; bison -o "@@.c" --defines="@@.h" cxx.y
   17241 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17242 at_status=$? at_failed=false
   17243 $at_check_filter
   17244 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17245 at_fn_diff_devnull "$at_stdout" || at_failed=:
   17246 at_fn_check_status 0 $at_status "$at_srcdir/output.at:229"
   17247 $at_failed && at_fn_log_failure
   17248 $at_traceon; }
   17249 
   17250 
   17251 { set +x
   17252 $as_echo "$at_srcdir/output.at:229: ls \"@@.c\" \"@@.h\""
   17253 at_fn_check_prepare_trace "output.at:229"
   17254 ( $at_check_trace; ls "@@.c" "@@.h"
   17255 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17256 at_status=$? at_failed=false
   17257 $at_check_filter
   17258 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17259 echo stdout:; cat "$at_stdout"
   17260 at_fn_check_status 0 $at_status "$at_srcdir/output.at:229"
   17261 $at_failed && at_fn_log_failure
   17262 $at_traceon; }
   17263 
   17264 
   17265 { set +x
   17266 $as_echo "$at_srcdir/output.at:229: \$BISON_CXX_WORKS"
   17267 at_fn_check_prepare_dynamic "$BISON_CXX_WORKS" "output.at:229"
   17268 ( $at_check_trace; $BISON_CXX_WORKS
   17269 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17270 at_status=$? at_failed=false
   17271 $at_check_filter
   17272 echo stderr:; cat "$at_stderr"
   17273 echo stdout:; cat "$at_stdout"
   17274 at_fn_check_status 0 $at_status "$at_srcdir/output.at:229"
   17275 $at_failed && at_fn_log_failure
   17276 $at_traceon; }
   17277 
   17278 { set +x
   17279 $as_echo "$at_srcdir/output.at:229: \$CXX \$CXXFLAGS \$CPPFLAGS -c -o cxx.o -c \"@@.c\" "
   17280 at_fn_check_prepare_dynamic "$CXX $CXXFLAGS $CPPFLAGS -c -o cxx.o -c \"@@.c\" " "output.at:229"
   17281 ( $at_check_trace; $CXX $CXXFLAGS $CPPFLAGS -c -o cxx.o -c "@@.c"
   17282 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17283 at_status=$? at_failed=false
   17284 $at_check_filter
   17285 echo stderr:; cat "$at_stderr"
   17286 echo stdout:; cat "$at_stdout"
   17287 at_fn_check_status 0 $at_status "$at_srcdir/output.at:229"
   17288 $at_failed && at_fn_log_failure
   17289 $at_traceon; }
   17290 
   17291 
   17292 
   17293 
   17294   set +x
   17295   $at_times_p && times >"$at_times_file"
   17296 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   17297 read at_status <"$at_status_file"
   17298 #AT_STOP_81
   17299 #AT_START_82
   17300 at_fn_group_banner 82 'output.at:230' \
   17301   "Output file name: @{" "                           " 3
   17302 at_xfail=no
   17303 (
   17304   $as_echo "82. $at_setup_line: testing $at_desc ..."
   17305   $at_traceon
   17306 
   17307 
   17308 
   17309 # Skip if platform doesn't support file name.  For example, Cygwin
   17310 # doesn't support file names containing ":" or "\".
   17311 { set +x
   17312 $as_echo "$at_srcdir/output.at:230: touch \"@{.tmp\" || exit 77"
   17313 at_fn_check_prepare_trace "output.at:230"
   17314 ( $at_check_trace; touch "@{.tmp" || exit 77
   17315 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17316 at_status=$? at_failed=false
   17317 $at_check_filter
   17318 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17319 at_fn_diff_devnull "$at_stdout" || at_failed=:
   17320 at_fn_check_status 0 $at_status "$at_srcdir/output.at:230"
   17321 $at_failed && at_fn_log_failure
   17322 $at_traceon; }
   17323 
   17324 
   17325 cat >glr.y <<'_ATEOF'
   17326 %code top {
   17327 #include <config.h>
   17328 /* We don't need perfect functions for these tests. */
   17329 #undef malloc
   17330 #undef memcmp
   17331 #undef realloc
   17332 }
   17333 
   17334 %glr-parser
   17335 %code {
   17336 void yyerror ( const char *msg);
   17337 int yylex (void);
   17338 }
   17339 %%
   17340 start: {};
   17341 _ATEOF
   17342 
   17343 
   17344 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   17345   at_save_special_files
   17346   mkdir xml-tests
   17347     # Don't combine these Bison invocations since we want to be sure that
   17348   # --report=all isn't required to get the full XML file.
   17349   { set +x
   17350 $as_echo "$at_srcdir/output.at:230: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   17351                   --graph=xml-tests/test.dot -o \"@{.c\" --defines=\"@{.h\" glr.y"
   17352 at_fn_check_prepare_notrace 'an embedded newline' "output.at:230"
   17353 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   17354                   --graph=xml-tests/test.dot -o "@{.c" --defines="@{.h" glr.y
   17355 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17356 at_status=$? at_failed=false
   17357 $at_check_filter
   17358 echo stderr:; cat "$at_stderr"
   17359 echo stdout:; cat "$at_stdout"
   17360 at_fn_check_status 0 $at_status "$at_srcdir/output.at:230"
   17361 $at_failed && at_fn_log_failure
   17362 $at_traceon; }
   17363 
   17364   { set +x
   17365 $as_echo "$at_srcdir/output.at:230: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"@{.c\" --defines=\"@{.h\" glr.y"
   17366 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"@{.c\" --defines=\"@{.h\" glr.y" "output.at:230"
   17367 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o "@{.c" --defines="@{.h" glr.y
   17368 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17369 at_status=$? at_failed=false
   17370 $at_check_filter
   17371 echo stderr:; cat "$at_stderr"
   17372 echo stdout:; cat "$at_stdout"
   17373 at_fn_check_status 0 $at_status "$at_srcdir/output.at:230"
   17374 $at_failed && at_fn_log_failure
   17375 $at_traceon; }
   17376 
   17377     cp xml-tests/test.output expout
   17378   { set +x
   17379 $as_echo "$at_srcdir/output.at:230: \$XSLTPROC \\
   17380              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   17381              xml-tests/test.xml"
   17382 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:230"
   17383 ( $at_check_trace; $XSLTPROC \
   17384              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   17385              xml-tests/test.xml
   17386 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17387 at_status=$? at_failed=false
   17388 $at_check_filter
   17389 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17390 $at_diff expout "$at_stdout" || at_failed=:
   17391 at_fn_check_status 0 $at_status "$at_srcdir/output.at:230"
   17392 $at_failed && at_fn_log_failure
   17393 $at_traceon; }
   17394 
   17395   sort xml-tests/test.dot > expout
   17396   { set +x
   17397 $as_echo "$at_srcdir/output.at:230: \$XSLTPROC \\
   17398              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   17399              xml-tests/test.xml | sort"
   17400 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:230"
   17401 ( $at_check_trace; $XSLTPROC \
   17402              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   17403              xml-tests/test.xml | sort
   17404 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17405 at_status=$? at_failed=false
   17406 $at_check_filter
   17407 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17408 $at_diff expout "$at_stdout" || at_failed=:
   17409 at_fn_check_status 0 $at_status "$at_srcdir/output.at:230"
   17410 $at_failed && at_fn_log_failure
   17411 $at_traceon; }
   17412 
   17413   rm -rf xml-tests expout
   17414   at_restore_special_files
   17415 fi
   17416 { set +x
   17417 $as_echo "$at_srcdir/output.at:230: bison -o \"@{.c\" --defines=\"@{.h\" glr.y"
   17418 at_fn_check_prepare_trace "output.at:230"
   17419 ( $at_check_trace; bison -o "@{.c" --defines="@{.h" glr.y
   17420 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17421 at_status=$? at_failed=false
   17422 $at_check_filter
   17423 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17424 at_fn_diff_devnull "$at_stdout" || at_failed=:
   17425 at_fn_check_status 0 $at_status "$at_srcdir/output.at:230"
   17426 $at_failed && at_fn_log_failure
   17427 $at_traceon; }
   17428 
   17429 
   17430 { set +x
   17431 $as_echo "$at_srcdir/output.at:230: ls \"@{.c\" \"@{.h\""
   17432 at_fn_check_prepare_trace "output.at:230"
   17433 ( $at_check_trace; ls "@{.c" "@{.h"
   17434 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17435 at_status=$? at_failed=false
   17436 $at_check_filter
   17437 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17438 echo stdout:; cat "$at_stdout"
   17439 at_fn_check_status 0 $at_status "$at_srcdir/output.at:230"
   17440 $at_failed && at_fn_log_failure
   17441 $at_traceon; }
   17442 
   17443 { set +x
   17444 $as_echo "$at_srcdir/output.at:230: \$BISON_C_WORKS"
   17445 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "output.at:230"
   17446 ( $at_check_trace; $BISON_C_WORKS
   17447 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17448 at_status=$? at_failed=false
   17449 $at_check_filter
   17450 echo stderr:; cat "$at_stderr"
   17451 echo stdout:; cat "$at_stdout"
   17452 at_fn_check_status 0 $at_status "$at_srcdir/output.at:230"
   17453 $at_failed && at_fn_log_failure
   17454 $at_traceon; }
   17455 
   17456 { set +x
   17457 $as_echo "$at_srcdir/output.at:230: \$CC \$CFLAGS \$CPPFLAGS -c -o glr.o -c \"@{.c\" "
   17458 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o glr.o -c \"@{.c\" " "output.at:230"
   17459 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o glr.o -c "@{.c"
   17460 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17461 at_status=$? at_failed=false
   17462 $at_check_filter
   17463 echo stderr:; cat "$at_stderr"
   17464 echo stdout:; cat "$at_stdout"
   17465 at_fn_check_status 0 $at_status "$at_srcdir/output.at:230"
   17466 $at_failed && at_fn_log_failure
   17467 $at_traceon; }
   17468 
   17469 
   17470 
   17471 cat >cxx.y <<'_ATEOF'
   17472 %code top {
   17473 #include <config.h>
   17474 /* We don't need perfect functions for these tests. */
   17475 #undef malloc
   17476 #undef memcmp
   17477 #undef realloc
   17478 }
   17479 
   17480 %skeleton "lalr1.cc"
   17481 %code { int yylex (yy::parser::semantic_type*); }
   17482 %%
   17483 start: {};
   17484 _ATEOF
   17485 
   17486 
   17487 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   17488   at_save_special_files
   17489   mkdir xml-tests
   17490     # Don't combine these Bison invocations since we want to be sure that
   17491   # --report=all isn't required to get the full XML file.
   17492   { set +x
   17493 $as_echo "$at_srcdir/output.at:230: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   17494                   --graph=xml-tests/test.dot -o \"@{.c\" --defines=\"@{.h\" cxx.y"
   17495 at_fn_check_prepare_notrace 'an embedded newline' "output.at:230"
   17496 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   17497                   --graph=xml-tests/test.dot -o "@{.c" --defines="@{.h" cxx.y
   17498 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17499 at_status=$? at_failed=false
   17500 $at_check_filter
   17501 echo stderr:; cat "$at_stderr"
   17502 echo stdout:; cat "$at_stdout"
   17503 at_fn_check_status 0 $at_status "$at_srcdir/output.at:230"
   17504 $at_failed && at_fn_log_failure
   17505 $at_traceon; }
   17506 
   17507   { set +x
   17508 $as_echo "$at_srcdir/output.at:230: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"@{.c\" --defines=\"@{.h\" cxx.y"
   17509 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"@{.c\" --defines=\"@{.h\" cxx.y" "output.at:230"
   17510 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o "@{.c" --defines="@{.h" cxx.y
   17511 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17512 at_status=$? at_failed=false
   17513 $at_check_filter
   17514 echo stderr:; cat "$at_stderr"
   17515 echo stdout:; cat "$at_stdout"
   17516 at_fn_check_status 0 $at_status "$at_srcdir/output.at:230"
   17517 $at_failed && at_fn_log_failure
   17518 $at_traceon; }
   17519 
   17520     cp xml-tests/test.output expout
   17521   { set +x
   17522 $as_echo "$at_srcdir/output.at:230: \$XSLTPROC \\
   17523              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   17524              xml-tests/test.xml"
   17525 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:230"
   17526 ( $at_check_trace; $XSLTPROC \
   17527              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   17528              xml-tests/test.xml
   17529 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17530 at_status=$? at_failed=false
   17531 $at_check_filter
   17532 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17533 $at_diff expout "$at_stdout" || at_failed=:
   17534 at_fn_check_status 0 $at_status "$at_srcdir/output.at:230"
   17535 $at_failed && at_fn_log_failure
   17536 $at_traceon; }
   17537 
   17538   sort xml-tests/test.dot > expout
   17539   { set +x
   17540 $as_echo "$at_srcdir/output.at:230: \$XSLTPROC \\
   17541              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   17542              xml-tests/test.xml | sort"
   17543 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:230"
   17544 ( $at_check_trace; $XSLTPROC \
   17545              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   17546              xml-tests/test.xml | sort
   17547 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17548 at_status=$? at_failed=false
   17549 $at_check_filter
   17550 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17551 $at_diff expout "$at_stdout" || at_failed=:
   17552 at_fn_check_status 0 $at_status "$at_srcdir/output.at:230"
   17553 $at_failed && at_fn_log_failure
   17554 $at_traceon; }
   17555 
   17556   rm -rf xml-tests expout
   17557   at_restore_special_files
   17558 fi
   17559 { set +x
   17560 $as_echo "$at_srcdir/output.at:230: bison -o \"@{.c\" --defines=\"@{.h\" cxx.y"
   17561 at_fn_check_prepare_trace "output.at:230"
   17562 ( $at_check_trace; bison -o "@{.c" --defines="@{.h" cxx.y
   17563 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17564 at_status=$? at_failed=false
   17565 $at_check_filter
   17566 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17567 at_fn_diff_devnull "$at_stdout" || at_failed=:
   17568 at_fn_check_status 0 $at_status "$at_srcdir/output.at:230"
   17569 $at_failed && at_fn_log_failure
   17570 $at_traceon; }
   17571 
   17572 
   17573 { set +x
   17574 $as_echo "$at_srcdir/output.at:230: ls \"@{.c\" \"@{.h\""
   17575 at_fn_check_prepare_trace "output.at:230"
   17576 ( $at_check_trace; ls "@{.c" "@{.h"
   17577 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17578 at_status=$? at_failed=false
   17579 $at_check_filter
   17580 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17581 echo stdout:; cat "$at_stdout"
   17582 at_fn_check_status 0 $at_status "$at_srcdir/output.at:230"
   17583 $at_failed && at_fn_log_failure
   17584 $at_traceon; }
   17585 
   17586 
   17587 { set +x
   17588 $as_echo "$at_srcdir/output.at:230: \$BISON_CXX_WORKS"
   17589 at_fn_check_prepare_dynamic "$BISON_CXX_WORKS" "output.at:230"
   17590 ( $at_check_trace; $BISON_CXX_WORKS
   17591 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17592 at_status=$? at_failed=false
   17593 $at_check_filter
   17594 echo stderr:; cat "$at_stderr"
   17595 echo stdout:; cat "$at_stdout"
   17596 at_fn_check_status 0 $at_status "$at_srcdir/output.at:230"
   17597 $at_failed && at_fn_log_failure
   17598 $at_traceon; }
   17599 
   17600 { set +x
   17601 $as_echo "$at_srcdir/output.at:230: \$CXX \$CXXFLAGS \$CPPFLAGS -c -o cxx.o -c \"@{.c\" "
   17602 at_fn_check_prepare_dynamic "$CXX $CXXFLAGS $CPPFLAGS -c -o cxx.o -c \"@{.c\" " "output.at:230"
   17603 ( $at_check_trace; $CXX $CXXFLAGS $CPPFLAGS -c -o cxx.o -c "@{.c"
   17604 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17605 at_status=$? at_failed=false
   17606 $at_check_filter
   17607 echo stderr:; cat "$at_stderr"
   17608 echo stdout:; cat "$at_stdout"
   17609 at_fn_check_status 0 $at_status "$at_srcdir/output.at:230"
   17610 $at_failed && at_fn_log_failure
   17611 $at_traceon; }
   17612 
   17613 
   17614 
   17615 
   17616   set +x
   17617   $at_times_p && times >"$at_times_file"
   17618 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   17619 read at_status <"$at_status_file"
   17620 #AT_STOP_82
   17621 #AT_START_83
   17622 at_fn_group_banner 83 'output.at:231' \
   17623   "Output file name: @}" "                           " 3
   17624 at_xfail=no
   17625 (
   17626   $as_echo "83. $at_setup_line: testing $at_desc ..."
   17627   $at_traceon
   17628 
   17629 
   17630 
   17631 # Skip if platform doesn't support file name.  For example, Cygwin
   17632 # doesn't support file names containing ":" or "\".
   17633 { set +x
   17634 $as_echo "$at_srcdir/output.at:231: touch \"@}.tmp\" || exit 77"
   17635 at_fn_check_prepare_trace "output.at:231"
   17636 ( $at_check_trace; touch "@}.tmp" || exit 77
   17637 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17638 at_status=$? at_failed=false
   17639 $at_check_filter
   17640 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17641 at_fn_diff_devnull "$at_stdout" || at_failed=:
   17642 at_fn_check_status 0 $at_status "$at_srcdir/output.at:231"
   17643 $at_failed && at_fn_log_failure
   17644 $at_traceon; }
   17645 
   17646 
   17647 cat >glr.y <<'_ATEOF'
   17648 %code top {
   17649 #include <config.h>
   17650 /* We don't need perfect functions for these tests. */
   17651 #undef malloc
   17652 #undef memcmp
   17653 #undef realloc
   17654 }
   17655 
   17656 %glr-parser
   17657 %code {
   17658 void yyerror ( const char *msg);
   17659 int yylex (void);
   17660 }
   17661 %%
   17662 start: {};
   17663 _ATEOF
   17664 
   17665 
   17666 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   17667   at_save_special_files
   17668   mkdir xml-tests
   17669     # Don't combine these Bison invocations since we want to be sure that
   17670   # --report=all isn't required to get the full XML file.
   17671   { set +x
   17672 $as_echo "$at_srcdir/output.at:231: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   17673                   --graph=xml-tests/test.dot -o \"@}.c\" --defines=\"@}.h\" glr.y"
   17674 at_fn_check_prepare_notrace 'an embedded newline' "output.at:231"
   17675 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   17676                   --graph=xml-tests/test.dot -o "@}.c" --defines="@}.h" glr.y
   17677 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17678 at_status=$? at_failed=false
   17679 $at_check_filter
   17680 echo stderr:; cat "$at_stderr"
   17681 echo stdout:; cat "$at_stdout"
   17682 at_fn_check_status 0 $at_status "$at_srcdir/output.at:231"
   17683 $at_failed && at_fn_log_failure
   17684 $at_traceon; }
   17685 
   17686   { set +x
   17687 $as_echo "$at_srcdir/output.at:231: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"@}.c\" --defines=\"@}.h\" glr.y"
   17688 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"@}.c\" --defines=\"@}.h\" glr.y" "output.at:231"
   17689 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o "@}.c" --defines="@}.h" glr.y
   17690 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17691 at_status=$? at_failed=false
   17692 $at_check_filter
   17693 echo stderr:; cat "$at_stderr"
   17694 echo stdout:; cat "$at_stdout"
   17695 at_fn_check_status 0 $at_status "$at_srcdir/output.at:231"
   17696 $at_failed && at_fn_log_failure
   17697 $at_traceon; }
   17698 
   17699     cp xml-tests/test.output expout
   17700   { set +x
   17701 $as_echo "$at_srcdir/output.at:231: \$XSLTPROC \\
   17702              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   17703              xml-tests/test.xml"
   17704 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:231"
   17705 ( $at_check_trace; $XSLTPROC \
   17706              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   17707              xml-tests/test.xml
   17708 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17709 at_status=$? at_failed=false
   17710 $at_check_filter
   17711 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17712 $at_diff expout "$at_stdout" || at_failed=:
   17713 at_fn_check_status 0 $at_status "$at_srcdir/output.at:231"
   17714 $at_failed && at_fn_log_failure
   17715 $at_traceon; }
   17716 
   17717   sort xml-tests/test.dot > expout
   17718   { set +x
   17719 $as_echo "$at_srcdir/output.at:231: \$XSLTPROC \\
   17720              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   17721              xml-tests/test.xml | sort"
   17722 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:231"
   17723 ( $at_check_trace; $XSLTPROC \
   17724              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   17725              xml-tests/test.xml | sort
   17726 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17727 at_status=$? at_failed=false
   17728 $at_check_filter
   17729 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17730 $at_diff expout "$at_stdout" || at_failed=:
   17731 at_fn_check_status 0 $at_status "$at_srcdir/output.at:231"
   17732 $at_failed && at_fn_log_failure
   17733 $at_traceon; }
   17734 
   17735   rm -rf xml-tests expout
   17736   at_restore_special_files
   17737 fi
   17738 { set +x
   17739 $as_echo "$at_srcdir/output.at:231: bison -o \"@}.c\" --defines=\"@}.h\" glr.y"
   17740 at_fn_check_prepare_trace "output.at:231"
   17741 ( $at_check_trace; bison -o "@}.c" --defines="@}.h" glr.y
   17742 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17743 at_status=$? at_failed=false
   17744 $at_check_filter
   17745 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17746 at_fn_diff_devnull "$at_stdout" || at_failed=:
   17747 at_fn_check_status 0 $at_status "$at_srcdir/output.at:231"
   17748 $at_failed && at_fn_log_failure
   17749 $at_traceon; }
   17750 
   17751 
   17752 { set +x
   17753 $as_echo "$at_srcdir/output.at:231: ls \"@}.c\" \"@}.h\""
   17754 at_fn_check_prepare_trace "output.at:231"
   17755 ( $at_check_trace; ls "@}.c" "@}.h"
   17756 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17757 at_status=$? at_failed=false
   17758 $at_check_filter
   17759 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17760 echo stdout:; cat "$at_stdout"
   17761 at_fn_check_status 0 $at_status "$at_srcdir/output.at:231"
   17762 $at_failed && at_fn_log_failure
   17763 $at_traceon; }
   17764 
   17765 { set +x
   17766 $as_echo "$at_srcdir/output.at:231: \$BISON_C_WORKS"
   17767 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "output.at:231"
   17768 ( $at_check_trace; $BISON_C_WORKS
   17769 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17770 at_status=$? at_failed=false
   17771 $at_check_filter
   17772 echo stderr:; cat "$at_stderr"
   17773 echo stdout:; cat "$at_stdout"
   17774 at_fn_check_status 0 $at_status "$at_srcdir/output.at:231"
   17775 $at_failed && at_fn_log_failure
   17776 $at_traceon; }
   17777 
   17778 { set +x
   17779 $as_echo "$at_srcdir/output.at:231: \$CC \$CFLAGS \$CPPFLAGS -c -o glr.o -c \"@}.c\" "
   17780 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o glr.o -c \"@}.c\" " "output.at:231"
   17781 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o glr.o -c "@}.c"
   17782 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17783 at_status=$? at_failed=false
   17784 $at_check_filter
   17785 echo stderr:; cat "$at_stderr"
   17786 echo stdout:; cat "$at_stdout"
   17787 at_fn_check_status 0 $at_status "$at_srcdir/output.at:231"
   17788 $at_failed && at_fn_log_failure
   17789 $at_traceon; }
   17790 
   17791 
   17792 
   17793 cat >cxx.y <<'_ATEOF'
   17794 %code top {
   17795 #include <config.h>
   17796 /* We don't need perfect functions for these tests. */
   17797 #undef malloc
   17798 #undef memcmp
   17799 #undef realloc
   17800 }
   17801 
   17802 %skeleton "lalr1.cc"
   17803 %code { int yylex (yy::parser::semantic_type*); }
   17804 %%
   17805 start: {};
   17806 _ATEOF
   17807 
   17808 
   17809 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   17810   at_save_special_files
   17811   mkdir xml-tests
   17812     # Don't combine these Bison invocations since we want to be sure that
   17813   # --report=all isn't required to get the full XML file.
   17814   { set +x
   17815 $as_echo "$at_srcdir/output.at:231: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   17816                   --graph=xml-tests/test.dot -o \"@}.c\" --defines=\"@}.h\" cxx.y"
   17817 at_fn_check_prepare_notrace 'an embedded newline' "output.at:231"
   17818 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   17819                   --graph=xml-tests/test.dot -o "@}.c" --defines="@}.h" cxx.y
   17820 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17821 at_status=$? at_failed=false
   17822 $at_check_filter
   17823 echo stderr:; cat "$at_stderr"
   17824 echo stdout:; cat "$at_stdout"
   17825 at_fn_check_status 0 $at_status "$at_srcdir/output.at:231"
   17826 $at_failed && at_fn_log_failure
   17827 $at_traceon; }
   17828 
   17829   { set +x
   17830 $as_echo "$at_srcdir/output.at:231: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"@}.c\" --defines=\"@}.h\" cxx.y"
   17831 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"@}.c\" --defines=\"@}.h\" cxx.y" "output.at:231"
   17832 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o "@}.c" --defines="@}.h" cxx.y
   17833 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17834 at_status=$? at_failed=false
   17835 $at_check_filter
   17836 echo stderr:; cat "$at_stderr"
   17837 echo stdout:; cat "$at_stdout"
   17838 at_fn_check_status 0 $at_status "$at_srcdir/output.at:231"
   17839 $at_failed && at_fn_log_failure
   17840 $at_traceon; }
   17841 
   17842     cp xml-tests/test.output expout
   17843   { set +x
   17844 $as_echo "$at_srcdir/output.at:231: \$XSLTPROC \\
   17845              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   17846              xml-tests/test.xml"
   17847 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:231"
   17848 ( $at_check_trace; $XSLTPROC \
   17849              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   17850              xml-tests/test.xml
   17851 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17852 at_status=$? at_failed=false
   17853 $at_check_filter
   17854 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17855 $at_diff expout "$at_stdout" || at_failed=:
   17856 at_fn_check_status 0 $at_status "$at_srcdir/output.at:231"
   17857 $at_failed && at_fn_log_failure
   17858 $at_traceon; }
   17859 
   17860   sort xml-tests/test.dot > expout
   17861   { set +x
   17862 $as_echo "$at_srcdir/output.at:231: \$XSLTPROC \\
   17863              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   17864              xml-tests/test.xml | sort"
   17865 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:231"
   17866 ( $at_check_trace; $XSLTPROC \
   17867              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   17868              xml-tests/test.xml | sort
   17869 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17870 at_status=$? at_failed=false
   17871 $at_check_filter
   17872 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17873 $at_diff expout "$at_stdout" || at_failed=:
   17874 at_fn_check_status 0 $at_status "$at_srcdir/output.at:231"
   17875 $at_failed && at_fn_log_failure
   17876 $at_traceon; }
   17877 
   17878   rm -rf xml-tests expout
   17879   at_restore_special_files
   17880 fi
   17881 { set +x
   17882 $as_echo "$at_srcdir/output.at:231: bison -o \"@}.c\" --defines=\"@}.h\" cxx.y"
   17883 at_fn_check_prepare_trace "output.at:231"
   17884 ( $at_check_trace; bison -o "@}.c" --defines="@}.h" cxx.y
   17885 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17886 at_status=$? at_failed=false
   17887 $at_check_filter
   17888 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17889 at_fn_diff_devnull "$at_stdout" || at_failed=:
   17890 at_fn_check_status 0 $at_status "$at_srcdir/output.at:231"
   17891 $at_failed && at_fn_log_failure
   17892 $at_traceon; }
   17893 
   17894 
   17895 { set +x
   17896 $as_echo "$at_srcdir/output.at:231: ls \"@}.c\" \"@}.h\""
   17897 at_fn_check_prepare_trace "output.at:231"
   17898 ( $at_check_trace; ls "@}.c" "@}.h"
   17899 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17900 at_status=$? at_failed=false
   17901 $at_check_filter
   17902 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17903 echo stdout:; cat "$at_stdout"
   17904 at_fn_check_status 0 $at_status "$at_srcdir/output.at:231"
   17905 $at_failed && at_fn_log_failure
   17906 $at_traceon; }
   17907 
   17908 
   17909 { set +x
   17910 $as_echo "$at_srcdir/output.at:231: \$BISON_CXX_WORKS"
   17911 at_fn_check_prepare_dynamic "$BISON_CXX_WORKS" "output.at:231"
   17912 ( $at_check_trace; $BISON_CXX_WORKS
   17913 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17914 at_status=$? at_failed=false
   17915 $at_check_filter
   17916 echo stderr:; cat "$at_stderr"
   17917 echo stdout:; cat "$at_stdout"
   17918 at_fn_check_status 0 $at_status "$at_srcdir/output.at:231"
   17919 $at_failed && at_fn_log_failure
   17920 $at_traceon; }
   17921 
   17922 { set +x
   17923 $as_echo "$at_srcdir/output.at:231: \$CXX \$CXXFLAGS \$CPPFLAGS -c -o cxx.o -c \"@}.c\" "
   17924 at_fn_check_prepare_dynamic "$CXX $CXXFLAGS $CPPFLAGS -c -o cxx.o -c \"@}.c\" " "output.at:231"
   17925 ( $at_check_trace; $CXX $CXXFLAGS $CPPFLAGS -c -o cxx.o -c "@}.c"
   17926 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17927 at_status=$? at_failed=false
   17928 $at_check_filter
   17929 echo stderr:; cat "$at_stderr"
   17930 echo stdout:; cat "$at_stdout"
   17931 at_fn_check_status 0 $at_status "$at_srcdir/output.at:231"
   17932 $at_failed && at_fn_log_failure
   17933 $at_traceon; }
   17934 
   17935 
   17936 
   17937 
   17938   set +x
   17939   $at_times_p && times >"$at_times_file"
   17940 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   17941 read at_status <"$at_status_file"
   17942 #AT_STOP_83
   17943 #AT_START_84
   17944 at_fn_group_banner 84 'output.at:232' \
   17945   "Output file name: [" "                            " 3
   17946 at_xfail=no
   17947 (
   17948   $as_echo "84. $at_setup_line: testing $at_desc ..."
   17949   $at_traceon
   17950 
   17951 
   17952 
   17953 # Skip if platform doesn't support file name.  For example, Cygwin
   17954 # doesn't support file names containing ":" or "\".
   17955 { set +x
   17956 $as_echo "$at_srcdir/output.at:232: touch \"[.tmp\" || exit 77"
   17957 at_fn_check_prepare_trace "output.at:232"
   17958 ( $at_check_trace; touch "[.tmp" || exit 77
   17959 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   17960 at_status=$? at_failed=false
   17961 $at_check_filter
   17962 at_fn_diff_devnull "$at_stderr" || at_failed=:
   17963 at_fn_diff_devnull "$at_stdout" || at_failed=:
   17964 at_fn_check_status 0 $at_status "$at_srcdir/output.at:232"
   17965 $at_failed && at_fn_log_failure
   17966 $at_traceon; }
   17967 
   17968 
   17969 cat >glr.y <<'_ATEOF'
   17970 %code top {
   17971 #include <config.h>
   17972 /* We don't need perfect functions for these tests. */
   17973 #undef malloc
   17974 #undef memcmp
   17975 #undef realloc
   17976 }
   17977 
   17978 %glr-parser
   17979 %code {
   17980 void yyerror ( const char *msg);
   17981 int yylex (void);
   17982 }
   17983 %%
   17984 start: {};
   17985 _ATEOF
   17986 
   17987 
   17988 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   17989   at_save_special_files
   17990   mkdir xml-tests
   17991     # Don't combine these Bison invocations since we want to be sure that
   17992   # --report=all isn't required to get the full XML file.
   17993   { set +x
   17994 $as_echo "$at_srcdir/output.at:232: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   17995                   --graph=xml-tests/test.dot -o \"[.c\" --defines=\"[.h\" glr.y"
   17996 at_fn_check_prepare_notrace 'an embedded newline' "output.at:232"
   17997 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   17998                   --graph=xml-tests/test.dot -o "[.c" --defines="[.h" glr.y
   17999 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18000 at_status=$? at_failed=false
   18001 $at_check_filter
   18002 echo stderr:; cat "$at_stderr"
   18003 echo stdout:; cat "$at_stdout"
   18004 at_fn_check_status 0 $at_status "$at_srcdir/output.at:232"
   18005 $at_failed && at_fn_log_failure
   18006 $at_traceon; }
   18007 
   18008   { set +x
   18009 $as_echo "$at_srcdir/output.at:232: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"[.c\" --defines=\"[.h\" glr.y"
   18010 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"[.c\" --defines=\"[.h\" glr.y" "output.at:232"
   18011 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o "[.c" --defines="[.h" glr.y
   18012 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18013 at_status=$? at_failed=false
   18014 $at_check_filter
   18015 echo stderr:; cat "$at_stderr"
   18016 echo stdout:; cat "$at_stdout"
   18017 at_fn_check_status 0 $at_status "$at_srcdir/output.at:232"
   18018 $at_failed && at_fn_log_failure
   18019 $at_traceon; }
   18020 
   18021     cp xml-tests/test.output expout
   18022   { set +x
   18023 $as_echo "$at_srcdir/output.at:232: \$XSLTPROC \\
   18024              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   18025              xml-tests/test.xml"
   18026 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:232"
   18027 ( $at_check_trace; $XSLTPROC \
   18028              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   18029              xml-tests/test.xml
   18030 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18031 at_status=$? at_failed=false
   18032 $at_check_filter
   18033 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18034 $at_diff expout "$at_stdout" || at_failed=:
   18035 at_fn_check_status 0 $at_status "$at_srcdir/output.at:232"
   18036 $at_failed && at_fn_log_failure
   18037 $at_traceon; }
   18038 
   18039   sort xml-tests/test.dot > expout
   18040   { set +x
   18041 $as_echo "$at_srcdir/output.at:232: \$XSLTPROC \\
   18042              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   18043              xml-tests/test.xml | sort"
   18044 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:232"
   18045 ( $at_check_trace; $XSLTPROC \
   18046              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   18047              xml-tests/test.xml | sort
   18048 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18049 at_status=$? at_failed=false
   18050 $at_check_filter
   18051 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18052 $at_diff expout "$at_stdout" || at_failed=:
   18053 at_fn_check_status 0 $at_status "$at_srcdir/output.at:232"
   18054 $at_failed && at_fn_log_failure
   18055 $at_traceon; }
   18056 
   18057   rm -rf xml-tests expout
   18058   at_restore_special_files
   18059 fi
   18060 { set +x
   18061 $as_echo "$at_srcdir/output.at:232: bison -o \"[.c\" --defines=\"[.h\" glr.y"
   18062 at_fn_check_prepare_trace "output.at:232"
   18063 ( $at_check_trace; bison -o "[.c" --defines="[.h" glr.y
   18064 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18065 at_status=$? at_failed=false
   18066 $at_check_filter
   18067 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18068 at_fn_diff_devnull "$at_stdout" || at_failed=:
   18069 at_fn_check_status 0 $at_status "$at_srcdir/output.at:232"
   18070 $at_failed && at_fn_log_failure
   18071 $at_traceon; }
   18072 
   18073 
   18074 { set +x
   18075 $as_echo "$at_srcdir/output.at:232: ls \"[.c\" \"[.h\""
   18076 at_fn_check_prepare_trace "output.at:232"
   18077 ( $at_check_trace; ls "[.c" "[.h"
   18078 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18079 at_status=$? at_failed=false
   18080 $at_check_filter
   18081 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18082 echo stdout:; cat "$at_stdout"
   18083 at_fn_check_status 0 $at_status "$at_srcdir/output.at:232"
   18084 $at_failed && at_fn_log_failure
   18085 $at_traceon; }
   18086 
   18087 { set +x
   18088 $as_echo "$at_srcdir/output.at:232: \$BISON_C_WORKS"
   18089 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "output.at:232"
   18090 ( $at_check_trace; $BISON_C_WORKS
   18091 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18092 at_status=$? at_failed=false
   18093 $at_check_filter
   18094 echo stderr:; cat "$at_stderr"
   18095 echo stdout:; cat "$at_stdout"
   18096 at_fn_check_status 0 $at_status "$at_srcdir/output.at:232"
   18097 $at_failed && at_fn_log_failure
   18098 $at_traceon; }
   18099 
   18100 { set +x
   18101 $as_echo "$at_srcdir/output.at:232: \$CC \$CFLAGS \$CPPFLAGS -c -o glr.o -c \"[.c\" "
   18102 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o glr.o -c \"[.c\" " "output.at:232"
   18103 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o glr.o -c "[.c"
   18104 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18105 at_status=$? at_failed=false
   18106 $at_check_filter
   18107 echo stderr:; cat "$at_stderr"
   18108 echo stdout:; cat "$at_stdout"
   18109 at_fn_check_status 0 $at_status "$at_srcdir/output.at:232"
   18110 $at_failed && at_fn_log_failure
   18111 $at_traceon; }
   18112 
   18113 
   18114 
   18115 cat >cxx.y <<'_ATEOF'
   18116 %code top {
   18117 #include <config.h>
   18118 /* We don't need perfect functions for these tests. */
   18119 #undef malloc
   18120 #undef memcmp
   18121 #undef realloc
   18122 }
   18123 
   18124 %skeleton "lalr1.cc"
   18125 %code { int yylex (yy::parser::semantic_type*); }
   18126 %%
   18127 start: {};
   18128 _ATEOF
   18129 
   18130 
   18131 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   18132   at_save_special_files
   18133   mkdir xml-tests
   18134     # Don't combine these Bison invocations since we want to be sure that
   18135   # --report=all isn't required to get the full XML file.
   18136   { set +x
   18137 $as_echo "$at_srcdir/output.at:232: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   18138                   --graph=xml-tests/test.dot -o \"[.c\" --defines=\"[.h\" cxx.y"
   18139 at_fn_check_prepare_notrace 'an embedded newline' "output.at:232"
   18140 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   18141                   --graph=xml-tests/test.dot -o "[.c" --defines="[.h" cxx.y
   18142 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18143 at_status=$? at_failed=false
   18144 $at_check_filter
   18145 echo stderr:; cat "$at_stderr"
   18146 echo stdout:; cat "$at_stdout"
   18147 at_fn_check_status 0 $at_status "$at_srcdir/output.at:232"
   18148 $at_failed && at_fn_log_failure
   18149 $at_traceon; }
   18150 
   18151   { set +x
   18152 $as_echo "$at_srcdir/output.at:232: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"[.c\" --defines=\"[.h\" cxx.y"
   18153 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"[.c\" --defines=\"[.h\" cxx.y" "output.at:232"
   18154 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o "[.c" --defines="[.h" cxx.y
   18155 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18156 at_status=$? at_failed=false
   18157 $at_check_filter
   18158 echo stderr:; cat "$at_stderr"
   18159 echo stdout:; cat "$at_stdout"
   18160 at_fn_check_status 0 $at_status "$at_srcdir/output.at:232"
   18161 $at_failed && at_fn_log_failure
   18162 $at_traceon; }
   18163 
   18164     cp xml-tests/test.output expout
   18165   { set +x
   18166 $as_echo "$at_srcdir/output.at:232: \$XSLTPROC \\
   18167              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   18168              xml-tests/test.xml"
   18169 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:232"
   18170 ( $at_check_trace; $XSLTPROC \
   18171              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   18172              xml-tests/test.xml
   18173 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18174 at_status=$? at_failed=false
   18175 $at_check_filter
   18176 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18177 $at_diff expout "$at_stdout" || at_failed=:
   18178 at_fn_check_status 0 $at_status "$at_srcdir/output.at:232"
   18179 $at_failed && at_fn_log_failure
   18180 $at_traceon; }
   18181 
   18182   sort xml-tests/test.dot > expout
   18183   { set +x
   18184 $as_echo "$at_srcdir/output.at:232: \$XSLTPROC \\
   18185              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   18186              xml-tests/test.xml | sort"
   18187 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:232"
   18188 ( $at_check_trace; $XSLTPROC \
   18189              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   18190              xml-tests/test.xml | sort
   18191 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18192 at_status=$? at_failed=false
   18193 $at_check_filter
   18194 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18195 $at_diff expout "$at_stdout" || at_failed=:
   18196 at_fn_check_status 0 $at_status "$at_srcdir/output.at:232"
   18197 $at_failed && at_fn_log_failure
   18198 $at_traceon; }
   18199 
   18200   rm -rf xml-tests expout
   18201   at_restore_special_files
   18202 fi
   18203 { set +x
   18204 $as_echo "$at_srcdir/output.at:232: bison -o \"[.c\" --defines=\"[.h\" cxx.y"
   18205 at_fn_check_prepare_trace "output.at:232"
   18206 ( $at_check_trace; bison -o "[.c" --defines="[.h" cxx.y
   18207 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18208 at_status=$? at_failed=false
   18209 $at_check_filter
   18210 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18211 at_fn_diff_devnull "$at_stdout" || at_failed=:
   18212 at_fn_check_status 0 $at_status "$at_srcdir/output.at:232"
   18213 $at_failed && at_fn_log_failure
   18214 $at_traceon; }
   18215 
   18216 
   18217 { set +x
   18218 $as_echo "$at_srcdir/output.at:232: ls \"[.c\" \"[.h\""
   18219 at_fn_check_prepare_trace "output.at:232"
   18220 ( $at_check_trace; ls "[.c" "[.h"
   18221 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18222 at_status=$? at_failed=false
   18223 $at_check_filter
   18224 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18225 echo stdout:; cat "$at_stdout"
   18226 at_fn_check_status 0 $at_status "$at_srcdir/output.at:232"
   18227 $at_failed && at_fn_log_failure
   18228 $at_traceon; }
   18229 
   18230 
   18231 { set +x
   18232 $as_echo "$at_srcdir/output.at:232: \$BISON_CXX_WORKS"
   18233 at_fn_check_prepare_dynamic "$BISON_CXX_WORKS" "output.at:232"
   18234 ( $at_check_trace; $BISON_CXX_WORKS
   18235 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18236 at_status=$? at_failed=false
   18237 $at_check_filter
   18238 echo stderr:; cat "$at_stderr"
   18239 echo stdout:; cat "$at_stdout"
   18240 at_fn_check_status 0 $at_status "$at_srcdir/output.at:232"
   18241 $at_failed && at_fn_log_failure
   18242 $at_traceon; }
   18243 
   18244 { set +x
   18245 $as_echo "$at_srcdir/output.at:232: \$CXX \$CXXFLAGS \$CPPFLAGS -c -o cxx.o -c \"[.c\" "
   18246 at_fn_check_prepare_dynamic "$CXX $CXXFLAGS $CPPFLAGS -c -o cxx.o -c \"[.c\" " "output.at:232"
   18247 ( $at_check_trace; $CXX $CXXFLAGS $CPPFLAGS -c -o cxx.o -c "[.c"
   18248 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18249 at_status=$? at_failed=false
   18250 $at_check_filter
   18251 echo stderr:; cat "$at_stderr"
   18252 echo stdout:; cat "$at_stdout"
   18253 at_fn_check_status 0 $at_status "$at_srcdir/output.at:232"
   18254 $at_failed && at_fn_log_failure
   18255 $at_traceon; }
   18256 
   18257 
   18258 
   18259 
   18260   set +x
   18261   $at_times_p && times >"$at_times_file"
   18262 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   18263 read at_status <"$at_status_file"
   18264 #AT_STOP_84
   18265 #AT_START_85
   18266 at_fn_group_banner 85 'output.at:233' \
   18267   "Output file name: ]" "                            " 3
   18268 at_xfail=no
   18269 (
   18270   $as_echo "85. $at_setup_line: testing $at_desc ..."
   18271   $at_traceon
   18272 
   18273 
   18274 
   18275 # Skip if platform doesn't support file name.  For example, Cygwin
   18276 # doesn't support file names containing ":" or "\".
   18277 { set +x
   18278 $as_echo "$at_srcdir/output.at:233: touch \"].tmp\" || exit 77"
   18279 at_fn_check_prepare_trace "output.at:233"
   18280 ( $at_check_trace; touch "].tmp" || exit 77
   18281 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18282 at_status=$? at_failed=false
   18283 $at_check_filter
   18284 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18285 at_fn_diff_devnull "$at_stdout" || at_failed=:
   18286 at_fn_check_status 0 $at_status "$at_srcdir/output.at:233"
   18287 $at_failed && at_fn_log_failure
   18288 $at_traceon; }
   18289 
   18290 
   18291 cat >glr.y <<'_ATEOF'
   18292 %code top {
   18293 #include <config.h>
   18294 /* We don't need perfect functions for these tests. */
   18295 #undef malloc
   18296 #undef memcmp
   18297 #undef realloc
   18298 }
   18299 
   18300 %glr-parser
   18301 %code {
   18302 void yyerror ( const char *msg);
   18303 int yylex (void);
   18304 }
   18305 %%
   18306 start: {};
   18307 _ATEOF
   18308 
   18309 
   18310 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   18311   at_save_special_files
   18312   mkdir xml-tests
   18313     # Don't combine these Bison invocations since we want to be sure that
   18314   # --report=all isn't required to get the full XML file.
   18315   { set +x
   18316 $as_echo "$at_srcdir/output.at:233: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   18317                   --graph=xml-tests/test.dot -o \"].c\" --defines=\"].h\" glr.y"
   18318 at_fn_check_prepare_notrace 'an embedded newline' "output.at:233"
   18319 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   18320                   --graph=xml-tests/test.dot -o "].c" --defines="].h" glr.y
   18321 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18322 at_status=$? at_failed=false
   18323 $at_check_filter
   18324 echo stderr:; cat "$at_stderr"
   18325 echo stdout:; cat "$at_stdout"
   18326 at_fn_check_status 0 $at_status "$at_srcdir/output.at:233"
   18327 $at_failed && at_fn_log_failure
   18328 $at_traceon; }
   18329 
   18330   { set +x
   18331 $as_echo "$at_srcdir/output.at:233: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"].c\" --defines=\"].h\" glr.y"
   18332 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"].c\" --defines=\"].h\" glr.y" "output.at:233"
   18333 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o "].c" --defines="].h" glr.y
   18334 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18335 at_status=$? at_failed=false
   18336 $at_check_filter
   18337 echo stderr:; cat "$at_stderr"
   18338 echo stdout:; cat "$at_stdout"
   18339 at_fn_check_status 0 $at_status "$at_srcdir/output.at:233"
   18340 $at_failed && at_fn_log_failure
   18341 $at_traceon; }
   18342 
   18343     cp xml-tests/test.output expout
   18344   { set +x
   18345 $as_echo "$at_srcdir/output.at:233: \$XSLTPROC \\
   18346              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   18347              xml-tests/test.xml"
   18348 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:233"
   18349 ( $at_check_trace; $XSLTPROC \
   18350              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   18351              xml-tests/test.xml
   18352 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18353 at_status=$? at_failed=false
   18354 $at_check_filter
   18355 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18356 $at_diff expout "$at_stdout" || at_failed=:
   18357 at_fn_check_status 0 $at_status "$at_srcdir/output.at:233"
   18358 $at_failed && at_fn_log_failure
   18359 $at_traceon; }
   18360 
   18361   sort xml-tests/test.dot > expout
   18362   { set +x
   18363 $as_echo "$at_srcdir/output.at:233: \$XSLTPROC \\
   18364              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   18365              xml-tests/test.xml | sort"
   18366 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:233"
   18367 ( $at_check_trace; $XSLTPROC \
   18368              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   18369              xml-tests/test.xml | sort
   18370 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18371 at_status=$? at_failed=false
   18372 $at_check_filter
   18373 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18374 $at_diff expout "$at_stdout" || at_failed=:
   18375 at_fn_check_status 0 $at_status "$at_srcdir/output.at:233"
   18376 $at_failed && at_fn_log_failure
   18377 $at_traceon; }
   18378 
   18379   rm -rf xml-tests expout
   18380   at_restore_special_files
   18381 fi
   18382 { set +x
   18383 $as_echo "$at_srcdir/output.at:233: bison -o \"].c\" --defines=\"].h\" glr.y"
   18384 at_fn_check_prepare_trace "output.at:233"
   18385 ( $at_check_trace; bison -o "].c" --defines="].h" glr.y
   18386 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18387 at_status=$? at_failed=false
   18388 $at_check_filter
   18389 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18390 at_fn_diff_devnull "$at_stdout" || at_failed=:
   18391 at_fn_check_status 0 $at_status "$at_srcdir/output.at:233"
   18392 $at_failed && at_fn_log_failure
   18393 $at_traceon; }
   18394 
   18395 
   18396 { set +x
   18397 $as_echo "$at_srcdir/output.at:233: ls \"].c\" \"].h\""
   18398 at_fn_check_prepare_trace "output.at:233"
   18399 ( $at_check_trace; ls "].c" "].h"
   18400 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18401 at_status=$? at_failed=false
   18402 $at_check_filter
   18403 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18404 echo stdout:; cat "$at_stdout"
   18405 at_fn_check_status 0 $at_status "$at_srcdir/output.at:233"
   18406 $at_failed && at_fn_log_failure
   18407 $at_traceon; }
   18408 
   18409 { set +x
   18410 $as_echo "$at_srcdir/output.at:233: \$BISON_C_WORKS"
   18411 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "output.at:233"
   18412 ( $at_check_trace; $BISON_C_WORKS
   18413 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18414 at_status=$? at_failed=false
   18415 $at_check_filter
   18416 echo stderr:; cat "$at_stderr"
   18417 echo stdout:; cat "$at_stdout"
   18418 at_fn_check_status 0 $at_status "$at_srcdir/output.at:233"
   18419 $at_failed && at_fn_log_failure
   18420 $at_traceon; }
   18421 
   18422 { set +x
   18423 $as_echo "$at_srcdir/output.at:233: \$CC \$CFLAGS \$CPPFLAGS -c -o glr.o -c \"].c\" "
   18424 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o glr.o -c \"].c\" " "output.at:233"
   18425 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o glr.o -c "].c"
   18426 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18427 at_status=$? at_failed=false
   18428 $at_check_filter
   18429 echo stderr:; cat "$at_stderr"
   18430 echo stdout:; cat "$at_stdout"
   18431 at_fn_check_status 0 $at_status "$at_srcdir/output.at:233"
   18432 $at_failed && at_fn_log_failure
   18433 $at_traceon; }
   18434 
   18435 
   18436 
   18437 cat >cxx.y <<'_ATEOF'
   18438 %code top {
   18439 #include <config.h>
   18440 /* We don't need perfect functions for these tests. */
   18441 #undef malloc
   18442 #undef memcmp
   18443 #undef realloc
   18444 }
   18445 
   18446 %skeleton "lalr1.cc"
   18447 %code { int yylex (yy::parser::semantic_type*); }
   18448 %%
   18449 start: {};
   18450 _ATEOF
   18451 
   18452 
   18453 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   18454   at_save_special_files
   18455   mkdir xml-tests
   18456     # Don't combine these Bison invocations since we want to be sure that
   18457   # --report=all isn't required to get the full XML file.
   18458   { set +x
   18459 $as_echo "$at_srcdir/output.at:233: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   18460                   --graph=xml-tests/test.dot -o \"].c\" --defines=\"].h\" cxx.y"
   18461 at_fn_check_prepare_notrace 'an embedded newline' "output.at:233"
   18462 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   18463                   --graph=xml-tests/test.dot -o "].c" --defines="].h" cxx.y
   18464 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18465 at_status=$? at_failed=false
   18466 $at_check_filter
   18467 echo stderr:; cat "$at_stderr"
   18468 echo stdout:; cat "$at_stdout"
   18469 at_fn_check_status 0 $at_status "$at_srcdir/output.at:233"
   18470 $at_failed && at_fn_log_failure
   18471 $at_traceon; }
   18472 
   18473   { set +x
   18474 $as_echo "$at_srcdir/output.at:233: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"].c\" --defines=\"].h\" cxx.y"
   18475 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o \"].c\" --defines=\"].h\" cxx.y" "output.at:233"
   18476 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o "].c" --defines="].h" cxx.y
   18477 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18478 at_status=$? at_failed=false
   18479 $at_check_filter
   18480 echo stderr:; cat "$at_stderr"
   18481 echo stdout:; cat "$at_stdout"
   18482 at_fn_check_status 0 $at_status "$at_srcdir/output.at:233"
   18483 $at_failed && at_fn_log_failure
   18484 $at_traceon; }
   18485 
   18486     cp xml-tests/test.output expout
   18487   { set +x
   18488 $as_echo "$at_srcdir/output.at:233: \$XSLTPROC \\
   18489              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   18490              xml-tests/test.xml"
   18491 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:233"
   18492 ( $at_check_trace; $XSLTPROC \
   18493              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   18494              xml-tests/test.xml
   18495 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18496 at_status=$? at_failed=false
   18497 $at_check_filter
   18498 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18499 $at_diff expout "$at_stdout" || at_failed=:
   18500 at_fn_check_status 0 $at_status "$at_srcdir/output.at:233"
   18501 $at_failed && at_fn_log_failure
   18502 $at_traceon; }
   18503 
   18504   sort xml-tests/test.dot > expout
   18505   { set +x
   18506 $as_echo "$at_srcdir/output.at:233: \$XSLTPROC \\
   18507              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   18508              xml-tests/test.xml | sort"
   18509 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:233"
   18510 ( $at_check_trace; $XSLTPROC \
   18511              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   18512              xml-tests/test.xml | sort
   18513 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18514 at_status=$? at_failed=false
   18515 $at_check_filter
   18516 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18517 $at_diff expout "$at_stdout" || at_failed=:
   18518 at_fn_check_status 0 $at_status "$at_srcdir/output.at:233"
   18519 $at_failed && at_fn_log_failure
   18520 $at_traceon; }
   18521 
   18522   rm -rf xml-tests expout
   18523   at_restore_special_files
   18524 fi
   18525 { set +x
   18526 $as_echo "$at_srcdir/output.at:233: bison -o \"].c\" --defines=\"].h\" cxx.y"
   18527 at_fn_check_prepare_trace "output.at:233"
   18528 ( $at_check_trace; bison -o "].c" --defines="].h" cxx.y
   18529 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18530 at_status=$? at_failed=false
   18531 $at_check_filter
   18532 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18533 at_fn_diff_devnull "$at_stdout" || at_failed=:
   18534 at_fn_check_status 0 $at_status "$at_srcdir/output.at:233"
   18535 $at_failed && at_fn_log_failure
   18536 $at_traceon; }
   18537 
   18538 
   18539 { set +x
   18540 $as_echo "$at_srcdir/output.at:233: ls \"].c\" \"].h\""
   18541 at_fn_check_prepare_trace "output.at:233"
   18542 ( $at_check_trace; ls "].c" "].h"
   18543 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18544 at_status=$? at_failed=false
   18545 $at_check_filter
   18546 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18547 echo stdout:; cat "$at_stdout"
   18548 at_fn_check_status 0 $at_status "$at_srcdir/output.at:233"
   18549 $at_failed && at_fn_log_failure
   18550 $at_traceon; }
   18551 
   18552 
   18553 { set +x
   18554 $as_echo "$at_srcdir/output.at:233: \$BISON_CXX_WORKS"
   18555 at_fn_check_prepare_dynamic "$BISON_CXX_WORKS" "output.at:233"
   18556 ( $at_check_trace; $BISON_CXX_WORKS
   18557 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18558 at_status=$? at_failed=false
   18559 $at_check_filter
   18560 echo stderr:; cat "$at_stderr"
   18561 echo stdout:; cat "$at_stdout"
   18562 at_fn_check_status 0 $at_status "$at_srcdir/output.at:233"
   18563 $at_failed && at_fn_log_failure
   18564 $at_traceon; }
   18565 
   18566 { set +x
   18567 $as_echo "$at_srcdir/output.at:233: \$CXX \$CXXFLAGS \$CPPFLAGS -c -o cxx.o -c \"].c\" "
   18568 at_fn_check_prepare_dynamic "$CXX $CXXFLAGS $CPPFLAGS -c -o cxx.o -c \"].c\" " "output.at:233"
   18569 ( $at_check_trace; $CXX $CXXFLAGS $CPPFLAGS -c -o cxx.o -c "].c"
   18570 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18571 at_status=$? at_failed=false
   18572 $at_check_filter
   18573 echo stderr:; cat "$at_stderr"
   18574 echo stdout:; cat "$at_stdout"
   18575 at_fn_check_status 0 $at_status "$at_srcdir/output.at:233"
   18576 $at_failed && at_fn_log_failure
   18577 $at_traceon; }
   18578 
   18579 
   18580 
   18581 
   18582   set +x
   18583   $at_times_p && times >"$at_times_file"
   18584 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   18585 read at_status <"$at_status_file"
   18586 #AT_STOP_85
   18587 #AT_START_86
   18588 at_fn_group_banner 86 'output.at:260' \
   18589   "Graph with no conflicts" "                        " 3
   18590 at_xfail=no
   18591 (
   18592   $as_echo "86. $at_setup_line: testing $at_desc ..."
   18593   $at_traceon
   18594 
   18595 
   18596 cat >input.y <<'_ATEOF'
   18597 %%
   18598 exp: a '?' b;
   18599 a: ;
   18600 b: 'b';
   18601 _ATEOF
   18602 
   18603 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   18604   at_save_special_files
   18605   mkdir xml-tests
   18606     # Don't combine these Bison invocations since we want to be sure that
   18607   # --report=all isn't required to get the full XML file.
   18608   { set +x
   18609 $as_echo "$at_srcdir/output.at:260: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   18610                   --graph=xml-tests/test.dot -rall --graph input.y"
   18611 at_fn_check_prepare_notrace 'an embedded newline' "output.at:260"
   18612 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   18613                   --graph=xml-tests/test.dot -rall --graph input.y
   18614 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18615 at_status=$? at_failed=false
   18616 $at_check_filter
   18617 echo stderr:; cat "$at_stderr"
   18618 echo stdout:; cat "$at_stdout"
   18619 at_fn_check_status 0 $at_status "$at_srcdir/output.at:260"
   18620 $at_failed && at_fn_log_failure
   18621 $at_traceon; }
   18622 
   18623   { set +x
   18624 $as_echo "$at_srcdir/output.at:260: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -rall --graph input.y"
   18625 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -rall --graph input.y" "output.at:260"
   18626 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -rall --graph input.y
   18627 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18628 at_status=$? at_failed=false
   18629 $at_check_filter
   18630 echo stderr:; cat "$at_stderr"
   18631 echo stdout:; cat "$at_stdout"
   18632 at_fn_check_status 0 $at_status "$at_srcdir/output.at:260"
   18633 $at_failed && at_fn_log_failure
   18634 $at_traceon; }
   18635 
   18636     cp xml-tests/test.output expout
   18637   { set +x
   18638 $as_echo "$at_srcdir/output.at:260: \$XSLTPROC \\
   18639              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   18640              xml-tests/test.xml"
   18641 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:260"
   18642 ( $at_check_trace; $XSLTPROC \
   18643              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   18644              xml-tests/test.xml
   18645 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18646 at_status=$? at_failed=false
   18647 $at_check_filter
   18648 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18649 $at_diff expout "$at_stdout" || at_failed=:
   18650 at_fn_check_status 0 $at_status "$at_srcdir/output.at:260"
   18651 $at_failed && at_fn_log_failure
   18652 $at_traceon; }
   18653 
   18654   sort xml-tests/test.dot > expout
   18655   { set +x
   18656 $as_echo "$at_srcdir/output.at:260: \$XSLTPROC \\
   18657              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   18658              xml-tests/test.xml | sort"
   18659 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:260"
   18660 ( $at_check_trace; $XSLTPROC \
   18661              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   18662              xml-tests/test.xml | sort
   18663 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18664 at_status=$? at_failed=false
   18665 $at_check_filter
   18666 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18667 $at_diff expout "$at_stdout" || at_failed=:
   18668 at_fn_check_status 0 $at_status "$at_srcdir/output.at:260"
   18669 $at_failed && at_fn_log_failure
   18670 $at_traceon; }
   18671 
   18672   rm -rf xml-tests expout
   18673   at_restore_special_files
   18674 fi
   18675 { set +x
   18676 $as_echo "$at_srcdir/output.at:260: bison -rall --graph input.y"
   18677 at_fn_check_prepare_trace "output.at:260"
   18678 ( $at_check_trace; bison -rall --graph input.y
   18679 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18680 at_status=$? at_failed=false
   18681 $at_check_filter
   18682 echo stderr:; cat "$at_stderr"
   18683 at_fn_diff_devnull "$at_stdout" || at_failed=:
   18684 at_fn_check_status 0 $at_status "$at_srcdir/output.at:260"
   18685 $at_failed && at_fn_log_failure
   18686 $at_traceon; }
   18687 
   18688 
   18689 { set +x
   18690 $as_echo "$at_srcdir/output.at:260: grep -v // input.dot"
   18691 at_fn_check_prepare_trace "output.at:260"
   18692 ( $at_check_trace; grep -v // input.dot
   18693 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18694 at_status=$? at_failed=false
   18695 $at_check_filter
   18696 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18697 echo >>"$at_stdout"; $as_echo "
   18698 digraph \"input.y\"
   18699 {
   18700   node [fontname = courier, shape = box, colorscheme = paired6]
   18701   edge [fontname = courier]
   18702 
   18703   0 [label=\"State 0\\n\\l  0 \$accept: . exp \$end\\l  1 exp: . a '?' b\\l  2 a: .\\l\"]
   18704   0 -> 1 [style=dashed label=\"exp\"]
   18705   0 -> 2 [style=dashed label=\"a\"]
   18706   0 -> \"0R2\" [style=solid]
   18707  \"0R2\" [label=\"R2\", fillcolor=3, shape=diamond, style=filled]
   18708   1 [label=\"State 1\\n\\l  0 \$accept: exp . \$end\\l\"]
   18709   1 -> 3 [style=solid label=\"\$end\"]
   18710   2 [label=\"State 2\\n\\l  1 exp: a . '?' b\\l\"]
   18711   2 -> 4 [style=solid label=\"'?'\"]
   18712   3 [label=\"State 3\\n\\l  0 \$accept: exp \$end .\\l\"]
   18713   3 -> \"3R0\" [style=solid]
   18714  \"3R0\" [label=\"Acc\", fillcolor=1, shape=diamond, style=filled]
   18715   4 [label=\"State 4\\n\\l  1 exp: a '?' . b\\l  3 b: . 'b'\\l\"]
   18716   4 -> 5 [style=solid label=\"'b'\"]
   18717   4 -> 6 [style=dashed label=\"b\"]
   18718   5 [label=\"State 5\\n\\l  3 b: 'b' .\\l\"]
   18719   5 -> \"5R3\" [style=solid]
   18720  \"5R3\" [label=\"R3\", fillcolor=3, shape=diamond, style=filled]
   18721   6 [label=\"State 6\\n\\l  1 exp: a '?' b .\\l\"]
   18722   6 -> \"6R1\" [style=solid]
   18723  \"6R1\" [label=\"R1\", fillcolor=3, shape=diamond, style=filled]
   18724 }
   18725 " | \
   18726   $at_diff - "$at_stdout" || at_failed=:
   18727 at_fn_check_status 0 $at_status "$at_srcdir/output.at:260"
   18728 $at_failed && at_fn_log_failure
   18729 $at_traceon; }
   18730 
   18731   set +x
   18732   $at_times_p && times >"$at_times_file"
   18733 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   18734 read at_status <"$at_status_file"
   18735 #AT_STOP_86
   18736 #AT_START_87
   18737 at_fn_group_banner 87 'output.at:294' \
   18738   "Graph with unsolved S/R" "                        " 3
   18739 at_xfail=no
   18740 (
   18741   $as_echo "87. $at_setup_line: testing $at_desc ..."
   18742   $at_traceon
   18743 
   18744 
   18745 cat >input.y <<'_ATEOF'
   18746 %%
   18747 start:
   18748     'a'
   18749   | empty_a 'a'
   18750   | 'b'
   18751   | empty_b 'b'
   18752   | 'c'
   18753   | empty_c 'c'
   18754   ;
   18755 empty_a: %prec 'a';
   18756 empty_b: %prec 'b';
   18757 empty_c: %prec 'c';
   18758 _ATEOF
   18759 
   18760 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   18761   at_save_special_files
   18762   mkdir xml-tests
   18763     # Don't combine these Bison invocations since we want to be sure that
   18764   # --report=all isn't required to get the full XML file.
   18765   { set +x
   18766 $as_echo "$at_srcdir/output.at:294: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   18767                   --graph=xml-tests/test.dot -rall --graph input.y"
   18768 at_fn_check_prepare_notrace 'an embedded newline' "output.at:294"
   18769 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   18770                   --graph=xml-tests/test.dot -rall --graph input.y
   18771 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18772 at_status=$? at_failed=false
   18773 $at_check_filter
   18774 echo stderr:; cat "$at_stderr"
   18775 echo stdout:; cat "$at_stdout"
   18776 at_fn_check_status 0 $at_status "$at_srcdir/output.at:294"
   18777 $at_failed && at_fn_log_failure
   18778 $at_traceon; }
   18779 
   18780   { set +x
   18781 $as_echo "$at_srcdir/output.at:294: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -rall --graph input.y"
   18782 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -rall --graph input.y" "output.at:294"
   18783 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -rall --graph input.y
   18784 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18785 at_status=$? at_failed=false
   18786 $at_check_filter
   18787 echo stderr:; cat "$at_stderr"
   18788 echo stdout:; cat "$at_stdout"
   18789 at_fn_check_status 0 $at_status "$at_srcdir/output.at:294"
   18790 $at_failed && at_fn_log_failure
   18791 $at_traceon; }
   18792 
   18793     cp xml-tests/test.output expout
   18794   { set +x
   18795 $as_echo "$at_srcdir/output.at:294: \$XSLTPROC \\
   18796              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   18797              xml-tests/test.xml"
   18798 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:294"
   18799 ( $at_check_trace; $XSLTPROC \
   18800              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   18801              xml-tests/test.xml
   18802 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18803 at_status=$? at_failed=false
   18804 $at_check_filter
   18805 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18806 $at_diff expout "$at_stdout" || at_failed=:
   18807 at_fn_check_status 0 $at_status "$at_srcdir/output.at:294"
   18808 $at_failed && at_fn_log_failure
   18809 $at_traceon; }
   18810 
   18811   sort xml-tests/test.dot > expout
   18812   { set +x
   18813 $as_echo "$at_srcdir/output.at:294: \$XSLTPROC \\
   18814              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   18815              xml-tests/test.xml | sort"
   18816 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:294"
   18817 ( $at_check_trace; $XSLTPROC \
   18818              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   18819              xml-tests/test.xml | sort
   18820 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18821 at_status=$? at_failed=false
   18822 $at_check_filter
   18823 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18824 $at_diff expout "$at_stdout" || at_failed=:
   18825 at_fn_check_status 0 $at_status "$at_srcdir/output.at:294"
   18826 $at_failed && at_fn_log_failure
   18827 $at_traceon; }
   18828 
   18829   rm -rf xml-tests expout
   18830   at_restore_special_files
   18831 fi
   18832 { set +x
   18833 $as_echo "$at_srcdir/output.at:294: bison -rall --graph input.y"
   18834 at_fn_check_prepare_trace "output.at:294"
   18835 ( $at_check_trace; bison -rall --graph input.y
   18836 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18837 at_status=$? at_failed=false
   18838 $at_check_filter
   18839 echo stderr:; cat "$at_stderr"
   18840 at_fn_diff_devnull "$at_stdout" || at_failed=:
   18841 at_fn_check_status 0 $at_status "$at_srcdir/output.at:294"
   18842 $at_failed && at_fn_log_failure
   18843 $at_traceon; }
   18844 
   18845 
   18846 { set +x
   18847 $as_echo "$at_srcdir/output.at:294: grep -v // input.dot"
   18848 at_fn_check_prepare_trace "output.at:294"
   18849 ( $at_check_trace; grep -v // input.dot
   18850 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18851 at_status=$? at_failed=false
   18852 $at_check_filter
   18853 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18854 echo >>"$at_stdout"; $as_echo "
   18855 digraph \"input.y\"
   18856 {
   18857   node [fontname = courier, shape = box, colorscheme = paired6]
   18858   edge [fontname = courier]
   18859 
   18860   0 [label=\"State 0\\n\\l  0 \$accept: . start \$end\\l  1 start: . 'a'\\l  2      | . empty_a 'a'\\l  3      | . 'b'\\l  4      | . empty_b 'b'\\l  5      | . 'c'\\l  6      | . empty_c 'c'\\l  7 empty_a: .  ['a']\\l  8 empty_b: .  ['b']\\l  9 empty_c: .  ['c']\\l\"]
   18861   0 -> 1 [style=solid label=\"'a'\"]
   18862   0 -> 2 [style=solid label=\"'b'\"]
   18863   0 -> 3 [style=solid label=\"'c'\"]
   18864   0 -> 4 [style=dashed label=\"start\"]
   18865   0 -> 5 [style=dashed label=\"empty_a\"]
   18866   0 -> 6 [style=dashed label=\"empty_b\"]
   18867   0 -> 7 [style=dashed label=\"empty_c\"]
   18868   0 -> \"0R7d\" [label=\"['a']\", style=solid]
   18869  \"0R7d\" [label=\"R7\", fillcolor=5, shape=diamond, style=filled]
   18870   0 -> \"0R8d\" [label=\"['b']\", style=solid]
   18871  \"0R8d\" [label=\"R8\", fillcolor=5, shape=diamond, style=filled]
   18872   0 -> \"0R9d\" [label=\"['c']\", style=solid]
   18873  \"0R9d\" [label=\"R9\", fillcolor=5, shape=diamond, style=filled]
   18874   1 [label=\"State 1\\n\\l  1 start: 'a' .\\l\"]
   18875   1 -> \"1R1\" [style=solid]
   18876  \"1R1\" [label=\"R1\", fillcolor=3, shape=diamond, style=filled]
   18877   2 [label=\"State 2\\n\\l  3 start: 'b' .\\l\"]
   18878   2 -> \"2R3\" [style=solid]
   18879  \"2R3\" [label=\"R3\", fillcolor=3, shape=diamond, style=filled]
   18880   3 [label=\"State 3\\n\\l  5 start: 'c' .\\l\"]
   18881   3 -> \"3R5\" [style=solid]
   18882  \"3R5\" [label=\"R5\", fillcolor=3, shape=diamond, style=filled]
   18883   4 [label=\"State 4\\n\\l  0 \$accept: start . \$end\\l\"]
   18884   4 -> 8 [style=solid label=\"\$end\"]
   18885   5 [label=\"State 5\\n\\l  2 start: empty_a . 'a'\\l\"]
   18886   5 -> 9 [style=solid label=\"'a'\"]
   18887   6 [label=\"State 6\\n\\l  4 start: empty_b . 'b'\\l\"]
   18888   6 -> 10 [style=solid label=\"'b'\"]
   18889   7 [label=\"State 7\\n\\l  6 start: empty_c . 'c'\\l\"]
   18890   7 -> 11 [style=solid label=\"'c'\"]
   18891   8 [label=\"State 8\\n\\l  0 \$accept: start \$end .\\l\"]
   18892   8 -> \"8R0\" [style=solid]
   18893  \"8R0\" [label=\"Acc\", fillcolor=1, shape=diamond, style=filled]
   18894   9 [label=\"State 9\\n\\l  2 start: empty_a 'a' .\\l\"]
   18895   9 -> \"9R2\" [style=solid]
   18896  \"9R2\" [label=\"R2\", fillcolor=3, shape=diamond, style=filled]
   18897   10 [label=\"State 10\\n\\l  4 start: empty_b 'b' .\\l\"]
   18898   10 -> \"10R4\" [style=solid]
   18899  \"10R4\" [label=\"R4\", fillcolor=3, shape=diamond, style=filled]
   18900   11 [label=\"State 11\\n\\l  6 start: empty_c 'c' .\\l\"]
   18901   11 -> \"11R6\" [style=solid]
   18902  \"11R6\" [label=\"R6\", fillcolor=3, shape=diamond, style=filled]
   18903 }
   18904 " | \
   18905   $at_diff - "$at_stdout" || at_failed=:
   18906 at_fn_check_status 0 $at_status "$at_srcdir/output.at:294"
   18907 $at_failed && at_fn_log_failure
   18908 $at_traceon; }
   18909 
   18910   set +x
   18911   $at_times_p && times >"$at_times_file"
   18912 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   18913 read at_status <"$at_status_file"
   18914 #AT_STOP_87
   18915 #AT_START_88
   18916 at_fn_group_banner 88 'output.at:358' \
   18917   "Graph with solved S/R" "                          " 3
   18918 at_xfail=no
   18919 (
   18920   $as_echo "88. $at_setup_line: testing $at_desc ..."
   18921   $at_traceon
   18922 
   18923 
   18924 cat >input.y <<'_ATEOF'
   18925 %left 'a'
   18926 %right 'b'
   18927 %right 'c'
   18928 %%
   18929 start:
   18930     'a'
   18931   | empty_a 'a'
   18932   | 'b'
   18933   | empty_b 'b'
   18934   | 'c'
   18935   | empty_c 'c'
   18936   ;
   18937 empty_a: %prec 'a';
   18938 empty_b: %prec 'b';
   18939 empty_c: %prec 'c';
   18940 _ATEOF
   18941 
   18942 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   18943   at_save_special_files
   18944   mkdir xml-tests
   18945     # Don't combine these Bison invocations since we want to be sure that
   18946   # --report=all isn't required to get the full XML file.
   18947   { set +x
   18948 $as_echo "$at_srcdir/output.at:358: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   18949                   --graph=xml-tests/test.dot -rall --graph input.y"
   18950 at_fn_check_prepare_notrace 'an embedded newline' "output.at:358"
   18951 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   18952                   --graph=xml-tests/test.dot -rall --graph input.y
   18953 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18954 at_status=$? at_failed=false
   18955 $at_check_filter
   18956 echo stderr:; cat "$at_stderr"
   18957 echo stdout:; cat "$at_stdout"
   18958 at_fn_check_status 0 $at_status "$at_srcdir/output.at:358"
   18959 $at_failed && at_fn_log_failure
   18960 $at_traceon; }
   18961 
   18962   { set +x
   18963 $as_echo "$at_srcdir/output.at:358: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -rall --graph input.y"
   18964 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -rall --graph input.y" "output.at:358"
   18965 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -rall --graph input.y
   18966 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18967 at_status=$? at_failed=false
   18968 $at_check_filter
   18969 echo stderr:; cat "$at_stderr"
   18970 echo stdout:; cat "$at_stdout"
   18971 at_fn_check_status 0 $at_status "$at_srcdir/output.at:358"
   18972 $at_failed && at_fn_log_failure
   18973 $at_traceon; }
   18974 
   18975     cp xml-tests/test.output expout
   18976   { set +x
   18977 $as_echo "$at_srcdir/output.at:358: \$XSLTPROC \\
   18978              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   18979              xml-tests/test.xml"
   18980 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:358"
   18981 ( $at_check_trace; $XSLTPROC \
   18982              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   18983              xml-tests/test.xml
   18984 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   18985 at_status=$? at_failed=false
   18986 $at_check_filter
   18987 at_fn_diff_devnull "$at_stderr" || at_failed=:
   18988 $at_diff expout "$at_stdout" || at_failed=:
   18989 at_fn_check_status 0 $at_status "$at_srcdir/output.at:358"
   18990 $at_failed && at_fn_log_failure
   18991 $at_traceon; }
   18992 
   18993   sort xml-tests/test.dot > expout
   18994   { set +x
   18995 $as_echo "$at_srcdir/output.at:358: \$XSLTPROC \\
   18996              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   18997              xml-tests/test.xml | sort"
   18998 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:358"
   18999 ( $at_check_trace; $XSLTPROC \
   19000              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   19001              xml-tests/test.xml | sort
   19002 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19003 at_status=$? at_failed=false
   19004 $at_check_filter
   19005 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19006 $at_diff expout "$at_stdout" || at_failed=:
   19007 at_fn_check_status 0 $at_status "$at_srcdir/output.at:358"
   19008 $at_failed && at_fn_log_failure
   19009 $at_traceon; }
   19010 
   19011   rm -rf xml-tests expout
   19012   at_restore_special_files
   19013 fi
   19014 { set +x
   19015 $as_echo "$at_srcdir/output.at:358: bison -rall --graph input.y"
   19016 at_fn_check_prepare_trace "output.at:358"
   19017 ( $at_check_trace; bison -rall --graph input.y
   19018 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19019 at_status=$? at_failed=false
   19020 $at_check_filter
   19021 echo stderr:; cat "$at_stderr"
   19022 at_fn_diff_devnull "$at_stdout" || at_failed=:
   19023 at_fn_check_status 0 $at_status "$at_srcdir/output.at:358"
   19024 $at_failed && at_fn_log_failure
   19025 $at_traceon; }
   19026 
   19027 
   19028 { set +x
   19029 $as_echo "$at_srcdir/output.at:358: grep -v // input.dot"
   19030 at_fn_check_prepare_trace "output.at:358"
   19031 ( $at_check_trace; grep -v // input.dot
   19032 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19033 at_status=$? at_failed=false
   19034 $at_check_filter
   19035 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19036 echo >>"$at_stdout"; $as_echo "
   19037 digraph \"input.y\"
   19038 {
   19039   node [fontname = courier, shape = box, colorscheme = paired6]
   19040   edge [fontname = courier]
   19041 
   19042   0 [label=\"State 0\\n\\l  0 \$accept: . start \$end\\l  1 start: . 'a'\\l  2      | . empty_a 'a'\\l  3      | . 'b'\\l  4      | . empty_b 'b'\\l  5      | . 'c'\\l  6      | . empty_c 'c'\\l  7 empty_a: .  ['a']\\l  8 empty_b: .  []\\l  9 empty_c: .  []\\l\"]
   19043   0 -> 1 [style=solid label=\"'b'\"]
   19044   0 -> 2 [style=solid label=\"'c'\"]
   19045   0 -> 3 [style=dashed label=\"start\"]
   19046   0 -> 4 [style=dashed label=\"empty_a\"]
   19047   0 -> 5 [style=dashed label=\"empty_b\"]
   19048   0 -> 6 [style=dashed label=\"empty_c\"]
   19049   0 -> \"0R7\" [style=solid]
   19050  \"0R7\" [label=\"R7\", fillcolor=3, shape=diamond, style=filled]
   19051   1 [label=\"State 1\\n\\l  3 start: 'b' .\\l\"]
   19052   1 -> \"1R3\" [style=solid]
   19053  \"1R3\" [label=\"R3\", fillcolor=3, shape=diamond, style=filled]
   19054   2 [label=\"State 2\\n\\l  5 start: 'c' .\\l\"]
   19055   2 -> \"2R5\" [style=solid]
   19056  \"2R5\" [label=\"R5\", fillcolor=3, shape=diamond, style=filled]
   19057   3 [label=\"State 3\\n\\l  0 \$accept: start . \$end\\l\"]
   19058   3 -> 7 [style=solid label=\"\$end\"]
   19059   4 [label=\"State 4\\n\\l  2 start: empty_a . 'a'\\l\"]
   19060   4 -> 8 [style=solid label=\"'a'\"]
   19061   5 [label=\"State 5\\n\\l  4 start: empty_b . 'b'\\l\"]
   19062   5 -> 9 [style=solid label=\"'b'\"]
   19063   6 [label=\"State 6\\n\\l  6 start: empty_c . 'c'\\l\"]
   19064   6 -> 10 [style=solid label=\"'c'\"]
   19065   7 [label=\"State 7\\n\\l  0 \$accept: start \$end .\\l\"]
   19066   7 -> \"7R0\" [style=solid]
   19067  \"7R0\" [label=\"Acc\", fillcolor=1, shape=diamond, style=filled]
   19068   8 [label=\"State 8\\n\\l  2 start: empty_a 'a' .\\l\"]
   19069   8 -> \"8R2\" [style=solid]
   19070  \"8R2\" [label=\"R2\", fillcolor=3, shape=diamond, style=filled]
   19071   9 [label=\"State 9\\n\\l  4 start: empty_b 'b' .\\l\"]
   19072   9 -> \"9R4\" [style=solid]
   19073  \"9R4\" [label=\"R4\", fillcolor=3, shape=diamond, style=filled]
   19074   10 [label=\"State 10\\n\\l  6 start: empty_c 'c' .\\l\"]
   19075   10 -> \"10R6\" [style=solid]
   19076  \"10R6\" [label=\"R6\", fillcolor=3, shape=diamond, style=filled]
   19077 }
   19078 " | \
   19079   $at_diff - "$at_stdout" || at_failed=:
   19080 at_fn_check_status 0 $at_status "$at_srcdir/output.at:358"
   19081 $at_failed && at_fn_log_failure
   19082 $at_traceon; }
   19083 
   19084   set +x
   19085   $at_times_p && times >"$at_times_file"
   19086 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   19087 read at_status <"$at_status_file"
   19088 #AT_STOP_88
   19089 #AT_START_89
   19090 at_fn_group_banner 89 'output.at:417' \
   19091   "Graph with R/R" "                                 " 3
   19092 at_xfail=no
   19093 (
   19094   $as_echo "89. $at_setup_line: testing $at_desc ..."
   19095   $at_traceon
   19096 
   19097 
   19098 cat >input.y <<'_ATEOF'
   19099 %%
   19100 exp: a | b;
   19101 a: ;
   19102 b: ;
   19103 _ATEOF
   19104 
   19105 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   19106   at_save_special_files
   19107   mkdir xml-tests
   19108     # Don't combine these Bison invocations since we want to be sure that
   19109   # --report=all isn't required to get the full XML file.
   19110   { set +x
   19111 $as_echo "$at_srcdir/output.at:417: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   19112                   --graph=xml-tests/test.dot -rall --graph input.y"
   19113 at_fn_check_prepare_notrace 'an embedded newline' "output.at:417"
   19114 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   19115                   --graph=xml-tests/test.dot -rall --graph input.y
   19116 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19117 at_status=$? at_failed=false
   19118 $at_check_filter
   19119 echo stderr:; cat "$at_stderr"
   19120 echo stdout:; cat "$at_stdout"
   19121 at_fn_check_status 0 $at_status "$at_srcdir/output.at:417"
   19122 $at_failed && at_fn_log_failure
   19123 $at_traceon; }
   19124 
   19125   { set +x
   19126 $as_echo "$at_srcdir/output.at:417: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -rall --graph input.y"
   19127 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -rall --graph input.y" "output.at:417"
   19128 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -rall --graph input.y
   19129 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19130 at_status=$? at_failed=false
   19131 $at_check_filter
   19132 echo stderr:; cat "$at_stderr"
   19133 echo stdout:; cat "$at_stdout"
   19134 at_fn_check_status 0 $at_status "$at_srcdir/output.at:417"
   19135 $at_failed && at_fn_log_failure
   19136 $at_traceon; }
   19137 
   19138     cp xml-tests/test.output expout
   19139   { set +x
   19140 $as_echo "$at_srcdir/output.at:417: \$XSLTPROC \\
   19141              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   19142              xml-tests/test.xml"
   19143 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:417"
   19144 ( $at_check_trace; $XSLTPROC \
   19145              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   19146              xml-tests/test.xml
   19147 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19148 at_status=$? at_failed=false
   19149 $at_check_filter
   19150 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19151 $at_diff expout "$at_stdout" || at_failed=:
   19152 at_fn_check_status 0 $at_status "$at_srcdir/output.at:417"
   19153 $at_failed && at_fn_log_failure
   19154 $at_traceon; }
   19155 
   19156   sort xml-tests/test.dot > expout
   19157   { set +x
   19158 $as_echo "$at_srcdir/output.at:417: \$XSLTPROC \\
   19159              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   19160              xml-tests/test.xml | sort"
   19161 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:417"
   19162 ( $at_check_trace; $XSLTPROC \
   19163              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   19164              xml-tests/test.xml | sort
   19165 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19166 at_status=$? at_failed=false
   19167 $at_check_filter
   19168 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19169 $at_diff expout "$at_stdout" || at_failed=:
   19170 at_fn_check_status 0 $at_status "$at_srcdir/output.at:417"
   19171 $at_failed && at_fn_log_failure
   19172 $at_traceon; }
   19173 
   19174   rm -rf xml-tests expout
   19175   at_restore_special_files
   19176 fi
   19177 { set +x
   19178 $as_echo "$at_srcdir/output.at:417: bison -rall --graph input.y"
   19179 at_fn_check_prepare_trace "output.at:417"
   19180 ( $at_check_trace; bison -rall --graph input.y
   19181 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19182 at_status=$? at_failed=false
   19183 $at_check_filter
   19184 echo stderr:; cat "$at_stderr"
   19185 at_fn_diff_devnull "$at_stdout" || at_failed=:
   19186 at_fn_check_status 0 $at_status "$at_srcdir/output.at:417"
   19187 $at_failed && at_fn_log_failure
   19188 $at_traceon; }
   19189 
   19190 
   19191 { set +x
   19192 $as_echo "$at_srcdir/output.at:417: grep -v // input.dot"
   19193 at_fn_check_prepare_trace "output.at:417"
   19194 ( $at_check_trace; grep -v // input.dot
   19195 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19196 at_status=$? at_failed=false
   19197 $at_check_filter
   19198 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19199 echo >>"$at_stdout"; $as_echo "
   19200 digraph \"input.y\"
   19201 {
   19202   node [fontname = courier, shape = box, colorscheme = paired6]
   19203   edge [fontname = courier]
   19204 
   19205   0 [label=\"State 0\\n\\l  0 \$accept: . exp \$end\\l  1 exp: . a\\l  2    | . b\\l  3 a: .  [\$end]\\l  4 b: .  [\$end]\\l\"]
   19206   0 -> 1 [style=dashed label=\"exp\"]
   19207   0 -> 2 [style=dashed label=\"a\"]
   19208   0 -> 3 [style=dashed label=\"b\"]
   19209   0 -> \"0R3\" [style=solid]
   19210  \"0R3\" [label=\"R3\", fillcolor=3, shape=diamond, style=filled]
   19211   0 -> \"0R4d\" [label=\"[\$end]\", style=solid]
   19212  \"0R4d\" [label=\"R4\", fillcolor=5, shape=diamond, style=filled]
   19213   1 [label=\"State 1\\n\\l  0 \$accept: exp . \$end\\l\"]
   19214   1 -> 4 [style=solid label=\"\$end\"]
   19215   2 [label=\"State 2\\n\\l  1 exp: a .\\l\"]
   19216   2 -> \"2R1\" [style=solid]
   19217  \"2R1\" [label=\"R1\", fillcolor=3, shape=diamond, style=filled]
   19218   3 [label=\"State 3\\n\\l  2 exp: b .\\l\"]
   19219   3 -> \"3R2\" [style=solid]
   19220  \"3R2\" [label=\"R2\", fillcolor=3, shape=diamond, style=filled]
   19221   4 [label=\"State 4\\n\\l  0 \$accept: exp \$end .\\l\"]
   19222   4 -> \"4R0\" [style=solid]
   19223  \"4R0\" [label=\"Acc\", fillcolor=1, shape=diamond, style=filled]
   19224 }
   19225 " | \
   19226   $at_diff - "$at_stdout" || at_failed=:
   19227 at_fn_check_status 0 $at_status "$at_srcdir/output.at:417"
   19228 $at_failed && at_fn_log_failure
   19229 $at_traceon; }
   19230 
   19231   set +x
   19232   $at_times_p && times >"$at_times_file"
   19233 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   19234 read at_status <"$at_status_file"
   19235 #AT_STOP_89
   19236 #AT_START_90
   19237 at_fn_group_banner 90 'output.at:449' \
   19238   "Graph with reductions with multiple LAT" "        " 3
   19239 at_xfail=no
   19240 (
   19241   $as_echo "90. $at_setup_line: testing $at_desc ..."
   19242   $at_traceon
   19243 
   19244 
   19245 cat >input.y <<'_ATEOF'
   19246 %%
   19247 exp: a ';' | a ';' | a '.' | b '?' | b '!' | c '?' | c ';';
   19248 a: ;
   19249 b: ;
   19250 c: ;
   19251 _ATEOF
   19252 
   19253 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   19254   at_save_special_files
   19255   mkdir xml-tests
   19256     # Don't combine these Bison invocations since we want to be sure that
   19257   # --report=all isn't required to get the full XML file.
   19258   { set +x
   19259 $as_echo "$at_srcdir/output.at:449: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   19260                   --graph=xml-tests/test.dot -rall --graph input.y"
   19261 at_fn_check_prepare_notrace 'an embedded newline' "output.at:449"
   19262 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   19263                   --graph=xml-tests/test.dot -rall --graph input.y
   19264 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19265 at_status=$? at_failed=false
   19266 $at_check_filter
   19267 echo stderr:; cat "$at_stderr"
   19268 echo stdout:; cat "$at_stdout"
   19269 at_fn_check_status 0 $at_status "$at_srcdir/output.at:449"
   19270 $at_failed && at_fn_log_failure
   19271 $at_traceon; }
   19272 
   19273   { set +x
   19274 $as_echo "$at_srcdir/output.at:449: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -rall --graph input.y"
   19275 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -rall --graph input.y" "output.at:449"
   19276 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -rall --graph input.y
   19277 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19278 at_status=$? at_failed=false
   19279 $at_check_filter
   19280 echo stderr:; cat "$at_stderr"
   19281 echo stdout:; cat "$at_stdout"
   19282 at_fn_check_status 0 $at_status "$at_srcdir/output.at:449"
   19283 $at_failed && at_fn_log_failure
   19284 $at_traceon; }
   19285 
   19286     cp xml-tests/test.output expout
   19287   { set +x
   19288 $as_echo "$at_srcdir/output.at:449: \$XSLTPROC \\
   19289              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   19290              xml-tests/test.xml"
   19291 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:449"
   19292 ( $at_check_trace; $XSLTPROC \
   19293              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   19294              xml-tests/test.xml
   19295 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19296 at_status=$? at_failed=false
   19297 $at_check_filter
   19298 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19299 $at_diff expout "$at_stdout" || at_failed=:
   19300 at_fn_check_status 0 $at_status "$at_srcdir/output.at:449"
   19301 $at_failed && at_fn_log_failure
   19302 $at_traceon; }
   19303 
   19304   sort xml-tests/test.dot > expout
   19305   { set +x
   19306 $as_echo "$at_srcdir/output.at:449: \$XSLTPROC \\
   19307              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   19308              xml-tests/test.xml | sort"
   19309 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:449"
   19310 ( $at_check_trace; $XSLTPROC \
   19311              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   19312              xml-tests/test.xml | sort
   19313 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19314 at_status=$? at_failed=false
   19315 $at_check_filter
   19316 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19317 $at_diff expout "$at_stdout" || at_failed=:
   19318 at_fn_check_status 0 $at_status "$at_srcdir/output.at:449"
   19319 $at_failed && at_fn_log_failure
   19320 $at_traceon; }
   19321 
   19322   rm -rf xml-tests expout
   19323   at_restore_special_files
   19324 fi
   19325 { set +x
   19326 $as_echo "$at_srcdir/output.at:449: bison -rall --graph input.y"
   19327 at_fn_check_prepare_trace "output.at:449"
   19328 ( $at_check_trace; bison -rall --graph input.y
   19329 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19330 at_status=$? at_failed=false
   19331 $at_check_filter
   19332 echo stderr:; cat "$at_stderr"
   19333 at_fn_diff_devnull "$at_stdout" || at_failed=:
   19334 at_fn_check_status 0 $at_status "$at_srcdir/output.at:449"
   19335 $at_failed && at_fn_log_failure
   19336 $at_traceon; }
   19337 
   19338 
   19339 { set +x
   19340 $as_echo "$at_srcdir/output.at:449: grep -v // input.dot"
   19341 at_fn_check_prepare_trace "output.at:449"
   19342 ( $at_check_trace; grep -v // input.dot
   19343 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19344 at_status=$? at_failed=false
   19345 $at_check_filter
   19346 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19347 echo >>"$at_stdout"; $as_echo "
   19348 digraph \"input.y\"
   19349 {
   19350   node [fontname = courier, shape = box, colorscheme = paired6]
   19351   edge [fontname = courier]
   19352 
   19353   0 [label=\"State 0\\n\\l  0 \$accept: . exp \$end\\l  1 exp: . a ';'\\l  2    | . a ';'\\l  3    | . a '.'\\l  4    | . b '?'\\l  5    | . b '!'\\l  6    | . c '?'\\l  7    | . c ';'\\l  8 a: .  [';', '.']\\l  9 b: .  ['?', '!']\\l 10 c: .  [';', '?']\\l\"]
   19354   0 -> 1 [style=dashed label=\"exp\"]
   19355   0 -> 2 [style=dashed label=\"a\"]
   19356   0 -> 3 [style=dashed label=\"b\"]
   19357   0 -> 4 [style=dashed label=\"c\"]
   19358   0 -> \"0R8\" [style=solid]
   19359  \"0R8\" [label=\"R8\", fillcolor=3, shape=diamond, style=filled]
   19360   0 -> \"0R9\" [label=\"['?', '!']\", style=solid]
   19361  \"0R9\" [label=\"R9\", fillcolor=3, shape=diamond, style=filled]
   19362   0 -> \"0R10d\" [label=\"[';', '?']\", style=solid]
   19363  \"0R10d\" [label=\"R10\", fillcolor=5, shape=diamond, style=filled]
   19364   1 [label=\"State 1\\n\\l  0 \$accept: exp . \$end\\l\"]
   19365   1 -> 5 [style=solid label=\"\$end\"]
   19366   2 [label=\"State 2\\n\\l  1 exp: a . ';'\\l  2    | a . ';'\\l  3    | a . '.'\\l\"]
   19367   2 -> 6 [style=solid label=\"';'\"]
   19368   2 -> 7 [style=solid label=\"'.'\"]
   19369   3 [label=\"State 3\\n\\l  4 exp: b . '?'\\l  5    | b . '!'\\l\"]
   19370   3 -> 8 [style=solid label=\"'?'\"]
   19371   3 -> 9 [style=solid label=\"'!'\"]
   19372   4 [label=\"State 4\\n\\l  6 exp: c . '?'\\l  7    | c . ';'\\l\"]
   19373   4 -> 10 [style=solid label=\"';'\"]
   19374   4 -> 11 [style=solid label=\"'?'\"]
   19375   5 [label=\"State 5\\n\\l  0 \$accept: exp \$end .\\l\"]
   19376   5 -> \"5R0\" [style=solid]
   19377  \"5R0\" [label=\"Acc\", fillcolor=1, shape=diamond, style=filled]
   19378   6 [label=\"State 6\\n\\l  1 exp: a ';' .  [\$end]\\l  2    | a ';' .  [\$end]\\l\"]
   19379   6 -> \"6R1\" [style=solid]
   19380  \"6R1\" [label=\"R1\", fillcolor=3, shape=diamond, style=filled]
   19381   6 -> \"6R2d\" [label=\"[\$end]\", style=solid]
   19382  \"6R2d\" [label=\"R2\", fillcolor=5, shape=diamond, style=filled]
   19383   7 [label=\"State 7\\n\\l  3 exp: a '.' .\\l\"]
   19384   7 -> \"7R3\" [style=solid]
   19385  \"7R3\" [label=\"R3\", fillcolor=3, shape=diamond, style=filled]
   19386   8 [label=\"State 8\\n\\l  4 exp: b '?' .\\l\"]
   19387   8 -> \"8R4\" [style=solid]
   19388  \"8R4\" [label=\"R4\", fillcolor=3, shape=diamond, style=filled]
   19389   9 [label=\"State 9\\n\\l  5 exp: b '!' .\\l\"]
   19390   9 -> \"9R5\" [style=solid]
   19391  \"9R5\" [label=\"R5\", fillcolor=3, shape=diamond, style=filled]
   19392   10 [label=\"State 10\\n\\l  7 exp: c ';' .\\l\"]
   19393   10 -> \"10R7\" [style=solid]
   19394  \"10R7\" [label=\"R7\", fillcolor=3, shape=diamond, style=filled]
   19395   11 [label=\"State 11\\n\\l  6 exp: c '?' .\\l\"]
   19396   11 -> \"11R6\" [style=solid]
   19397  \"11R6\" [label=\"R6\", fillcolor=3, shape=diamond, style=filled]
   19398 }
   19399 " | \
   19400   $at_diff - "$at_stdout" || at_failed=:
   19401 at_fn_check_status 0 $at_status "$at_srcdir/output.at:449"
   19402 $at_failed && at_fn_log_failure
   19403 $at_traceon; }
   19404 
   19405   set +x
   19406   $at_times_p && times >"$at_times_file"
   19407 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   19408 read at_status <"$at_status_file"
   19409 #AT_STOP_90
   19410 #AT_START_91
   19411 at_fn_group_banner 91 'output.at:508' \
   19412   "Graph with a reduction rule both enabled and disabled" "" 3
   19413 at_xfail=no
   19414 (
   19415   $as_echo "91. $at_setup_line: testing $at_desc ..."
   19416   $at_traceon
   19417 
   19418 
   19419 cat >input.y <<'_ATEOF'
   19420 %%
   19421 exp: ifexp | opexp | imm;
   19422 ifexp: "if" exp "then" exp elseexp;
   19423 elseexp: "else" exp | ;
   19424 opexp: exp '+' exp;
   19425 imm: '0';
   19426 _ATEOF
   19427 
   19428 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   19429   at_save_special_files
   19430   mkdir xml-tests
   19431     # Don't combine these Bison invocations since we want to be sure that
   19432   # --report=all isn't required to get the full XML file.
   19433   { set +x
   19434 $as_echo "$at_srcdir/output.at:508: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   19435                   --graph=xml-tests/test.dot -rall --graph input.y"
   19436 at_fn_check_prepare_notrace 'an embedded newline' "output.at:508"
   19437 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   19438                   --graph=xml-tests/test.dot -rall --graph input.y
   19439 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19440 at_status=$? at_failed=false
   19441 $at_check_filter
   19442 echo stderr:; cat "$at_stderr"
   19443 echo stdout:; cat "$at_stdout"
   19444 at_fn_check_status 0 $at_status "$at_srcdir/output.at:508"
   19445 $at_failed && at_fn_log_failure
   19446 $at_traceon; }
   19447 
   19448   { set +x
   19449 $as_echo "$at_srcdir/output.at:508: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -rall --graph input.y"
   19450 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -rall --graph input.y" "output.at:508"
   19451 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -rall --graph input.y
   19452 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19453 at_status=$? at_failed=false
   19454 $at_check_filter
   19455 echo stderr:; cat "$at_stderr"
   19456 echo stdout:; cat "$at_stdout"
   19457 at_fn_check_status 0 $at_status "$at_srcdir/output.at:508"
   19458 $at_failed && at_fn_log_failure
   19459 $at_traceon; }
   19460 
   19461     cp xml-tests/test.output expout
   19462   { set +x
   19463 $as_echo "$at_srcdir/output.at:508: \$XSLTPROC \\
   19464              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   19465              xml-tests/test.xml"
   19466 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:508"
   19467 ( $at_check_trace; $XSLTPROC \
   19468              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   19469              xml-tests/test.xml
   19470 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19471 at_status=$? at_failed=false
   19472 $at_check_filter
   19473 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19474 $at_diff expout "$at_stdout" || at_failed=:
   19475 at_fn_check_status 0 $at_status "$at_srcdir/output.at:508"
   19476 $at_failed && at_fn_log_failure
   19477 $at_traceon; }
   19478 
   19479   sort xml-tests/test.dot > expout
   19480   { set +x
   19481 $as_echo "$at_srcdir/output.at:508: \$XSLTPROC \\
   19482              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   19483              xml-tests/test.xml | sort"
   19484 at_fn_check_prepare_notrace 'a `...` command substitution' "output.at:508"
   19485 ( $at_check_trace; $XSLTPROC \
   19486              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   19487              xml-tests/test.xml | sort
   19488 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19489 at_status=$? at_failed=false
   19490 $at_check_filter
   19491 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19492 $at_diff expout "$at_stdout" || at_failed=:
   19493 at_fn_check_status 0 $at_status "$at_srcdir/output.at:508"
   19494 $at_failed && at_fn_log_failure
   19495 $at_traceon; }
   19496 
   19497   rm -rf xml-tests expout
   19498   at_restore_special_files
   19499 fi
   19500 { set +x
   19501 $as_echo "$at_srcdir/output.at:508: bison -rall --graph input.y"
   19502 at_fn_check_prepare_trace "output.at:508"
   19503 ( $at_check_trace; bison -rall --graph input.y
   19504 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19505 at_status=$? at_failed=false
   19506 $at_check_filter
   19507 echo stderr:; cat "$at_stderr"
   19508 at_fn_diff_devnull "$at_stdout" || at_failed=:
   19509 at_fn_check_status 0 $at_status "$at_srcdir/output.at:508"
   19510 $at_failed && at_fn_log_failure
   19511 $at_traceon; }
   19512 
   19513 
   19514 { set +x
   19515 $as_echo "$at_srcdir/output.at:508: grep -v // input.dot"
   19516 at_fn_check_prepare_trace "output.at:508"
   19517 ( $at_check_trace; grep -v // input.dot
   19518 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19519 at_status=$? at_failed=false
   19520 $at_check_filter
   19521 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19522 echo >>"$at_stdout"; $as_echo "
   19523 digraph \"input.y\"
   19524 {
   19525   node [fontname = courier, shape = box, colorscheme = paired6]
   19526   edge [fontname = courier]
   19527 
   19528   0 [label=\"State 0\\n\\l  0 \$accept: . exp \$end\\l  1 exp: . ifexp\\l  2    | . opexp\\l  3    | . imm\\l  4 ifexp: . \\\"if\\\" exp \\\"then\\\" exp elseexp\\l  7 opexp: . exp '+' exp\\l  8 imm: . '0'\\l\"]
   19529   0 -> 1 [style=solid label=\"\\\"if\\\"\"]
   19530   0 -> 2 [style=solid label=\"'0'\"]
   19531   0 -> 3 [style=dashed label=\"exp\"]
   19532   0 -> 4 [style=dashed label=\"ifexp\"]
   19533   0 -> 5 [style=dashed label=\"opexp\"]
   19534   0 -> 6 [style=dashed label=\"imm\"]
   19535   1 [label=\"State 1\\n\\l  1 exp: . ifexp\\l  2    | . opexp\\l  3    | . imm\\l  4 ifexp: . \\\"if\\\" exp \\\"then\\\" exp elseexp\\l  4      | \\\"if\\\" . exp \\\"then\\\" exp elseexp\\l  7 opexp: . exp '+' exp\\l  8 imm: . '0'\\l\"]
   19536   1 -> 1 [style=solid label=\"\\\"if\\\"\"]
   19537   1 -> 2 [style=solid label=\"'0'\"]
   19538   1 -> 7 [style=dashed label=\"exp\"]
   19539   1 -> 4 [style=dashed label=\"ifexp\"]
   19540   1 -> 5 [style=dashed label=\"opexp\"]
   19541   1 -> 6 [style=dashed label=\"imm\"]
   19542   2 [label=\"State 2\\n\\l  8 imm: '0' .\\l\"]
   19543   2 -> \"2R8\" [style=solid]
   19544  \"2R8\" [label=\"R8\", fillcolor=3, shape=diamond, style=filled]
   19545   3 [label=\"State 3\\n\\l  0 \$accept: exp . \$end\\l  7 opexp: exp . '+' exp\\l\"]
   19546   3 -> 8 [style=solid label=\"\$end\"]
   19547   3 -> 9 [style=solid label=\"'+'\"]
   19548   4 [label=\"State 4\\n\\l  1 exp: ifexp .\\l\"]
   19549   4 -> \"4R1\" [style=solid]
   19550  \"4R1\" [label=\"R1\", fillcolor=3, shape=diamond, style=filled]
   19551   5 [label=\"State 5\\n\\l  2 exp: opexp .\\l\"]
   19552   5 -> \"5R2\" [style=solid]
   19553  \"5R2\" [label=\"R2\", fillcolor=3, shape=diamond, style=filled]
   19554   6 [label=\"State 6\\n\\l  3 exp: imm .\\l\"]
   19555   6 -> \"6R3\" [style=solid]
   19556  \"6R3\" [label=\"R3\", fillcolor=3, shape=diamond, style=filled]
   19557   7 [label=\"State 7\\n\\l  4 ifexp: \\\"if\\\" exp . \\\"then\\\" exp elseexp\\l  7 opexp: exp . '+' exp\\l\"]
   19558   7 -> 10 [style=solid label=\"\\\"then\\\"\"]
   19559   7 -> 9 [style=solid label=\"'+'\"]
   19560   8 [label=\"State 8\\n\\l  0 \$accept: exp \$end .\\l\"]
   19561   8 -> \"8R0\" [style=solid]
   19562  \"8R0\" [label=\"Acc\", fillcolor=1, shape=diamond, style=filled]
   19563   9 [label=\"State 9\\n\\l  1 exp: . ifexp\\l  2    | . opexp\\l  3    | . imm\\l  4 ifexp: . \\\"if\\\" exp \\\"then\\\" exp elseexp\\l  7 opexp: . exp '+' exp\\l  7      | exp '+' . exp\\l  8 imm: . '0'\\l\"]
   19564   9 -> 1 [style=solid label=\"\\\"if\\\"\"]
   19565   9 -> 2 [style=solid label=\"'0'\"]
   19566   9 -> 11 [style=dashed label=\"exp\"]
   19567   9 -> 4 [style=dashed label=\"ifexp\"]
   19568   9 -> 5 [style=dashed label=\"opexp\"]
   19569   9 -> 6 [style=dashed label=\"imm\"]
   19570   10 [label=\"State 10\\n\\l  1 exp: . ifexp\\l  2    | . opexp\\l  3    | . imm\\l  4 ifexp: . \\\"if\\\" exp \\\"then\\\" exp elseexp\\l  4      | \\\"if\\\" exp \\\"then\\\" . exp elseexp\\l  7 opexp: . exp '+' exp\\l  8 imm: . '0'\\l\"]
   19571   10 -> 1 [style=solid label=\"\\\"if\\\"\"]
   19572   10 -> 2 [style=solid label=\"'0'\"]
   19573   10 -> 12 [style=dashed label=\"exp\"]
   19574   10 -> 4 [style=dashed label=\"ifexp\"]
   19575   10 -> 5 [style=dashed label=\"opexp\"]
   19576   10 -> 6 [style=dashed label=\"imm\"]
   19577   11 [label=\"State 11\\n\\l  7 opexp: exp . '+' exp\\l  7      | exp '+' exp .  [\$end, \\\"then\\\", \\\"else\\\", '+']\\l\"]
   19578   11 -> 9 [style=solid label=\"'+'\"]
   19579   11 -> \"11R7d\" [label=\"['+']\", style=solid]
   19580  \"11R7d\" [label=\"R7\", fillcolor=5, shape=diamond, style=filled]
   19581   11 -> \"11R7\" [style=solid]
   19582  \"11R7\" [label=\"R7\", fillcolor=3, shape=diamond, style=filled]
   19583   12 [label=\"State 12\\n\\l  4 ifexp: \\\"if\\\" exp \\\"then\\\" exp . elseexp\\l  5 elseexp: . \\\"else\\\" exp\\l  6        | .  [\$end, \\\"then\\\", \\\"else\\\", '+']\\l  7 opexp: exp . '+' exp\\l\"]
   19584   12 -> 13 [style=solid label=\"\\\"else\\\"\"]
   19585   12 -> 9 [style=solid label=\"'+'\"]
   19586   12 -> 14 [style=dashed label=\"elseexp\"]
   19587   12 -> \"12R6d\" [label=\"[\\\"else\\\", '+']\", style=solid]
   19588  \"12R6d\" [label=\"R6\", fillcolor=5, shape=diamond, style=filled]
   19589   12 -> \"12R6\" [style=solid]
   19590  \"12R6\" [label=\"R6\", fillcolor=3, shape=diamond, style=filled]
   19591   13 [label=\"State 13\\n\\l  1 exp: . ifexp\\l  2    | . opexp\\l  3    | . imm\\l  4 ifexp: . \\\"if\\\" exp \\\"then\\\" exp elseexp\\l  5 elseexp: \\\"else\\\" . exp\\l  7 opexp: . exp '+' exp\\l  8 imm: . '0'\\l\"]
   19592   13 -> 1 [style=solid label=\"\\\"if\\\"\"]
   19593   13 -> 2 [style=solid label=\"'0'\"]
   19594   13 -> 15 [style=dashed label=\"exp\"]
   19595   13 -> 4 [style=dashed label=\"ifexp\"]
   19596   13 -> 5 [style=dashed label=\"opexp\"]
   19597   13 -> 6 [style=dashed label=\"imm\"]
   19598   14 [label=\"State 14\\n\\l  4 ifexp: \\\"if\\\" exp \\\"then\\\" exp elseexp .\\l\"]
   19599   14 -> \"14R4\" [style=solid]
   19600  \"14R4\" [label=\"R4\", fillcolor=3, shape=diamond, style=filled]
   19601   15 [label=\"State 15\\n\\l  5 elseexp: \\\"else\\\" exp .  [\$end, \\\"then\\\", \\\"else\\\", '+']\\l  7 opexp: exp . '+' exp\\l\"]
   19602   15 -> 9 [style=solid label=\"'+'\"]
   19603   15 -> \"15R5d\" [label=\"['+']\", style=solid]
   19604  \"15R5d\" [label=\"R5\", fillcolor=5, shape=diamond, style=filled]
   19605   15 -> \"15R5\" [style=solid]
   19606  \"15R5\" [label=\"R5\", fillcolor=3, shape=diamond, style=filled]
   19607 }
   19608 " | \
   19609   $at_diff - "$at_stdout" || at_failed=:
   19610 at_fn_check_status 0 $at_status "$at_srcdir/output.at:508"
   19611 $at_failed && at_fn_log_failure
   19612 $at_traceon; }
   19613 
   19614   set +x
   19615   $at_times_p && times >"$at_times_file"
   19616 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   19617 read at_status <"$at_status_file"
   19618 #AT_STOP_91
   19619 #AT_START_92
   19620 at_fn_group_banner 92 'skeletons.at:24' \
   19621   "Relative skeleton file names" "                   " 4
   19622 at_xfail=no
   19623 (
   19624   $as_echo "92. $at_setup_line: testing $at_desc ..."
   19625   $at_traceon
   19626 
   19627 
   19628 { set +x
   19629 $as_echo "$at_srcdir/skeletons.at:26: mkdir tmp"
   19630 at_fn_check_prepare_trace "skeletons.at:26"
   19631 ( $at_check_trace; mkdir tmp
   19632 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19633 at_status=$? at_failed=false
   19634 $at_check_filter
   19635 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19636 at_fn_diff_devnull "$at_stdout" || at_failed=:
   19637 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:26"
   19638 $at_failed && at_fn_log_failure
   19639 $at_traceon; }
   19640 
   19641 
   19642 cat >tmp/skel.c <<'_ATEOF'
   19643 m4_divert_push(0)dnl
   19644 @output(b4_parser_file_name@)dnl
   19645 b4_percent_define_get([[test]])
   19646 m4_divert_pop(0)
   19647 _ATEOF
   19648 
   19649 
   19650 cat >skel.c <<'_ATEOF'
   19651 m4_divert_push(0)dnl
   19652 @output(b4_parser_file_name@)dnl
   19653 b4_percent_define_get([[test]]) -- Local
   19654 m4_divert_pop(0)
   19655 _ATEOF
   19656 
   19657 
   19658 cat >tmp/input-gram.y <<'_ATEOF'
   19659 %skeleton "./skel.c"
   19660 %define test "Hello World"
   19661 %%
   19662 start: ;
   19663 _ATEOF
   19664 
   19665 
   19666 cat >input-gram.y <<'_ATEOF'
   19667 %skeleton "./skel.c"
   19668 %define test "Hello World"
   19669 %%
   19670 start: ;
   19671 _ATEOF
   19672 
   19673 
   19674 cat >tmp/input-cmd-line.y <<'_ATEOF'
   19675 %define test "Hello World"
   19676 %%
   19677 start: ;
   19678 _ATEOF
   19679 
   19680 
   19681 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   19682   at_save_special_files
   19683   mkdir xml-tests
   19684     # Don't combine these Bison invocations since we want to be sure that
   19685   # --report=all isn't required to get the full XML file.
   19686   { set +x
   19687 $as_echo "$at_srcdir/skeletons.at:62: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   19688                   --graph=xml-tests/test.dot tmp/input-gram.y"
   19689 at_fn_check_prepare_notrace 'an embedded newline' "skeletons.at:62"
   19690 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   19691                   --graph=xml-tests/test.dot tmp/input-gram.y
   19692 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19693 at_status=$? at_failed=false
   19694 $at_check_filter
   19695 echo stderr:; cat "$at_stderr"
   19696 echo stdout:; cat "$at_stdout"
   19697 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:62"
   19698 $at_failed && at_fn_log_failure
   19699 $at_traceon; }
   19700 
   19701   { set +x
   19702 $as_echo "$at_srcdir/skeletons.at:62: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml tmp/input-gram.y"
   19703 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml tmp/input-gram.y" "skeletons.at:62"
   19704 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml tmp/input-gram.y
   19705 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19706 at_status=$? at_failed=false
   19707 $at_check_filter
   19708 echo stderr:; cat "$at_stderr"
   19709 echo stdout:; cat "$at_stdout"
   19710 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:62"
   19711 $at_failed && at_fn_log_failure
   19712 $at_traceon; }
   19713 
   19714     cp xml-tests/test.output expout
   19715   { set +x
   19716 $as_echo "$at_srcdir/skeletons.at:62: \$XSLTPROC \\
   19717              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   19718              xml-tests/test.xml"
   19719 at_fn_check_prepare_notrace 'a `...` command substitution' "skeletons.at:62"
   19720 ( $at_check_trace; $XSLTPROC \
   19721              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   19722              xml-tests/test.xml
   19723 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19724 at_status=$? at_failed=false
   19725 $at_check_filter
   19726 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19727 $at_diff expout "$at_stdout" || at_failed=:
   19728 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:62"
   19729 $at_failed && at_fn_log_failure
   19730 $at_traceon; }
   19731 
   19732   sort xml-tests/test.dot > expout
   19733   { set +x
   19734 $as_echo "$at_srcdir/skeletons.at:62: \$XSLTPROC \\
   19735              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   19736              xml-tests/test.xml | sort"
   19737 at_fn_check_prepare_notrace 'a `...` command substitution' "skeletons.at:62"
   19738 ( $at_check_trace; $XSLTPROC \
   19739              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   19740              xml-tests/test.xml | sort
   19741 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19742 at_status=$? at_failed=false
   19743 $at_check_filter
   19744 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19745 $at_diff expout "$at_stdout" || at_failed=:
   19746 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:62"
   19747 $at_failed && at_fn_log_failure
   19748 $at_traceon; }
   19749 
   19750   rm -rf xml-tests expout
   19751   at_restore_special_files
   19752 fi
   19753 { set +x
   19754 $as_echo "$at_srcdir/skeletons.at:62: bison tmp/input-gram.y"
   19755 at_fn_check_prepare_trace "skeletons.at:62"
   19756 ( $at_check_trace; bison tmp/input-gram.y
   19757 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19758 at_status=$? at_failed=false
   19759 $at_check_filter
   19760 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19761 at_fn_diff_devnull "$at_stdout" || at_failed=:
   19762 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:62"
   19763 $at_failed && at_fn_log_failure
   19764 $at_traceon; }
   19765 
   19766 
   19767 { set +x
   19768 $as_echo "$at_srcdir/skeletons.at:63: cat input-gram.tab.c"
   19769 at_fn_check_prepare_trace "skeletons.at:63"
   19770 ( $at_check_trace; cat input-gram.tab.c
   19771 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19772 at_status=$? at_failed=false
   19773 $at_check_filter
   19774 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19775 echo >>"$at_stdout"; $as_echo "Hello World
   19776 " | \
   19777   $at_diff - "$at_stdout" || at_failed=:
   19778 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:63"
   19779 $at_failed && at_fn_log_failure
   19780 $at_traceon; }
   19781 
   19782 
   19783 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   19784   at_save_special_files
   19785   mkdir xml-tests
   19786     # Don't combine these Bison invocations since we want to be sure that
   19787   # --report=all isn't required to get the full XML file.
   19788   { set +x
   19789 $as_echo "$at_srcdir/skeletons.at:67: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   19790                   --graph=xml-tests/test.dot input-gram.y"
   19791 at_fn_check_prepare_notrace 'an embedded newline' "skeletons.at:67"
   19792 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   19793                   --graph=xml-tests/test.dot input-gram.y
   19794 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19795 at_status=$? at_failed=false
   19796 $at_check_filter
   19797 echo stderr:; cat "$at_stderr"
   19798 echo stdout:; cat "$at_stdout"
   19799 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:67"
   19800 $at_failed && at_fn_log_failure
   19801 $at_traceon; }
   19802 
   19803   { set +x
   19804 $as_echo "$at_srcdir/skeletons.at:67: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input-gram.y"
   19805 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input-gram.y" "skeletons.at:67"
   19806 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input-gram.y
   19807 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19808 at_status=$? at_failed=false
   19809 $at_check_filter
   19810 echo stderr:; cat "$at_stderr"
   19811 echo stdout:; cat "$at_stdout"
   19812 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:67"
   19813 $at_failed && at_fn_log_failure
   19814 $at_traceon; }
   19815 
   19816     cp xml-tests/test.output expout
   19817   { set +x
   19818 $as_echo "$at_srcdir/skeletons.at:67: \$XSLTPROC \\
   19819              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   19820              xml-tests/test.xml"
   19821 at_fn_check_prepare_notrace 'a `...` command substitution' "skeletons.at:67"
   19822 ( $at_check_trace; $XSLTPROC \
   19823              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   19824              xml-tests/test.xml
   19825 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19826 at_status=$? at_failed=false
   19827 $at_check_filter
   19828 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19829 $at_diff expout "$at_stdout" || at_failed=:
   19830 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:67"
   19831 $at_failed && at_fn_log_failure
   19832 $at_traceon; }
   19833 
   19834   sort xml-tests/test.dot > expout
   19835   { set +x
   19836 $as_echo "$at_srcdir/skeletons.at:67: \$XSLTPROC \\
   19837              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   19838              xml-tests/test.xml | sort"
   19839 at_fn_check_prepare_notrace 'a `...` command substitution' "skeletons.at:67"
   19840 ( $at_check_trace; $XSLTPROC \
   19841              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   19842              xml-tests/test.xml | sort
   19843 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19844 at_status=$? at_failed=false
   19845 $at_check_filter
   19846 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19847 $at_diff expout "$at_stdout" || at_failed=:
   19848 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:67"
   19849 $at_failed && at_fn_log_failure
   19850 $at_traceon; }
   19851 
   19852   rm -rf xml-tests expout
   19853   at_restore_special_files
   19854 fi
   19855 { set +x
   19856 $as_echo "$at_srcdir/skeletons.at:67: bison input-gram.y"
   19857 at_fn_check_prepare_trace "skeletons.at:67"
   19858 ( $at_check_trace; bison input-gram.y
   19859 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19860 at_status=$? at_failed=false
   19861 $at_check_filter
   19862 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19863 at_fn_diff_devnull "$at_stdout" || at_failed=:
   19864 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:67"
   19865 $at_failed && at_fn_log_failure
   19866 $at_traceon; }
   19867 
   19868 
   19869 { set +x
   19870 $as_echo "$at_srcdir/skeletons.at:68: cat input-gram.tab.c"
   19871 at_fn_check_prepare_trace "skeletons.at:68"
   19872 ( $at_check_trace; cat input-gram.tab.c
   19873 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19874 at_status=$? at_failed=false
   19875 $at_check_filter
   19876 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19877 echo >>"$at_stdout"; $as_echo "Hello World -- Local
   19878 " | \
   19879   $at_diff - "$at_stdout" || at_failed=:
   19880 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:68"
   19881 $at_failed && at_fn_log_failure
   19882 $at_traceon; }
   19883 
   19884 
   19885 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   19886   at_save_special_files
   19887   mkdir xml-tests
   19888     # Don't combine these Bison invocations since we want to be sure that
   19889   # --report=all isn't required to get the full XML file.
   19890   { set +x
   19891 $as_echo "$at_srcdir/skeletons.at:72: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   19892                   --graph=xml-tests/test.dot --skeleton=tmp/skel.c tmp/input-cmd-line.y"
   19893 at_fn_check_prepare_notrace 'an embedded newline' "skeletons.at:72"
   19894 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   19895                   --graph=xml-tests/test.dot --skeleton=tmp/skel.c tmp/input-cmd-line.y
   19896 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19897 at_status=$? at_failed=false
   19898 $at_check_filter
   19899 echo stderr:; cat "$at_stderr"
   19900 echo stdout:; cat "$at_stdout"
   19901 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:72"
   19902 $at_failed && at_fn_log_failure
   19903 $at_traceon; }
   19904 
   19905   { set +x
   19906 $as_echo "$at_srcdir/skeletons.at:72: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --skeleton=tmp/skel.c tmp/input-cmd-line.y"
   19907 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --skeleton=tmp/skel.c tmp/input-cmd-line.y" "skeletons.at:72"
   19908 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --skeleton=tmp/skel.c tmp/input-cmd-line.y
   19909 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19910 at_status=$? at_failed=false
   19911 $at_check_filter
   19912 echo stderr:; cat "$at_stderr"
   19913 echo stdout:; cat "$at_stdout"
   19914 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:72"
   19915 $at_failed && at_fn_log_failure
   19916 $at_traceon; }
   19917 
   19918     cp xml-tests/test.output expout
   19919   { set +x
   19920 $as_echo "$at_srcdir/skeletons.at:72: \$XSLTPROC \\
   19921              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   19922              xml-tests/test.xml"
   19923 at_fn_check_prepare_notrace 'a `...` command substitution' "skeletons.at:72"
   19924 ( $at_check_trace; $XSLTPROC \
   19925              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   19926              xml-tests/test.xml
   19927 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19928 at_status=$? at_failed=false
   19929 $at_check_filter
   19930 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19931 $at_diff expout "$at_stdout" || at_failed=:
   19932 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:72"
   19933 $at_failed && at_fn_log_failure
   19934 $at_traceon; }
   19935 
   19936   sort xml-tests/test.dot > expout
   19937   { set +x
   19938 $as_echo "$at_srcdir/skeletons.at:72: \$XSLTPROC \\
   19939              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   19940              xml-tests/test.xml | sort"
   19941 at_fn_check_prepare_notrace 'a `...` command substitution' "skeletons.at:72"
   19942 ( $at_check_trace; $XSLTPROC \
   19943              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   19944              xml-tests/test.xml | sort
   19945 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19946 at_status=$? at_failed=false
   19947 $at_check_filter
   19948 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19949 $at_diff expout "$at_stdout" || at_failed=:
   19950 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:72"
   19951 $at_failed && at_fn_log_failure
   19952 $at_traceon; }
   19953 
   19954   rm -rf xml-tests expout
   19955   at_restore_special_files
   19956 fi
   19957 { set +x
   19958 $as_echo "$at_srcdir/skeletons.at:72: bison --skeleton=tmp/skel.c tmp/input-cmd-line.y"
   19959 at_fn_check_prepare_trace "skeletons.at:72"
   19960 ( $at_check_trace; bison --skeleton=tmp/skel.c tmp/input-cmd-line.y
   19961 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19962 at_status=$? at_failed=false
   19963 $at_check_filter
   19964 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19965 at_fn_diff_devnull "$at_stdout" || at_failed=:
   19966 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:72"
   19967 $at_failed && at_fn_log_failure
   19968 $at_traceon; }
   19969 
   19970 
   19971 { set +x
   19972 $as_echo "$at_srcdir/skeletons.at:73: cat input-cmd-line.tab.c"
   19973 at_fn_check_prepare_trace "skeletons.at:73"
   19974 ( $at_check_trace; cat input-cmd-line.tab.c
   19975 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   19976 at_status=$? at_failed=false
   19977 $at_check_filter
   19978 at_fn_diff_devnull "$at_stderr" || at_failed=:
   19979 echo >>"$at_stdout"; $as_echo "Hello World
   19980 " | \
   19981   $at_diff - "$at_stdout" || at_failed=:
   19982 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:73"
   19983 $at_failed && at_fn_log_failure
   19984 $at_traceon; }
   19985 
   19986 
   19987   set +x
   19988   $at_times_p && times >"$at_times_file"
   19989 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   19990 read at_status <"$at_status_file"
   19991 #AT_STOP_92
   19992 #AT_START_93
   19993 at_fn_group_banner 93 'skeletons.at:84' \
   19994   "Installed skeleton file names" "                  " 4
   19995 at_xfail=no
   19996 (
   19997   $as_echo "93. $at_setup_line: testing $at_desc ..."
   19998   $at_traceon
   19999 
   20000 
   20001 
   20002 
   20003 
   20004 cat >input-cmd-line.y <<'_ATEOF'
   20005 %code top {
   20006 #include <config.h>
   20007 /* We don't need perfect functions for these tests. */
   20008 #undef malloc
   20009 #undef memcmp
   20010 #undef realloc
   20011 }
   20012 
   20013 %{
   20014   #include <stdio.h>
   20015   static void yyerror ( const char *msg);
   20016   int yylex (void);
   20017 %}
   20018 
   20019 %error-verbose
   20020 %token 'a'
   20021 
   20022 %%
   20023 
   20024 start: ;
   20025 
   20026 %%
   20027 
   20028 #include <stdio.h>
   20029 /* A C error reporting function.  */
   20030 static
   20031 void yyerror ( const char *msg)
   20032 {
   20033   fprintf (stderr, "%s\n", msg);
   20034 }
   20035 int
   20036 yylex (void)
   20037 {
   20038   return 'a';
   20039 }
   20040 
   20041 int
   20042 main (void)
   20043 {
   20044   return yyparse ();
   20045 }
   20046 _ATEOF
   20047 
   20048 
   20049 
   20050 cat >input-gram.y <<'_ATEOF'
   20051 %code top {
   20052 #include <config.h>
   20053 /* We don't need perfect functions for these tests. */
   20054 #undef malloc
   20055 #undef memcmp
   20056 #undef realloc
   20057 }
   20058 
   20059 %skeleton "yacc.c"
   20060 %{
   20061   #include <stdio.h>
   20062   static void yyerror ( const char *msg);
   20063   int yylex (void);
   20064 %}
   20065 
   20066 %error-verbose
   20067 %token 'a'
   20068 
   20069 %%
   20070 
   20071 start: ;
   20072 
   20073 %%
   20074 
   20075 #include <stdio.h>
   20076 /* A C error reporting function.  */
   20077 static
   20078 void yyerror ( const char *msg)
   20079 {
   20080   fprintf (stderr, "%s\n", msg);
   20081 }
   20082 int
   20083 yylex (void)
   20084 {
   20085   return 'a';
   20086 }
   20087 
   20088 int
   20089 main (void)
   20090 {
   20091   return yyparse ();
   20092 }
   20093 _ATEOF
   20094 
   20095 
   20096 
   20097 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   20098   at_save_special_files
   20099   mkdir xml-tests
   20100     # Don't combine these Bison invocations since we want to be sure that
   20101   # --report=all isn't required to get the full XML file.
   20102   { set +x
   20103 $as_echo "$at_srcdir/skeletons.at:124: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   20104                   --graph=xml-tests/test.dot --skeleton=yacc.c -o input-cmd-line.c input-cmd-line.y"
   20105 at_fn_check_prepare_notrace 'an embedded newline' "skeletons.at:124"
   20106 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   20107                   --graph=xml-tests/test.dot --skeleton=yacc.c -o input-cmd-line.c input-cmd-line.y
   20108 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20109 at_status=$? at_failed=false
   20110 $at_check_filter
   20111 echo stderr:; cat "$at_stderr"
   20112 echo stdout:; cat "$at_stdout"
   20113 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:124"
   20114 $at_failed && at_fn_log_failure
   20115 $at_traceon; }
   20116 
   20117   { set +x
   20118 $as_echo "$at_srcdir/skeletons.at:124: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --skeleton=yacc.c -o input-cmd-line.c input-cmd-line.y"
   20119 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --skeleton=yacc.c -o input-cmd-line.c input-cmd-line.y" "skeletons.at:124"
   20120 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --skeleton=yacc.c -o input-cmd-line.c input-cmd-line.y
   20121 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20122 at_status=$? at_failed=false
   20123 $at_check_filter
   20124 echo stderr:; cat "$at_stderr"
   20125 echo stdout:; cat "$at_stdout"
   20126 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:124"
   20127 $at_failed && at_fn_log_failure
   20128 $at_traceon; }
   20129 
   20130     cp xml-tests/test.output expout
   20131   { set +x
   20132 $as_echo "$at_srcdir/skeletons.at:124: \$XSLTPROC \\
   20133              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   20134              xml-tests/test.xml"
   20135 at_fn_check_prepare_notrace 'a `...` command substitution' "skeletons.at:124"
   20136 ( $at_check_trace; $XSLTPROC \
   20137              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   20138              xml-tests/test.xml
   20139 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20140 at_status=$? at_failed=false
   20141 $at_check_filter
   20142 at_fn_diff_devnull "$at_stderr" || at_failed=:
   20143 $at_diff expout "$at_stdout" || at_failed=:
   20144 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:124"
   20145 $at_failed && at_fn_log_failure
   20146 $at_traceon; }
   20147 
   20148   sort xml-tests/test.dot > expout
   20149   { set +x
   20150 $as_echo "$at_srcdir/skeletons.at:124: \$XSLTPROC \\
   20151              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   20152              xml-tests/test.xml | sort"
   20153 at_fn_check_prepare_notrace 'a `...` command substitution' "skeletons.at:124"
   20154 ( $at_check_trace; $XSLTPROC \
   20155              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   20156              xml-tests/test.xml | sort
   20157 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20158 at_status=$? at_failed=false
   20159 $at_check_filter
   20160 at_fn_diff_devnull "$at_stderr" || at_failed=:
   20161 $at_diff expout "$at_stdout" || at_failed=:
   20162 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:124"
   20163 $at_failed && at_fn_log_failure
   20164 $at_traceon; }
   20165 
   20166   rm -rf xml-tests expout
   20167   at_restore_special_files
   20168 fi
   20169 { set +x
   20170 $as_echo "$at_srcdir/skeletons.at:124: bison --skeleton=yacc.c -o input-cmd-line.c input-cmd-line.y"
   20171 at_fn_check_prepare_trace "skeletons.at:124"
   20172 ( $at_check_trace; bison --skeleton=yacc.c -o input-cmd-line.c input-cmd-line.y
   20173 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20174 at_status=$? at_failed=false
   20175 $at_check_filter
   20176 at_fn_diff_devnull "$at_stderr" || at_failed=:
   20177 at_fn_diff_devnull "$at_stdout" || at_failed=:
   20178 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:124"
   20179 $at_failed && at_fn_log_failure
   20180 $at_traceon; }
   20181 
   20182 
   20183 { set +x
   20184 $as_echo "$at_srcdir/skeletons.at:125: \$BISON_C_WORKS"
   20185 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "skeletons.at:125"
   20186 ( $at_check_trace; $BISON_C_WORKS
   20187 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20188 at_status=$? at_failed=false
   20189 $at_check_filter
   20190 echo stderr:; cat "$at_stderr"
   20191 echo stdout:; cat "$at_stdout"
   20192 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:125"
   20193 $at_failed && at_fn_log_failure
   20194 $at_traceon; }
   20195 
   20196 { set +x
   20197 $as_echo "$at_srcdir/skeletons.at:125: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input-cmd-line input-cmd-line.c \$LIBS"
   20198 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input-cmd-line input-cmd-line.c $LIBS" "skeletons.at:125"
   20199 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input-cmd-line input-cmd-line.c $LIBS
   20200 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20201 at_status=$? at_failed=false
   20202 $at_check_filter
   20203 echo stderr:; cat "$at_stderr"
   20204 echo stdout:; cat "$at_stdout"
   20205 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:125"
   20206 $at_failed && at_fn_log_failure
   20207 $at_traceon; }
   20208 
   20209 { set +x
   20210 $as_echo "$at_srcdir/skeletons.at:126:  \$PREPARSER ./input-cmd-line"
   20211 at_fn_check_prepare_dynamic " $PREPARSER ./input-cmd-line" "skeletons.at:126"
   20212 ( $at_check_trace;  $PREPARSER ./input-cmd-line
   20213 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20214 at_status=$? at_failed=false
   20215 $at_check_filter
   20216 echo stderr:; tee stderr <"$at_stderr"
   20217 at_fn_diff_devnull "$at_stdout" || at_failed=:
   20218 at_fn_check_status 1 $at_status "$at_srcdir/skeletons.at:126"
   20219 $at_failed && at_fn_log_failure
   20220 $at_traceon; }
   20221 
   20222 { set +x
   20223 $as_echo "$at_srcdir/skeletons.at:126: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   20224 at_fn_check_prepare_trace "skeletons.at:126"
   20225 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   20226 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20227 at_status=$? at_failed=false
   20228 $at_check_filter
   20229 echo >>"$at_stderr"; $as_echo "syntax error, unexpected 'a', expecting \$end
   20230 " | \
   20231   $at_diff - "$at_stderr" || at_failed=:
   20232 at_fn_diff_devnull "$at_stdout" || at_failed=:
   20233 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:126"
   20234 $at_failed && at_fn_log_failure
   20235 $at_traceon; }
   20236 
   20237 
   20238 
   20239 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   20240   at_save_special_files
   20241   mkdir xml-tests
   20242     # Don't combine these Bison invocations since we want to be sure that
   20243   # --report=all isn't required to get the full XML file.
   20244   { set +x
   20245 $as_echo "$at_srcdir/skeletons.at:130: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   20246                   --graph=xml-tests/test.dot -o input-gram.c input-gram.y"
   20247 at_fn_check_prepare_notrace 'an embedded newline' "skeletons.at:130"
   20248 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   20249                   --graph=xml-tests/test.dot -o input-gram.c input-gram.y
   20250 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20251 at_status=$? at_failed=false
   20252 $at_check_filter
   20253 echo stderr:; cat "$at_stderr"
   20254 echo stdout:; cat "$at_stdout"
   20255 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:130"
   20256 $at_failed && at_fn_log_failure
   20257 $at_traceon; }
   20258 
   20259   { set +x
   20260 $as_echo "$at_srcdir/skeletons.at:130: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input-gram.c input-gram.y"
   20261 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input-gram.c input-gram.y" "skeletons.at:130"
   20262 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input-gram.c input-gram.y
   20263 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20264 at_status=$? at_failed=false
   20265 $at_check_filter
   20266 echo stderr:; cat "$at_stderr"
   20267 echo stdout:; cat "$at_stdout"
   20268 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:130"
   20269 $at_failed && at_fn_log_failure
   20270 $at_traceon; }
   20271 
   20272     cp xml-tests/test.output expout
   20273   { set +x
   20274 $as_echo "$at_srcdir/skeletons.at:130: \$XSLTPROC \\
   20275              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   20276              xml-tests/test.xml"
   20277 at_fn_check_prepare_notrace 'a `...` command substitution' "skeletons.at:130"
   20278 ( $at_check_trace; $XSLTPROC \
   20279              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   20280              xml-tests/test.xml
   20281 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20282 at_status=$? at_failed=false
   20283 $at_check_filter
   20284 at_fn_diff_devnull "$at_stderr" || at_failed=:
   20285 $at_diff expout "$at_stdout" || at_failed=:
   20286 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:130"
   20287 $at_failed && at_fn_log_failure
   20288 $at_traceon; }
   20289 
   20290   sort xml-tests/test.dot > expout
   20291   { set +x
   20292 $as_echo "$at_srcdir/skeletons.at:130: \$XSLTPROC \\
   20293              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   20294              xml-tests/test.xml | sort"
   20295 at_fn_check_prepare_notrace 'a `...` command substitution' "skeletons.at:130"
   20296 ( $at_check_trace; $XSLTPROC \
   20297              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   20298              xml-tests/test.xml | sort
   20299 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20300 at_status=$? at_failed=false
   20301 $at_check_filter
   20302 at_fn_diff_devnull "$at_stderr" || at_failed=:
   20303 $at_diff expout "$at_stdout" || at_failed=:
   20304 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:130"
   20305 $at_failed && at_fn_log_failure
   20306 $at_traceon; }
   20307 
   20308   rm -rf xml-tests expout
   20309   at_restore_special_files
   20310 fi
   20311 { set +x
   20312 $as_echo "$at_srcdir/skeletons.at:130: bison -o input-gram.c input-gram.y"
   20313 at_fn_check_prepare_trace "skeletons.at:130"
   20314 ( $at_check_trace; bison -o input-gram.c input-gram.y
   20315 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20316 at_status=$? at_failed=false
   20317 $at_check_filter
   20318 at_fn_diff_devnull "$at_stderr" || at_failed=:
   20319 at_fn_diff_devnull "$at_stdout" || at_failed=:
   20320 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:130"
   20321 $at_failed && at_fn_log_failure
   20322 $at_traceon; }
   20323 
   20324 
   20325 { set +x
   20326 $as_echo "$at_srcdir/skeletons.at:131: \$BISON_C_WORKS"
   20327 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "skeletons.at:131"
   20328 ( $at_check_trace; $BISON_C_WORKS
   20329 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20330 at_status=$? at_failed=false
   20331 $at_check_filter
   20332 echo stderr:; cat "$at_stderr"
   20333 echo stdout:; cat "$at_stdout"
   20334 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:131"
   20335 $at_failed && at_fn_log_failure
   20336 $at_traceon; }
   20337 
   20338 { set +x
   20339 $as_echo "$at_srcdir/skeletons.at:131: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input-gram input-gram.c \$LIBS"
   20340 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input-gram input-gram.c $LIBS" "skeletons.at:131"
   20341 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input-gram input-gram.c $LIBS
   20342 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20343 at_status=$? at_failed=false
   20344 $at_check_filter
   20345 echo stderr:; cat "$at_stderr"
   20346 echo stdout:; cat "$at_stdout"
   20347 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:131"
   20348 $at_failed && at_fn_log_failure
   20349 $at_traceon; }
   20350 
   20351 { set +x
   20352 $as_echo "$at_srcdir/skeletons.at:132:  \$PREPARSER ./input-gram"
   20353 at_fn_check_prepare_dynamic " $PREPARSER ./input-gram" "skeletons.at:132"
   20354 ( $at_check_trace;  $PREPARSER ./input-gram
   20355 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20356 at_status=$? at_failed=false
   20357 $at_check_filter
   20358 echo stderr:; tee stderr <"$at_stderr"
   20359 at_fn_diff_devnull "$at_stdout" || at_failed=:
   20360 at_fn_check_status 1 $at_status "$at_srcdir/skeletons.at:132"
   20361 $at_failed && at_fn_log_failure
   20362 $at_traceon; }
   20363 
   20364 { set +x
   20365 $as_echo "$at_srcdir/skeletons.at:132: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   20366 at_fn_check_prepare_trace "skeletons.at:132"
   20367 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   20368 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20369 at_status=$? at_failed=false
   20370 $at_check_filter
   20371 echo >>"$at_stderr"; $as_echo "syntax error, unexpected 'a', expecting \$end
   20372 " | \
   20373   $at_diff - "$at_stderr" || at_failed=:
   20374 at_fn_diff_devnull "$at_stdout" || at_failed=:
   20375 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:132"
   20376 $at_failed && at_fn_log_failure
   20377 $at_traceon; }
   20378 
   20379 
   20380 
   20381 
   20382 
   20383 
   20384   set +x
   20385   $at_times_p && times >"$at_times_file"
   20386 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   20387 read at_status <"$at_status_file"
   20388 #AT_STOP_93
   20389 #AT_START_94
   20390 at_fn_group_banner 94 'skeletons.at:146' \
   20391   "%define Boolean variables: invalid skeleton defaults" "" 4
   20392 at_xfail=no
   20393 (
   20394   $as_echo "94. $at_setup_line: testing $at_desc ..."
   20395   $at_traceon
   20396 
   20397 
   20398 cat >skel.c <<'_ATEOF'
   20399 b4_percent_define_default([[foo]], [[bogus value]])
   20400 b4_percent_define_flag_if([[foo]])
   20401 _ATEOF
   20402 
   20403 
   20404 cat >input.y <<'_ATEOF'
   20405 %skeleton "./skel.c"
   20406 %%
   20407 start: ;
   20408 _ATEOF
   20409 
   20410 
   20411 
   20412 { set +x
   20413 $as_echo "$at_srcdir/skeletons.at:159: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   20414 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "skeletons.at:159"
   20415 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   20416 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20417 at_status=$? at_failed=false
   20418 $at_check_filter
   20419 echo >>"$at_stderr"; $as_echo "<skeleton default value>: error: invalid value for %define Boolean variable 'foo'
   20420 " | \
   20421   $at_diff - "$at_stderr" || at_failed=:
   20422 at_fn_diff_devnull "$at_stdout" || at_failed=:
   20423 at_fn_check_status 1 $at_status "$at_srcdir/skeletons.at:159"
   20424 $at_failed && at_fn_log_failure
   20425 $at_traceon; }
   20426 
   20427 
   20428 
   20429   set +x
   20430   $at_times_p && times >"$at_times_file"
   20431 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   20432 read at_status <"$at_status_file"
   20433 #AT_STOP_94
   20434 #AT_START_95
   20435 at_fn_group_banner 95 'skeletons.at:170' \
   20436   "Complaining during macro argument expansion" "    " 4
   20437 at_xfail=no
   20438 (
   20439   $as_echo "95. $at_setup_line: testing $at_desc ..."
   20440   $at_traceon
   20441 
   20442 
   20443 cat >skel1.c <<'_ATEOF'
   20444 m4_define([foow], [b4_warn([[foow fubar]])])
   20445 m4_define([foowat], [b4_warn_at([[foow.y:2.3]],
   20446                                     [[foow.y:5.4]], [[foowat fubar]])])
   20447 m4_define([fooc], [b4_complain([[fooc fubar]])])
   20448 m4_define([foocat], [b4_complain_at([[fooc.y:1.1]],
   20449                                         [[fooc.y:10.6]], [[foocat fubar]])])
   20450 m4_define([foof], [b4_fatal([[foof fubar]])])
   20451 m4_if(foow, [1], [yes])
   20452 m4_if(foowat, [1], [yes])
   20453 m4_if(fooc, [1], [yes])
   20454 m4_if(foocat, [1], [yes])
   20455 m4_if(foof, [1], [yes])
   20456 _ATEOF
   20457 
   20458 
   20459 cat >input1.y <<'_ATEOF'
   20460 %skeleton "./skel1.c"
   20461 %%
   20462 start: ;
   20463 _ATEOF
   20464 
   20465 
   20466 
   20467 { set +x
   20468 $as_echo "$at_srcdir/skeletons.at:193: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input1.y"
   20469 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input1.y" "skeletons.at:193"
   20470 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input1.y
   20471 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20472 at_status=$? at_failed=false
   20473 $at_check_filter
   20474 echo >>"$at_stderr"; $as_echo "input1.y: warning: foow fubar
   20475 foow.y:2.3-5.3: warning: foowat fubar
   20476 input1.y: error: fooc fubar
   20477 fooc.y:1.1-10.5: error: foocat fubar
   20478 input1.y: fatal error: foof fubar
   20479 " | \
   20480   $at_diff - "$at_stderr" || at_failed=:
   20481 at_fn_diff_devnull "$at_stdout" || at_failed=:
   20482 at_fn_check_status 1 $at_status "$at_srcdir/skeletons.at:193"
   20483 $at_failed && at_fn_log_failure
   20484 $at_traceon; }
   20485 
   20486 
   20487 
   20488 cat >skel2.c <<'_ATEOF'
   20489 m4_define([foofat], [b4_fatal_at([[foof.y:12.11]],
   20490                                        [[foof.y:100.123]], [[foofat fubar]])])
   20491 m4_if(foofat, [1], [yes])
   20492 _ATEOF
   20493 
   20494 
   20495 cat >input2.y <<'_ATEOF'
   20496 %skeleton "./skel2.c"
   20497 %%
   20498 start: ;
   20499 _ATEOF
   20500 
   20501 
   20502 
   20503 { set +x
   20504 $as_echo "$at_srcdir/skeletons.at:213: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input2.y"
   20505 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input2.y" "skeletons.at:213"
   20506 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input2.y
   20507 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20508 at_status=$? at_failed=false
   20509 $at_check_filter
   20510 echo >>"$at_stderr"; $as_echo "foof.y:12.11-100.122: fatal error: foofat fubar
   20511 " | \
   20512   $at_diff - "$at_stderr" || at_failed=:
   20513 at_fn_diff_devnull "$at_stdout" || at_failed=:
   20514 at_fn_check_status 1 $at_status "$at_srcdir/skeletons.at:213"
   20515 $at_failed && at_fn_log_failure
   20516 $at_traceon; }
   20517 
   20518 
   20519 
   20520 cat >skel3.c <<'_ATEOF'
   20521 b4_complain_at(b4_percent_define_get_loc([[bogus]]), [[bad value]])
   20522 _ATEOF
   20523 
   20524 
   20525 cat >input3.y <<'_ATEOF'
   20526 %skeleton "./skel3.c"
   20527 %%
   20528 start: ;
   20529 _ATEOF
   20530 
   20531 
   20532 
   20533 { set +x
   20534 $as_echo "$at_srcdir/skeletons.at:227: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input3.y"
   20535 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input3.y" "skeletons.at:227"
   20536 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input3.y
   20537 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20538 at_status=$? at_failed=false
   20539 $at_check_filter
   20540 echo >>"$at_stderr"; $as_echo "input3.y: fatal error: b4_percent_define_get_loc: undefined %define variable 'bogus'
   20541 " | \
   20542   $at_diff - "$at_stderr" || at_failed=:
   20543 at_fn_diff_devnull "$at_stdout" || at_failed=:
   20544 at_fn_check_status 1 $at_status "$at_srcdir/skeletons.at:227"
   20545 $at_failed && at_fn_log_failure
   20546 $at_traceon; }
   20547 
   20548 
   20549 
   20550 cat >skel4.c <<'_ATEOF'
   20551 b4_warn_at(b4_percent_define_get_syncline([[bogus]]), [[bad value]])
   20552 _ATEOF
   20553 
   20554 
   20555 cat >input4.y <<'_ATEOF'
   20556 %skeleton "./skel4.c"
   20557 %%
   20558 start: ;
   20559 _ATEOF
   20560 
   20561 
   20562 
   20563 { set +x
   20564 $as_echo "$at_srcdir/skeletons.at:241: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input4.y"
   20565 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input4.y" "skeletons.at:241"
   20566 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input4.y
   20567 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20568 at_status=$? at_failed=false
   20569 $at_check_filter
   20570 echo >>"$at_stderr"; $as_echo "input4.y: fatal error: b4_percent_define_get_syncline: undefined %define variable 'bogus'
   20571 " | \
   20572   $at_diff - "$at_stderr" || at_failed=:
   20573 at_fn_diff_devnull "$at_stdout" || at_failed=:
   20574 at_fn_check_status 1 $at_status "$at_srcdir/skeletons.at:241"
   20575 $at_failed && at_fn_log_failure
   20576 $at_traceon; }
   20577 
   20578 
   20579 
   20580   set +x
   20581   $at_times_p && times >"$at_times_file"
   20582 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   20583 read at_status <"$at_status_file"
   20584 #AT_STOP_95
   20585 #AT_START_96
   20586 at_fn_group_banner 96 'skeletons.at:252' \
   20587   "Fatal errors make M4 exit immediately" "          " 4
   20588 at_xfail=no
   20589 (
   20590   $as_echo "96. $at_setup_line: testing $at_desc ..."
   20591   $at_traceon
   20592 
   20593 
   20594 cat >skel1.c <<'_ATEOF'
   20595 b4_complain([[non-fatal error]])
   20596 b4_fatal([[M4 should exit immediately here]])
   20597 m4_fatal([this should never be evaluated])
   20598 _ATEOF
   20599 
   20600 
   20601 cat >input1.y <<'_ATEOF'
   20602 %skeleton "./skel1.c"
   20603 %%
   20604 start: ;
   20605 _ATEOF
   20606 
   20607 
   20608 
   20609 { set +x
   20610 $as_echo "$at_srcdir/skeletons.at:266: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input1.y"
   20611 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input1.y" "skeletons.at:266"
   20612 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input1.y
   20613 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20614 at_status=$? at_failed=false
   20615 $at_check_filter
   20616 echo >>"$at_stderr"; $as_echo "input1.y: error: non-fatal error
   20617 input1.y: fatal error: M4 should exit immediately here
   20618 " | \
   20619   $at_diff - "$at_stderr" || at_failed=:
   20620 at_fn_diff_devnull "$at_stdout" || at_failed=:
   20621 at_fn_check_status 1 $at_status "$at_srcdir/skeletons.at:266"
   20622 $at_failed && at_fn_log_failure
   20623 $at_traceon; }
   20624 
   20625 
   20626 
   20627 cat >skel2.c <<'_ATEOF'
   20628 b4_warn([[morning]])
   20629 b4_fatal_at([[foo.y:1.5]], [[foo.y:1.7]], [[M4 should exit immediately here]])
   20630 m4_fatal([this should never be evaluated])
   20631 _ATEOF
   20632 
   20633 
   20634 cat >input2.y <<'_ATEOF'
   20635 %skeleton "./skel2.c"
   20636 %%
   20637 start: ;
   20638 _ATEOF
   20639 
   20640 
   20641 
   20642 { set +x
   20643 $as_echo "$at_srcdir/skeletons.at:283: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input2.y"
   20644 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input2.y" "skeletons.at:283"
   20645 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input2.y
   20646 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20647 at_status=$? at_failed=false
   20648 $at_check_filter
   20649 echo >>"$at_stderr"; $as_echo "input2.y: warning: morning
   20650 foo.y:1.5-6: fatal error: M4 should exit immediately here
   20651 " | \
   20652   $at_diff - "$at_stderr" || at_failed=:
   20653 at_fn_diff_devnull "$at_stdout" || at_failed=:
   20654 at_fn_check_status 1 $at_status "$at_srcdir/skeletons.at:283"
   20655 $at_failed && at_fn_log_failure
   20656 $at_traceon; }
   20657 
   20658 
   20659 
   20660   set +x
   20661   $at_times_p && times >"$at_times_file"
   20662 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   20663 read at_status <"$at_status_file"
   20664 #AT_STOP_96
   20665 #AT_START_97
   20666 at_fn_group_banner 97 'skeletons.at:306' \
   20667   "Fatal errors but M4 continues producing output" " " 4
   20668 at_xfail=no
   20669 (
   20670   $as_echo "97. $at_setup_line: testing $at_desc ..."
   20671   $at_traceon
   20672 
   20673 
   20674 cat >gen-skel.pl <<'_ATEOF'
   20675 use warnings;
   20676 use strict;
   20677 my $M4 = "m4";
   20678 my $DNL = "d"."nl";
   20679 print "${M4}_divert_push(0)$DNL\n";
   20680 print '@output(@,@)', "\n";
   20681 (print "garbage"x10, "\n") for (1..1000);
   20682 print "${M4}_divert_pop(0)\n";
   20683 _ATEOF
   20684 
   20685 { set +x
   20686 $as_echo "$at_srcdir/skeletons.at:318: \$PERL gen-skel.pl > skel.c || exit 77"
   20687 at_fn_check_prepare_dynamic "$PERL gen-skel.pl > skel.c || exit 77" "skeletons.at:318"
   20688 ( $at_check_trace; $PERL gen-skel.pl > skel.c || exit 77
   20689 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20690 at_status=$? at_failed=false
   20691 $at_check_filter
   20692 at_fn_diff_devnull "$at_stderr" || at_failed=:
   20693 at_fn_diff_devnull "$at_stdout" || at_failed=:
   20694 at_fn_check_status 0 $at_status "$at_srcdir/skeletons.at:318"
   20695 $at_failed && at_fn_log_failure
   20696 $at_traceon; }
   20697 
   20698 
   20699 cat >input.y <<'_ATEOF'
   20700 %skeleton "./skel.c"
   20701 %%
   20702 start: ;
   20703 _ATEOF
   20704 
   20705 
   20706 
   20707 { set +x
   20708 $as_echo "$at_srcdir/skeletons.at:326: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   20709 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "skeletons.at:326"
   20710 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   20711 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20712 at_status=$? at_failed=false
   20713 $at_check_filter
   20714 echo >>"$at_stderr"; $as_echo "input.y: fatal error: too many arguments for @output directive in skeleton
   20715 " | \
   20716   $at_diff - "$at_stderr" || at_failed=:
   20717 at_fn_diff_devnull "$at_stdout" || at_failed=:
   20718 at_fn_check_status 1 $at_status "$at_srcdir/skeletons.at:326"
   20719 $at_failed && at_fn_log_failure
   20720 $at_traceon; }
   20721 
   20722 
   20723 
   20724   set +x
   20725   $at_times_p && times >"$at_times_file"
   20726 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   20727 read at_status <"$at_status_file"
   20728 #AT_STOP_97
   20729 #AT_START_98
   20730 at_fn_group_banner 98 'sets.at:66' \
   20731   "Nullable" "                                       " 5
   20732 at_xfail=no
   20733 (
   20734   $as_echo "98. $at_setup_line: testing $at_desc ..."
   20735   $at_traceon
   20736 
   20737 
   20738 # At some point, nullable had been smoking grass, and managed to say:
   20739 #
   20740 # Entering set_nullable
   20741 # NULLABLE
   20742 #         'e': yes
   20743 #         (null): no
   20744 # ...
   20745 
   20746 cat >input.y <<'_ATEOF'
   20747 %%
   20748 e: 'e' | /* Nothing */;
   20749 _ATEOF
   20750 
   20751 
   20752 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   20753   at_save_special_files
   20754   mkdir xml-tests
   20755     # Don't combine these Bison invocations since we want to be sure that
   20756   # --report=all isn't required to get the full XML file.
   20757   { set +x
   20758 $as_echo "$at_srcdir/sets.at:81: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   20759                   --graph=xml-tests/test.dot --trace=sets input.y"
   20760 at_fn_check_prepare_notrace 'an embedded newline' "sets.at:81"
   20761 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   20762                   --graph=xml-tests/test.dot --trace=sets input.y
   20763 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20764 at_status=$? at_failed=false
   20765 $at_check_filter
   20766 echo stderr:; cat "$at_stderr"
   20767 echo stdout:; cat "$at_stdout"
   20768 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:81"
   20769 $at_failed && at_fn_log_failure
   20770 $at_traceon; }
   20771 
   20772   { set +x
   20773 $as_echo "$at_srcdir/sets.at:81: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --trace=sets input.y"
   20774 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --trace=sets input.y" "sets.at:81"
   20775 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --trace=sets input.y
   20776 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20777 at_status=$? at_failed=false
   20778 $at_check_filter
   20779 echo stderr:; cat "$at_stderr"
   20780 echo stdout:; cat "$at_stdout"
   20781 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:81"
   20782 $at_failed && at_fn_log_failure
   20783 $at_traceon; }
   20784 
   20785     cp xml-tests/test.output expout
   20786   { set +x
   20787 $as_echo "$at_srcdir/sets.at:81: \$XSLTPROC \\
   20788              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   20789              xml-tests/test.xml"
   20790 at_fn_check_prepare_notrace 'a `...` command substitution' "sets.at:81"
   20791 ( $at_check_trace; $XSLTPROC \
   20792              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   20793              xml-tests/test.xml
   20794 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20795 at_status=$? at_failed=false
   20796 $at_check_filter
   20797 at_fn_diff_devnull "$at_stderr" || at_failed=:
   20798 $at_diff expout "$at_stdout" || at_failed=:
   20799 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:81"
   20800 $at_failed && at_fn_log_failure
   20801 $at_traceon; }
   20802 
   20803   sort xml-tests/test.dot > expout
   20804   { set +x
   20805 $as_echo "$at_srcdir/sets.at:81: \$XSLTPROC \\
   20806              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   20807              xml-tests/test.xml | sort"
   20808 at_fn_check_prepare_notrace 'a `...` command substitution' "sets.at:81"
   20809 ( $at_check_trace; $XSLTPROC \
   20810              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   20811              xml-tests/test.xml | sort
   20812 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20813 at_status=$? at_failed=false
   20814 $at_check_filter
   20815 at_fn_diff_devnull "$at_stderr" || at_failed=:
   20816 $at_diff expout "$at_stdout" || at_failed=:
   20817 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:81"
   20818 $at_failed && at_fn_log_failure
   20819 $at_traceon; }
   20820 
   20821   rm -rf xml-tests expout
   20822   at_restore_special_files
   20823 fi
   20824 { set +x
   20825 $as_echo "$at_srcdir/sets.at:81: bison --trace=sets input.y"
   20826 at_fn_check_prepare_trace "sets.at:81"
   20827 ( $at_check_trace; bison --trace=sets input.y
   20828 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20829 at_status=$? at_failed=false
   20830 $at_check_filter
   20831 echo stderr:; tee stderr <"$at_stderr"
   20832 at_fn_diff_devnull "$at_stdout" || at_failed=:
   20833 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:81"
   20834 $at_failed && at_fn_log_failure
   20835 $at_traceon; }
   20836 
   20837 
   20838 cat >extract.sed <<'_ATEOF'
   20839 #n
   20840 /^NULLABLE$/ {
   20841    :null
   20842    p
   20843    n
   20844    /^[	 ]*$/ !b null
   20845 }
   20846 /^FIRSTS$/ {
   20847    :firsts
   20848    p
   20849    n
   20850    /^[	 ]*$/ !b firsts
   20851 }
   20852 /^FDERIVES$/ {
   20853    :fderiv
   20854    p
   20855    n
   20856    /^[	 ]*$/ !b fderiv
   20857 }
   20858 /^DERIVES$/ {
   20859    :deriv
   20860    p
   20861    n
   20862    /^[	 ]*$/ !b deriv
   20863 }
   20864 _ATEOF
   20865 
   20866 { set +x
   20867 $as_echo "$at_srcdir/sets.at:82: sed -f extract.sed stderr"
   20868 at_fn_check_prepare_trace "sets.at:82"
   20869 ( $at_check_trace; sed -f extract.sed stderr
   20870 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20871 at_status=$? at_failed=false
   20872 $at_check_filter
   20873 at_fn_diff_devnull "$at_stderr" || at_failed=:
   20874 echo stdout:; tee stdout <"$at_stdout"
   20875 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:82"
   20876 $at_failed && at_fn_log_failure
   20877 $at_traceon; }
   20878 
   20879 { set +x
   20880 $as_echo "$at_srcdir/sets.at:82: mv stdout sets"
   20881 at_fn_check_prepare_trace "sets.at:82"
   20882 ( $at_check_trace; mv stdout sets
   20883 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20884 at_status=$? at_failed=false
   20885 $at_check_filter
   20886 at_fn_diff_devnull "$at_stderr" || at_failed=:
   20887 at_fn_diff_devnull "$at_stdout" || at_failed=:
   20888 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:82"
   20889 $at_failed && at_fn_log_failure
   20890 $at_traceon; }
   20891 
   20892 
   20893 { set +x
   20894 $as_echo "$at_srcdir/sets.at:83: cat sets"
   20895 at_fn_check_prepare_trace "sets.at:83"
   20896 ( $at_check_trace; cat sets
   20897 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20898 at_status=$? at_failed=false
   20899 $at_check_filter
   20900 at_fn_diff_devnull "$at_stderr" || at_failed=:
   20901 echo >>"$at_stdout"; $as_echo "DERIVES
   20902 	\$accept derives
   20903 		  0  e \$end
   20904 	e derives
   20905 		  1  'e'
   20906 		  2  /* empty */
   20907 NULLABLE
   20908 	\$accept: no
   20909 	e: yes
   20910 FIRSTS
   20911 	\$accept firsts
   20912 		\$accept
   20913 		e
   20914 	e firsts
   20915 		e
   20916 FDERIVES
   20917 	\$accept derives
   20918 		  0  e \$end
   20919 		  1  'e'
   20920 		  2  /* empty */
   20921 	e derives
   20922 		  1  'e'
   20923 		  2  /* empty */
   20924 " | \
   20925   $at_diff - "$at_stdout" || at_failed=:
   20926 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:83"
   20927 $at_failed && at_fn_log_failure
   20928 $at_traceon; }
   20929 
   20930 
   20931   set +x
   20932   $at_times_p && times >"$at_times_file"
   20933 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   20934 read at_status <"$at_status_file"
   20935 #AT_STOP_98
   20936 #AT_START_99
   20937 at_fn_group_banner 99 'sets.at:151' \
   20938   "Broken Closure" "                                 " 5
   20939 at_xfail=no
   20940 (
   20941   $as_echo "99. $at_setup_line: testing $at_desc ..."
   20942   $at_traceon
   20943 
   20944 
   20945 cat >input.y <<'_ATEOF'
   20946 %%
   20947 a: b;
   20948 b: c;
   20949 c: d;
   20950 d: e;
   20951 e: f;
   20952 f: g;
   20953 g: h;
   20954 h: 'h';
   20955 _ATEOF
   20956 
   20957 
   20958 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   20959   at_save_special_files
   20960   mkdir xml-tests
   20961     # Don't combine these Bison invocations since we want to be sure that
   20962   # --report=all isn't required to get the full XML file.
   20963   { set +x
   20964 $as_echo "$at_srcdir/sets.at:165: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   20965                   --graph=xml-tests/test.dot --trace=sets input.y"
   20966 at_fn_check_prepare_notrace 'an embedded newline' "sets.at:165"
   20967 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   20968                   --graph=xml-tests/test.dot --trace=sets input.y
   20969 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20970 at_status=$? at_failed=false
   20971 $at_check_filter
   20972 echo stderr:; cat "$at_stderr"
   20973 echo stdout:; cat "$at_stdout"
   20974 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:165"
   20975 $at_failed && at_fn_log_failure
   20976 $at_traceon; }
   20977 
   20978   { set +x
   20979 $as_echo "$at_srcdir/sets.at:165: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --trace=sets input.y"
   20980 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --trace=sets input.y" "sets.at:165"
   20981 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --trace=sets input.y
   20982 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   20983 at_status=$? at_failed=false
   20984 $at_check_filter
   20985 echo stderr:; cat "$at_stderr"
   20986 echo stdout:; cat "$at_stdout"
   20987 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:165"
   20988 $at_failed && at_fn_log_failure
   20989 $at_traceon; }
   20990 
   20991     cp xml-tests/test.output expout
   20992   { set +x
   20993 $as_echo "$at_srcdir/sets.at:165: \$XSLTPROC \\
   20994              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   20995              xml-tests/test.xml"
   20996 at_fn_check_prepare_notrace 'a `...` command substitution' "sets.at:165"
   20997 ( $at_check_trace; $XSLTPROC \
   20998              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   20999              xml-tests/test.xml
   21000 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21001 at_status=$? at_failed=false
   21002 $at_check_filter
   21003 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21004 $at_diff expout "$at_stdout" || at_failed=:
   21005 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:165"
   21006 $at_failed && at_fn_log_failure
   21007 $at_traceon; }
   21008 
   21009   sort xml-tests/test.dot > expout
   21010   { set +x
   21011 $as_echo "$at_srcdir/sets.at:165: \$XSLTPROC \\
   21012              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   21013              xml-tests/test.xml | sort"
   21014 at_fn_check_prepare_notrace 'a `...` command substitution' "sets.at:165"
   21015 ( $at_check_trace; $XSLTPROC \
   21016              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   21017              xml-tests/test.xml | sort
   21018 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21019 at_status=$? at_failed=false
   21020 $at_check_filter
   21021 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21022 $at_diff expout "$at_stdout" || at_failed=:
   21023 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:165"
   21024 $at_failed && at_fn_log_failure
   21025 $at_traceon; }
   21026 
   21027   rm -rf xml-tests expout
   21028   at_restore_special_files
   21029 fi
   21030 { set +x
   21031 $as_echo "$at_srcdir/sets.at:165: bison --trace=sets input.y"
   21032 at_fn_check_prepare_trace "sets.at:165"
   21033 ( $at_check_trace; bison --trace=sets input.y
   21034 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21035 at_status=$? at_failed=false
   21036 $at_check_filter
   21037 echo stderr:; tee stderr <"$at_stderr"
   21038 at_fn_diff_devnull "$at_stdout" || at_failed=:
   21039 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:165"
   21040 $at_failed && at_fn_log_failure
   21041 $at_traceon; }
   21042 
   21043 
   21044 
   21045 { set +x
   21046 $as_echo "$at_srcdir/sets.at:167: sed -n 's/[	 ]*\$//;/^RTC: Firsts Output BEGIN/,/^RTC: Firsts Output END/p' stderr"
   21047 at_fn_check_prepare_dynamic "sed -n 's/[	 ]*$//;/^RTC: Firsts Output BEGIN/,/^RTC: Firsts Output END/p' stderr" "sets.at:167"
   21048 ( $at_check_trace; sed -n 's/[	 ]*$//;/^RTC: Firsts Output BEGIN/,/^RTC: Firsts Output END/p' stderr
   21049 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21050 at_status=$? at_failed=false
   21051 $at_check_filter
   21052 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21053 echo >>"$at_stdout"; $as_echo "RTC: Firsts Output BEGIN
   21054 
   21055    012345678
   21056   .---------.
   21057  0|111111111|
   21058  1| 11111111|
   21059  2|  1111111|
   21060  3|   111111|
   21061  4|    11111|
   21062  5|     1111|
   21063  6|      111|
   21064  7|       11|
   21065  8|        1|
   21066   \`---------'
   21067 RTC: Firsts Output END
   21068 " | \
   21069   $at_diff - "$at_stdout" || at_failed=:
   21070 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:167"
   21071 $at_failed && at_fn_log_failure
   21072 $at_traceon; }
   21073 
   21074 
   21075   set +x
   21076   $at_times_p && times >"$at_times_file"
   21077 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   21078 read at_status <"$at_status_file"
   21079 #AT_STOP_99
   21080 #AT_START_100
   21081 at_fn_group_banner 100 'sets.at:193' \
   21082   "Firsts" "                                         " 5
   21083 at_xfail=no
   21084 (
   21085   $as_echo "100. $at_setup_line: testing $at_desc ..."
   21086   $at_traceon
   21087 
   21088 
   21089 cat >input.y <<'_ATEOF'
   21090 %nonassoc '<' '>'
   21091 %left '+' '-'
   21092 %right '^' '='
   21093 %%
   21094 exp:
   21095    exp '<' exp
   21096  | exp '>' exp
   21097  | exp '+' exp
   21098  | exp '-' exp
   21099  | exp '^' exp
   21100  | exp '=' exp
   21101  | "exp"
   21102  ;
   21103 _ATEOF
   21104 
   21105 
   21106 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   21107   at_save_special_files
   21108   mkdir xml-tests
   21109     # Don't combine these Bison invocations since we want to be sure that
   21110   # --report=all isn't required to get the full XML file.
   21111   { set +x
   21112 $as_echo "$at_srcdir/sets.at:211: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   21113                   --graph=xml-tests/test.dot --trace=sets input.y"
   21114 at_fn_check_prepare_notrace 'an embedded newline' "sets.at:211"
   21115 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   21116                   --graph=xml-tests/test.dot --trace=sets input.y
   21117 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21118 at_status=$? at_failed=false
   21119 $at_check_filter
   21120 echo stderr:; cat "$at_stderr"
   21121 echo stdout:; cat "$at_stdout"
   21122 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:211"
   21123 $at_failed && at_fn_log_failure
   21124 $at_traceon; }
   21125 
   21126   { set +x
   21127 $as_echo "$at_srcdir/sets.at:211: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --trace=sets input.y"
   21128 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --trace=sets input.y" "sets.at:211"
   21129 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --trace=sets input.y
   21130 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21131 at_status=$? at_failed=false
   21132 $at_check_filter
   21133 echo stderr:; cat "$at_stderr"
   21134 echo stdout:; cat "$at_stdout"
   21135 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:211"
   21136 $at_failed && at_fn_log_failure
   21137 $at_traceon; }
   21138 
   21139     cp xml-tests/test.output expout
   21140   { set +x
   21141 $as_echo "$at_srcdir/sets.at:211: \$XSLTPROC \\
   21142              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   21143              xml-tests/test.xml"
   21144 at_fn_check_prepare_notrace 'a `...` command substitution' "sets.at:211"
   21145 ( $at_check_trace; $XSLTPROC \
   21146              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   21147              xml-tests/test.xml
   21148 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21149 at_status=$? at_failed=false
   21150 $at_check_filter
   21151 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21152 $at_diff expout "$at_stdout" || at_failed=:
   21153 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:211"
   21154 $at_failed && at_fn_log_failure
   21155 $at_traceon; }
   21156 
   21157   sort xml-tests/test.dot > expout
   21158   { set +x
   21159 $as_echo "$at_srcdir/sets.at:211: \$XSLTPROC \\
   21160              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   21161              xml-tests/test.xml | sort"
   21162 at_fn_check_prepare_notrace 'a `...` command substitution' "sets.at:211"
   21163 ( $at_check_trace; $XSLTPROC \
   21164              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   21165              xml-tests/test.xml | sort
   21166 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21167 at_status=$? at_failed=false
   21168 $at_check_filter
   21169 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21170 $at_diff expout "$at_stdout" || at_failed=:
   21171 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:211"
   21172 $at_failed && at_fn_log_failure
   21173 $at_traceon; }
   21174 
   21175   rm -rf xml-tests expout
   21176   at_restore_special_files
   21177 fi
   21178 { set +x
   21179 $as_echo "$at_srcdir/sets.at:211: bison --trace=sets input.y"
   21180 at_fn_check_prepare_trace "sets.at:211"
   21181 ( $at_check_trace; bison --trace=sets input.y
   21182 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21183 at_status=$? at_failed=false
   21184 $at_check_filter
   21185 echo stderr:; tee stderr <"$at_stderr"
   21186 at_fn_diff_devnull "$at_stdout" || at_failed=:
   21187 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:211"
   21188 $at_failed && at_fn_log_failure
   21189 $at_traceon; }
   21190 
   21191 
   21192 cat >extract.sed <<'_ATEOF'
   21193 #n
   21194 /^NULLABLE$/ {
   21195    :null
   21196    p
   21197    n
   21198    /^[	 ]*$/ !b null
   21199 }
   21200 /^FIRSTS$/ {
   21201    :firsts
   21202    p
   21203    n
   21204    /^[	 ]*$/ !b firsts
   21205 }
   21206 /^FDERIVES$/ {
   21207    :fderiv
   21208    p
   21209    n
   21210    /^[	 ]*$/ !b fderiv
   21211 }
   21212 /^DERIVES$/ {
   21213    :deriv
   21214    p
   21215    n
   21216    /^[	 ]*$/ !b deriv
   21217 }
   21218 _ATEOF
   21219 
   21220 { set +x
   21221 $as_echo "$at_srcdir/sets.at:212: sed -f extract.sed stderr"
   21222 at_fn_check_prepare_trace "sets.at:212"
   21223 ( $at_check_trace; sed -f extract.sed stderr
   21224 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21225 at_status=$? at_failed=false
   21226 $at_check_filter
   21227 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21228 echo stdout:; tee stdout <"$at_stdout"
   21229 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:212"
   21230 $at_failed && at_fn_log_failure
   21231 $at_traceon; }
   21232 
   21233 { set +x
   21234 $as_echo "$at_srcdir/sets.at:212: mv stdout sets"
   21235 at_fn_check_prepare_trace "sets.at:212"
   21236 ( $at_check_trace; mv stdout sets
   21237 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21238 at_status=$? at_failed=false
   21239 $at_check_filter
   21240 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21241 at_fn_diff_devnull "$at_stdout" || at_failed=:
   21242 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:212"
   21243 $at_failed && at_fn_log_failure
   21244 $at_traceon; }
   21245 
   21246 
   21247 { set +x
   21248 $as_echo "$at_srcdir/sets.at:213: cat sets"
   21249 at_fn_check_prepare_trace "sets.at:213"
   21250 ( $at_check_trace; cat sets
   21251 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21252 at_status=$? at_failed=false
   21253 $at_check_filter
   21254 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21255 echo >>"$at_stdout"; $as_echo "DERIVES
   21256 	\$accept derives
   21257 		  0  exp \$end
   21258 	exp derives
   21259 		  1  exp '<' exp
   21260 		  2  exp '>' exp
   21261 		  3  exp '+' exp
   21262 		  4  exp '-' exp
   21263 		  5  exp '^' exp
   21264 		  6  exp '=' exp
   21265 		  7  \"exp\"
   21266 NULLABLE
   21267 	\$accept: no
   21268 	exp: no
   21269 FIRSTS
   21270 	\$accept firsts
   21271 		\$accept
   21272 		exp
   21273 	exp firsts
   21274 		exp
   21275 FDERIVES
   21276 	\$accept derives
   21277 		  0  exp \$end
   21278 		  1  exp '<' exp
   21279 		  2  exp '>' exp
   21280 		  3  exp '+' exp
   21281 		  4  exp '-' exp
   21282 		  5  exp '^' exp
   21283 		  6  exp '=' exp
   21284 		  7  \"exp\"
   21285 	exp derives
   21286 		  1  exp '<' exp
   21287 		  2  exp '>' exp
   21288 		  3  exp '+' exp
   21289 		  4  exp '-' exp
   21290 		  5  exp '^' exp
   21291 		  6  exp '=' exp
   21292 		  7  \"exp\"
   21293 " | \
   21294   $at_diff - "$at_stdout" || at_failed=:
   21295 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:213"
   21296 $at_failed && at_fn_log_failure
   21297 $at_traceon; }
   21298 
   21299 
   21300   set +x
   21301   $at_times_p && times >"$at_times_file"
   21302 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   21303 read at_status <"$at_status_file"
   21304 #AT_STOP_100
   21305 #AT_START_101
   21306 at_fn_group_banner 101 'sets.at:269' \
   21307   "Accept" "                                         " 5
   21308 at_xfail=no
   21309 (
   21310   $as_echo "101. $at_setup_line: testing $at_desc ..."
   21311   $at_traceon
   21312 
   21313 
   21314 cat >input.y <<'_ATEOF'
   21315 %token END 0
   21316 %%
   21317 input:
   21318   'a'
   21319 | '(' input ')'
   21320 | '(' error END
   21321 ;
   21322 _ATEOF
   21323 
   21324 
   21325 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   21326   at_save_special_files
   21327   mkdir xml-tests
   21328     # Don't combine these Bison invocations since we want to be sure that
   21329   # --report=all isn't required to get the full XML file.
   21330   { set +x
   21331 $as_echo "$at_srcdir/sets.at:281: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   21332                   --graph=xml-tests/test.dot -v -o input.c input.y"
   21333 at_fn_check_prepare_notrace 'an embedded newline' "sets.at:281"
   21334 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   21335                   --graph=xml-tests/test.dot -v -o input.c input.y
   21336 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21337 at_status=$? at_failed=false
   21338 $at_check_filter
   21339 echo stderr:; cat "$at_stderr"
   21340 echo stdout:; cat "$at_stdout"
   21341 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:281"
   21342 $at_failed && at_fn_log_failure
   21343 $at_traceon; }
   21344 
   21345   { set +x
   21346 $as_echo "$at_srcdir/sets.at:281: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -v -o input.c input.y"
   21347 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -v -o input.c input.y" "sets.at:281"
   21348 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -v -o input.c input.y
   21349 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21350 at_status=$? at_failed=false
   21351 $at_check_filter
   21352 echo stderr:; cat "$at_stderr"
   21353 echo stdout:; cat "$at_stdout"
   21354 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:281"
   21355 $at_failed && at_fn_log_failure
   21356 $at_traceon; }
   21357 
   21358     cp xml-tests/test.output expout
   21359   { set +x
   21360 $as_echo "$at_srcdir/sets.at:281: \$XSLTPROC \\
   21361              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   21362              xml-tests/test.xml"
   21363 at_fn_check_prepare_notrace 'a `...` command substitution' "sets.at:281"
   21364 ( $at_check_trace; $XSLTPROC \
   21365              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   21366              xml-tests/test.xml
   21367 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21368 at_status=$? at_failed=false
   21369 $at_check_filter
   21370 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21371 $at_diff expout "$at_stdout" || at_failed=:
   21372 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:281"
   21373 $at_failed && at_fn_log_failure
   21374 $at_traceon; }
   21375 
   21376   sort xml-tests/test.dot > expout
   21377   { set +x
   21378 $as_echo "$at_srcdir/sets.at:281: \$XSLTPROC \\
   21379              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   21380              xml-tests/test.xml | sort"
   21381 at_fn_check_prepare_notrace 'a `...` command substitution' "sets.at:281"
   21382 ( $at_check_trace; $XSLTPROC \
   21383              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   21384              xml-tests/test.xml | sort
   21385 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21386 at_status=$? at_failed=false
   21387 $at_check_filter
   21388 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21389 $at_diff expout "$at_stdout" || at_failed=:
   21390 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:281"
   21391 $at_failed && at_fn_log_failure
   21392 $at_traceon; }
   21393 
   21394   rm -rf xml-tests expout
   21395   at_restore_special_files
   21396 fi
   21397 { set +x
   21398 $as_echo "$at_srcdir/sets.at:281: bison -v -o input.c input.y"
   21399 at_fn_check_prepare_trace "sets.at:281"
   21400 ( $at_check_trace; bison -v -o input.c input.y
   21401 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21402 at_status=$? at_failed=false
   21403 $at_check_filter
   21404 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21405 at_fn_diff_devnull "$at_stdout" || at_failed=:
   21406 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:281"
   21407 $at_failed && at_fn_log_failure
   21408 $at_traceon; }
   21409 
   21410 
   21411 
   21412 # Get the final state in the parser.
   21413 { set +x
   21414 $as_echo "$at_srcdir/sets.at:284: sed -n 's/.*define YYFINAL *\\([0-9][0-9]*\\)/final state \\1/p' input.c"
   21415 at_fn_check_prepare_trace "sets.at:284"
   21416 ( $at_check_trace; sed -n 's/.*define YYFINAL *\([0-9][0-9]*\)/final state \1/p' input.c
   21417 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21418 at_status=$? at_failed=false
   21419 $at_check_filter
   21420 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21421 echo stdout:; tee stdout <"$at_stdout"
   21422 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:284"
   21423 $at_failed && at_fn_log_failure
   21424 $at_traceon; }
   21425 
   21426 mv stdout expout
   21427 
   21428 # Get the final state in the report, from the "accept" action..
   21429 { set +x
   21430 $as_echo "$at_srcdir/sets.at:289: sed -n '
   21431            /^State \\(.*\\)/{
   21432 	     s//final state \\1/
   21433 	     x
   21434 	   }
   21435 	   / accept/{
   21436 	     x
   21437 	     p
   21438 	     q
   21439 	   }
   21440 	' input.output"
   21441 at_fn_check_prepare_notrace 'an embedded newline' "sets.at:289"
   21442 ( $at_check_trace; sed -n '
   21443            /^State \(.*\)/{
   21444 	     s//final state \1/
   21445 	     x
   21446 	   }
   21447 	   / accept/{
   21448 	     x
   21449 	     p
   21450 	     q
   21451 	   }
   21452 	' input.output
   21453 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21454 at_status=$? at_failed=false
   21455 $at_check_filter
   21456 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21457 $at_diff expout "$at_stdout" || at_failed=:
   21458 at_fn_check_status 0 $at_status "$at_srcdir/sets.at:289"
   21459 $at_failed && at_fn_log_failure
   21460 $at_traceon; }
   21461 
   21462 
   21463   set +x
   21464   $at_times_p && times >"$at_times_file"
   21465 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   21466 read at_status <"$at_status_file"
   21467 #AT_STOP_101
   21468 #AT_START_102
   21469 at_fn_group_banner 102 'reduce.at:25' \
   21470   "Useless Terminals" "                              " 6
   21471 at_xfail=no
   21472 (
   21473   $as_echo "102. $at_setup_line: testing $at_desc ..."
   21474   $at_traceon
   21475 
   21476 
   21477 cat >input.y <<'_ATEOF'
   21478 %verbose
   21479 %output "input.c"
   21480 
   21481 %token useless1
   21482 %token useless2
   21483 %token useless3
   21484 %token useless4
   21485 %token useless5
   21486 %token useless6
   21487 %token useless7
   21488 %token useless8
   21489 %token useless9
   21490 
   21491 %token useful
   21492 %%
   21493 exp: useful;
   21494 _ATEOF
   21495 
   21496 
   21497 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   21498   at_save_special_files
   21499   mkdir xml-tests
   21500     # Don't combine these Bison invocations since we want to be sure that
   21501   # --report=all isn't required to get the full XML file.
   21502   { set +x
   21503 $as_echo "$at_srcdir/reduce.at:46: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   21504                   --graph=xml-tests/test.dot input.y"
   21505 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:46"
   21506 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   21507                   --graph=xml-tests/test.dot input.y
   21508 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21509 at_status=$? at_failed=false
   21510 $at_check_filter
   21511 echo stderr:; cat "$at_stderr"
   21512 echo stdout:; cat "$at_stdout"
   21513 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:46"
   21514 $at_failed && at_fn_log_failure
   21515 $at_traceon; }
   21516 
   21517   { set +x
   21518 $as_echo "$at_srcdir/reduce.at:46: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y"
   21519 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y" "reduce.at:46"
   21520 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y
   21521 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21522 at_status=$? at_failed=false
   21523 $at_check_filter
   21524 echo stderr:; cat "$at_stderr"
   21525 echo stdout:; cat "$at_stdout"
   21526 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:46"
   21527 $at_failed && at_fn_log_failure
   21528 $at_traceon; }
   21529 
   21530     cp xml-tests/test.output expout
   21531   { set +x
   21532 $as_echo "$at_srcdir/reduce.at:46: \$XSLTPROC \\
   21533              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   21534              xml-tests/test.xml"
   21535 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:46"
   21536 ( $at_check_trace; $XSLTPROC \
   21537              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   21538              xml-tests/test.xml
   21539 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21540 at_status=$? at_failed=false
   21541 $at_check_filter
   21542 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21543 $at_diff expout "$at_stdout" || at_failed=:
   21544 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:46"
   21545 $at_failed && at_fn_log_failure
   21546 $at_traceon; }
   21547 
   21548   sort xml-tests/test.dot > expout
   21549   { set +x
   21550 $as_echo "$at_srcdir/reduce.at:46: \$XSLTPROC \\
   21551              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   21552              xml-tests/test.xml | sort"
   21553 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:46"
   21554 ( $at_check_trace; $XSLTPROC \
   21555              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   21556              xml-tests/test.xml | sort
   21557 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21558 at_status=$? at_failed=false
   21559 $at_check_filter
   21560 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21561 $at_diff expout "$at_stdout" || at_failed=:
   21562 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:46"
   21563 $at_failed && at_fn_log_failure
   21564 $at_traceon; }
   21565 
   21566   rm -rf xml-tests expout
   21567   at_restore_special_files
   21568 fi
   21569 { set +x
   21570 $as_echo "$at_srcdir/reduce.at:46: bison input.y"
   21571 at_fn_check_prepare_trace "reduce.at:46"
   21572 ( $at_check_trace; bison input.y
   21573 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21574 at_status=$? at_failed=false
   21575 $at_check_filter
   21576 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21577 at_fn_diff_devnull "$at_stdout" || at_failed=:
   21578 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:46"
   21579 $at_failed && at_fn_log_failure
   21580 $at_traceon; }
   21581 
   21582 
   21583 
   21584 { set +x
   21585 $as_echo "$at_srcdir/reduce.at:48: sed -n '/^Grammar/q;/^\$/!p' input.output"
   21586 at_fn_check_prepare_dynamic "sed -n '/^Grammar/q;/^$/!p' input.output" "reduce.at:48"
   21587 ( $at_check_trace; sed -n '/^Grammar/q;/^$/!p' input.output
   21588 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21589 at_status=$? at_failed=false
   21590 $at_check_filter
   21591 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21592 echo >>"$at_stdout"; $as_echo "Terminals unused in grammar
   21593    useless1
   21594    useless2
   21595    useless3
   21596    useless4
   21597    useless5
   21598    useless6
   21599    useless7
   21600    useless8
   21601    useless9
   21602 " | \
   21603   $at_diff - "$at_stdout" || at_failed=:
   21604 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:48"
   21605 $at_failed && at_fn_log_failure
   21606 $at_traceon; }
   21607 
   21608 
   21609   set +x
   21610   $at_times_p && times >"$at_times_file"
   21611 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   21612 read at_status <"$at_status_file"
   21613 #AT_STOP_102
   21614 #AT_START_103
   21615 at_fn_group_banner 103 'reduce.at:69' \
   21616   "Useless Nonterminals" "                           " 6
   21617 at_xfail=no
   21618 (
   21619   $as_echo "103. $at_setup_line: testing $at_desc ..."
   21620   $at_traceon
   21621 
   21622 
   21623 cat >input.y <<'_ATEOF'
   21624 %verbose
   21625 %output "input.c"
   21626 
   21627 %nterm useless1
   21628 %nterm useless2
   21629 %nterm useless3
   21630 %nterm useless4
   21631 %nterm useless5
   21632 %nterm useless6
   21633 %nterm useless7
   21634 %nterm useless8
   21635 %nterm useless9
   21636 
   21637 %token useful
   21638 %%
   21639 exp: useful;
   21640 _ATEOF
   21641 
   21642 
   21643 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   21644   at_save_special_files
   21645   mkdir xml-tests
   21646     # Don't combine these Bison invocations since we want to be sure that
   21647   # --report=all isn't required to get the full XML file.
   21648   { set +x
   21649 $as_echo "$at_srcdir/reduce.at:90: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   21650                   --graph=xml-tests/test.dot input.y"
   21651 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:90"
   21652 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   21653                   --graph=xml-tests/test.dot input.y
   21654 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21655 at_status=$? at_failed=false
   21656 $at_check_filter
   21657 echo stderr:; cat "$at_stderr"
   21658 echo stdout:; cat "$at_stdout"
   21659 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:90"
   21660 $at_failed && at_fn_log_failure
   21661 $at_traceon; }
   21662 
   21663   { set +x
   21664 $as_echo "$at_srcdir/reduce.at:90: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y"
   21665 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y" "reduce.at:90"
   21666 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y
   21667 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21668 at_status=$? at_failed=false
   21669 $at_check_filter
   21670 echo stderr:; cat "$at_stderr"
   21671 echo stdout:; cat "$at_stdout"
   21672 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:90"
   21673 $at_failed && at_fn_log_failure
   21674 $at_traceon; }
   21675 
   21676     cp xml-tests/test.output expout
   21677   { set +x
   21678 $as_echo "$at_srcdir/reduce.at:90: \$XSLTPROC \\
   21679              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   21680              xml-tests/test.xml"
   21681 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:90"
   21682 ( $at_check_trace; $XSLTPROC \
   21683              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   21684              xml-tests/test.xml
   21685 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21686 at_status=$? at_failed=false
   21687 $at_check_filter
   21688 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21689 $at_diff expout "$at_stdout" || at_failed=:
   21690 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:90"
   21691 $at_failed && at_fn_log_failure
   21692 $at_traceon; }
   21693 
   21694   sort xml-tests/test.dot > expout
   21695   { set +x
   21696 $as_echo "$at_srcdir/reduce.at:90: \$XSLTPROC \\
   21697              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   21698              xml-tests/test.xml | sort"
   21699 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:90"
   21700 ( $at_check_trace; $XSLTPROC \
   21701              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   21702              xml-tests/test.xml | sort
   21703 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21704 at_status=$? at_failed=false
   21705 $at_check_filter
   21706 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21707 $at_diff expout "$at_stdout" || at_failed=:
   21708 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:90"
   21709 $at_failed && at_fn_log_failure
   21710 $at_traceon; }
   21711 
   21712   rm -rf xml-tests expout
   21713   at_restore_special_files
   21714 fi
   21715 { set +x
   21716 $as_echo "$at_srcdir/reduce.at:90: bison input.y"
   21717 at_fn_check_prepare_trace "reduce.at:90"
   21718 ( $at_check_trace; bison input.y
   21719 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21720 at_status=$? at_failed=false
   21721 $at_check_filter
   21722 echo >>"$at_stderr"; $as_echo "input.y: warning: 9 nonterminals useless in grammar
   21723 input.y:4.8-15: warning: nonterminal useless in grammar: useless1
   21724 input.y:5.8-15: warning: nonterminal useless in grammar: useless2
   21725 input.y:6.8-15: warning: nonterminal useless in grammar: useless3
   21726 input.y:7.8-15: warning: nonterminal useless in grammar: useless4
   21727 input.y:8.8-15: warning: nonterminal useless in grammar: useless5
   21728 input.y:9.8-15: warning: nonterminal useless in grammar: useless6
   21729 input.y:10.8-15: warning: nonterminal useless in grammar: useless7
   21730 input.y:11.8-15: warning: nonterminal useless in grammar: useless8
   21731 input.y:12.8-15: warning: nonterminal useless in grammar: useless9
   21732 " | \
   21733   $at_diff - "$at_stderr" || at_failed=:
   21734 at_fn_diff_devnull "$at_stdout" || at_failed=:
   21735 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:90"
   21736 $at_failed && at_fn_log_failure
   21737 $at_traceon; }
   21738 
   21739 # Defining POSIXLY_CORRECT causes bison to complain if options are
   21740 # added after the grammar file name, so skip these checks in that
   21741 # case.
   21742 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   21743   at_save_special_files
   21744 
   21745   # To avoid expanding it repeatedly, store specified stdout.
   21746   : >expout
   21747 
   21748   # Run with -Werror.
   21749   { set +x
   21750 $as_echo "$at_srcdir/reduce.at:90: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Werror"
   21751 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Werror" "reduce.at:90"
   21752 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y -Werror
   21753 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21754 at_status=$? at_failed=false
   21755 $at_check_filter
   21756 echo stderr:; tee stderr <"$at_stderr"
   21757 $at_diff expout "$at_stdout" || at_failed=:
   21758 at_fn_check_status 1 $at_status "$at_srcdir/reduce.at:90"
   21759 $at_failed && at_fn_log_failure
   21760 $at_traceon; }
   21761 
   21762 
   21763   # Build expected stderr up to and including the "warnings being
   21764   # treated as errors" message.
   21765   cat >at-bison-check-warnings <<'_ATEOF'
   21766 input.y: warning: 9 nonterminals useless in grammar
   21767 input.y:4.8-15: warning: nonterminal useless in grammar: useless1
   21768 input.y:5.8-15: warning: nonterminal useless in grammar: useless2
   21769 input.y:6.8-15: warning: nonterminal useless in grammar: useless3
   21770 input.y:7.8-15: warning: nonterminal useless in grammar: useless4
   21771 input.y:8.8-15: warning: nonterminal useless in grammar: useless5
   21772 input.y:9.8-15: warning: nonterminal useless in grammar: useless6
   21773 input.y:10.8-15: warning: nonterminal useless in grammar: useless7
   21774 input.y:11.8-15: warning: nonterminal useless in grammar: useless8
   21775 input.y:12.8-15: warning: nonterminal useless in grammar: useless9
   21776 _ATEOF
   21777 
   21778   at_bison_check_first=`sed -n \
   21779     '/: warning: /{=;q;}' at-bison-check-warnings`
   21780   : ${at_bison_check_first:=1}
   21781   at_bison_check_first_tmp=`sed -n \
   21782     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   21783   : ${at_bison_check_first_tmp:=1}
   21784   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   21785     at_bison_check_first=$at_bison_check_first_tmp
   21786   fi
   21787   if test $at_bison_check_first -gt 1; then
   21788     sed -n "1,`expr $at_bison_check_first - 1`"p \
   21789       at-bison-check-warnings > experr
   21790   fi
   21791   echo 'bison: warnings being treated as errors' >> experr
   21792 
   21793   # Finish building expected stderr and check.  Unlike warnings,
   21794   # complaints cause bison to exit early.  Thus, with -Werror, bison
   21795   # does not necessarily report all warnings that it does without
   21796   # -Werror, but it at least reports one.
   21797   at_bison_check_last=`sed -n '$=' stderr`
   21798   : ${at_bison_check_last:=1}
   21799   at_bison_check_last=`expr $at_bison_check_last - 1`
   21800   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   21801     at-bison-check-warnings >> experr
   21802   { set +x
   21803 $as_echo "$at_srcdir/reduce.at:90: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   21804               stderr 1>&2"
   21805 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:90"
   21806 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   21807               stderr 1>&2
   21808 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21809 at_status=$? at_failed=false
   21810 $at_check_filter
   21811 $at_diff experr "$at_stderr" || at_failed=:
   21812 at_fn_diff_devnull "$at_stdout" || at_failed=:
   21813 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:90"
   21814 $at_failed && at_fn_log_failure
   21815 $at_traceon; }
   21816 
   21817 
   21818   # Now check --warnings=error.
   21819   cp stderr experr
   21820   { set +x
   21821 $as_echo "$at_srcdir/reduce.at:90: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=error"
   21822 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=error" "reduce.at:90"
   21823 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y --warnings=error
   21824 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21825 at_status=$? at_failed=false
   21826 $at_check_filter
   21827 $at_diff experr "$at_stderr" || at_failed=:
   21828 $at_diff expout "$at_stdout" || at_failed=:
   21829 at_fn_check_status 1 $at_status "$at_srcdir/reduce.at:90"
   21830 $at_failed && at_fn_log_failure
   21831 $at_traceon; }
   21832 
   21833 
   21834   # Now check -Wnone and --warnings=none by making sure that
   21835   # -Werror doesn't change the exit status when -Wnone or
   21836   # --warnings=none is specified.
   21837   { set +x
   21838 $as_echo "$at_srcdir/reduce.at:90: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Wnone -Werror"
   21839 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Wnone -Werror" "reduce.at:90"
   21840 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y -Wnone -Werror
   21841 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21842 at_status=$? at_failed=false
   21843 $at_check_filter
   21844 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21845 $at_diff expout "$at_stdout" || at_failed=:
   21846 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:90"
   21847 $at_failed && at_fn_log_failure
   21848 $at_traceon; }
   21849 
   21850   { set +x
   21851 $as_echo "$at_srcdir/reduce.at:90: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror"
   21852 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror" "reduce.at:90"
   21853 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror
   21854 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21855 at_status=$? at_failed=false
   21856 $at_check_filter
   21857 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21858 $at_diff expout "$at_stdout" || at_failed=:
   21859 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:90"
   21860 $at_failed && at_fn_log_failure
   21861 $at_traceon; }
   21862 
   21863 
   21864   at_restore_special_files
   21865 fi
   21866 
   21867 { set +x
   21868 $as_echo "$at_srcdir/reduce.at:103: sed -n '/^Grammar/q;/^\$/!p' input.output"
   21869 at_fn_check_prepare_dynamic "sed -n '/^Grammar/q;/^$/!p' input.output" "reduce.at:103"
   21870 ( $at_check_trace; sed -n '/^Grammar/q;/^$/!p' input.output
   21871 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21872 at_status=$? at_failed=false
   21873 $at_check_filter
   21874 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21875 echo >>"$at_stdout"; $as_echo "Nonterminals useless in grammar
   21876    useless1
   21877    useless2
   21878    useless3
   21879    useless4
   21880    useless5
   21881    useless6
   21882    useless7
   21883    useless8
   21884    useless9
   21885 " | \
   21886   $at_diff - "$at_stdout" || at_failed=:
   21887 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:103"
   21888 $at_failed && at_fn_log_failure
   21889 $at_traceon; }
   21890 
   21891 
   21892   set +x
   21893   $at_times_p && times >"$at_times_file"
   21894 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   21895 read at_status <"$at_status_file"
   21896 #AT_STOP_103
   21897 #AT_START_104
   21898 at_fn_group_banner 104 'reduce.at:124' \
   21899   "Useless Rules" "                                  " 6
   21900 at_xfail=no
   21901 (
   21902   $as_echo "104. $at_setup_line: testing $at_desc ..."
   21903   $at_traceon
   21904 
   21905 
   21906 
   21907 
   21908 cat >input.y <<'_ATEOF'
   21909 %verbose
   21910 %output "input.c"
   21911 %token useful
   21912 %%
   21913 exp: useful;
   21914 useless1: '1';
   21915 useless2: '2';
   21916 useless3: '3';
   21917 useless4: '4';
   21918 useless5: '5';
   21919 useless6: '6';
   21920 useless7: '7';
   21921 useless8: '8';
   21922 useless9: '9';
   21923 _ATEOF
   21924 
   21925 
   21926 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   21927   at_save_special_files
   21928   mkdir xml-tests
   21929     # Don't combine these Bison invocations since we want to be sure that
   21930   # --report=all isn't required to get the full XML file.
   21931   { set +x
   21932 $as_echo "$at_srcdir/reduce.at:145: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   21933                   --graph=xml-tests/test.dot -fcaret input.y"
   21934 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:145"
   21935 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   21936                   --graph=xml-tests/test.dot -fcaret input.y
   21937 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21938 at_status=$? at_failed=false
   21939 $at_check_filter
   21940 echo stderr:; cat "$at_stderr"
   21941 echo stdout:; cat "$at_stdout"
   21942 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:145"
   21943 $at_failed && at_fn_log_failure
   21944 $at_traceon; }
   21945 
   21946   { set +x
   21947 $as_echo "$at_srcdir/reduce.at:145: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -fcaret input.y"
   21948 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -fcaret input.y" "reduce.at:145"
   21949 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -fcaret input.y
   21950 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21951 at_status=$? at_failed=false
   21952 $at_check_filter
   21953 echo stderr:; cat "$at_stderr"
   21954 echo stdout:; cat "$at_stdout"
   21955 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:145"
   21956 $at_failed && at_fn_log_failure
   21957 $at_traceon; }
   21958 
   21959     cp xml-tests/test.output expout
   21960   { set +x
   21961 $as_echo "$at_srcdir/reduce.at:145: \$XSLTPROC \\
   21962              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   21963              xml-tests/test.xml"
   21964 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:145"
   21965 ( $at_check_trace; $XSLTPROC \
   21966              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   21967              xml-tests/test.xml
   21968 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21969 at_status=$? at_failed=false
   21970 $at_check_filter
   21971 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21972 $at_diff expout "$at_stdout" || at_failed=:
   21973 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:145"
   21974 $at_failed && at_fn_log_failure
   21975 $at_traceon; }
   21976 
   21977   sort xml-tests/test.dot > expout
   21978   { set +x
   21979 $as_echo "$at_srcdir/reduce.at:145: \$XSLTPROC \\
   21980              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   21981              xml-tests/test.xml | sort"
   21982 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:145"
   21983 ( $at_check_trace; $XSLTPROC \
   21984              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   21985              xml-tests/test.xml | sort
   21986 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   21987 at_status=$? at_failed=false
   21988 $at_check_filter
   21989 at_fn_diff_devnull "$at_stderr" || at_failed=:
   21990 $at_diff expout "$at_stdout" || at_failed=:
   21991 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:145"
   21992 $at_failed && at_fn_log_failure
   21993 $at_traceon; }
   21994 
   21995   rm -rf xml-tests expout
   21996   at_restore_special_files
   21997 fi
   21998 { set +x
   21999 $as_echo "$at_srcdir/reduce.at:145: bison -fcaret input.y"
   22000 at_fn_check_prepare_trace "reduce.at:145"
   22001 ( $at_check_trace; bison -fcaret input.y
   22002 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22003 at_status=$? at_failed=false
   22004 $at_check_filter
   22005 echo >>"$at_stderr"; $as_echo "input.y: warning: 9 nonterminals useless in grammar
   22006 input.y: warning: 9 rules useless in grammar
   22007 input.y:6.1-8: warning: nonterminal useless in grammar: useless1
   22008  useless1: '1';
   22009  ^^^^^^^^
   22010 input.y:7.1-8: warning: nonterminal useless in grammar: useless2
   22011  useless2: '2';
   22012  ^^^^^^^^
   22013 input.y:8.1-8: warning: nonterminal useless in grammar: useless3
   22014  useless3: '3';
   22015  ^^^^^^^^
   22016 input.y:9.1-8: warning: nonterminal useless in grammar: useless4
   22017  useless4: '4';
   22018  ^^^^^^^^
   22019 input.y:10.1-8: warning: nonterminal useless in grammar: useless5
   22020  useless5: '5';
   22021  ^^^^^^^^
   22022 input.y:11.1-8: warning: nonterminal useless in grammar: useless6
   22023  useless6: '6';
   22024  ^^^^^^^^
   22025 input.y:12.1-8: warning: nonterminal useless in grammar: useless7
   22026  useless7: '7';
   22027  ^^^^^^^^
   22028 input.y:13.1-8: warning: nonterminal useless in grammar: useless8
   22029  useless8: '8';
   22030  ^^^^^^^^
   22031 input.y:14.1-8: warning: nonterminal useless in grammar: useless9
   22032  useless9: '9';
   22033  ^^^^^^^^
   22034 input.y:6.11-13: warning: rule useless in grammar
   22035  useless1: '1';
   22036            ^^^
   22037 input.y:7.11-13: warning: rule useless in grammar
   22038  useless2: '2';
   22039            ^^^
   22040 input.y:8.11-13: warning: rule useless in grammar
   22041  useless3: '3';
   22042            ^^^
   22043 input.y:9.11-13: warning: rule useless in grammar
   22044  useless4: '4';
   22045            ^^^
   22046 input.y:10.11-13: warning: rule useless in grammar
   22047  useless5: '5';
   22048            ^^^
   22049 input.y:11.11-13: warning: rule useless in grammar
   22050  useless6: '6';
   22051            ^^^
   22052 input.y:12.11-13: warning: rule useless in grammar
   22053  useless7: '7';
   22054            ^^^
   22055 input.y:13.11-13: warning: rule useless in grammar
   22056  useless8: '8';
   22057            ^^^
   22058 input.y:14.11-13: warning: rule useless in grammar
   22059  useless9: '9';
   22060            ^^^
   22061 " | \
   22062   $at_diff - "$at_stderr" || at_failed=:
   22063 at_fn_diff_devnull "$at_stdout" || at_failed=:
   22064 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:145"
   22065 $at_failed && at_fn_log_failure
   22066 $at_traceon; }
   22067 
   22068 # Defining POSIXLY_CORRECT causes bison to complain if options are
   22069 # added after the grammar file name, so skip these checks in that
   22070 # case.
   22071 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   22072   at_save_special_files
   22073 
   22074   # To avoid expanding it repeatedly, store specified stdout.
   22075   : >expout
   22076 
   22077   # Run with -Werror.
   22078   { set +x
   22079 $as_echo "$at_srcdir/reduce.at:145: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y -Werror"
   22080 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y -Werror" "reduce.at:145"
   22081 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret input.y -Werror
   22082 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22083 at_status=$? at_failed=false
   22084 $at_check_filter
   22085 echo stderr:; tee stderr <"$at_stderr"
   22086 $at_diff expout "$at_stdout" || at_failed=:
   22087 at_fn_check_status 1 $at_status "$at_srcdir/reduce.at:145"
   22088 $at_failed && at_fn_log_failure
   22089 $at_traceon; }
   22090 
   22091 
   22092   # Build expected stderr up to and including the "warnings being
   22093   # treated as errors" message.
   22094   cat >at-bison-check-warnings <<'_ATEOF'
   22095 input.y: warning: 9 nonterminals useless in grammar
   22096 input.y: warning: 9 rules useless in grammar
   22097 input.y:6.1-8: warning: nonterminal useless in grammar: useless1
   22098  useless1: '1';
   22099  ^^^^^^^^
   22100 input.y:7.1-8: warning: nonterminal useless in grammar: useless2
   22101  useless2: '2';
   22102  ^^^^^^^^
   22103 input.y:8.1-8: warning: nonterminal useless in grammar: useless3
   22104  useless3: '3';
   22105  ^^^^^^^^
   22106 input.y:9.1-8: warning: nonterminal useless in grammar: useless4
   22107  useless4: '4';
   22108  ^^^^^^^^
   22109 input.y:10.1-8: warning: nonterminal useless in grammar: useless5
   22110  useless5: '5';
   22111  ^^^^^^^^
   22112 input.y:11.1-8: warning: nonterminal useless in grammar: useless6
   22113  useless6: '6';
   22114  ^^^^^^^^
   22115 input.y:12.1-8: warning: nonterminal useless in grammar: useless7
   22116  useless7: '7';
   22117  ^^^^^^^^
   22118 input.y:13.1-8: warning: nonterminal useless in grammar: useless8
   22119  useless8: '8';
   22120  ^^^^^^^^
   22121 input.y:14.1-8: warning: nonterminal useless in grammar: useless9
   22122  useless9: '9';
   22123  ^^^^^^^^
   22124 input.y:6.11-13: warning: rule useless in grammar
   22125  useless1: '1';
   22126            ^^^
   22127 input.y:7.11-13: warning: rule useless in grammar
   22128  useless2: '2';
   22129            ^^^
   22130 input.y:8.11-13: warning: rule useless in grammar
   22131  useless3: '3';
   22132            ^^^
   22133 input.y:9.11-13: warning: rule useless in grammar
   22134  useless4: '4';
   22135            ^^^
   22136 input.y:10.11-13: warning: rule useless in grammar
   22137  useless5: '5';
   22138            ^^^
   22139 input.y:11.11-13: warning: rule useless in grammar
   22140  useless6: '6';
   22141            ^^^
   22142 input.y:12.11-13: warning: rule useless in grammar
   22143  useless7: '7';
   22144            ^^^
   22145 input.y:13.11-13: warning: rule useless in grammar
   22146  useless8: '8';
   22147            ^^^
   22148 input.y:14.11-13: warning: rule useless in grammar
   22149  useless9: '9';
   22150            ^^^
   22151 _ATEOF
   22152 
   22153   at_bison_check_first=`sed -n \
   22154     '/: warning: /{=;q;}' at-bison-check-warnings`
   22155   : ${at_bison_check_first:=1}
   22156   at_bison_check_first_tmp=`sed -n \
   22157     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   22158   : ${at_bison_check_first_tmp:=1}
   22159   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   22160     at_bison_check_first=$at_bison_check_first_tmp
   22161   fi
   22162   if test $at_bison_check_first -gt 1; then
   22163     sed -n "1,`expr $at_bison_check_first - 1`"p \
   22164       at-bison-check-warnings > experr
   22165   fi
   22166   echo 'bison: warnings being treated as errors' >> experr
   22167 
   22168   # Finish building expected stderr and check.  Unlike warnings,
   22169   # complaints cause bison to exit early.  Thus, with -Werror, bison
   22170   # does not necessarily report all warnings that it does without
   22171   # -Werror, but it at least reports one.
   22172   at_bison_check_last=`sed -n '$=' stderr`
   22173   : ${at_bison_check_last:=1}
   22174   at_bison_check_last=`expr $at_bison_check_last - 1`
   22175   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   22176     at-bison-check-warnings >> experr
   22177   { set +x
   22178 $as_echo "$at_srcdir/reduce.at:145: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   22179               stderr 1>&2"
   22180 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:145"
   22181 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   22182               stderr 1>&2
   22183 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22184 at_status=$? at_failed=false
   22185 $at_check_filter
   22186 $at_diff experr "$at_stderr" || at_failed=:
   22187 at_fn_diff_devnull "$at_stdout" || at_failed=:
   22188 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:145"
   22189 $at_failed && at_fn_log_failure
   22190 $at_traceon; }
   22191 
   22192 
   22193   # Now check --warnings=error.
   22194   cp stderr experr
   22195   { set +x
   22196 $as_echo "$at_srcdir/reduce.at:145: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y --warnings=error"
   22197 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y --warnings=error" "reduce.at:145"
   22198 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret input.y --warnings=error
   22199 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22200 at_status=$? at_failed=false
   22201 $at_check_filter
   22202 $at_diff experr "$at_stderr" || at_failed=:
   22203 $at_diff expout "$at_stdout" || at_failed=:
   22204 at_fn_check_status 1 $at_status "$at_srcdir/reduce.at:145"
   22205 $at_failed && at_fn_log_failure
   22206 $at_traceon; }
   22207 
   22208 
   22209   # Now check -Wnone and --warnings=none by making sure that
   22210   # -Werror doesn't change the exit status when -Wnone or
   22211   # --warnings=none is specified.
   22212   { set +x
   22213 $as_echo "$at_srcdir/reduce.at:145: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y -Wnone -Werror"
   22214 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y -Wnone -Werror" "reduce.at:145"
   22215 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret input.y -Wnone -Werror
   22216 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22217 at_status=$? at_failed=false
   22218 $at_check_filter
   22219 at_fn_diff_devnull "$at_stderr" || at_failed=:
   22220 $at_diff expout "$at_stdout" || at_failed=:
   22221 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:145"
   22222 $at_failed && at_fn_log_failure
   22223 $at_traceon; }
   22224 
   22225   { set +x
   22226 $as_echo "$at_srcdir/reduce.at:145: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y --warnings=none -Werror"
   22227 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret input.y --warnings=none -Werror" "reduce.at:145"
   22228 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret input.y --warnings=none -Werror
   22229 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22230 at_status=$? at_failed=false
   22231 $at_check_filter
   22232 at_fn_diff_devnull "$at_stderr" || at_failed=:
   22233 $at_diff expout "$at_stdout" || at_failed=:
   22234 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:145"
   22235 $at_failed && at_fn_log_failure
   22236 $at_traceon; }
   22237 
   22238 
   22239   at_restore_special_files
   22240 fi
   22241 
   22242 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   22243   at_save_special_files
   22244   mkdir xml-tests
   22245     # Don't combine these Bison invocations since we want to be sure that
   22246   # --report=all isn't required to get the full XML file.
   22247   { set +x
   22248 $as_echo "$at_srcdir/reduce.at:204: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   22249                   --graph=xml-tests/test.dot input.y"
   22250 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:204"
   22251 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   22252                   --graph=xml-tests/test.dot input.y
   22253 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22254 at_status=$? at_failed=false
   22255 $at_check_filter
   22256 echo stderr:; cat "$at_stderr"
   22257 echo stdout:; cat "$at_stdout"
   22258 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:204"
   22259 $at_failed && at_fn_log_failure
   22260 $at_traceon; }
   22261 
   22262   { set +x
   22263 $as_echo "$at_srcdir/reduce.at:204: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y"
   22264 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y" "reduce.at:204"
   22265 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y
   22266 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22267 at_status=$? at_failed=false
   22268 $at_check_filter
   22269 echo stderr:; cat "$at_stderr"
   22270 echo stdout:; cat "$at_stdout"
   22271 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:204"
   22272 $at_failed && at_fn_log_failure
   22273 $at_traceon; }
   22274 
   22275     cp xml-tests/test.output expout
   22276   { set +x
   22277 $as_echo "$at_srcdir/reduce.at:204: \$XSLTPROC \\
   22278              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   22279              xml-tests/test.xml"
   22280 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:204"
   22281 ( $at_check_trace; $XSLTPROC \
   22282              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   22283              xml-tests/test.xml
   22284 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22285 at_status=$? at_failed=false
   22286 $at_check_filter
   22287 at_fn_diff_devnull "$at_stderr" || at_failed=:
   22288 $at_diff expout "$at_stdout" || at_failed=:
   22289 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:204"
   22290 $at_failed && at_fn_log_failure
   22291 $at_traceon; }
   22292 
   22293   sort xml-tests/test.dot > expout
   22294   { set +x
   22295 $as_echo "$at_srcdir/reduce.at:204: \$XSLTPROC \\
   22296              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   22297              xml-tests/test.xml | sort"
   22298 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:204"
   22299 ( $at_check_trace; $XSLTPROC \
   22300              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   22301              xml-tests/test.xml | sort
   22302 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22303 at_status=$? at_failed=false
   22304 $at_check_filter
   22305 at_fn_diff_devnull "$at_stderr" || at_failed=:
   22306 $at_diff expout "$at_stdout" || at_failed=:
   22307 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:204"
   22308 $at_failed && at_fn_log_failure
   22309 $at_traceon; }
   22310 
   22311   rm -rf xml-tests expout
   22312   at_restore_special_files
   22313 fi
   22314 { set +x
   22315 $as_echo "$at_srcdir/reduce.at:204: bison input.y"
   22316 at_fn_check_prepare_trace "reduce.at:204"
   22317 ( $at_check_trace; bison input.y
   22318 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22319 at_status=$? at_failed=false
   22320 $at_check_filter
   22321 echo >>"$at_stderr"; $as_echo "input.y: warning: 9 nonterminals useless in grammar
   22322 input.y: warning: 9 rules useless in grammar
   22323 input.y:6.1-8: warning: nonterminal useless in grammar: useless1
   22324 input.y:7.1-8: warning: nonterminal useless in grammar: useless2
   22325 input.y:8.1-8: warning: nonterminal useless in grammar: useless3
   22326 input.y:9.1-8: warning: nonterminal useless in grammar: useless4
   22327 input.y:10.1-8: warning: nonterminal useless in grammar: useless5
   22328 input.y:11.1-8: warning: nonterminal useless in grammar: useless6
   22329 input.y:12.1-8: warning: nonterminal useless in grammar: useless7
   22330 input.y:13.1-8: warning: nonterminal useless in grammar: useless8
   22331 input.y:14.1-8: warning: nonterminal useless in grammar: useless9
   22332 input.y:6.11-13: warning: rule useless in grammar: useless1: '1'
   22333 input.y:7.11-13: warning: rule useless in grammar: useless2: '2'
   22334 input.y:8.11-13: warning: rule useless in grammar: useless3: '3'
   22335 input.y:9.11-13: warning: rule useless in grammar: useless4: '4'
   22336 input.y:10.11-13: warning: rule useless in grammar: useless5: '5'
   22337 input.y:11.11-13: warning: rule useless in grammar: useless6: '6'
   22338 input.y:12.11-13: warning: rule useless in grammar: useless7: '7'
   22339 input.y:13.11-13: warning: rule useless in grammar: useless8: '8'
   22340 input.y:14.11-13: warning: rule useless in grammar: useless9: '9'
   22341 " | \
   22342   $at_diff - "$at_stderr" || at_failed=:
   22343 at_fn_diff_devnull "$at_stdout" || at_failed=:
   22344 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:204"
   22345 $at_failed && at_fn_log_failure
   22346 $at_traceon; }
   22347 
   22348 # Defining POSIXLY_CORRECT causes bison to complain if options are
   22349 # added after the grammar file name, so skip these checks in that
   22350 # case.
   22351 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   22352   at_save_special_files
   22353 
   22354   # To avoid expanding it repeatedly, store specified stdout.
   22355   : >expout
   22356 
   22357   # Run with -Werror.
   22358   { set +x
   22359 $as_echo "$at_srcdir/reduce.at:204: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Werror"
   22360 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Werror" "reduce.at:204"
   22361 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y -Werror
   22362 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22363 at_status=$? at_failed=false
   22364 $at_check_filter
   22365 echo stderr:; tee stderr <"$at_stderr"
   22366 $at_diff expout "$at_stdout" || at_failed=:
   22367 at_fn_check_status 1 $at_status "$at_srcdir/reduce.at:204"
   22368 $at_failed && at_fn_log_failure
   22369 $at_traceon; }
   22370 
   22371 
   22372   # Build expected stderr up to and including the "warnings being
   22373   # treated as errors" message.
   22374   cat >at-bison-check-warnings <<'_ATEOF'
   22375 input.y: warning: 9 nonterminals useless in grammar
   22376 input.y: warning: 9 rules useless in grammar
   22377 input.y:6.1-8: warning: nonterminal useless in grammar: useless1
   22378 input.y:7.1-8: warning: nonterminal useless in grammar: useless2
   22379 input.y:8.1-8: warning: nonterminal useless in grammar: useless3
   22380 input.y:9.1-8: warning: nonterminal useless in grammar: useless4
   22381 input.y:10.1-8: warning: nonterminal useless in grammar: useless5
   22382 input.y:11.1-8: warning: nonterminal useless in grammar: useless6
   22383 input.y:12.1-8: warning: nonterminal useless in grammar: useless7
   22384 input.y:13.1-8: warning: nonterminal useless in grammar: useless8
   22385 input.y:14.1-8: warning: nonterminal useless in grammar: useless9
   22386 input.y:6.11-13: warning: rule useless in grammar: useless1: '1'
   22387 input.y:7.11-13: warning: rule useless in grammar: useless2: '2'
   22388 input.y:8.11-13: warning: rule useless in grammar: useless3: '3'
   22389 input.y:9.11-13: warning: rule useless in grammar: useless4: '4'
   22390 input.y:10.11-13: warning: rule useless in grammar: useless5: '5'
   22391 input.y:11.11-13: warning: rule useless in grammar: useless6: '6'
   22392 input.y:12.11-13: warning: rule useless in grammar: useless7: '7'
   22393 input.y:13.11-13: warning: rule useless in grammar: useless8: '8'
   22394 input.y:14.11-13: warning: rule useless in grammar: useless9: '9'
   22395 _ATEOF
   22396 
   22397   at_bison_check_first=`sed -n \
   22398     '/: warning: /{=;q;}' at-bison-check-warnings`
   22399   : ${at_bison_check_first:=1}
   22400   at_bison_check_first_tmp=`sed -n \
   22401     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   22402   : ${at_bison_check_first_tmp:=1}
   22403   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   22404     at_bison_check_first=$at_bison_check_first_tmp
   22405   fi
   22406   if test $at_bison_check_first -gt 1; then
   22407     sed -n "1,`expr $at_bison_check_first - 1`"p \
   22408       at-bison-check-warnings > experr
   22409   fi
   22410   echo 'bison: warnings being treated as errors' >> experr
   22411 
   22412   # Finish building expected stderr and check.  Unlike warnings,
   22413   # complaints cause bison to exit early.  Thus, with -Werror, bison
   22414   # does not necessarily report all warnings that it does without
   22415   # -Werror, but it at least reports one.
   22416   at_bison_check_last=`sed -n '$=' stderr`
   22417   : ${at_bison_check_last:=1}
   22418   at_bison_check_last=`expr $at_bison_check_last - 1`
   22419   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   22420     at-bison-check-warnings >> experr
   22421   { set +x
   22422 $as_echo "$at_srcdir/reduce.at:204: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   22423               stderr 1>&2"
   22424 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:204"
   22425 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   22426               stderr 1>&2
   22427 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22428 at_status=$? at_failed=false
   22429 $at_check_filter
   22430 $at_diff experr "$at_stderr" || at_failed=:
   22431 at_fn_diff_devnull "$at_stdout" || at_failed=:
   22432 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:204"
   22433 $at_failed && at_fn_log_failure
   22434 $at_traceon; }
   22435 
   22436 
   22437   # Now check --warnings=error.
   22438   cp stderr experr
   22439   { set +x
   22440 $as_echo "$at_srcdir/reduce.at:204: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=error"
   22441 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=error" "reduce.at:204"
   22442 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y --warnings=error
   22443 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22444 at_status=$? at_failed=false
   22445 $at_check_filter
   22446 $at_diff experr "$at_stderr" || at_failed=:
   22447 $at_diff expout "$at_stdout" || at_failed=:
   22448 at_fn_check_status 1 $at_status "$at_srcdir/reduce.at:204"
   22449 $at_failed && at_fn_log_failure
   22450 $at_traceon; }
   22451 
   22452 
   22453   # Now check -Wnone and --warnings=none by making sure that
   22454   # -Werror doesn't change the exit status when -Wnone or
   22455   # --warnings=none is specified.
   22456   { set +x
   22457 $as_echo "$at_srcdir/reduce.at:204: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Wnone -Werror"
   22458 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Wnone -Werror" "reduce.at:204"
   22459 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y -Wnone -Werror
   22460 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22461 at_status=$? at_failed=false
   22462 $at_check_filter
   22463 at_fn_diff_devnull "$at_stderr" || at_failed=:
   22464 $at_diff expout "$at_stdout" || at_failed=:
   22465 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:204"
   22466 $at_failed && at_fn_log_failure
   22467 $at_traceon; }
   22468 
   22469   { set +x
   22470 $as_echo "$at_srcdir/reduce.at:204: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror"
   22471 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror" "reduce.at:204"
   22472 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror
   22473 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22474 at_status=$? at_failed=false
   22475 $at_check_filter
   22476 at_fn_diff_devnull "$at_stderr" || at_failed=:
   22477 $at_diff expout "$at_stdout" || at_failed=:
   22478 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:204"
   22479 $at_failed && at_fn_log_failure
   22480 $at_traceon; }
   22481 
   22482 
   22483   at_restore_special_files
   22484 fi
   22485 
   22486 { set +x
   22487 $as_echo "$at_srcdir/reduce.at:227: sed -n '/^Grammar/q;/^\$/!p' input.output"
   22488 at_fn_check_prepare_dynamic "sed -n '/^Grammar/q;/^$/!p' input.output" "reduce.at:227"
   22489 ( $at_check_trace; sed -n '/^Grammar/q;/^$/!p' input.output
   22490 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22491 at_status=$? at_failed=false
   22492 $at_check_filter
   22493 at_fn_diff_devnull "$at_stderr" || at_failed=:
   22494 echo >>"$at_stdout"; $as_echo "Nonterminals useless in grammar
   22495    useless1
   22496    useless2
   22497    useless3
   22498    useless4
   22499    useless5
   22500    useless6
   22501    useless7
   22502    useless8
   22503    useless9
   22504 Terminals unused in grammar
   22505    '1'
   22506    '2'
   22507    '3'
   22508    '4'
   22509    '5'
   22510    '6'
   22511    '7'
   22512    '8'
   22513    '9'
   22514 Rules useless in grammar
   22515     2 useless1: '1'
   22516     3 useless2: '2'
   22517     4 useless3: '3'
   22518     5 useless4: '4'
   22519     6 useless5: '5'
   22520     7 useless6: '6'
   22521     8 useless7: '7'
   22522     9 useless8: '8'
   22523    10 useless9: '9'
   22524 " | \
   22525   $at_diff - "$at_stdout" || at_failed=:
   22526 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:227"
   22527 $at_failed && at_fn_log_failure
   22528 $at_traceon; }
   22529 
   22530 
   22531   set +x
   22532   $at_times_p && times >"$at_times_file"
   22533 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   22534 read at_status <"$at_status_file"
   22535 #AT_STOP_104
   22536 #AT_START_105
   22537 at_fn_group_banner 105 'reduce.at:271' \
   22538   "Reduced Automaton" "                              " 6
   22539 at_xfail=no
   22540 (
   22541   $as_echo "105. $at_setup_line: testing $at_desc ..."
   22542   $at_traceon
   22543 
   22544 
   22545 
   22546 
   22547 # The non reduced grammar.
   22548 # ------------------------
   22549 cat >not-reduced.y <<'_ATEOF'
   22550 /* A useless token. */
   22551 %token useless_token
   22552 /* A useful one. */
   22553 %token useful
   22554 %verbose
   22555 %output "not-reduced.c"
   22556 
   22557 %%
   22558 
   22559 exp: useful            { /* A useful action. */ }
   22560    | non_productive    { /* A non productive action. */ }
   22561    ;
   22562 
   22563 not_reachable: useful  { /* A not reachable action. */ }
   22564              ;
   22565 
   22566 non_productive: non_productive useless_token
   22567                        { /* Another non productive action. */ }
   22568               ;
   22569 %%
   22570 _ATEOF
   22571 
   22572 
   22573 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   22574   at_save_special_files
   22575   mkdir xml-tests
   22576     # Don't combine these Bison invocations since we want to be sure that
   22577   # --report=all isn't required to get the full XML file.
   22578   { set +x
   22579 $as_echo "$at_srcdir/reduce.at:300: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   22580                   --graph=xml-tests/test.dot -fcaret not-reduced.y"
   22581 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:300"
   22582 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   22583                   --graph=xml-tests/test.dot -fcaret not-reduced.y
   22584 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22585 at_status=$? at_failed=false
   22586 $at_check_filter
   22587 echo stderr:; cat "$at_stderr"
   22588 echo stdout:; cat "$at_stdout"
   22589 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:300"
   22590 $at_failed && at_fn_log_failure
   22591 $at_traceon; }
   22592 
   22593   { set +x
   22594 $as_echo "$at_srcdir/reduce.at:300: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -fcaret not-reduced.y"
   22595 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -fcaret not-reduced.y" "reduce.at:300"
   22596 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -fcaret not-reduced.y
   22597 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22598 at_status=$? at_failed=false
   22599 $at_check_filter
   22600 echo stderr:; cat "$at_stderr"
   22601 echo stdout:; cat "$at_stdout"
   22602 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:300"
   22603 $at_failed && at_fn_log_failure
   22604 $at_traceon; }
   22605 
   22606     cp xml-tests/test.output expout
   22607   { set +x
   22608 $as_echo "$at_srcdir/reduce.at:300: \$XSLTPROC \\
   22609              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   22610              xml-tests/test.xml"
   22611 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:300"
   22612 ( $at_check_trace; $XSLTPROC \
   22613              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   22614              xml-tests/test.xml
   22615 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22616 at_status=$? at_failed=false
   22617 $at_check_filter
   22618 at_fn_diff_devnull "$at_stderr" || at_failed=:
   22619 $at_diff expout "$at_stdout" || at_failed=:
   22620 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:300"
   22621 $at_failed && at_fn_log_failure
   22622 $at_traceon; }
   22623 
   22624   sort xml-tests/test.dot > expout
   22625   { set +x
   22626 $as_echo "$at_srcdir/reduce.at:300: \$XSLTPROC \\
   22627              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   22628              xml-tests/test.xml | sort"
   22629 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:300"
   22630 ( $at_check_trace; $XSLTPROC \
   22631              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   22632              xml-tests/test.xml | sort
   22633 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22634 at_status=$? at_failed=false
   22635 $at_check_filter
   22636 at_fn_diff_devnull "$at_stderr" || at_failed=:
   22637 $at_diff expout "$at_stdout" || at_failed=:
   22638 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:300"
   22639 $at_failed && at_fn_log_failure
   22640 $at_traceon; }
   22641 
   22642   rm -rf xml-tests expout
   22643   at_restore_special_files
   22644 fi
   22645 { set +x
   22646 $as_echo "$at_srcdir/reduce.at:300: bison -fcaret not-reduced.y"
   22647 at_fn_check_prepare_trace "reduce.at:300"
   22648 ( $at_check_trace; bison -fcaret not-reduced.y
   22649 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22650 at_status=$? at_failed=false
   22651 $at_check_filter
   22652 echo >>"$at_stderr"; $as_echo "not-reduced.y: warning: 2 nonterminals useless in grammar
   22653 not-reduced.y: warning: 3 rules useless in grammar
   22654 not-reduced.y:14.1-13: warning: nonterminal useless in grammar: not_reachable
   22655  not_reachable: useful  { /* A not reachable action. */ }
   22656  ^^^^^^^^^^^^^
   22657 not-reduced.y:11.6-19: warning: nonterminal useless in grammar: non_productive
   22658     | non_productive    { /* A non productive action. */ }
   22659       ^^^^^^^^^^^^^^
   22660 not-reduced.y:11.6-57: warning: rule useless in grammar
   22661     | non_productive    { /* A non productive action. */ }
   22662       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   22663 not-reduced.y:14.16-56: warning: rule useless in grammar
   22664  not_reachable: useful  { /* A not reachable action. */ }
   22665                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   22666 not-reduced.y:17.17-18.63: warning: rule useless in grammar
   22667  non_productive: non_productive useless_token
   22668                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   22669 " | \
   22670   $at_diff - "$at_stderr" || at_failed=:
   22671 at_fn_diff_devnull "$at_stdout" || at_failed=:
   22672 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:300"
   22673 $at_failed && at_fn_log_failure
   22674 $at_traceon; }
   22675 
   22676 # Defining POSIXLY_CORRECT causes bison to complain if options are
   22677 # added after the grammar file name, so skip these checks in that
   22678 # case.
   22679 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   22680   at_save_special_files
   22681 
   22682   # To avoid expanding it repeatedly, store specified stdout.
   22683   : >expout
   22684 
   22685   # Run with -Werror.
   22686   { set +x
   22687 $as_echo "$at_srcdir/reduce.at:300: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret not-reduced.y -Werror"
   22688 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret not-reduced.y -Werror" "reduce.at:300"
   22689 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret not-reduced.y -Werror
   22690 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22691 at_status=$? at_failed=false
   22692 $at_check_filter
   22693 echo stderr:; tee stderr <"$at_stderr"
   22694 $at_diff expout "$at_stdout" || at_failed=:
   22695 at_fn_check_status 1 $at_status "$at_srcdir/reduce.at:300"
   22696 $at_failed && at_fn_log_failure
   22697 $at_traceon; }
   22698 
   22699 
   22700   # Build expected stderr up to and including the "warnings being
   22701   # treated as errors" message.
   22702   cat >at-bison-check-warnings <<'_ATEOF'
   22703 not-reduced.y: warning: 2 nonterminals useless in grammar
   22704 not-reduced.y: warning: 3 rules useless in grammar
   22705 not-reduced.y:14.1-13: warning: nonterminal useless in grammar: not_reachable
   22706  not_reachable: useful  { /* A not reachable action. */ }
   22707  ^^^^^^^^^^^^^
   22708 not-reduced.y:11.6-19: warning: nonterminal useless in grammar: non_productive
   22709     | non_productive    { /* A non productive action. */ }
   22710       ^^^^^^^^^^^^^^
   22711 not-reduced.y:11.6-57: warning: rule useless in grammar
   22712     | non_productive    { /* A non productive action. */ }
   22713       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   22714 not-reduced.y:14.16-56: warning: rule useless in grammar
   22715  not_reachable: useful  { /* A not reachable action. */ }
   22716                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   22717 not-reduced.y:17.17-18.63: warning: rule useless in grammar
   22718  non_productive: non_productive useless_token
   22719                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   22720 _ATEOF
   22721 
   22722   at_bison_check_first=`sed -n \
   22723     '/: warning: /{=;q;}' at-bison-check-warnings`
   22724   : ${at_bison_check_first:=1}
   22725   at_bison_check_first_tmp=`sed -n \
   22726     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   22727   : ${at_bison_check_first_tmp:=1}
   22728   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   22729     at_bison_check_first=$at_bison_check_first_tmp
   22730   fi
   22731   if test $at_bison_check_first -gt 1; then
   22732     sed -n "1,`expr $at_bison_check_first - 1`"p \
   22733       at-bison-check-warnings > experr
   22734   fi
   22735   echo 'bison: warnings being treated as errors' >> experr
   22736 
   22737   # Finish building expected stderr and check.  Unlike warnings,
   22738   # complaints cause bison to exit early.  Thus, with -Werror, bison
   22739   # does not necessarily report all warnings that it does without
   22740   # -Werror, but it at least reports one.
   22741   at_bison_check_last=`sed -n '$=' stderr`
   22742   : ${at_bison_check_last:=1}
   22743   at_bison_check_last=`expr $at_bison_check_last - 1`
   22744   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   22745     at-bison-check-warnings >> experr
   22746   { set +x
   22747 $as_echo "$at_srcdir/reduce.at:300: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   22748               stderr 1>&2"
   22749 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:300"
   22750 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   22751               stderr 1>&2
   22752 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22753 at_status=$? at_failed=false
   22754 $at_check_filter
   22755 $at_diff experr "$at_stderr" || at_failed=:
   22756 at_fn_diff_devnull "$at_stdout" || at_failed=:
   22757 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:300"
   22758 $at_failed && at_fn_log_failure
   22759 $at_traceon; }
   22760 
   22761 
   22762   # Now check --warnings=error.
   22763   cp stderr experr
   22764   { set +x
   22765 $as_echo "$at_srcdir/reduce.at:300: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret not-reduced.y --warnings=error"
   22766 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret not-reduced.y --warnings=error" "reduce.at:300"
   22767 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret not-reduced.y --warnings=error
   22768 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22769 at_status=$? at_failed=false
   22770 $at_check_filter
   22771 $at_diff experr "$at_stderr" || at_failed=:
   22772 $at_diff expout "$at_stdout" || at_failed=:
   22773 at_fn_check_status 1 $at_status "$at_srcdir/reduce.at:300"
   22774 $at_failed && at_fn_log_failure
   22775 $at_traceon; }
   22776 
   22777 
   22778   # Now check -Wnone and --warnings=none by making sure that
   22779   # -Werror doesn't change the exit status when -Wnone or
   22780   # --warnings=none is specified.
   22781   { set +x
   22782 $as_echo "$at_srcdir/reduce.at:300: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret not-reduced.y -Wnone -Werror"
   22783 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret not-reduced.y -Wnone -Werror" "reduce.at:300"
   22784 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret not-reduced.y -Wnone -Werror
   22785 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22786 at_status=$? at_failed=false
   22787 $at_check_filter
   22788 at_fn_diff_devnull "$at_stderr" || at_failed=:
   22789 $at_diff expout "$at_stdout" || at_failed=:
   22790 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:300"
   22791 $at_failed && at_fn_log_failure
   22792 $at_traceon; }
   22793 
   22794   { set +x
   22795 $as_echo "$at_srcdir/reduce.at:300: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret not-reduced.y --warnings=none -Werror"
   22796 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret not-reduced.y --warnings=none -Werror" "reduce.at:300"
   22797 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret not-reduced.y --warnings=none -Werror
   22798 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22799 at_status=$? at_failed=false
   22800 $at_check_filter
   22801 at_fn_diff_devnull "$at_stderr" || at_failed=:
   22802 $at_diff expout "$at_stdout" || at_failed=:
   22803 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:300"
   22804 $at_failed && at_fn_log_failure
   22805 $at_traceon; }
   22806 
   22807 
   22808   at_restore_special_files
   22809 fi
   22810 
   22811 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   22812   at_save_special_files
   22813   mkdir xml-tests
   22814     # Don't combine these Bison invocations since we want to be sure that
   22815   # --report=all isn't required to get the full XML file.
   22816   { set +x
   22817 $as_echo "$at_srcdir/reduce.at:320: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   22818                   --graph=xml-tests/test.dot not-reduced.y"
   22819 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:320"
   22820 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   22821                   --graph=xml-tests/test.dot not-reduced.y
   22822 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22823 at_status=$? at_failed=false
   22824 $at_check_filter
   22825 echo stderr:; cat "$at_stderr"
   22826 echo stdout:; cat "$at_stdout"
   22827 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:320"
   22828 $at_failed && at_fn_log_failure
   22829 $at_traceon; }
   22830 
   22831   { set +x
   22832 $as_echo "$at_srcdir/reduce.at:320: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml not-reduced.y"
   22833 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml not-reduced.y" "reduce.at:320"
   22834 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml not-reduced.y
   22835 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22836 at_status=$? at_failed=false
   22837 $at_check_filter
   22838 echo stderr:; cat "$at_stderr"
   22839 echo stdout:; cat "$at_stdout"
   22840 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:320"
   22841 $at_failed && at_fn_log_failure
   22842 $at_traceon; }
   22843 
   22844     cp xml-tests/test.output expout
   22845   { set +x
   22846 $as_echo "$at_srcdir/reduce.at:320: \$XSLTPROC \\
   22847              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   22848              xml-tests/test.xml"
   22849 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:320"
   22850 ( $at_check_trace; $XSLTPROC \
   22851              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   22852              xml-tests/test.xml
   22853 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22854 at_status=$? at_failed=false
   22855 $at_check_filter
   22856 at_fn_diff_devnull "$at_stderr" || at_failed=:
   22857 $at_diff expout "$at_stdout" || at_failed=:
   22858 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:320"
   22859 $at_failed && at_fn_log_failure
   22860 $at_traceon; }
   22861 
   22862   sort xml-tests/test.dot > expout
   22863   { set +x
   22864 $as_echo "$at_srcdir/reduce.at:320: \$XSLTPROC \\
   22865              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   22866              xml-tests/test.xml | sort"
   22867 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:320"
   22868 ( $at_check_trace; $XSLTPROC \
   22869              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   22870              xml-tests/test.xml | sort
   22871 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22872 at_status=$? at_failed=false
   22873 $at_check_filter
   22874 at_fn_diff_devnull "$at_stderr" || at_failed=:
   22875 $at_diff expout "$at_stdout" || at_failed=:
   22876 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:320"
   22877 $at_failed && at_fn_log_failure
   22878 $at_traceon; }
   22879 
   22880   rm -rf xml-tests expout
   22881   at_restore_special_files
   22882 fi
   22883 { set +x
   22884 $as_echo "$at_srcdir/reduce.at:320: bison not-reduced.y"
   22885 at_fn_check_prepare_trace "reduce.at:320"
   22886 ( $at_check_trace; bison not-reduced.y
   22887 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22888 at_status=$? at_failed=false
   22889 $at_check_filter
   22890 echo >>"$at_stderr"; $as_echo "not-reduced.y: warning: 2 nonterminals useless in grammar
   22891 not-reduced.y: warning: 3 rules useless in grammar
   22892 not-reduced.y:14.1-13: warning: nonterminal useless in grammar: not_reachable
   22893 not-reduced.y:11.6-19: warning: nonterminal useless in grammar: non_productive
   22894 not-reduced.y:11.6-57: warning: rule useless in grammar: exp: non_productive
   22895 not-reduced.y:14.16-56: warning: rule useless in grammar: not_reachable: useful
   22896 not-reduced.y:17.17-18.63: warning: rule useless in grammar: non_productive: non_productive useless_token
   22897 " | \
   22898   $at_diff - "$at_stderr" || at_failed=:
   22899 at_fn_diff_devnull "$at_stdout" || at_failed=:
   22900 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:320"
   22901 $at_failed && at_fn_log_failure
   22902 $at_traceon; }
   22903 
   22904 # Defining POSIXLY_CORRECT causes bison to complain if options are
   22905 # added after the grammar file name, so skip these checks in that
   22906 # case.
   22907 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   22908   at_save_special_files
   22909 
   22910   # To avoid expanding it repeatedly, store specified stdout.
   22911   : >expout
   22912 
   22913   # Run with -Werror.
   22914   { set +x
   22915 $as_echo "$at_srcdir/reduce.at:320: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison not-reduced.y -Werror"
   22916 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison not-reduced.y -Werror" "reduce.at:320"
   22917 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison not-reduced.y -Werror
   22918 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22919 at_status=$? at_failed=false
   22920 $at_check_filter
   22921 echo stderr:; tee stderr <"$at_stderr"
   22922 $at_diff expout "$at_stdout" || at_failed=:
   22923 at_fn_check_status 1 $at_status "$at_srcdir/reduce.at:320"
   22924 $at_failed && at_fn_log_failure
   22925 $at_traceon; }
   22926 
   22927 
   22928   # Build expected stderr up to and including the "warnings being
   22929   # treated as errors" message.
   22930   cat >at-bison-check-warnings <<'_ATEOF'
   22931 not-reduced.y: warning: 2 nonterminals useless in grammar
   22932 not-reduced.y: warning: 3 rules useless in grammar
   22933 not-reduced.y:14.1-13: warning: nonterminal useless in grammar: not_reachable
   22934 not-reduced.y:11.6-19: warning: nonterminal useless in grammar: non_productive
   22935 not-reduced.y:11.6-57: warning: rule useless in grammar: exp: non_productive
   22936 not-reduced.y:14.16-56: warning: rule useless in grammar: not_reachable: useful
   22937 not-reduced.y:17.17-18.63: warning: rule useless in grammar: non_productive: non_productive useless_token
   22938 _ATEOF
   22939 
   22940   at_bison_check_first=`sed -n \
   22941     '/: warning: /{=;q;}' at-bison-check-warnings`
   22942   : ${at_bison_check_first:=1}
   22943   at_bison_check_first_tmp=`sed -n \
   22944     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   22945   : ${at_bison_check_first_tmp:=1}
   22946   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   22947     at_bison_check_first=$at_bison_check_first_tmp
   22948   fi
   22949   if test $at_bison_check_first -gt 1; then
   22950     sed -n "1,`expr $at_bison_check_first - 1`"p \
   22951       at-bison-check-warnings > experr
   22952   fi
   22953   echo 'bison: warnings being treated as errors' >> experr
   22954 
   22955   # Finish building expected stderr and check.  Unlike warnings,
   22956   # complaints cause bison to exit early.  Thus, with -Werror, bison
   22957   # does not necessarily report all warnings that it does without
   22958   # -Werror, but it at least reports one.
   22959   at_bison_check_last=`sed -n '$=' stderr`
   22960   : ${at_bison_check_last:=1}
   22961   at_bison_check_last=`expr $at_bison_check_last - 1`
   22962   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   22963     at-bison-check-warnings >> experr
   22964   { set +x
   22965 $as_echo "$at_srcdir/reduce.at:320: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   22966               stderr 1>&2"
   22967 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:320"
   22968 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   22969               stderr 1>&2
   22970 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22971 at_status=$? at_failed=false
   22972 $at_check_filter
   22973 $at_diff experr "$at_stderr" || at_failed=:
   22974 at_fn_diff_devnull "$at_stdout" || at_failed=:
   22975 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:320"
   22976 $at_failed && at_fn_log_failure
   22977 $at_traceon; }
   22978 
   22979 
   22980   # Now check --warnings=error.
   22981   cp stderr experr
   22982   { set +x
   22983 $as_echo "$at_srcdir/reduce.at:320: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison not-reduced.y --warnings=error"
   22984 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison not-reduced.y --warnings=error" "reduce.at:320"
   22985 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison not-reduced.y --warnings=error
   22986 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   22987 at_status=$? at_failed=false
   22988 $at_check_filter
   22989 $at_diff experr "$at_stderr" || at_failed=:
   22990 $at_diff expout "$at_stdout" || at_failed=:
   22991 at_fn_check_status 1 $at_status "$at_srcdir/reduce.at:320"
   22992 $at_failed && at_fn_log_failure
   22993 $at_traceon; }
   22994 
   22995 
   22996   # Now check -Wnone and --warnings=none by making sure that
   22997   # -Werror doesn't change the exit status when -Wnone or
   22998   # --warnings=none is specified.
   22999   { set +x
   23000 $as_echo "$at_srcdir/reduce.at:320: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison not-reduced.y -Wnone -Werror"
   23001 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison not-reduced.y -Wnone -Werror" "reduce.at:320"
   23002 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison not-reduced.y -Wnone -Werror
   23003 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23004 at_status=$? at_failed=false
   23005 $at_check_filter
   23006 at_fn_diff_devnull "$at_stderr" || at_failed=:
   23007 $at_diff expout "$at_stdout" || at_failed=:
   23008 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:320"
   23009 $at_failed && at_fn_log_failure
   23010 $at_traceon; }
   23011 
   23012   { set +x
   23013 $as_echo "$at_srcdir/reduce.at:320: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison not-reduced.y --warnings=none -Werror"
   23014 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison not-reduced.y --warnings=none -Werror" "reduce.at:320"
   23015 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison not-reduced.y --warnings=none -Werror
   23016 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23017 at_status=$? at_failed=false
   23018 $at_check_filter
   23019 at_fn_diff_devnull "$at_stderr" || at_failed=:
   23020 $at_diff expout "$at_stdout" || at_failed=:
   23021 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:320"
   23022 $at_failed && at_fn_log_failure
   23023 $at_traceon; }
   23024 
   23025 
   23026   at_restore_special_files
   23027 fi
   23028 
   23029 { set +x
   23030 $as_echo "$at_srcdir/reduce.at:330: sed -n '/^Grammar/q;/^\$/!p' not-reduced.output"
   23031 at_fn_check_prepare_dynamic "sed -n '/^Grammar/q;/^$/!p' not-reduced.output" "reduce.at:330"
   23032 ( $at_check_trace; sed -n '/^Grammar/q;/^$/!p' not-reduced.output
   23033 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23034 at_status=$? at_failed=false
   23035 $at_check_filter
   23036 at_fn_diff_devnull "$at_stderr" || at_failed=:
   23037 echo >>"$at_stdout"; $as_echo "Nonterminals useless in grammar
   23038    not_reachable
   23039    non_productive
   23040 Terminals unused in grammar
   23041    useless_token
   23042 Rules useless in grammar
   23043     2 exp: non_productive
   23044     3 not_reachable: useful
   23045     4 non_productive: non_productive useless_token
   23046 " | \
   23047   $at_diff - "$at_stdout" || at_failed=:
   23048 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:330"
   23049 $at_failed && at_fn_log_failure
   23050 $at_traceon; }
   23051 
   23052 
   23053 # The reduced grammar.
   23054 # --------------------
   23055 cat >reduced.y <<'_ATEOF'
   23056 /* A useless token. */
   23057 %token useless_token
   23058 /* A useful one. */
   23059 %token useful
   23060 %verbose
   23061 %output "reduced.c"
   23062 
   23063 %%
   23064 
   23065 exp: useful            { /* A useful action. */ }
   23066 //   | non_productive    { /* A non productive action. */ } */
   23067    ;
   23068 
   23069 //not_reachable: useful  { /* A not reachable action. */ }
   23070 //             ;
   23071 
   23072 //non_productive: non_productive useless_token
   23073 //                       { /* Another non productive action. */ }
   23074 //              ;
   23075 %%
   23076 _ATEOF
   23077 
   23078 
   23079 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   23080   at_save_special_files
   23081   mkdir xml-tests
   23082     # Don't combine these Bison invocations since we want to be sure that
   23083   # --report=all isn't required to get the full XML file.
   23084   { set +x
   23085 $as_echo "$at_srcdir/reduce.at:367: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   23086                   --graph=xml-tests/test.dot reduced.y"
   23087 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:367"
   23088 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   23089                   --graph=xml-tests/test.dot reduced.y
   23090 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23091 at_status=$? at_failed=false
   23092 $at_check_filter
   23093 echo stderr:; cat "$at_stderr"
   23094 echo stdout:; cat "$at_stdout"
   23095 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:367"
   23096 $at_failed && at_fn_log_failure
   23097 $at_traceon; }
   23098 
   23099   { set +x
   23100 $as_echo "$at_srcdir/reduce.at:367: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml reduced.y"
   23101 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml reduced.y" "reduce.at:367"
   23102 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml reduced.y
   23103 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23104 at_status=$? at_failed=false
   23105 $at_check_filter
   23106 echo stderr:; cat "$at_stderr"
   23107 echo stdout:; cat "$at_stdout"
   23108 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:367"
   23109 $at_failed && at_fn_log_failure
   23110 $at_traceon; }
   23111 
   23112     cp xml-tests/test.output expout
   23113   { set +x
   23114 $as_echo "$at_srcdir/reduce.at:367: \$XSLTPROC \\
   23115              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   23116              xml-tests/test.xml"
   23117 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:367"
   23118 ( $at_check_trace; $XSLTPROC \
   23119              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   23120              xml-tests/test.xml
   23121 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23122 at_status=$? at_failed=false
   23123 $at_check_filter
   23124 at_fn_diff_devnull "$at_stderr" || at_failed=:
   23125 $at_diff expout "$at_stdout" || at_failed=:
   23126 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:367"
   23127 $at_failed && at_fn_log_failure
   23128 $at_traceon; }
   23129 
   23130   sort xml-tests/test.dot > expout
   23131   { set +x
   23132 $as_echo "$at_srcdir/reduce.at:367: \$XSLTPROC \\
   23133              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   23134              xml-tests/test.xml | sort"
   23135 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:367"
   23136 ( $at_check_trace; $XSLTPROC \
   23137              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   23138              xml-tests/test.xml | sort
   23139 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23140 at_status=$? at_failed=false
   23141 $at_check_filter
   23142 at_fn_diff_devnull "$at_stderr" || at_failed=:
   23143 $at_diff expout "$at_stdout" || at_failed=:
   23144 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:367"
   23145 $at_failed && at_fn_log_failure
   23146 $at_traceon; }
   23147 
   23148   rm -rf xml-tests expout
   23149   at_restore_special_files
   23150 fi
   23151 { set +x
   23152 $as_echo "$at_srcdir/reduce.at:367: bison reduced.y"
   23153 at_fn_check_prepare_trace "reduce.at:367"
   23154 ( $at_check_trace; bison reduced.y
   23155 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23156 at_status=$? at_failed=false
   23157 $at_check_filter
   23158 at_fn_diff_devnull "$at_stderr" || at_failed=:
   23159 at_fn_diff_devnull "$at_stdout" || at_failed=:
   23160 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:367"
   23161 $at_failed && at_fn_log_failure
   23162 $at_traceon; }
   23163 
   23164 
   23165 
   23166 # Comparing the parsers.
   23167 cp reduced.c expout
   23168 { set +x
   23169 $as_echo "$at_srcdir/reduce.at:371: sed 's/not-reduced/reduced/g' not-reduced.c"
   23170 at_fn_check_prepare_trace "reduce.at:371"
   23171 ( $at_check_trace; sed 's/not-reduced/reduced/g' not-reduced.c
   23172 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23173 at_status=$? at_failed=false
   23174 $at_check_filter
   23175 at_fn_diff_devnull "$at_stderr" || at_failed=:
   23176 $at_diff expout "$at_stdout" || at_failed=:
   23177 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:371"
   23178 $at_failed && at_fn_log_failure
   23179 $at_traceon; }
   23180 
   23181 
   23182   set +x
   23183   $at_times_p && times >"$at_times_file"
   23184 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   23185 read at_status <"$at_status_file"
   23186 #AT_STOP_105
   23187 #AT_START_106
   23188 at_fn_group_banner 106 'reduce.at:381' \
   23189   "Underivable Rules" "                              " 6
   23190 at_xfail=no
   23191 (
   23192   $as_echo "106. $at_setup_line: testing $at_desc ..."
   23193   $at_traceon
   23194 
   23195 
   23196 
   23197 
   23198 cat >input.y <<'_ATEOF'
   23199 %verbose
   23200 %output "input.c"
   23201 %token useful
   23202 %%
   23203 exp: useful | underivable;
   23204 underivable: indirection;
   23205 indirection: underivable;
   23206 _ATEOF
   23207 
   23208 
   23209 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   23210   at_save_special_files
   23211   mkdir xml-tests
   23212     # Don't combine these Bison invocations since we want to be sure that
   23213   # --report=all isn't required to get the full XML file.
   23214   { set +x
   23215 $as_echo "$at_srcdir/reduce.at:395: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   23216                   --graph=xml-tests/test.dot input.y"
   23217 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:395"
   23218 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   23219                   --graph=xml-tests/test.dot input.y
   23220 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23221 at_status=$? at_failed=false
   23222 $at_check_filter
   23223 echo stderr:; cat "$at_stderr"
   23224 echo stdout:; cat "$at_stdout"
   23225 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:395"
   23226 $at_failed && at_fn_log_failure
   23227 $at_traceon; }
   23228 
   23229   { set +x
   23230 $as_echo "$at_srcdir/reduce.at:395: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y"
   23231 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y" "reduce.at:395"
   23232 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml input.y
   23233 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23234 at_status=$? at_failed=false
   23235 $at_check_filter
   23236 echo stderr:; cat "$at_stderr"
   23237 echo stdout:; cat "$at_stdout"
   23238 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:395"
   23239 $at_failed && at_fn_log_failure
   23240 $at_traceon; }
   23241 
   23242     cp xml-tests/test.output expout
   23243   { set +x
   23244 $as_echo "$at_srcdir/reduce.at:395: \$XSLTPROC \\
   23245              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   23246              xml-tests/test.xml"
   23247 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:395"
   23248 ( $at_check_trace; $XSLTPROC \
   23249              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   23250              xml-tests/test.xml
   23251 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23252 at_status=$? at_failed=false
   23253 $at_check_filter
   23254 at_fn_diff_devnull "$at_stderr" || at_failed=:
   23255 $at_diff expout "$at_stdout" || at_failed=:
   23256 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:395"
   23257 $at_failed && at_fn_log_failure
   23258 $at_traceon; }
   23259 
   23260   sort xml-tests/test.dot > expout
   23261   { set +x
   23262 $as_echo "$at_srcdir/reduce.at:395: \$XSLTPROC \\
   23263              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   23264              xml-tests/test.xml | sort"
   23265 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:395"
   23266 ( $at_check_trace; $XSLTPROC \
   23267              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   23268              xml-tests/test.xml | sort
   23269 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23270 at_status=$? at_failed=false
   23271 $at_check_filter
   23272 at_fn_diff_devnull "$at_stderr" || at_failed=:
   23273 $at_diff expout "$at_stdout" || at_failed=:
   23274 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:395"
   23275 $at_failed && at_fn_log_failure
   23276 $at_traceon; }
   23277 
   23278   rm -rf xml-tests expout
   23279   at_restore_special_files
   23280 fi
   23281 { set +x
   23282 $as_echo "$at_srcdir/reduce.at:395: bison input.y"
   23283 at_fn_check_prepare_trace "reduce.at:395"
   23284 ( $at_check_trace; bison input.y
   23285 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23286 at_status=$? at_failed=false
   23287 $at_check_filter
   23288 echo >>"$at_stderr"; $as_echo "input.y: warning: 2 nonterminals useless in grammar
   23289 input.y: warning: 3 rules useless in grammar
   23290 input.y:5.15-25: warning: nonterminal useless in grammar: underivable
   23291 input.y:6.14-24: warning: nonterminal useless in grammar: indirection
   23292 input.y:5.15-25: warning: rule useless in grammar: exp: underivable
   23293 input.y:6.14-24: warning: rule useless in grammar: underivable: indirection
   23294 input.y:7.14-24: warning: rule useless in grammar: indirection: underivable
   23295 " | \
   23296   $at_diff - "$at_stderr" || at_failed=:
   23297 at_fn_diff_devnull "$at_stdout" || at_failed=:
   23298 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:395"
   23299 $at_failed && at_fn_log_failure
   23300 $at_traceon; }
   23301 
   23302 # Defining POSIXLY_CORRECT causes bison to complain if options are
   23303 # added after the grammar file name, so skip these checks in that
   23304 # case.
   23305 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   23306   at_save_special_files
   23307 
   23308   # To avoid expanding it repeatedly, store specified stdout.
   23309   : >expout
   23310 
   23311   # Run with -Werror.
   23312   { set +x
   23313 $as_echo "$at_srcdir/reduce.at:395: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Werror"
   23314 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Werror" "reduce.at:395"
   23315 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y -Werror
   23316 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23317 at_status=$? at_failed=false
   23318 $at_check_filter
   23319 echo stderr:; tee stderr <"$at_stderr"
   23320 $at_diff expout "$at_stdout" || at_failed=:
   23321 at_fn_check_status 1 $at_status "$at_srcdir/reduce.at:395"
   23322 $at_failed && at_fn_log_failure
   23323 $at_traceon; }
   23324 
   23325 
   23326   # Build expected stderr up to and including the "warnings being
   23327   # treated as errors" message.
   23328   cat >at-bison-check-warnings <<'_ATEOF'
   23329 input.y: warning: 2 nonterminals useless in grammar
   23330 input.y: warning: 3 rules useless in grammar
   23331 input.y:5.15-25: warning: nonterminal useless in grammar: underivable
   23332 input.y:6.14-24: warning: nonterminal useless in grammar: indirection
   23333 input.y:5.15-25: warning: rule useless in grammar: exp: underivable
   23334 input.y:6.14-24: warning: rule useless in grammar: underivable: indirection
   23335 input.y:7.14-24: warning: rule useless in grammar: indirection: underivable
   23336 _ATEOF
   23337 
   23338   at_bison_check_first=`sed -n \
   23339     '/: warning: /{=;q;}' at-bison-check-warnings`
   23340   : ${at_bison_check_first:=1}
   23341   at_bison_check_first_tmp=`sed -n \
   23342     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   23343   : ${at_bison_check_first_tmp:=1}
   23344   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   23345     at_bison_check_first=$at_bison_check_first_tmp
   23346   fi
   23347   if test $at_bison_check_first -gt 1; then
   23348     sed -n "1,`expr $at_bison_check_first - 1`"p \
   23349       at-bison-check-warnings > experr
   23350   fi
   23351   echo 'bison: warnings being treated as errors' >> experr
   23352 
   23353   # Finish building expected stderr and check.  Unlike warnings,
   23354   # complaints cause bison to exit early.  Thus, with -Werror, bison
   23355   # does not necessarily report all warnings that it does without
   23356   # -Werror, but it at least reports one.
   23357   at_bison_check_last=`sed -n '$=' stderr`
   23358   : ${at_bison_check_last:=1}
   23359   at_bison_check_last=`expr $at_bison_check_last - 1`
   23360   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   23361     at-bison-check-warnings >> experr
   23362   { set +x
   23363 $as_echo "$at_srcdir/reduce.at:395: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   23364               stderr 1>&2"
   23365 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:395"
   23366 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   23367               stderr 1>&2
   23368 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23369 at_status=$? at_failed=false
   23370 $at_check_filter
   23371 $at_diff experr "$at_stderr" || at_failed=:
   23372 at_fn_diff_devnull "$at_stdout" || at_failed=:
   23373 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:395"
   23374 $at_failed && at_fn_log_failure
   23375 $at_traceon; }
   23376 
   23377 
   23378   # Now check --warnings=error.
   23379   cp stderr experr
   23380   { set +x
   23381 $as_echo "$at_srcdir/reduce.at:395: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=error"
   23382 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=error" "reduce.at:395"
   23383 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y --warnings=error
   23384 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23385 at_status=$? at_failed=false
   23386 $at_check_filter
   23387 $at_diff experr "$at_stderr" || at_failed=:
   23388 $at_diff expout "$at_stdout" || at_failed=:
   23389 at_fn_check_status 1 $at_status "$at_srcdir/reduce.at:395"
   23390 $at_failed && at_fn_log_failure
   23391 $at_traceon; }
   23392 
   23393 
   23394   # Now check -Wnone and --warnings=none by making sure that
   23395   # -Werror doesn't change the exit status when -Wnone or
   23396   # --warnings=none is specified.
   23397   { set +x
   23398 $as_echo "$at_srcdir/reduce.at:395: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Wnone -Werror"
   23399 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y -Wnone -Werror" "reduce.at:395"
   23400 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y -Wnone -Werror
   23401 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23402 at_status=$? at_failed=false
   23403 $at_check_filter
   23404 at_fn_diff_devnull "$at_stderr" || at_failed=:
   23405 $at_diff expout "$at_stdout" || at_failed=:
   23406 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:395"
   23407 $at_failed && at_fn_log_failure
   23408 $at_traceon; }
   23409 
   23410   { set +x
   23411 $as_echo "$at_srcdir/reduce.at:395: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror"
   23412 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror" "reduce.at:395"
   23413 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y --warnings=none -Werror
   23414 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23415 at_status=$? at_failed=false
   23416 $at_check_filter
   23417 at_fn_diff_devnull "$at_stderr" || at_failed=:
   23418 $at_diff expout "$at_stdout" || at_failed=:
   23419 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:395"
   23420 $at_failed && at_fn_log_failure
   23421 $at_traceon; }
   23422 
   23423 
   23424   at_restore_special_files
   23425 fi
   23426 
   23427 { set +x
   23428 $as_echo "$at_srcdir/reduce.at:405: sed -n '/^Grammar/q;/^\$/!p' input.output"
   23429 at_fn_check_prepare_dynamic "sed -n '/^Grammar/q;/^$/!p' input.output" "reduce.at:405"
   23430 ( $at_check_trace; sed -n '/^Grammar/q;/^$/!p' input.output
   23431 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23432 at_status=$? at_failed=false
   23433 $at_check_filter
   23434 at_fn_diff_devnull "$at_stderr" || at_failed=:
   23435 echo >>"$at_stdout"; $as_echo "Nonterminals useless in grammar
   23436    underivable
   23437    indirection
   23438 Rules useless in grammar
   23439     2 exp: underivable
   23440     3 underivable: indirection
   23441     4 indirection: underivable
   23442 " | \
   23443   $at_diff - "$at_stdout" || at_failed=:
   23444 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:405"
   23445 $at_failed && at_fn_log_failure
   23446 $at_traceon; }
   23447 
   23448 
   23449   set +x
   23450   $at_times_p && times >"$at_times_file"
   23451 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   23452 read at_status <"$at_status_file"
   23453 #AT_STOP_106
   23454 #AT_START_107
   23455 at_fn_group_banner 107 'reduce.at:423' \
   23456   "Empty Language" "                                 " 6
   23457 at_xfail=no
   23458 (
   23459   $as_echo "107. $at_setup_line: testing $at_desc ..."
   23460   $at_traceon
   23461 
   23462 
   23463 cat >input.y <<'_ATEOF'
   23464 %output "input.c"
   23465 %%
   23466 exp: exp;
   23467 _ATEOF
   23468 
   23469 
   23470 
   23471 { set +x
   23472 $as_echo "$at_srcdir/reduce.at:431: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y"
   23473 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison input.y" "reduce.at:431"
   23474 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison input.y
   23475 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23476 at_status=$? at_failed=false
   23477 $at_check_filter
   23478 echo >>"$at_stderr"; $as_echo "input.y: warning: 2 nonterminals useless in grammar
   23479 input.y: warning: 2 rules useless in grammar
   23480 input.y:3.1-3: fatal error: start symbol exp does not derive any sentence
   23481 " | \
   23482   $at_diff - "$at_stderr" || at_failed=:
   23483 at_fn_diff_devnull "$at_stdout" || at_failed=:
   23484 at_fn_check_status 1 $at_status "$at_srcdir/reduce.at:431"
   23485 $at_failed && at_fn_log_failure
   23486 $at_traceon; }
   23487 
   23488 
   23489 
   23490   set +x
   23491   $at_times_p && times >"$at_times_file"
   23492 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   23493 read at_status <"$at_status_file"
   23494 #AT_STOP_107
   23495 #AT_START_108
   23496 at_fn_group_banner 108 'reduce.at:474' \
   23497   "no %define lr.type: Single State Split" "         " 6
   23498 at_xfail=no
   23499 (
   23500   $as_echo "108. $at_setup_line: testing $at_desc ..."
   23501   $at_traceon
   23502 
   23503 
   23504 cat >input.y <<'_ATEOF'
   23505 %code top {
   23506 #include <config.h>
   23507 /* We don't need perfect functions for these tests. */
   23508 #undef malloc
   23509 #undef memcmp
   23510 #undef realloc
   23511 }
   23512 
   23513 %code {
   23514   #include <stdio.h>
   23515   static void yyerror ( const char *msg);
   23516   static int yylex (void);
   23517 }
   23518 
   23519 %left 'a'
   23520 // Conflict resolution renders state 12 unreachable for canonical LR(1).  We
   23521 // keep it so that the paser table diff is easier to code.
   23522 %define lr.keep-unreachable-states
   23523 
   23524 %%
   23525 
   23526 
   23527 S: 'a' A 'a' /* rule 1 */
   23528  | 'b' A 'b' /* rule 2 */
   23529  | 'c' c     /* rule 3 */
   23530  ;
   23531 
   23532 /* A conflict should appear after the first 'a' in rules 4 and 5 but only after
   23533    having shifted the first 'a' in rule 1.  However, when LALR(1) merging is
   23534    chosen, the state containing that conflict is reused after having seen the
   23535    first 'b' in rule 2 and then the first 'a' in rules 4 and 5.  In both cases,
   23536    because of the merged state, if the next token is an 'a', the %left forces a
   23537    reduction action with rule 5.  In the latter case, only a shift is actually
   23538    grammatically correct.  Thus, the parser would report a syntax error for the
   23539    grammatically correct sentence "baab" because it would encounter a syntax
   23540    error after that incorrect reduction.
   23541 
   23542    Despite not being LALR(1), Menhir version 20070322 suffers from this problem
   23543    as well.  It uses David Pager's weak compatibility test for merging states.
   23544    Bison and Menhir accept non-LR(1) grammars with conflict resolution.  Pager
   23545    designed his algorithm only for LR(1) grammars.  */
   23546 A: 'a' 'a' /* rule 4 */
   23547  | 'a'     /* rule 5 */
   23548  ;
   23549 
   23550 /* Rule 3, rule 6, and rule 7 ensure that Bison does not report rule 4 as
   23551    useless after conflict resolution.  This proves that, even though LALR(1)
   23552    generates incorrect parser tables sometimes, Bison will not necessarily
   23553    produce any warning to help the user realize it.  */
   23554 c: 'a' 'b' /* rule 6 */
   23555  | A       /* rule 7 */
   23556  ;
   23557 
   23558 
   23559 %%
   23560 #include <stdio.h>
   23561 /* A C error reporting function.  */
   23562 static
   23563 void yyerror ( const char *msg)
   23564 {
   23565   fprintf (stderr, "%s\n", msg);
   23566 }
   23567 static int
   23568 yylex (void)
   23569 {
   23570   static int const input[] = {
   23571     'b', 'a', 'a', 'b', 0
   23572   };
   23573   static int const *inputp = input;
   23574   return *inputp++;
   23575 }
   23576 
   23577 int
   23578 main (void)
   23579 {
   23580   return yyparse ();
   23581 }
   23582 _ATEOF
   23583 
   23584 
   23585 
   23586 # In some versions of Autoconf, AT_CHECK invokes AS_ESCAPE before
   23587 # expanding macros, so it corrupts some special characters in the
   23588 # macros.  To avoid this, expand now and pass it the result with proper
   23589 # string quotation.  Assume args 7 through 12 expand to properly quoted
   23590 # strings.
   23591 
   23592 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   23593   at_save_special_files
   23594   mkdir xml-tests
   23595     # Don't combine these Bison invocations since we want to be sure that
   23596   # --report=all isn't required to get the full XML file.
   23597   { set +x
   23598 $as_echo "$at_srcdir/reduce.at:474: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   23599                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y"
   23600 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:474"
   23601 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   23602                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y
   23603 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23604 at_status=$? at_failed=false
   23605 $at_check_filter
   23606 echo stderr:; cat "$at_stderr"
   23607 echo stdout:; cat "$at_stdout"
   23608 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   23609 $at_failed && at_fn_log_failure
   23610 $at_traceon; }
   23611 
   23612   { set +x
   23613 $as_echo "$at_srcdir/reduce.at:474: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y"
   23614 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y" "reduce.at:474"
   23615 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y
   23616 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23617 at_status=$? at_failed=false
   23618 $at_check_filter
   23619 echo stderr:; cat "$at_stderr"
   23620 echo stdout:; cat "$at_stdout"
   23621 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   23622 $at_failed && at_fn_log_failure
   23623 $at_traceon; }
   23624 
   23625     cp xml-tests/test.output expout
   23626   { set +x
   23627 $as_echo "$at_srcdir/reduce.at:474: \$XSLTPROC \\
   23628              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   23629              xml-tests/test.xml"
   23630 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:474"
   23631 ( $at_check_trace; $XSLTPROC \
   23632              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   23633              xml-tests/test.xml
   23634 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23635 at_status=$? at_failed=false
   23636 $at_check_filter
   23637 at_fn_diff_devnull "$at_stderr" || at_failed=:
   23638 $at_diff expout "$at_stdout" || at_failed=:
   23639 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   23640 $at_failed && at_fn_log_failure
   23641 $at_traceon; }
   23642 
   23643   sort xml-tests/test.dot > expout
   23644   { set +x
   23645 $as_echo "$at_srcdir/reduce.at:474: \$XSLTPROC \\
   23646              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   23647              xml-tests/test.xml | sort"
   23648 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:474"
   23649 ( $at_check_trace; $XSLTPROC \
   23650              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   23651              xml-tests/test.xml | sort
   23652 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23653 at_status=$? at_failed=false
   23654 $at_check_filter
   23655 at_fn_diff_devnull "$at_stderr" || at_failed=:
   23656 $at_diff expout "$at_stdout" || at_failed=:
   23657 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   23658 $at_failed && at_fn_log_failure
   23659 $at_traceon; }
   23660 
   23661   rm -rf xml-tests expout
   23662   at_restore_special_files
   23663 fi
   23664 { set +x
   23665 $as_echo "$at_srcdir/reduce.at:474: bison --report=all --defines -o input.c input.y"
   23666 at_fn_check_prepare_trace "reduce.at:474"
   23667 ( $at_check_trace; bison --report=all --defines -o input.c input.y
   23668 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23669 at_status=$? at_failed=false
   23670 $at_check_filter
   23671 at_fn_diff_devnull "$at_stderr" || at_failed=:
   23672 at_fn_diff_devnull "$at_stdout" || at_failed=:
   23673 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   23674 $at_failed && at_fn_log_failure
   23675 $at_traceon; }
   23676 
   23677 
   23678 
   23679 { set +x
   23680 $as_echo "$at_srcdir/reduce.at:474: sed -n '/^State 0\$/,\$p' input.output"
   23681 at_fn_check_prepare_dynamic "sed -n '/^State 0$/,$p' input.output" "reduce.at:474"
   23682 ( $at_check_trace; sed -n '/^State 0$/,$p' input.output
   23683 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23684 at_status=$? at_failed=false
   23685 $at_check_filter
   23686 at_fn_diff_devnull "$at_stderr" || at_failed=:
   23687 echo >>"$at_stdout"; $as_echo "State 0
   23688 
   23689     0 \$accept: . S \$end
   23690     1 S: . 'a' A 'a'
   23691     2  | . 'b' A 'b'
   23692     3  | . 'c' c
   23693 
   23694     'a'  shift, and go to state 1
   23695     'b'  shift, and go to state 2
   23696     'c'  shift, and go to state 3
   23697 
   23698     S  go to state 4
   23699 
   23700 
   23701 State 1
   23702 
   23703     1 S: 'a' . A 'a'
   23704     4 A: . 'a' 'a'
   23705     5  | . 'a'
   23706 
   23707     'a'  shift, and go to state 5
   23708 
   23709     A  go to state 6
   23710 
   23711 
   23712 State 2
   23713 
   23714     2 S: 'b' . A 'b'
   23715     4 A: . 'a' 'a'
   23716     5  | . 'a'
   23717 
   23718     'a'  shift, and go to state 5
   23719 
   23720     A  go to state 7
   23721 
   23722 
   23723 State 3
   23724 
   23725     3 S: 'c' . c
   23726     4 A: . 'a' 'a'
   23727     5  | . 'a'
   23728     6 c: . 'a' 'b'
   23729     7  | . A
   23730 
   23731     'a'  shift, and go to state 8
   23732 
   23733     A  go to state 9
   23734     c  go to state 10
   23735 
   23736 
   23737 State 4
   23738 
   23739     0 \$accept: S . \$end
   23740 
   23741     \$end  shift, and go to state 11
   23742 
   23743 
   23744 State 5
   23745 
   23746     4 A: 'a' . 'a'
   23747     5  | 'a' .  ['a', 'b']
   23748 
   23749     \$default  reduce using rule 5 (A)
   23750 
   23751     Conflict between rule 5 and token 'a' resolved as reduce (%left 'a').
   23752 
   23753 
   23754 State 6
   23755 
   23756     1 S: 'a' A . 'a'
   23757 
   23758     'a'  shift, and go to state 13
   23759 
   23760 
   23761 State 7
   23762 
   23763     2 S: 'b' A . 'b'
   23764 
   23765     'b'  shift, and go to state 14
   23766 
   23767 
   23768 State 8
   23769 
   23770     4 A: 'a' . 'a'
   23771     5  | 'a' .  [\$end]
   23772     6 c: 'a' . 'b'
   23773 
   23774     'a'  shift, and go to state 12
   23775     'b'  shift, and go to state 15
   23776 
   23777     \$default  reduce using rule 5 (A)
   23778 
   23779 
   23780 State 9
   23781 
   23782     7 c: A .
   23783 
   23784     \$default  reduce using rule 7 (c)
   23785 
   23786 
   23787 State 10
   23788 
   23789     3 S: 'c' c .
   23790 
   23791     \$default  reduce using rule 3 (S)
   23792 
   23793 
   23794 State 11
   23795 
   23796     0 \$accept: S \$end .
   23797 
   23798     \$default  accept
   23799 
   23800 
   23801 State 12
   23802 
   23803     4 A: 'a' 'a' .
   23804 
   23805     \$default  reduce using rule 4 (A)
   23806 
   23807 
   23808 State 13
   23809 
   23810     1 S: 'a' A 'a' .
   23811 
   23812     \$default  reduce using rule 1 (S)
   23813 
   23814 
   23815 State 14
   23816 
   23817     2 S: 'b' A 'b' .
   23818 
   23819     \$default  reduce using rule 2 (S)
   23820 
   23821 
   23822 State 15
   23823 
   23824     6 c: 'a' 'b' .
   23825 
   23826     \$default  reduce using rule 6 (c)
   23827 " | \
   23828   $at_diff - "$at_stdout" || at_failed=:
   23829 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   23830 $at_failed && at_fn_log_failure
   23831 $at_traceon; }
   23832 
   23833 
   23834 
   23835 
   23836 # Canonical LR generates very large tables, resulting in very long
   23837 # files with #line directives that may overflow what the standards
   23838 # (C90 and C++98) guarantee: 32767.  In that case, GCC's -pedantic
   23839 # will issue an error.
   23840 #
   23841 # There is no "" around `wc` since some indent the result.
   23842 
   23843 { set +x
   23844 $as_echo "$at_srcdir/reduce.at:474: \$BISON_C_WORKS"
   23845 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "reduce.at:474"
   23846 ( $at_check_trace; $BISON_C_WORKS
   23847 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23848 at_status=$? at_failed=false
   23849 $at_check_filter
   23850 echo stderr:; cat "$at_stderr"
   23851 echo stdout:; cat "$at_stdout"
   23852 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   23853 $at_failed && at_fn_log_failure
   23854 $at_traceon; }
   23855 
   23856 { set +x
   23857 $as_echo "$at_srcdir/reduce.at:474: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   23858 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "reduce.at:474"
   23859 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   23860 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23861 at_status=$? at_failed=false
   23862 $at_check_filter
   23863 echo stderr:; cat "$at_stderr"
   23864 echo stdout:; cat "$at_stdout"
   23865 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   23866 $at_failed && at_fn_log_failure
   23867 $at_traceon; }
   23868 
   23869 
   23870 { set +x
   23871 $as_echo "$at_srcdir/reduce.at:474:  \$PREPARSER ./input"
   23872 at_fn_check_prepare_dynamic " $PREPARSER ./input" "reduce.at:474"
   23873 ( $at_check_trace;  $PREPARSER ./input
   23874 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23875 at_status=$? at_failed=false
   23876 $at_check_filter
   23877 echo stderr:; tee stderr <"$at_stderr"
   23878 at_fn_diff_devnull "$at_stdout" || at_failed=:
   23879 at_fn_check_status 1 $at_status "$at_srcdir/reduce.at:474"
   23880 $at_failed && at_fn_log_failure
   23881 $at_traceon; }
   23882 
   23883 { set +x
   23884 $as_echo "$at_srcdir/reduce.at:474: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   23885 at_fn_check_prepare_trace "reduce.at:474"
   23886 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   23887 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   23888 at_status=$? at_failed=false
   23889 $at_check_filter
   23890 echo >>"$at_stderr"; $as_echo "syntax error
   23891 " | \
   23892   $at_diff - "$at_stderr" || at_failed=:
   23893 at_fn_diff_devnull "$at_stdout" || at_failed=:
   23894 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   23895 $at_failed && at_fn_log_failure
   23896 $at_traceon; }
   23897 
   23898 
   23899 
   23900 
   23901   set +x
   23902   $at_times_p && times >"$at_times_file"
   23903 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   23904 read at_status <"$at_status_file"
   23905 #AT_STOP_108
   23906 #AT_START_109
   23907 at_fn_group_banner 109 'reduce.at:474' \
   23908   "%define lr.type lalr: Single State Split" "       " 6
   23909 at_xfail=no
   23910 (
   23911   $as_echo "109. $at_setup_line: testing $at_desc ..."
   23912   $at_traceon
   23913 
   23914 
   23915 cat >input.y <<'_ATEOF'
   23916 %code top {
   23917 #include <config.h>
   23918 /* We don't need perfect functions for these tests. */
   23919 #undef malloc
   23920 #undef memcmp
   23921 #undef realloc
   23922 }
   23923 
   23924 %code {
   23925   #include <stdio.h>
   23926   static void yyerror ( const char *msg);
   23927   static int yylex (void);
   23928 }
   23929 
   23930 %define lr.type lalr
   23931 %left 'a'
   23932 // Conflict resolution renders state 12 unreachable for canonical LR(1).  We
   23933 // keep it so that the paser table diff is easier to code.
   23934 %define lr.keep-unreachable-states
   23935 
   23936 %%
   23937 
   23938 
   23939 S: 'a' A 'a' /* rule 1 */
   23940  | 'b' A 'b' /* rule 2 */
   23941  | 'c' c     /* rule 3 */
   23942  ;
   23943 
   23944 /* A conflict should appear after the first 'a' in rules 4 and 5 but only after
   23945    having shifted the first 'a' in rule 1.  However, when LALR(1) merging is
   23946    chosen, the state containing that conflict is reused after having seen the
   23947    first 'b' in rule 2 and then the first 'a' in rules 4 and 5.  In both cases,
   23948    because of the merged state, if the next token is an 'a', the %left forces a
   23949    reduction action with rule 5.  In the latter case, only a shift is actually
   23950    grammatically correct.  Thus, the parser would report a syntax error for the
   23951    grammatically correct sentence "baab" because it would encounter a syntax
   23952    error after that incorrect reduction.
   23953 
   23954    Despite not being LALR(1), Menhir version 20070322 suffers from this problem
   23955    as well.  It uses David Pager's weak compatibility test for merging states.
   23956    Bison and Menhir accept non-LR(1) grammars with conflict resolution.  Pager
   23957    designed his algorithm only for LR(1) grammars.  */
   23958 A: 'a' 'a' /* rule 4 */
   23959  | 'a'     /* rule 5 */
   23960  ;
   23961 
   23962 /* Rule 3, rule 6, and rule 7 ensure that Bison does not report rule 4 as
   23963    useless after conflict resolution.  This proves that, even though LALR(1)
   23964    generates incorrect parser tables sometimes, Bison will not necessarily
   23965    produce any warning to help the user realize it.  */
   23966 c: 'a' 'b' /* rule 6 */
   23967  | A       /* rule 7 */
   23968  ;
   23969 
   23970 
   23971 %%
   23972 #include <stdio.h>
   23973 /* A C error reporting function.  */
   23974 static
   23975 void yyerror ( const char *msg)
   23976 {
   23977   fprintf (stderr, "%s\n", msg);
   23978 }
   23979 static int
   23980 yylex (void)
   23981 {
   23982   static int const input[] = {
   23983     'b', 'a', 'a', 'b', 0
   23984   };
   23985   static int const *inputp = input;
   23986   return *inputp++;
   23987 }
   23988 
   23989 int
   23990 main (void)
   23991 {
   23992   return yyparse ();
   23993 }
   23994 _ATEOF
   23995 
   23996 
   23997 
   23998 # In some versions of Autoconf, AT_CHECK invokes AS_ESCAPE before
   23999 # expanding macros, so it corrupts some special characters in the
   24000 # macros.  To avoid this, expand now and pass it the result with proper
   24001 # string quotation.  Assume args 7 through 12 expand to properly quoted
   24002 # strings.
   24003 
   24004 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   24005   at_save_special_files
   24006   mkdir xml-tests
   24007     # Don't combine these Bison invocations since we want to be sure that
   24008   # --report=all isn't required to get the full XML file.
   24009   { set +x
   24010 $as_echo "$at_srcdir/reduce.at:474: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   24011                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y"
   24012 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:474"
   24013 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   24014                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y
   24015 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24016 at_status=$? at_failed=false
   24017 $at_check_filter
   24018 echo stderr:; cat "$at_stderr"
   24019 echo stdout:; cat "$at_stdout"
   24020 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24021 $at_failed && at_fn_log_failure
   24022 $at_traceon; }
   24023 
   24024   { set +x
   24025 $as_echo "$at_srcdir/reduce.at:474: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y"
   24026 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y" "reduce.at:474"
   24027 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y
   24028 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24029 at_status=$? at_failed=false
   24030 $at_check_filter
   24031 echo stderr:; cat "$at_stderr"
   24032 echo stdout:; cat "$at_stdout"
   24033 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24034 $at_failed && at_fn_log_failure
   24035 $at_traceon; }
   24036 
   24037     cp xml-tests/test.output expout
   24038   { set +x
   24039 $as_echo "$at_srcdir/reduce.at:474: \$XSLTPROC \\
   24040              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   24041              xml-tests/test.xml"
   24042 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:474"
   24043 ( $at_check_trace; $XSLTPROC \
   24044              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   24045              xml-tests/test.xml
   24046 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24047 at_status=$? at_failed=false
   24048 $at_check_filter
   24049 at_fn_diff_devnull "$at_stderr" || at_failed=:
   24050 $at_diff expout "$at_stdout" || at_failed=:
   24051 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24052 $at_failed && at_fn_log_failure
   24053 $at_traceon; }
   24054 
   24055   sort xml-tests/test.dot > expout
   24056   { set +x
   24057 $as_echo "$at_srcdir/reduce.at:474: \$XSLTPROC \\
   24058              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   24059              xml-tests/test.xml | sort"
   24060 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:474"
   24061 ( $at_check_trace; $XSLTPROC \
   24062              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   24063              xml-tests/test.xml | sort
   24064 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24065 at_status=$? at_failed=false
   24066 $at_check_filter
   24067 at_fn_diff_devnull "$at_stderr" || at_failed=:
   24068 $at_diff expout "$at_stdout" || at_failed=:
   24069 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24070 $at_failed && at_fn_log_failure
   24071 $at_traceon; }
   24072 
   24073   rm -rf xml-tests expout
   24074   at_restore_special_files
   24075 fi
   24076 { set +x
   24077 $as_echo "$at_srcdir/reduce.at:474: bison --report=all --defines -o input.c input.y"
   24078 at_fn_check_prepare_trace "reduce.at:474"
   24079 ( $at_check_trace; bison --report=all --defines -o input.c input.y
   24080 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24081 at_status=$? at_failed=false
   24082 $at_check_filter
   24083 at_fn_diff_devnull "$at_stderr" || at_failed=:
   24084 at_fn_diff_devnull "$at_stdout" || at_failed=:
   24085 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24086 $at_failed && at_fn_log_failure
   24087 $at_traceon; }
   24088 
   24089 
   24090 
   24091 { set +x
   24092 $as_echo "$at_srcdir/reduce.at:474: sed -n '/^State 0\$/,\$p' input.output"
   24093 at_fn_check_prepare_dynamic "sed -n '/^State 0$/,$p' input.output" "reduce.at:474"
   24094 ( $at_check_trace; sed -n '/^State 0$/,$p' input.output
   24095 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24096 at_status=$? at_failed=false
   24097 $at_check_filter
   24098 at_fn_diff_devnull "$at_stderr" || at_failed=:
   24099 echo >>"$at_stdout"; $as_echo "State 0
   24100 
   24101     0 \$accept: . S \$end
   24102     1 S: . 'a' A 'a'
   24103     2  | . 'b' A 'b'
   24104     3  | . 'c' c
   24105 
   24106     'a'  shift, and go to state 1
   24107     'b'  shift, and go to state 2
   24108     'c'  shift, and go to state 3
   24109 
   24110     S  go to state 4
   24111 
   24112 
   24113 State 1
   24114 
   24115     1 S: 'a' . A 'a'
   24116     4 A: . 'a' 'a'
   24117     5  | . 'a'
   24118 
   24119     'a'  shift, and go to state 5
   24120 
   24121     A  go to state 6
   24122 
   24123 
   24124 State 2
   24125 
   24126     2 S: 'b' . A 'b'
   24127     4 A: . 'a' 'a'
   24128     5  | . 'a'
   24129 
   24130     'a'  shift, and go to state 5
   24131 
   24132     A  go to state 7
   24133 
   24134 
   24135 State 3
   24136 
   24137     3 S: 'c' . c
   24138     4 A: . 'a' 'a'
   24139     5  | . 'a'
   24140     6 c: . 'a' 'b'
   24141     7  | . A
   24142 
   24143     'a'  shift, and go to state 8
   24144 
   24145     A  go to state 9
   24146     c  go to state 10
   24147 
   24148 
   24149 State 4
   24150 
   24151     0 \$accept: S . \$end
   24152 
   24153     \$end  shift, and go to state 11
   24154 
   24155 
   24156 State 5
   24157 
   24158     4 A: 'a' . 'a'
   24159     5  | 'a' .  ['a', 'b']
   24160 
   24161     \$default  reduce using rule 5 (A)
   24162 
   24163     Conflict between rule 5 and token 'a' resolved as reduce (%left 'a').
   24164 
   24165 
   24166 State 6
   24167 
   24168     1 S: 'a' A . 'a'
   24169 
   24170     'a'  shift, and go to state 13
   24171 
   24172 
   24173 State 7
   24174 
   24175     2 S: 'b' A . 'b'
   24176 
   24177     'b'  shift, and go to state 14
   24178 
   24179 
   24180 State 8
   24181 
   24182     4 A: 'a' . 'a'
   24183     5  | 'a' .  [\$end]
   24184     6 c: 'a' . 'b'
   24185 
   24186     'a'  shift, and go to state 12
   24187     'b'  shift, and go to state 15
   24188 
   24189     \$default  reduce using rule 5 (A)
   24190 
   24191 
   24192 State 9
   24193 
   24194     7 c: A .
   24195 
   24196     \$default  reduce using rule 7 (c)
   24197 
   24198 
   24199 State 10
   24200 
   24201     3 S: 'c' c .
   24202 
   24203     \$default  reduce using rule 3 (S)
   24204 
   24205 
   24206 State 11
   24207 
   24208     0 \$accept: S \$end .
   24209 
   24210     \$default  accept
   24211 
   24212 
   24213 State 12
   24214 
   24215     4 A: 'a' 'a' .
   24216 
   24217     \$default  reduce using rule 4 (A)
   24218 
   24219 
   24220 State 13
   24221 
   24222     1 S: 'a' A 'a' .
   24223 
   24224     \$default  reduce using rule 1 (S)
   24225 
   24226 
   24227 State 14
   24228 
   24229     2 S: 'b' A 'b' .
   24230 
   24231     \$default  reduce using rule 2 (S)
   24232 
   24233 
   24234 State 15
   24235 
   24236     6 c: 'a' 'b' .
   24237 
   24238     \$default  reduce using rule 6 (c)
   24239 " | \
   24240   $at_diff - "$at_stdout" || at_failed=:
   24241 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24242 $at_failed && at_fn_log_failure
   24243 $at_traceon; }
   24244 
   24245 
   24246 
   24247 
   24248 # Canonical LR generates very large tables, resulting in very long
   24249 # files with #line directives that may overflow what the standards
   24250 # (C90 and C++98) guarantee: 32767.  In that case, GCC's -pedantic
   24251 # will issue an error.
   24252 #
   24253 # There is no "" around `wc` since some indent the result.
   24254 
   24255 { set +x
   24256 $as_echo "$at_srcdir/reduce.at:474: \$BISON_C_WORKS"
   24257 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "reduce.at:474"
   24258 ( $at_check_trace; $BISON_C_WORKS
   24259 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24260 at_status=$? at_failed=false
   24261 $at_check_filter
   24262 echo stderr:; cat "$at_stderr"
   24263 echo stdout:; cat "$at_stdout"
   24264 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24265 $at_failed && at_fn_log_failure
   24266 $at_traceon; }
   24267 
   24268 { set +x
   24269 $as_echo "$at_srcdir/reduce.at:474: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   24270 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "reduce.at:474"
   24271 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   24272 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24273 at_status=$? at_failed=false
   24274 $at_check_filter
   24275 echo stderr:; cat "$at_stderr"
   24276 echo stdout:; cat "$at_stdout"
   24277 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24278 $at_failed && at_fn_log_failure
   24279 $at_traceon; }
   24280 
   24281 
   24282 { set +x
   24283 $as_echo "$at_srcdir/reduce.at:474:  \$PREPARSER ./input"
   24284 at_fn_check_prepare_dynamic " $PREPARSER ./input" "reduce.at:474"
   24285 ( $at_check_trace;  $PREPARSER ./input
   24286 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24287 at_status=$? at_failed=false
   24288 $at_check_filter
   24289 echo stderr:; tee stderr <"$at_stderr"
   24290 at_fn_diff_devnull "$at_stdout" || at_failed=:
   24291 at_fn_check_status 1 $at_status "$at_srcdir/reduce.at:474"
   24292 $at_failed && at_fn_log_failure
   24293 $at_traceon; }
   24294 
   24295 { set +x
   24296 $as_echo "$at_srcdir/reduce.at:474: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   24297 at_fn_check_prepare_trace "reduce.at:474"
   24298 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   24299 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24300 at_status=$? at_failed=false
   24301 $at_check_filter
   24302 echo >>"$at_stderr"; $as_echo "syntax error
   24303 " | \
   24304   $at_diff - "$at_stderr" || at_failed=:
   24305 at_fn_diff_devnull "$at_stdout" || at_failed=:
   24306 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24307 $at_failed && at_fn_log_failure
   24308 $at_traceon; }
   24309 
   24310 
   24311 
   24312 
   24313   set +x
   24314   $at_times_p && times >"$at_times_file"
   24315 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   24316 read at_status <"$at_status_file"
   24317 #AT_STOP_109
   24318 #AT_START_110
   24319 at_fn_group_banner 110 'reduce.at:474' \
   24320   "%define lr.type ielr: Single State Split" "       " 6
   24321 at_xfail=no
   24322 (
   24323   $as_echo "110. $at_setup_line: testing $at_desc ..."
   24324   $at_traceon
   24325 
   24326 
   24327 cat >input.y <<'_ATEOF'
   24328 %code top {
   24329 #include <config.h>
   24330 /* We don't need perfect functions for these tests. */
   24331 #undef malloc
   24332 #undef memcmp
   24333 #undef realloc
   24334 }
   24335 
   24336 %code {
   24337   #include <stdio.h>
   24338   static void yyerror ( const char *msg);
   24339   static int yylex (void);
   24340 }
   24341 
   24342 %define lr.type ielr
   24343 %left 'a'
   24344 // Conflict resolution renders state 12 unreachable for canonical LR(1).  We
   24345 // keep it so that the paser table diff is easier to code.
   24346 %define lr.keep-unreachable-states
   24347 
   24348 %%
   24349 
   24350 
   24351 S: 'a' A 'a' /* rule 1 */
   24352  | 'b' A 'b' /* rule 2 */
   24353  | 'c' c     /* rule 3 */
   24354  ;
   24355 
   24356 /* A conflict should appear after the first 'a' in rules 4 and 5 but only after
   24357    having shifted the first 'a' in rule 1.  However, when LALR(1) merging is
   24358    chosen, the state containing that conflict is reused after having seen the
   24359    first 'b' in rule 2 and then the first 'a' in rules 4 and 5.  In both cases,
   24360    because of the merged state, if the next token is an 'a', the %left forces a
   24361    reduction action with rule 5.  In the latter case, only a shift is actually
   24362    grammatically correct.  Thus, the parser would report a syntax error for the
   24363    grammatically correct sentence "baab" because it would encounter a syntax
   24364    error after that incorrect reduction.
   24365 
   24366    Despite not being LALR(1), Menhir version 20070322 suffers from this problem
   24367    as well.  It uses David Pager's weak compatibility test for merging states.
   24368    Bison and Menhir accept non-LR(1) grammars with conflict resolution.  Pager
   24369    designed his algorithm only for LR(1) grammars.  */
   24370 A: 'a' 'a' /* rule 4 */
   24371  | 'a'     /* rule 5 */
   24372  ;
   24373 
   24374 /* Rule 3, rule 6, and rule 7 ensure that Bison does not report rule 4 as
   24375    useless after conflict resolution.  This proves that, even though LALR(1)
   24376    generates incorrect parser tables sometimes, Bison will not necessarily
   24377    produce any warning to help the user realize it.  */
   24378 c: 'a' 'b' /* rule 6 */
   24379  | A       /* rule 7 */
   24380  ;
   24381 
   24382 
   24383 %%
   24384 #include <stdio.h>
   24385 /* A C error reporting function.  */
   24386 static
   24387 void yyerror ( const char *msg)
   24388 {
   24389   fprintf (stderr, "%s\n", msg);
   24390 }
   24391 static int
   24392 yylex (void)
   24393 {
   24394   static int const input[] = {
   24395     'b', 'a', 'a', 'b', 0
   24396   };
   24397   static int const *inputp = input;
   24398   return *inputp++;
   24399 }
   24400 
   24401 int
   24402 main (void)
   24403 {
   24404   return yyparse ();
   24405 }
   24406 _ATEOF
   24407 
   24408 
   24409 
   24410 # In some versions of Autoconf, AT_CHECK invokes AS_ESCAPE before
   24411 # expanding macros, so it corrupts some special characters in the
   24412 # macros.  To avoid this, expand now and pass it the result with proper
   24413 # string quotation.  Assume args 7 through 12 expand to properly quoted
   24414 # strings.
   24415 
   24416 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   24417   at_save_special_files
   24418   mkdir xml-tests
   24419     # Don't combine these Bison invocations since we want to be sure that
   24420   # --report=all isn't required to get the full XML file.
   24421   { set +x
   24422 $as_echo "$at_srcdir/reduce.at:474: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   24423                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y"
   24424 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:474"
   24425 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   24426                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y
   24427 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24428 at_status=$? at_failed=false
   24429 $at_check_filter
   24430 echo stderr:; cat "$at_stderr"
   24431 echo stdout:; cat "$at_stdout"
   24432 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24433 $at_failed && at_fn_log_failure
   24434 $at_traceon; }
   24435 
   24436   { set +x
   24437 $as_echo "$at_srcdir/reduce.at:474: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y"
   24438 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y" "reduce.at:474"
   24439 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y
   24440 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24441 at_status=$? at_failed=false
   24442 $at_check_filter
   24443 echo stderr:; cat "$at_stderr"
   24444 echo stdout:; cat "$at_stdout"
   24445 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24446 $at_failed && at_fn_log_failure
   24447 $at_traceon; }
   24448 
   24449     cp xml-tests/test.output expout
   24450   { set +x
   24451 $as_echo "$at_srcdir/reduce.at:474: \$XSLTPROC \\
   24452              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   24453              xml-tests/test.xml"
   24454 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:474"
   24455 ( $at_check_trace; $XSLTPROC \
   24456              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   24457              xml-tests/test.xml
   24458 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24459 at_status=$? at_failed=false
   24460 $at_check_filter
   24461 at_fn_diff_devnull "$at_stderr" || at_failed=:
   24462 $at_diff expout "$at_stdout" || at_failed=:
   24463 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24464 $at_failed && at_fn_log_failure
   24465 $at_traceon; }
   24466 
   24467   sort xml-tests/test.dot > expout
   24468   { set +x
   24469 $as_echo "$at_srcdir/reduce.at:474: \$XSLTPROC \\
   24470              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   24471              xml-tests/test.xml | sort"
   24472 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:474"
   24473 ( $at_check_trace; $XSLTPROC \
   24474              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   24475              xml-tests/test.xml | sort
   24476 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24477 at_status=$? at_failed=false
   24478 $at_check_filter
   24479 at_fn_diff_devnull "$at_stderr" || at_failed=:
   24480 $at_diff expout "$at_stdout" || at_failed=:
   24481 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24482 $at_failed && at_fn_log_failure
   24483 $at_traceon; }
   24484 
   24485   rm -rf xml-tests expout
   24486   at_restore_special_files
   24487 fi
   24488 { set +x
   24489 $as_echo "$at_srcdir/reduce.at:474: bison --report=all --defines -o input.c input.y"
   24490 at_fn_check_prepare_trace "reduce.at:474"
   24491 ( $at_check_trace; bison --report=all --defines -o input.c input.y
   24492 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24493 at_status=$? at_failed=false
   24494 $at_check_filter
   24495 at_fn_diff_devnull "$at_stderr" || at_failed=:
   24496 at_fn_diff_devnull "$at_stdout" || at_failed=:
   24497 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24498 $at_failed && at_fn_log_failure
   24499 $at_traceon; }
   24500 
   24501 
   24502 
   24503 { set +x
   24504 $as_echo "$at_srcdir/reduce.at:474: sed -n '/^State 0\$/,\$p' input.output"
   24505 at_fn_check_prepare_dynamic "sed -n '/^State 0$/,$p' input.output" "reduce.at:474"
   24506 ( $at_check_trace; sed -n '/^State 0$/,$p' input.output
   24507 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24508 at_status=$? at_failed=false
   24509 $at_check_filter
   24510 at_fn_diff_devnull "$at_stderr" || at_failed=:
   24511 echo >>"$at_stdout"; $as_echo "State 0
   24512 
   24513     0 \$accept: . S \$end
   24514     1 S: . 'a' A 'a'
   24515     2  | . 'b' A 'b'
   24516     3  | . 'c' c
   24517 
   24518     'a'  shift, and go to state 1
   24519     'b'  shift, and go to state 2
   24520     'c'  shift, and go to state 3
   24521 
   24522     S  go to state 4
   24523 
   24524 
   24525 State 1
   24526 
   24527     1 S: 'a' . A 'a'
   24528     4 A: . 'a' 'a'
   24529     5  | . 'a'
   24530 
   24531     'a'  shift, and go to state 5
   24532 
   24533     A  go to state 6
   24534 
   24535 
   24536 State 2
   24537 
   24538     2 S: 'b' . A 'b'
   24539     4 A: . 'a' 'a'
   24540     5  | . 'a'
   24541 
   24542     'a'  shift, and go to state 16
   24543 
   24544     A  go to state 7
   24545 
   24546 
   24547 State 3
   24548 
   24549     3 S: 'c' . c
   24550     4 A: . 'a' 'a'
   24551     5  | . 'a'
   24552     6 c: . 'a' 'b'
   24553     7  | . A
   24554 
   24555     'a'  shift, and go to state 8
   24556 
   24557     A  go to state 9
   24558     c  go to state 10
   24559 
   24560 
   24561 State 4
   24562 
   24563     0 \$accept: S . \$end
   24564 
   24565     \$end  shift, and go to state 11
   24566 
   24567 
   24568 State 5
   24569 
   24570     4 A: 'a' . 'a'
   24571     5  | 'a' .  ['a']
   24572 
   24573     \$default  reduce using rule 5 (A)
   24574 
   24575     Conflict between rule 5 and token 'a' resolved as reduce (%left 'a').
   24576 
   24577 
   24578 State 6
   24579 
   24580     1 S: 'a' A . 'a'
   24581 
   24582     'a'  shift, and go to state 13
   24583 
   24584 
   24585 State 7
   24586 
   24587     2 S: 'b' A . 'b'
   24588 
   24589     'b'  shift, and go to state 14
   24590 
   24591 
   24592 State 8
   24593 
   24594     4 A: 'a' . 'a'
   24595     5  | 'a' .  [\$end]
   24596     6 c: 'a' . 'b'
   24597 
   24598     'a'  shift, and go to state 12
   24599     'b'  shift, and go to state 15
   24600 
   24601     \$default  reduce using rule 5 (A)
   24602 
   24603 
   24604 State 9
   24605 
   24606     7 c: A .
   24607 
   24608     \$default  reduce using rule 7 (c)
   24609 
   24610 
   24611 State 10
   24612 
   24613     3 S: 'c' c .
   24614 
   24615     \$default  reduce using rule 3 (S)
   24616 
   24617 
   24618 State 11
   24619 
   24620     0 \$accept: S \$end .
   24621 
   24622     \$default  accept
   24623 
   24624 
   24625 State 12
   24626 
   24627     4 A: 'a' 'a' .
   24628 
   24629     \$default  reduce using rule 4 (A)
   24630 
   24631 
   24632 State 13
   24633 
   24634     1 S: 'a' A 'a' .
   24635 
   24636     \$default  reduce using rule 1 (S)
   24637 
   24638 
   24639 State 14
   24640 
   24641     2 S: 'b' A 'b' .
   24642 
   24643     \$default  reduce using rule 2 (S)
   24644 
   24645 
   24646 State 15
   24647 
   24648     6 c: 'a' 'b' .
   24649 
   24650     \$default  reduce using rule 6 (c)
   24651 
   24652 
   24653 State 16
   24654 
   24655     4 A: 'a' . 'a'
   24656     5  | 'a' .  ['b']
   24657 
   24658     'a'  shift, and go to state 12
   24659 
   24660     \$default  reduce using rule 5 (A)
   24661 " | \
   24662   $at_diff - "$at_stdout" || at_failed=:
   24663 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24664 $at_failed && at_fn_log_failure
   24665 $at_traceon; }
   24666 
   24667 
   24668 
   24669 
   24670 # Canonical LR generates very large tables, resulting in very long
   24671 # files with #line directives that may overflow what the standards
   24672 # (C90 and C++98) guarantee: 32767.  In that case, GCC's -pedantic
   24673 # will issue an error.
   24674 #
   24675 # There is no "" around `wc` since some indent the result.
   24676 
   24677 { set +x
   24678 $as_echo "$at_srcdir/reduce.at:474: \$BISON_C_WORKS"
   24679 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "reduce.at:474"
   24680 ( $at_check_trace; $BISON_C_WORKS
   24681 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24682 at_status=$? at_failed=false
   24683 $at_check_filter
   24684 echo stderr:; cat "$at_stderr"
   24685 echo stdout:; cat "$at_stdout"
   24686 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24687 $at_failed && at_fn_log_failure
   24688 $at_traceon; }
   24689 
   24690 { set +x
   24691 $as_echo "$at_srcdir/reduce.at:474: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   24692 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "reduce.at:474"
   24693 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   24694 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24695 at_status=$? at_failed=false
   24696 $at_check_filter
   24697 echo stderr:; cat "$at_stderr"
   24698 echo stdout:; cat "$at_stdout"
   24699 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24700 $at_failed && at_fn_log_failure
   24701 $at_traceon; }
   24702 
   24703 
   24704 { set +x
   24705 $as_echo "$at_srcdir/reduce.at:474:  \$PREPARSER ./input"
   24706 at_fn_check_prepare_dynamic " $PREPARSER ./input" "reduce.at:474"
   24707 ( $at_check_trace;  $PREPARSER ./input
   24708 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24709 at_status=$? at_failed=false
   24710 $at_check_filter
   24711 echo stderr:; tee stderr <"$at_stderr"
   24712 at_fn_diff_devnull "$at_stdout" || at_failed=:
   24713 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24714 $at_failed && at_fn_log_failure
   24715 $at_traceon; }
   24716 
   24717 { set +x
   24718 $as_echo "$at_srcdir/reduce.at:474: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   24719 at_fn_check_prepare_trace "reduce.at:474"
   24720 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   24721 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24722 at_status=$? at_failed=false
   24723 $at_check_filter
   24724 at_fn_diff_devnull "$at_stderr" || at_failed=:
   24725 at_fn_diff_devnull "$at_stdout" || at_failed=:
   24726 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24727 $at_failed && at_fn_log_failure
   24728 $at_traceon; }
   24729 
   24730 
   24731 
   24732 
   24733   set +x
   24734   $at_times_p && times >"$at_times_file"
   24735 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   24736 read at_status <"$at_status_file"
   24737 #AT_STOP_110
   24738 #AT_START_111
   24739 at_fn_group_banner 111 'reduce.at:474' \
   24740   "%define lr.type canonical-lr: Single State Split" "" 6
   24741 at_xfail=no
   24742 (
   24743   $as_echo "111. $at_setup_line: testing $at_desc ..."
   24744   $at_traceon
   24745 
   24746 
   24747 cat >input.y <<'_ATEOF'
   24748 %code top {
   24749 #include <config.h>
   24750 /* We don't need perfect functions for these tests. */
   24751 #undef malloc
   24752 #undef memcmp
   24753 #undef realloc
   24754 }
   24755 
   24756 %code {
   24757   #include <stdio.h>
   24758   static void yyerror ( const char *msg);
   24759   static int yylex (void);
   24760 }
   24761 
   24762 %define lr.type canonical-lr
   24763 %left 'a'
   24764 // Conflict resolution renders state 12 unreachable for canonical LR(1).  We
   24765 // keep it so that the paser table diff is easier to code.
   24766 %define lr.keep-unreachable-states
   24767 
   24768 %%
   24769 
   24770 
   24771 S: 'a' A 'a' /* rule 1 */
   24772  | 'b' A 'b' /* rule 2 */
   24773  | 'c' c     /* rule 3 */
   24774  ;
   24775 
   24776 /* A conflict should appear after the first 'a' in rules 4 and 5 but only after
   24777    having shifted the first 'a' in rule 1.  However, when LALR(1) merging is
   24778    chosen, the state containing that conflict is reused after having seen the
   24779    first 'b' in rule 2 and then the first 'a' in rules 4 and 5.  In both cases,
   24780    because of the merged state, if the next token is an 'a', the %left forces a
   24781    reduction action with rule 5.  In the latter case, only a shift is actually
   24782    grammatically correct.  Thus, the parser would report a syntax error for the
   24783    grammatically correct sentence "baab" because it would encounter a syntax
   24784    error after that incorrect reduction.
   24785 
   24786    Despite not being LALR(1), Menhir version 20070322 suffers from this problem
   24787    as well.  It uses David Pager's weak compatibility test for merging states.
   24788    Bison and Menhir accept non-LR(1) grammars with conflict resolution.  Pager
   24789    designed his algorithm only for LR(1) grammars.  */
   24790 A: 'a' 'a' /* rule 4 */
   24791  | 'a'     /* rule 5 */
   24792  ;
   24793 
   24794 /* Rule 3, rule 6, and rule 7 ensure that Bison does not report rule 4 as
   24795    useless after conflict resolution.  This proves that, even though LALR(1)
   24796    generates incorrect parser tables sometimes, Bison will not necessarily
   24797    produce any warning to help the user realize it.  */
   24798 c: 'a' 'b' /* rule 6 */
   24799  | A       /* rule 7 */
   24800  ;
   24801 
   24802 
   24803 %%
   24804 #include <stdio.h>
   24805 /* A C error reporting function.  */
   24806 static
   24807 void yyerror ( const char *msg)
   24808 {
   24809   fprintf (stderr, "%s\n", msg);
   24810 }
   24811 static int
   24812 yylex (void)
   24813 {
   24814   static int const input[] = {
   24815     'b', 'a', 'a', 'b', 0
   24816   };
   24817   static int const *inputp = input;
   24818   return *inputp++;
   24819 }
   24820 
   24821 int
   24822 main (void)
   24823 {
   24824   return yyparse ();
   24825 }
   24826 _ATEOF
   24827 
   24828 
   24829 
   24830 # In some versions of Autoconf, AT_CHECK invokes AS_ESCAPE before
   24831 # expanding macros, so it corrupts some special characters in the
   24832 # macros.  To avoid this, expand now and pass it the result with proper
   24833 # string quotation.  Assume args 7 through 12 expand to properly quoted
   24834 # strings.
   24835 
   24836 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   24837   at_save_special_files
   24838   mkdir xml-tests
   24839     # Don't combine these Bison invocations since we want to be sure that
   24840   # --report=all isn't required to get the full XML file.
   24841   { set +x
   24842 $as_echo "$at_srcdir/reduce.at:474: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   24843                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y"
   24844 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:474"
   24845 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   24846                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y
   24847 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24848 at_status=$? at_failed=false
   24849 $at_check_filter
   24850 echo stderr:; cat "$at_stderr"
   24851 echo stdout:; cat "$at_stdout"
   24852 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24853 $at_failed && at_fn_log_failure
   24854 $at_traceon; }
   24855 
   24856   { set +x
   24857 $as_echo "$at_srcdir/reduce.at:474: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y"
   24858 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y" "reduce.at:474"
   24859 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y
   24860 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24861 at_status=$? at_failed=false
   24862 $at_check_filter
   24863 echo stderr:; cat "$at_stderr"
   24864 echo stdout:; cat "$at_stdout"
   24865 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24866 $at_failed && at_fn_log_failure
   24867 $at_traceon; }
   24868 
   24869     cp xml-tests/test.output expout
   24870   { set +x
   24871 $as_echo "$at_srcdir/reduce.at:474: \$XSLTPROC \\
   24872              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   24873              xml-tests/test.xml"
   24874 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:474"
   24875 ( $at_check_trace; $XSLTPROC \
   24876              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   24877              xml-tests/test.xml
   24878 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24879 at_status=$? at_failed=false
   24880 $at_check_filter
   24881 at_fn_diff_devnull "$at_stderr" || at_failed=:
   24882 $at_diff expout "$at_stdout" || at_failed=:
   24883 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24884 $at_failed && at_fn_log_failure
   24885 $at_traceon; }
   24886 
   24887   sort xml-tests/test.dot > expout
   24888   { set +x
   24889 $as_echo "$at_srcdir/reduce.at:474: \$XSLTPROC \\
   24890              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   24891              xml-tests/test.xml | sort"
   24892 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:474"
   24893 ( $at_check_trace; $XSLTPROC \
   24894              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   24895              xml-tests/test.xml | sort
   24896 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24897 at_status=$? at_failed=false
   24898 $at_check_filter
   24899 at_fn_diff_devnull "$at_stderr" || at_failed=:
   24900 $at_diff expout "$at_stdout" || at_failed=:
   24901 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24902 $at_failed && at_fn_log_failure
   24903 $at_traceon; }
   24904 
   24905   rm -rf xml-tests expout
   24906   at_restore_special_files
   24907 fi
   24908 { set +x
   24909 $as_echo "$at_srcdir/reduce.at:474: bison --report=all --defines -o input.c input.y"
   24910 at_fn_check_prepare_trace "reduce.at:474"
   24911 ( $at_check_trace; bison --report=all --defines -o input.c input.y
   24912 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24913 at_status=$? at_failed=false
   24914 $at_check_filter
   24915 at_fn_diff_devnull "$at_stderr" || at_failed=:
   24916 at_fn_diff_devnull "$at_stdout" || at_failed=:
   24917 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   24918 $at_failed && at_fn_log_failure
   24919 $at_traceon; }
   24920 
   24921 
   24922 
   24923 { set +x
   24924 $as_echo "$at_srcdir/reduce.at:474: sed -n '/^State 0\$/,\$p' input.output"
   24925 at_fn_check_prepare_dynamic "sed -n '/^State 0$/,$p' input.output" "reduce.at:474"
   24926 ( $at_check_trace; sed -n '/^State 0$/,$p' input.output
   24927 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   24928 at_status=$? at_failed=false
   24929 $at_check_filter
   24930 at_fn_diff_devnull "$at_stderr" || at_failed=:
   24931 echo >>"$at_stdout"; $as_echo "State 0
   24932 
   24933     0 \$accept: . S \$end
   24934     1 S: . 'a' A 'a'
   24935     2  | . 'b' A 'b'
   24936     3  | . 'c' c
   24937 
   24938     'a'  shift, and go to state 1
   24939     'b'  shift, and go to state 2
   24940     'c'  shift, and go to state 3
   24941 
   24942     S  go to state 4
   24943 
   24944 
   24945 State 1
   24946 
   24947     1 S: 'a' . A 'a'
   24948     4 A: . 'a' 'a'
   24949     5  | . 'a'
   24950 
   24951     'a'  shift, and go to state 5
   24952 
   24953     A  go to state 6
   24954 
   24955 
   24956 State 2
   24957 
   24958     2 S: 'b' . A 'b'
   24959     4 A: . 'a' 'a'
   24960     5  | . 'a'
   24961 
   24962     'a'  shift, and go to state 16
   24963 
   24964     A  go to state 7
   24965 
   24966 
   24967 State 3
   24968 
   24969     3 S: 'c' . c
   24970     4 A: . 'a' 'a'
   24971     5  | . 'a'
   24972     6 c: . 'a' 'b'
   24973     7  | . A
   24974 
   24975     'a'  shift, and go to state 8
   24976 
   24977     A  go to state 9
   24978     c  go to state 10
   24979 
   24980 
   24981 State 4
   24982 
   24983     0 \$accept: S . \$end
   24984 
   24985     \$end  shift, and go to state 11
   24986 
   24987 
   24988 State 5
   24989 
   24990     4 A: 'a' . 'a'
   24991     5  | 'a' .  ['a']
   24992 
   24993     'a'  reduce using rule 5 (A)
   24994 
   24995     Conflict between rule 5 and token 'a' resolved as reduce (%left 'a').
   24996 
   24997 
   24998 State 6
   24999 
   25000     1 S: 'a' A . 'a'
   25001 
   25002     'a'  shift, and go to state 13
   25003 
   25004 
   25005 State 7
   25006 
   25007     2 S: 'b' A . 'b'
   25008 
   25009     'b'  shift, and go to state 14
   25010 
   25011 
   25012 State 8
   25013 
   25014     4 A: 'a' . 'a'
   25015     5  | 'a' .  [\$end]
   25016     6 c: 'a' . 'b'
   25017 
   25018     'a'  shift, and go to state 17
   25019     'b'  shift, and go to state 15
   25020 
   25021     \$end  reduce using rule 5 (A)
   25022 
   25023 
   25024 State 9
   25025 
   25026     7 c: A .  [\$end]
   25027 
   25028     \$end  reduce using rule 7 (c)
   25029 
   25030 
   25031 State 10
   25032 
   25033     3 S: 'c' c .  [\$end]
   25034 
   25035     \$end  reduce using rule 3 (S)
   25036 
   25037 
   25038 State 11
   25039 
   25040     0 \$accept: S \$end .
   25041 
   25042     \$default  accept
   25043 
   25044 
   25045 State 12
   25046 
   25047     4 A: 'a' 'a' .  ['a']
   25048 
   25049     'a'  reduce using rule 4 (A)
   25050 
   25051 
   25052 State 13
   25053 
   25054     1 S: 'a' A 'a' .  [\$end]
   25055 
   25056     \$end  reduce using rule 1 (S)
   25057 
   25058 
   25059 State 14
   25060 
   25061     2 S: 'b' A 'b' .  [\$end]
   25062 
   25063     \$end  reduce using rule 2 (S)
   25064 
   25065 
   25066 State 15
   25067 
   25068     6 c: 'a' 'b' .  [\$end]
   25069 
   25070     \$end  reduce using rule 6 (c)
   25071 
   25072 
   25073 State 16
   25074 
   25075     4 A: 'a' . 'a'
   25076     5  | 'a' .  ['b']
   25077 
   25078     'a'  shift, and go to state 18
   25079 
   25080     'b'  reduce using rule 5 (A)
   25081 
   25082 
   25083 State 17
   25084 
   25085     4 A: 'a' 'a' .  [\$end]
   25086 
   25087     \$end  reduce using rule 4 (A)
   25088 
   25089 
   25090 State 18
   25091 
   25092     4 A: 'a' 'a' .  ['b']
   25093 
   25094     'b'  reduce using rule 4 (A)
   25095 " | \
   25096   $at_diff - "$at_stdout" || at_failed=:
   25097 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   25098 $at_failed && at_fn_log_failure
   25099 $at_traceon; }
   25100 
   25101 
   25102 
   25103 
   25104 # Canonical LR generates very large tables, resulting in very long
   25105 # files with #line directives that may overflow what the standards
   25106 # (C90 and C++98) guarantee: 32767.  In that case, GCC's -pedantic
   25107 # will issue an error.
   25108 #
   25109 # There is no "" around `wc` since some indent the result.
   25110 if test 32767 -lt `wc -l < input.c`; then
   25111   CFLAGS=`echo " $CFLAGS " | sed -e 's/ -pedantic //'`
   25112   CXXFLAGS=`echo " $CXXFLAGS " | sed -e 's/ -pedantic //'`
   25113 fi
   25114 { set +x
   25115 $as_echo "$at_srcdir/reduce.at:474: \$BISON_C_WORKS"
   25116 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "reduce.at:474"
   25117 ( $at_check_trace; $BISON_C_WORKS
   25118 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25119 at_status=$? at_failed=false
   25120 $at_check_filter
   25121 echo stderr:; cat "$at_stderr"
   25122 echo stdout:; cat "$at_stdout"
   25123 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   25124 $at_failed && at_fn_log_failure
   25125 $at_traceon; }
   25126 
   25127 { set +x
   25128 $as_echo "$at_srcdir/reduce.at:474: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   25129 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "reduce.at:474"
   25130 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   25131 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25132 at_status=$? at_failed=false
   25133 $at_check_filter
   25134 echo stderr:; cat "$at_stderr"
   25135 echo stdout:; cat "$at_stdout"
   25136 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   25137 $at_failed && at_fn_log_failure
   25138 $at_traceon; }
   25139 
   25140 
   25141 { set +x
   25142 $as_echo "$at_srcdir/reduce.at:474:  \$PREPARSER ./input"
   25143 at_fn_check_prepare_dynamic " $PREPARSER ./input" "reduce.at:474"
   25144 ( $at_check_trace;  $PREPARSER ./input
   25145 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25146 at_status=$? at_failed=false
   25147 $at_check_filter
   25148 echo stderr:; tee stderr <"$at_stderr"
   25149 at_fn_diff_devnull "$at_stdout" || at_failed=:
   25150 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   25151 $at_failed && at_fn_log_failure
   25152 $at_traceon; }
   25153 
   25154 { set +x
   25155 $as_echo "$at_srcdir/reduce.at:474: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   25156 at_fn_check_prepare_trace "reduce.at:474"
   25157 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   25158 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25159 at_status=$? at_failed=false
   25160 $at_check_filter
   25161 at_fn_diff_devnull "$at_stderr" || at_failed=:
   25162 at_fn_diff_devnull "$at_stdout" || at_failed=:
   25163 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:474"
   25164 $at_failed && at_fn_log_failure
   25165 $at_traceon; }
   25166 
   25167 
   25168 
   25169 
   25170   set +x
   25171   $at_times_p && times >"$at_times_file"
   25172 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   25173 read at_status <"$at_status_file"
   25174 #AT_STOP_111
   25175 #AT_START_112
   25176 at_fn_group_banner 112 'reduce.at:707' \
   25177   "no %define lr.type: Lane Split" "                 " 6
   25178 at_xfail=no
   25179 (
   25180   $as_echo "112. $at_setup_line: testing $at_desc ..."
   25181   $at_traceon
   25182 
   25183 
   25184 cat >input.y <<'_ATEOF'
   25185 %code top {
   25186 #include <config.h>
   25187 /* We don't need perfect functions for these tests. */
   25188 #undef malloc
   25189 #undef memcmp
   25190 #undef realloc
   25191 }
   25192 
   25193 %code {
   25194   #include <stdio.h>
   25195   static void yyerror ( const char *msg);
   25196   static int yylex (void);
   25197 }
   25198 
   25199 %left 'a'
   25200 // Conflict resolution renders state 16 unreachable for canonical LR(1).  We
   25201 // keep it so that the paser table diff is easier to code.
   25202 %define lr.keep-unreachable-states
   25203 
   25204 %%
   25205 
   25206 
   25207 /* Similar to the last test case set but two states must be split.  */
   25208 S: 'a' A 'a' /* rule 1 */
   25209  | 'b' A 'b' /* rule 2 */
   25210  | 'c' c     /* rule 3 */
   25211  ;
   25212 
   25213 A: 'a' 'a' 'a' /* rule 4 */
   25214  | 'a' 'a'     /* rule 5 */
   25215  ;
   25216 
   25217 c: 'a' 'a' 'b' /* rule 6 */
   25218  | A           /* rule 7 */
   25219  ;
   25220 
   25221 
   25222 %%
   25223 #include <stdio.h>
   25224 /* A C error reporting function.  */
   25225 static
   25226 void yyerror ( const char *msg)
   25227 {
   25228   fprintf (stderr, "%s\n", msg);
   25229 }
   25230 static int
   25231 yylex (void)
   25232 {
   25233   static int const input[] = {
   25234     'b', 'a', 'a', 'a', 'b', 0
   25235   };
   25236   static int const *inputp = input;
   25237   return *inputp++;
   25238 }
   25239 
   25240 int
   25241 main (void)
   25242 {
   25243   return yyparse ();
   25244 }
   25245 _ATEOF
   25246 
   25247 
   25248 
   25249 # In some versions of Autoconf, AT_CHECK invokes AS_ESCAPE before
   25250 # expanding macros, so it corrupts some special characters in the
   25251 # macros.  To avoid this, expand now and pass it the result with proper
   25252 # string quotation.  Assume args 7 through 12 expand to properly quoted
   25253 # strings.
   25254 
   25255 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   25256   at_save_special_files
   25257   mkdir xml-tests
   25258     # Don't combine these Bison invocations since we want to be sure that
   25259   # --report=all isn't required to get the full XML file.
   25260   { set +x
   25261 $as_echo "$at_srcdir/reduce.at:707: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   25262                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y"
   25263 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:707"
   25264 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   25265                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y
   25266 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25267 at_status=$? at_failed=false
   25268 $at_check_filter
   25269 echo stderr:; cat "$at_stderr"
   25270 echo stdout:; cat "$at_stdout"
   25271 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   25272 $at_failed && at_fn_log_failure
   25273 $at_traceon; }
   25274 
   25275   { set +x
   25276 $as_echo "$at_srcdir/reduce.at:707: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y"
   25277 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y" "reduce.at:707"
   25278 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y
   25279 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25280 at_status=$? at_failed=false
   25281 $at_check_filter
   25282 echo stderr:; cat "$at_stderr"
   25283 echo stdout:; cat "$at_stdout"
   25284 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   25285 $at_failed && at_fn_log_failure
   25286 $at_traceon; }
   25287 
   25288     cp xml-tests/test.output expout
   25289   { set +x
   25290 $as_echo "$at_srcdir/reduce.at:707: \$XSLTPROC \\
   25291              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   25292              xml-tests/test.xml"
   25293 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:707"
   25294 ( $at_check_trace; $XSLTPROC \
   25295              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   25296              xml-tests/test.xml
   25297 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25298 at_status=$? at_failed=false
   25299 $at_check_filter
   25300 at_fn_diff_devnull "$at_stderr" || at_failed=:
   25301 $at_diff expout "$at_stdout" || at_failed=:
   25302 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   25303 $at_failed && at_fn_log_failure
   25304 $at_traceon; }
   25305 
   25306   sort xml-tests/test.dot > expout
   25307   { set +x
   25308 $as_echo "$at_srcdir/reduce.at:707: \$XSLTPROC \\
   25309              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   25310              xml-tests/test.xml | sort"
   25311 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:707"
   25312 ( $at_check_trace; $XSLTPROC \
   25313              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   25314              xml-tests/test.xml | sort
   25315 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25316 at_status=$? at_failed=false
   25317 $at_check_filter
   25318 at_fn_diff_devnull "$at_stderr" || at_failed=:
   25319 $at_diff expout "$at_stdout" || at_failed=:
   25320 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   25321 $at_failed && at_fn_log_failure
   25322 $at_traceon; }
   25323 
   25324   rm -rf xml-tests expout
   25325   at_restore_special_files
   25326 fi
   25327 { set +x
   25328 $as_echo "$at_srcdir/reduce.at:707: bison --report=all --defines -o input.c input.y"
   25329 at_fn_check_prepare_trace "reduce.at:707"
   25330 ( $at_check_trace; bison --report=all --defines -o input.c input.y
   25331 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25332 at_status=$? at_failed=false
   25333 $at_check_filter
   25334 at_fn_diff_devnull "$at_stderr" || at_failed=:
   25335 at_fn_diff_devnull "$at_stdout" || at_failed=:
   25336 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   25337 $at_failed && at_fn_log_failure
   25338 $at_traceon; }
   25339 
   25340 
   25341 
   25342 { set +x
   25343 $as_echo "$at_srcdir/reduce.at:707: sed -n '/^State 0\$/,\$p' input.output"
   25344 at_fn_check_prepare_dynamic "sed -n '/^State 0$/,$p' input.output" "reduce.at:707"
   25345 ( $at_check_trace; sed -n '/^State 0$/,$p' input.output
   25346 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25347 at_status=$? at_failed=false
   25348 $at_check_filter
   25349 at_fn_diff_devnull "$at_stderr" || at_failed=:
   25350 echo >>"$at_stdout"; $as_echo "State 0
   25351 
   25352     0 \$accept: . S \$end
   25353     1 S: . 'a' A 'a'
   25354     2  | . 'b' A 'b'
   25355     3  | . 'c' c
   25356 
   25357     'a'  shift, and go to state 1
   25358     'b'  shift, and go to state 2
   25359     'c'  shift, and go to state 3
   25360 
   25361     S  go to state 4
   25362 
   25363 
   25364 State 1
   25365 
   25366     1 S: 'a' . A 'a'
   25367     4 A: . 'a' 'a' 'a'
   25368     5  | . 'a' 'a'
   25369 
   25370     'a'  shift, and go to state 5
   25371 
   25372     A  go to state 6
   25373 
   25374 
   25375 State 2
   25376 
   25377     2 S: 'b' . A 'b'
   25378     4 A: . 'a' 'a' 'a'
   25379     5  | . 'a' 'a'
   25380 
   25381     'a'  shift, and go to state 5
   25382 
   25383     A  go to state 7
   25384 
   25385 
   25386 State 3
   25387 
   25388     3 S: 'c' . c
   25389     4 A: . 'a' 'a' 'a'
   25390     5  | . 'a' 'a'
   25391     6 c: . 'a' 'a' 'b'
   25392     7  | . A
   25393 
   25394     'a'  shift, and go to state 8
   25395 
   25396     A  go to state 9
   25397     c  go to state 10
   25398 
   25399 
   25400 State 4
   25401 
   25402     0 \$accept: S . \$end
   25403 
   25404     \$end  shift, and go to state 11
   25405 
   25406 
   25407 State 5
   25408 
   25409     4 A: 'a' . 'a' 'a'
   25410     5  | 'a' . 'a'
   25411 
   25412     'a'  shift, and go to state 12
   25413 
   25414 
   25415 State 6
   25416 
   25417     1 S: 'a' A . 'a'
   25418 
   25419     'a'  shift, and go to state 13
   25420 
   25421 
   25422 State 7
   25423 
   25424     2 S: 'b' A . 'b'
   25425 
   25426     'b'  shift, and go to state 14
   25427 
   25428 
   25429 State 8
   25430 
   25431     4 A: 'a' . 'a' 'a'
   25432     5  | 'a' . 'a'
   25433     6 c: 'a' . 'a' 'b'
   25434 
   25435     'a'  shift, and go to state 15
   25436 
   25437 
   25438 State 9
   25439 
   25440     7 c: A .
   25441 
   25442     \$default  reduce using rule 7 (c)
   25443 
   25444 
   25445 State 10
   25446 
   25447     3 S: 'c' c .
   25448 
   25449     \$default  reduce using rule 3 (S)
   25450 
   25451 
   25452 State 11
   25453 
   25454     0 \$accept: S \$end .
   25455 
   25456     \$default  accept
   25457 
   25458 
   25459 State 12
   25460 
   25461     4 A: 'a' 'a' . 'a'
   25462     5  | 'a' 'a' .  ['a', 'b']
   25463 
   25464     \$default  reduce using rule 5 (A)
   25465 
   25466     Conflict between rule 5 and token 'a' resolved as reduce (%left 'a').
   25467 
   25468 
   25469 State 13
   25470 
   25471     1 S: 'a' A 'a' .
   25472 
   25473     \$default  reduce using rule 1 (S)
   25474 
   25475 
   25476 State 14
   25477 
   25478     2 S: 'b' A 'b' .
   25479 
   25480     \$default  reduce using rule 2 (S)
   25481 
   25482 
   25483 State 15
   25484 
   25485     4 A: 'a' 'a' . 'a'
   25486     5  | 'a' 'a' .  [\$end]
   25487     6 c: 'a' 'a' . 'b'
   25488 
   25489     'a'  shift, and go to state 16
   25490     'b'  shift, and go to state 17
   25491 
   25492     \$default  reduce using rule 5 (A)
   25493 
   25494 
   25495 State 16
   25496 
   25497     4 A: 'a' 'a' 'a' .
   25498 
   25499     \$default  reduce using rule 4 (A)
   25500 
   25501 
   25502 State 17
   25503 
   25504     6 c: 'a' 'a' 'b' .
   25505 
   25506     \$default  reduce using rule 6 (c)
   25507 " | \
   25508   $at_diff - "$at_stdout" || at_failed=:
   25509 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   25510 $at_failed && at_fn_log_failure
   25511 $at_traceon; }
   25512 
   25513 
   25514 
   25515 
   25516 # Canonical LR generates very large tables, resulting in very long
   25517 # files with #line directives that may overflow what the standards
   25518 # (C90 and C++98) guarantee: 32767.  In that case, GCC's -pedantic
   25519 # will issue an error.
   25520 #
   25521 # There is no "" around `wc` since some indent the result.
   25522 
   25523 { set +x
   25524 $as_echo "$at_srcdir/reduce.at:707: \$BISON_C_WORKS"
   25525 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "reduce.at:707"
   25526 ( $at_check_trace; $BISON_C_WORKS
   25527 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25528 at_status=$? at_failed=false
   25529 $at_check_filter
   25530 echo stderr:; cat "$at_stderr"
   25531 echo stdout:; cat "$at_stdout"
   25532 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   25533 $at_failed && at_fn_log_failure
   25534 $at_traceon; }
   25535 
   25536 { set +x
   25537 $as_echo "$at_srcdir/reduce.at:707: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   25538 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "reduce.at:707"
   25539 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   25540 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25541 at_status=$? at_failed=false
   25542 $at_check_filter
   25543 echo stderr:; cat "$at_stderr"
   25544 echo stdout:; cat "$at_stdout"
   25545 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   25546 $at_failed && at_fn_log_failure
   25547 $at_traceon; }
   25548 
   25549 
   25550 { set +x
   25551 $as_echo "$at_srcdir/reduce.at:707:  \$PREPARSER ./input"
   25552 at_fn_check_prepare_dynamic " $PREPARSER ./input" "reduce.at:707"
   25553 ( $at_check_trace;  $PREPARSER ./input
   25554 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25555 at_status=$? at_failed=false
   25556 $at_check_filter
   25557 echo stderr:; tee stderr <"$at_stderr"
   25558 at_fn_diff_devnull "$at_stdout" || at_failed=:
   25559 at_fn_check_status 1 $at_status "$at_srcdir/reduce.at:707"
   25560 $at_failed && at_fn_log_failure
   25561 $at_traceon; }
   25562 
   25563 { set +x
   25564 $as_echo "$at_srcdir/reduce.at:707: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   25565 at_fn_check_prepare_trace "reduce.at:707"
   25566 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   25567 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25568 at_status=$? at_failed=false
   25569 $at_check_filter
   25570 echo >>"$at_stderr"; $as_echo "syntax error
   25571 " | \
   25572   $at_diff - "$at_stderr" || at_failed=:
   25573 at_fn_diff_devnull "$at_stdout" || at_failed=:
   25574 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   25575 $at_failed && at_fn_log_failure
   25576 $at_traceon; }
   25577 
   25578 
   25579 
   25580 
   25581   set +x
   25582   $at_times_p && times >"$at_times_file"
   25583 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   25584 read at_status <"$at_status_file"
   25585 #AT_STOP_112
   25586 #AT_START_113
   25587 at_fn_group_banner 113 'reduce.at:707' \
   25588   "%define lr.type lalr: Lane Split" "               " 6
   25589 at_xfail=no
   25590 (
   25591   $as_echo "113. $at_setup_line: testing $at_desc ..."
   25592   $at_traceon
   25593 
   25594 
   25595 cat >input.y <<'_ATEOF'
   25596 %code top {
   25597 #include <config.h>
   25598 /* We don't need perfect functions for these tests. */
   25599 #undef malloc
   25600 #undef memcmp
   25601 #undef realloc
   25602 }
   25603 
   25604 %code {
   25605   #include <stdio.h>
   25606   static void yyerror ( const char *msg);
   25607   static int yylex (void);
   25608 }
   25609 
   25610 %define lr.type lalr
   25611 %left 'a'
   25612 // Conflict resolution renders state 16 unreachable for canonical LR(1).  We
   25613 // keep it so that the paser table diff is easier to code.
   25614 %define lr.keep-unreachable-states
   25615 
   25616 %%
   25617 
   25618 
   25619 /* Similar to the last test case set but two states must be split.  */
   25620 S: 'a' A 'a' /* rule 1 */
   25621  | 'b' A 'b' /* rule 2 */
   25622  | 'c' c     /* rule 3 */
   25623  ;
   25624 
   25625 A: 'a' 'a' 'a' /* rule 4 */
   25626  | 'a' 'a'     /* rule 5 */
   25627  ;
   25628 
   25629 c: 'a' 'a' 'b' /* rule 6 */
   25630  | A           /* rule 7 */
   25631  ;
   25632 
   25633 
   25634 %%
   25635 #include <stdio.h>
   25636 /* A C error reporting function.  */
   25637 static
   25638 void yyerror ( const char *msg)
   25639 {
   25640   fprintf (stderr, "%s\n", msg);
   25641 }
   25642 static int
   25643 yylex (void)
   25644 {
   25645   static int const input[] = {
   25646     'b', 'a', 'a', 'a', 'b', 0
   25647   };
   25648   static int const *inputp = input;
   25649   return *inputp++;
   25650 }
   25651 
   25652 int
   25653 main (void)
   25654 {
   25655   return yyparse ();
   25656 }
   25657 _ATEOF
   25658 
   25659 
   25660 
   25661 # In some versions of Autoconf, AT_CHECK invokes AS_ESCAPE before
   25662 # expanding macros, so it corrupts some special characters in the
   25663 # macros.  To avoid this, expand now and pass it the result with proper
   25664 # string quotation.  Assume args 7 through 12 expand to properly quoted
   25665 # strings.
   25666 
   25667 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   25668   at_save_special_files
   25669   mkdir xml-tests
   25670     # Don't combine these Bison invocations since we want to be sure that
   25671   # --report=all isn't required to get the full XML file.
   25672   { set +x
   25673 $as_echo "$at_srcdir/reduce.at:707: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   25674                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y"
   25675 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:707"
   25676 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   25677                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y
   25678 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25679 at_status=$? at_failed=false
   25680 $at_check_filter
   25681 echo stderr:; cat "$at_stderr"
   25682 echo stdout:; cat "$at_stdout"
   25683 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   25684 $at_failed && at_fn_log_failure
   25685 $at_traceon; }
   25686 
   25687   { set +x
   25688 $as_echo "$at_srcdir/reduce.at:707: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y"
   25689 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y" "reduce.at:707"
   25690 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y
   25691 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25692 at_status=$? at_failed=false
   25693 $at_check_filter
   25694 echo stderr:; cat "$at_stderr"
   25695 echo stdout:; cat "$at_stdout"
   25696 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   25697 $at_failed && at_fn_log_failure
   25698 $at_traceon; }
   25699 
   25700     cp xml-tests/test.output expout
   25701   { set +x
   25702 $as_echo "$at_srcdir/reduce.at:707: \$XSLTPROC \\
   25703              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   25704              xml-tests/test.xml"
   25705 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:707"
   25706 ( $at_check_trace; $XSLTPROC \
   25707              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   25708              xml-tests/test.xml
   25709 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25710 at_status=$? at_failed=false
   25711 $at_check_filter
   25712 at_fn_diff_devnull "$at_stderr" || at_failed=:
   25713 $at_diff expout "$at_stdout" || at_failed=:
   25714 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   25715 $at_failed && at_fn_log_failure
   25716 $at_traceon; }
   25717 
   25718   sort xml-tests/test.dot > expout
   25719   { set +x
   25720 $as_echo "$at_srcdir/reduce.at:707: \$XSLTPROC \\
   25721              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   25722              xml-tests/test.xml | sort"
   25723 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:707"
   25724 ( $at_check_trace; $XSLTPROC \
   25725              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   25726              xml-tests/test.xml | sort
   25727 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25728 at_status=$? at_failed=false
   25729 $at_check_filter
   25730 at_fn_diff_devnull "$at_stderr" || at_failed=:
   25731 $at_diff expout "$at_stdout" || at_failed=:
   25732 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   25733 $at_failed && at_fn_log_failure
   25734 $at_traceon; }
   25735 
   25736   rm -rf xml-tests expout
   25737   at_restore_special_files
   25738 fi
   25739 { set +x
   25740 $as_echo "$at_srcdir/reduce.at:707: bison --report=all --defines -o input.c input.y"
   25741 at_fn_check_prepare_trace "reduce.at:707"
   25742 ( $at_check_trace; bison --report=all --defines -o input.c input.y
   25743 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25744 at_status=$? at_failed=false
   25745 $at_check_filter
   25746 at_fn_diff_devnull "$at_stderr" || at_failed=:
   25747 at_fn_diff_devnull "$at_stdout" || at_failed=:
   25748 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   25749 $at_failed && at_fn_log_failure
   25750 $at_traceon; }
   25751 
   25752 
   25753 
   25754 { set +x
   25755 $as_echo "$at_srcdir/reduce.at:707: sed -n '/^State 0\$/,\$p' input.output"
   25756 at_fn_check_prepare_dynamic "sed -n '/^State 0$/,$p' input.output" "reduce.at:707"
   25757 ( $at_check_trace; sed -n '/^State 0$/,$p' input.output
   25758 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25759 at_status=$? at_failed=false
   25760 $at_check_filter
   25761 at_fn_diff_devnull "$at_stderr" || at_failed=:
   25762 echo >>"$at_stdout"; $as_echo "State 0
   25763 
   25764     0 \$accept: . S \$end
   25765     1 S: . 'a' A 'a'
   25766     2  | . 'b' A 'b'
   25767     3  | . 'c' c
   25768 
   25769     'a'  shift, and go to state 1
   25770     'b'  shift, and go to state 2
   25771     'c'  shift, and go to state 3
   25772 
   25773     S  go to state 4
   25774 
   25775 
   25776 State 1
   25777 
   25778     1 S: 'a' . A 'a'
   25779     4 A: . 'a' 'a' 'a'
   25780     5  | . 'a' 'a'
   25781 
   25782     'a'  shift, and go to state 5
   25783 
   25784     A  go to state 6
   25785 
   25786 
   25787 State 2
   25788 
   25789     2 S: 'b' . A 'b'
   25790     4 A: . 'a' 'a' 'a'
   25791     5  | . 'a' 'a'
   25792 
   25793     'a'  shift, and go to state 5
   25794 
   25795     A  go to state 7
   25796 
   25797 
   25798 State 3
   25799 
   25800     3 S: 'c' . c
   25801     4 A: . 'a' 'a' 'a'
   25802     5  | . 'a' 'a'
   25803     6 c: . 'a' 'a' 'b'
   25804     7  | . A
   25805 
   25806     'a'  shift, and go to state 8
   25807 
   25808     A  go to state 9
   25809     c  go to state 10
   25810 
   25811 
   25812 State 4
   25813 
   25814     0 \$accept: S . \$end
   25815 
   25816     \$end  shift, and go to state 11
   25817 
   25818 
   25819 State 5
   25820 
   25821     4 A: 'a' . 'a' 'a'
   25822     5  | 'a' . 'a'
   25823 
   25824     'a'  shift, and go to state 12
   25825 
   25826 
   25827 State 6
   25828 
   25829     1 S: 'a' A . 'a'
   25830 
   25831     'a'  shift, and go to state 13
   25832 
   25833 
   25834 State 7
   25835 
   25836     2 S: 'b' A . 'b'
   25837 
   25838     'b'  shift, and go to state 14
   25839 
   25840 
   25841 State 8
   25842 
   25843     4 A: 'a' . 'a' 'a'
   25844     5  | 'a' . 'a'
   25845     6 c: 'a' . 'a' 'b'
   25846 
   25847     'a'  shift, and go to state 15
   25848 
   25849 
   25850 State 9
   25851 
   25852     7 c: A .
   25853 
   25854     \$default  reduce using rule 7 (c)
   25855 
   25856 
   25857 State 10
   25858 
   25859     3 S: 'c' c .
   25860 
   25861     \$default  reduce using rule 3 (S)
   25862 
   25863 
   25864 State 11
   25865 
   25866     0 \$accept: S \$end .
   25867 
   25868     \$default  accept
   25869 
   25870 
   25871 State 12
   25872 
   25873     4 A: 'a' 'a' . 'a'
   25874     5  | 'a' 'a' .  ['a', 'b']
   25875 
   25876     \$default  reduce using rule 5 (A)
   25877 
   25878     Conflict between rule 5 and token 'a' resolved as reduce (%left 'a').
   25879 
   25880 
   25881 State 13
   25882 
   25883     1 S: 'a' A 'a' .
   25884 
   25885     \$default  reduce using rule 1 (S)
   25886 
   25887 
   25888 State 14
   25889 
   25890     2 S: 'b' A 'b' .
   25891 
   25892     \$default  reduce using rule 2 (S)
   25893 
   25894 
   25895 State 15
   25896 
   25897     4 A: 'a' 'a' . 'a'
   25898     5  | 'a' 'a' .  [\$end]
   25899     6 c: 'a' 'a' . 'b'
   25900 
   25901     'a'  shift, and go to state 16
   25902     'b'  shift, and go to state 17
   25903 
   25904     \$default  reduce using rule 5 (A)
   25905 
   25906 
   25907 State 16
   25908 
   25909     4 A: 'a' 'a' 'a' .
   25910 
   25911     \$default  reduce using rule 4 (A)
   25912 
   25913 
   25914 State 17
   25915 
   25916     6 c: 'a' 'a' 'b' .
   25917 
   25918     \$default  reduce using rule 6 (c)
   25919 " | \
   25920   $at_diff - "$at_stdout" || at_failed=:
   25921 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   25922 $at_failed && at_fn_log_failure
   25923 $at_traceon; }
   25924 
   25925 
   25926 
   25927 
   25928 # Canonical LR generates very large tables, resulting in very long
   25929 # files with #line directives that may overflow what the standards
   25930 # (C90 and C++98) guarantee: 32767.  In that case, GCC's -pedantic
   25931 # will issue an error.
   25932 #
   25933 # There is no "" around `wc` since some indent the result.
   25934 
   25935 { set +x
   25936 $as_echo "$at_srcdir/reduce.at:707: \$BISON_C_WORKS"
   25937 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "reduce.at:707"
   25938 ( $at_check_trace; $BISON_C_WORKS
   25939 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25940 at_status=$? at_failed=false
   25941 $at_check_filter
   25942 echo stderr:; cat "$at_stderr"
   25943 echo stdout:; cat "$at_stdout"
   25944 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   25945 $at_failed && at_fn_log_failure
   25946 $at_traceon; }
   25947 
   25948 { set +x
   25949 $as_echo "$at_srcdir/reduce.at:707: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   25950 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "reduce.at:707"
   25951 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   25952 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25953 at_status=$? at_failed=false
   25954 $at_check_filter
   25955 echo stderr:; cat "$at_stderr"
   25956 echo stdout:; cat "$at_stdout"
   25957 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   25958 $at_failed && at_fn_log_failure
   25959 $at_traceon; }
   25960 
   25961 
   25962 { set +x
   25963 $as_echo "$at_srcdir/reduce.at:707:  \$PREPARSER ./input"
   25964 at_fn_check_prepare_dynamic " $PREPARSER ./input" "reduce.at:707"
   25965 ( $at_check_trace;  $PREPARSER ./input
   25966 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25967 at_status=$? at_failed=false
   25968 $at_check_filter
   25969 echo stderr:; tee stderr <"$at_stderr"
   25970 at_fn_diff_devnull "$at_stdout" || at_failed=:
   25971 at_fn_check_status 1 $at_status "$at_srcdir/reduce.at:707"
   25972 $at_failed && at_fn_log_failure
   25973 $at_traceon; }
   25974 
   25975 { set +x
   25976 $as_echo "$at_srcdir/reduce.at:707: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   25977 at_fn_check_prepare_trace "reduce.at:707"
   25978 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   25979 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   25980 at_status=$? at_failed=false
   25981 $at_check_filter
   25982 echo >>"$at_stderr"; $as_echo "syntax error
   25983 " | \
   25984   $at_diff - "$at_stderr" || at_failed=:
   25985 at_fn_diff_devnull "$at_stdout" || at_failed=:
   25986 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   25987 $at_failed && at_fn_log_failure
   25988 $at_traceon; }
   25989 
   25990 
   25991 
   25992 
   25993   set +x
   25994   $at_times_p && times >"$at_times_file"
   25995 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   25996 read at_status <"$at_status_file"
   25997 #AT_STOP_113
   25998 #AT_START_114
   25999 at_fn_group_banner 114 'reduce.at:707' \
   26000   "%define lr.type ielr: Lane Split" "               " 6
   26001 at_xfail=no
   26002 (
   26003   $as_echo "114. $at_setup_line: testing $at_desc ..."
   26004   $at_traceon
   26005 
   26006 
   26007 cat >input.y <<'_ATEOF'
   26008 %code top {
   26009 #include <config.h>
   26010 /* We don't need perfect functions for these tests. */
   26011 #undef malloc
   26012 #undef memcmp
   26013 #undef realloc
   26014 }
   26015 
   26016 %code {
   26017   #include <stdio.h>
   26018   static void yyerror ( const char *msg);
   26019   static int yylex (void);
   26020 }
   26021 
   26022 %define lr.type ielr
   26023 %left 'a'
   26024 // Conflict resolution renders state 16 unreachable for canonical LR(1).  We
   26025 // keep it so that the paser table diff is easier to code.
   26026 %define lr.keep-unreachable-states
   26027 
   26028 %%
   26029 
   26030 
   26031 /* Similar to the last test case set but two states must be split.  */
   26032 S: 'a' A 'a' /* rule 1 */
   26033  | 'b' A 'b' /* rule 2 */
   26034  | 'c' c     /* rule 3 */
   26035  ;
   26036 
   26037 A: 'a' 'a' 'a' /* rule 4 */
   26038  | 'a' 'a'     /* rule 5 */
   26039  ;
   26040 
   26041 c: 'a' 'a' 'b' /* rule 6 */
   26042  | A           /* rule 7 */
   26043  ;
   26044 
   26045 
   26046 %%
   26047 #include <stdio.h>
   26048 /* A C error reporting function.  */
   26049 static
   26050 void yyerror ( const char *msg)
   26051 {
   26052   fprintf (stderr, "%s\n", msg);
   26053 }
   26054 static int
   26055 yylex (void)
   26056 {
   26057   static int const input[] = {
   26058     'b', 'a', 'a', 'a', 'b', 0
   26059   };
   26060   static int const *inputp = input;
   26061   return *inputp++;
   26062 }
   26063 
   26064 int
   26065 main (void)
   26066 {
   26067   return yyparse ();
   26068 }
   26069 _ATEOF
   26070 
   26071 
   26072 
   26073 # In some versions of Autoconf, AT_CHECK invokes AS_ESCAPE before
   26074 # expanding macros, so it corrupts some special characters in the
   26075 # macros.  To avoid this, expand now and pass it the result with proper
   26076 # string quotation.  Assume args 7 through 12 expand to properly quoted
   26077 # strings.
   26078 
   26079 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   26080   at_save_special_files
   26081   mkdir xml-tests
   26082     # Don't combine these Bison invocations since we want to be sure that
   26083   # --report=all isn't required to get the full XML file.
   26084   { set +x
   26085 $as_echo "$at_srcdir/reduce.at:707: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   26086                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y"
   26087 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:707"
   26088 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   26089                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y
   26090 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26091 at_status=$? at_failed=false
   26092 $at_check_filter
   26093 echo stderr:; cat "$at_stderr"
   26094 echo stdout:; cat "$at_stdout"
   26095 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   26096 $at_failed && at_fn_log_failure
   26097 $at_traceon; }
   26098 
   26099   { set +x
   26100 $as_echo "$at_srcdir/reduce.at:707: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y"
   26101 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y" "reduce.at:707"
   26102 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y
   26103 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26104 at_status=$? at_failed=false
   26105 $at_check_filter
   26106 echo stderr:; cat "$at_stderr"
   26107 echo stdout:; cat "$at_stdout"
   26108 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   26109 $at_failed && at_fn_log_failure
   26110 $at_traceon; }
   26111 
   26112     cp xml-tests/test.output expout
   26113   { set +x
   26114 $as_echo "$at_srcdir/reduce.at:707: \$XSLTPROC \\
   26115              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   26116              xml-tests/test.xml"
   26117 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:707"
   26118 ( $at_check_trace; $XSLTPROC \
   26119              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   26120              xml-tests/test.xml
   26121 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26122 at_status=$? at_failed=false
   26123 $at_check_filter
   26124 at_fn_diff_devnull "$at_stderr" || at_failed=:
   26125 $at_diff expout "$at_stdout" || at_failed=:
   26126 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   26127 $at_failed && at_fn_log_failure
   26128 $at_traceon; }
   26129 
   26130   sort xml-tests/test.dot > expout
   26131   { set +x
   26132 $as_echo "$at_srcdir/reduce.at:707: \$XSLTPROC \\
   26133              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   26134              xml-tests/test.xml | sort"
   26135 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:707"
   26136 ( $at_check_trace; $XSLTPROC \
   26137              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   26138              xml-tests/test.xml | sort
   26139 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26140 at_status=$? at_failed=false
   26141 $at_check_filter
   26142 at_fn_diff_devnull "$at_stderr" || at_failed=:
   26143 $at_diff expout "$at_stdout" || at_failed=:
   26144 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   26145 $at_failed && at_fn_log_failure
   26146 $at_traceon; }
   26147 
   26148   rm -rf xml-tests expout
   26149   at_restore_special_files
   26150 fi
   26151 { set +x
   26152 $as_echo "$at_srcdir/reduce.at:707: bison --report=all --defines -o input.c input.y"
   26153 at_fn_check_prepare_trace "reduce.at:707"
   26154 ( $at_check_trace; bison --report=all --defines -o input.c input.y
   26155 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26156 at_status=$? at_failed=false
   26157 $at_check_filter
   26158 at_fn_diff_devnull "$at_stderr" || at_failed=:
   26159 at_fn_diff_devnull "$at_stdout" || at_failed=:
   26160 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   26161 $at_failed && at_fn_log_failure
   26162 $at_traceon; }
   26163 
   26164 
   26165 
   26166 { set +x
   26167 $as_echo "$at_srcdir/reduce.at:707: sed -n '/^State 0\$/,\$p' input.output"
   26168 at_fn_check_prepare_dynamic "sed -n '/^State 0$/,$p' input.output" "reduce.at:707"
   26169 ( $at_check_trace; sed -n '/^State 0$/,$p' input.output
   26170 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26171 at_status=$? at_failed=false
   26172 $at_check_filter
   26173 at_fn_diff_devnull "$at_stderr" || at_failed=:
   26174 echo >>"$at_stdout"; $as_echo "State 0
   26175 
   26176     0 \$accept: . S \$end
   26177     1 S: . 'a' A 'a'
   26178     2  | . 'b' A 'b'
   26179     3  | . 'c' c
   26180 
   26181     'a'  shift, and go to state 1
   26182     'b'  shift, and go to state 2
   26183     'c'  shift, and go to state 3
   26184 
   26185     S  go to state 4
   26186 
   26187 
   26188 State 1
   26189 
   26190     1 S: 'a' . A 'a'
   26191     4 A: . 'a' 'a' 'a'
   26192     5  | . 'a' 'a'
   26193 
   26194     'a'  shift, and go to state 5
   26195 
   26196     A  go to state 6
   26197 
   26198 
   26199 State 2
   26200 
   26201     2 S: 'b' . A 'b'
   26202     4 A: . 'a' 'a' 'a'
   26203     5  | . 'a' 'a'
   26204 
   26205     'a'  shift, and go to state 18
   26206 
   26207     A  go to state 7
   26208 
   26209 
   26210 State 3
   26211 
   26212     3 S: 'c' . c
   26213     4 A: . 'a' 'a' 'a'
   26214     5  | . 'a' 'a'
   26215     6 c: . 'a' 'a' 'b'
   26216     7  | . A
   26217 
   26218     'a'  shift, and go to state 8
   26219 
   26220     A  go to state 9
   26221     c  go to state 10
   26222 
   26223 
   26224 State 4
   26225 
   26226     0 \$accept: S . \$end
   26227 
   26228     \$end  shift, and go to state 11
   26229 
   26230 
   26231 State 5
   26232 
   26233     4 A: 'a' . 'a' 'a'
   26234     5  | 'a' . 'a'
   26235 
   26236     'a'  shift, and go to state 12
   26237 
   26238 
   26239 State 6
   26240 
   26241     1 S: 'a' A . 'a'
   26242 
   26243     'a'  shift, and go to state 13
   26244 
   26245 
   26246 State 7
   26247 
   26248     2 S: 'b' A . 'b'
   26249 
   26250     'b'  shift, and go to state 14
   26251 
   26252 
   26253 State 8
   26254 
   26255     4 A: 'a' . 'a' 'a'
   26256     5  | 'a' . 'a'
   26257     6 c: 'a' . 'a' 'b'
   26258 
   26259     'a'  shift, and go to state 15
   26260 
   26261 
   26262 State 9
   26263 
   26264     7 c: A .
   26265 
   26266     \$default  reduce using rule 7 (c)
   26267 
   26268 
   26269 State 10
   26270 
   26271     3 S: 'c' c .
   26272 
   26273     \$default  reduce using rule 3 (S)
   26274 
   26275 
   26276 State 11
   26277 
   26278     0 \$accept: S \$end .
   26279 
   26280     \$default  accept
   26281 
   26282 
   26283 State 12
   26284 
   26285     4 A: 'a' 'a' . 'a'
   26286     5  | 'a' 'a' .  ['a']
   26287 
   26288     \$default  reduce using rule 5 (A)
   26289 
   26290     Conflict between rule 5 and token 'a' resolved as reduce (%left 'a').
   26291 
   26292 
   26293 State 13
   26294 
   26295     1 S: 'a' A 'a' .
   26296 
   26297     \$default  reduce using rule 1 (S)
   26298 
   26299 
   26300 State 14
   26301 
   26302     2 S: 'b' A 'b' .
   26303 
   26304     \$default  reduce using rule 2 (S)
   26305 
   26306 
   26307 State 15
   26308 
   26309     4 A: 'a' 'a' . 'a'
   26310     5  | 'a' 'a' .  [\$end]
   26311     6 c: 'a' 'a' . 'b'
   26312 
   26313     'a'  shift, and go to state 16
   26314     'b'  shift, and go to state 17
   26315 
   26316     \$default  reduce using rule 5 (A)
   26317 
   26318 
   26319 State 16
   26320 
   26321     4 A: 'a' 'a' 'a' .
   26322 
   26323     \$default  reduce using rule 4 (A)
   26324 
   26325 
   26326 State 17
   26327 
   26328     6 c: 'a' 'a' 'b' .
   26329 
   26330     \$default  reduce using rule 6 (c)
   26331 
   26332 
   26333 State 18
   26334 
   26335     4 A: 'a' . 'a' 'a'
   26336     5  | 'a' . 'a'
   26337 
   26338     'a'  shift, and go to state 19
   26339 
   26340 
   26341 State 19
   26342 
   26343     4 A: 'a' 'a' . 'a'
   26344     5  | 'a' 'a' .  ['b']
   26345 
   26346     'a'  shift, and go to state 16
   26347 
   26348     \$default  reduce using rule 5 (A)
   26349 " | \
   26350   $at_diff - "$at_stdout" || at_failed=:
   26351 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   26352 $at_failed && at_fn_log_failure
   26353 $at_traceon; }
   26354 
   26355 
   26356 
   26357 
   26358 # Canonical LR generates very large tables, resulting in very long
   26359 # files with #line directives that may overflow what the standards
   26360 # (C90 and C++98) guarantee: 32767.  In that case, GCC's -pedantic
   26361 # will issue an error.
   26362 #
   26363 # There is no "" around `wc` since some indent the result.
   26364 
   26365 { set +x
   26366 $as_echo "$at_srcdir/reduce.at:707: \$BISON_C_WORKS"
   26367 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "reduce.at:707"
   26368 ( $at_check_trace; $BISON_C_WORKS
   26369 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26370 at_status=$? at_failed=false
   26371 $at_check_filter
   26372 echo stderr:; cat "$at_stderr"
   26373 echo stdout:; cat "$at_stdout"
   26374 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   26375 $at_failed && at_fn_log_failure
   26376 $at_traceon; }
   26377 
   26378 { set +x
   26379 $as_echo "$at_srcdir/reduce.at:707: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   26380 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "reduce.at:707"
   26381 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   26382 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26383 at_status=$? at_failed=false
   26384 $at_check_filter
   26385 echo stderr:; cat "$at_stderr"
   26386 echo stdout:; cat "$at_stdout"
   26387 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   26388 $at_failed && at_fn_log_failure
   26389 $at_traceon; }
   26390 
   26391 
   26392 { set +x
   26393 $as_echo "$at_srcdir/reduce.at:707:  \$PREPARSER ./input"
   26394 at_fn_check_prepare_dynamic " $PREPARSER ./input" "reduce.at:707"
   26395 ( $at_check_trace;  $PREPARSER ./input
   26396 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26397 at_status=$? at_failed=false
   26398 $at_check_filter
   26399 echo stderr:; tee stderr <"$at_stderr"
   26400 at_fn_diff_devnull "$at_stdout" || at_failed=:
   26401 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   26402 $at_failed && at_fn_log_failure
   26403 $at_traceon; }
   26404 
   26405 { set +x
   26406 $as_echo "$at_srcdir/reduce.at:707: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   26407 at_fn_check_prepare_trace "reduce.at:707"
   26408 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   26409 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26410 at_status=$? at_failed=false
   26411 $at_check_filter
   26412 at_fn_diff_devnull "$at_stderr" || at_failed=:
   26413 at_fn_diff_devnull "$at_stdout" || at_failed=:
   26414 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   26415 $at_failed && at_fn_log_failure
   26416 $at_traceon; }
   26417 
   26418 
   26419 
   26420 
   26421   set +x
   26422   $at_times_p && times >"$at_times_file"
   26423 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   26424 read at_status <"$at_status_file"
   26425 #AT_STOP_114
   26426 #AT_START_115
   26427 at_fn_group_banner 115 'reduce.at:707' \
   26428   "%define lr.type canonical-lr: Lane Split" "       " 6
   26429 at_xfail=no
   26430 (
   26431   $as_echo "115. $at_setup_line: testing $at_desc ..."
   26432   $at_traceon
   26433 
   26434 
   26435 cat >input.y <<'_ATEOF'
   26436 %code top {
   26437 #include <config.h>
   26438 /* We don't need perfect functions for these tests. */
   26439 #undef malloc
   26440 #undef memcmp
   26441 #undef realloc
   26442 }
   26443 
   26444 %code {
   26445   #include <stdio.h>
   26446   static void yyerror ( const char *msg);
   26447   static int yylex (void);
   26448 }
   26449 
   26450 %define lr.type canonical-lr
   26451 %left 'a'
   26452 // Conflict resolution renders state 16 unreachable for canonical LR(1).  We
   26453 // keep it so that the paser table diff is easier to code.
   26454 %define lr.keep-unreachable-states
   26455 
   26456 %%
   26457 
   26458 
   26459 /* Similar to the last test case set but two states must be split.  */
   26460 S: 'a' A 'a' /* rule 1 */
   26461  | 'b' A 'b' /* rule 2 */
   26462  | 'c' c     /* rule 3 */
   26463  ;
   26464 
   26465 A: 'a' 'a' 'a' /* rule 4 */
   26466  | 'a' 'a'     /* rule 5 */
   26467  ;
   26468 
   26469 c: 'a' 'a' 'b' /* rule 6 */
   26470  | A           /* rule 7 */
   26471  ;
   26472 
   26473 
   26474 %%
   26475 #include <stdio.h>
   26476 /* A C error reporting function.  */
   26477 static
   26478 void yyerror ( const char *msg)
   26479 {
   26480   fprintf (stderr, "%s\n", msg);
   26481 }
   26482 static int
   26483 yylex (void)
   26484 {
   26485   static int const input[] = {
   26486     'b', 'a', 'a', 'a', 'b', 0
   26487   };
   26488   static int const *inputp = input;
   26489   return *inputp++;
   26490 }
   26491 
   26492 int
   26493 main (void)
   26494 {
   26495   return yyparse ();
   26496 }
   26497 _ATEOF
   26498 
   26499 
   26500 
   26501 # In some versions of Autoconf, AT_CHECK invokes AS_ESCAPE before
   26502 # expanding macros, so it corrupts some special characters in the
   26503 # macros.  To avoid this, expand now and pass it the result with proper
   26504 # string quotation.  Assume args 7 through 12 expand to properly quoted
   26505 # strings.
   26506 
   26507 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   26508   at_save_special_files
   26509   mkdir xml-tests
   26510     # Don't combine these Bison invocations since we want to be sure that
   26511   # --report=all isn't required to get the full XML file.
   26512   { set +x
   26513 $as_echo "$at_srcdir/reduce.at:707: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   26514                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y"
   26515 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:707"
   26516 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   26517                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y
   26518 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26519 at_status=$? at_failed=false
   26520 $at_check_filter
   26521 echo stderr:; cat "$at_stderr"
   26522 echo stdout:; cat "$at_stdout"
   26523 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   26524 $at_failed && at_fn_log_failure
   26525 $at_traceon; }
   26526 
   26527   { set +x
   26528 $as_echo "$at_srcdir/reduce.at:707: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y"
   26529 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y" "reduce.at:707"
   26530 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y
   26531 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26532 at_status=$? at_failed=false
   26533 $at_check_filter
   26534 echo stderr:; cat "$at_stderr"
   26535 echo stdout:; cat "$at_stdout"
   26536 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   26537 $at_failed && at_fn_log_failure
   26538 $at_traceon; }
   26539 
   26540     cp xml-tests/test.output expout
   26541   { set +x
   26542 $as_echo "$at_srcdir/reduce.at:707: \$XSLTPROC \\
   26543              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   26544              xml-tests/test.xml"
   26545 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:707"
   26546 ( $at_check_trace; $XSLTPROC \
   26547              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   26548              xml-tests/test.xml
   26549 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26550 at_status=$? at_failed=false
   26551 $at_check_filter
   26552 at_fn_diff_devnull "$at_stderr" || at_failed=:
   26553 $at_diff expout "$at_stdout" || at_failed=:
   26554 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   26555 $at_failed && at_fn_log_failure
   26556 $at_traceon; }
   26557 
   26558   sort xml-tests/test.dot > expout
   26559   { set +x
   26560 $as_echo "$at_srcdir/reduce.at:707: \$XSLTPROC \\
   26561              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   26562              xml-tests/test.xml | sort"
   26563 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:707"
   26564 ( $at_check_trace; $XSLTPROC \
   26565              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   26566              xml-tests/test.xml | sort
   26567 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26568 at_status=$? at_failed=false
   26569 $at_check_filter
   26570 at_fn_diff_devnull "$at_stderr" || at_failed=:
   26571 $at_diff expout "$at_stdout" || at_failed=:
   26572 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   26573 $at_failed && at_fn_log_failure
   26574 $at_traceon; }
   26575 
   26576   rm -rf xml-tests expout
   26577   at_restore_special_files
   26578 fi
   26579 { set +x
   26580 $as_echo "$at_srcdir/reduce.at:707: bison --report=all --defines -o input.c input.y"
   26581 at_fn_check_prepare_trace "reduce.at:707"
   26582 ( $at_check_trace; bison --report=all --defines -o input.c input.y
   26583 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26584 at_status=$? at_failed=false
   26585 $at_check_filter
   26586 at_fn_diff_devnull "$at_stderr" || at_failed=:
   26587 at_fn_diff_devnull "$at_stdout" || at_failed=:
   26588 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   26589 $at_failed && at_fn_log_failure
   26590 $at_traceon; }
   26591 
   26592 
   26593 
   26594 { set +x
   26595 $as_echo "$at_srcdir/reduce.at:707: sed -n '/^State 0\$/,\$p' input.output"
   26596 at_fn_check_prepare_dynamic "sed -n '/^State 0$/,$p' input.output" "reduce.at:707"
   26597 ( $at_check_trace; sed -n '/^State 0$/,$p' input.output
   26598 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26599 at_status=$? at_failed=false
   26600 $at_check_filter
   26601 at_fn_diff_devnull "$at_stderr" || at_failed=:
   26602 echo >>"$at_stdout"; $as_echo "State 0
   26603 
   26604     0 \$accept: . S \$end
   26605     1 S: . 'a' A 'a'
   26606     2  | . 'b' A 'b'
   26607     3  | . 'c' c
   26608 
   26609     'a'  shift, and go to state 1
   26610     'b'  shift, and go to state 2
   26611     'c'  shift, and go to state 3
   26612 
   26613     S  go to state 4
   26614 
   26615 
   26616 State 1
   26617 
   26618     1 S: 'a' . A 'a'
   26619     4 A: . 'a' 'a' 'a'
   26620     5  | . 'a' 'a'
   26621 
   26622     'a'  shift, and go to state 5
   26623 
   26624     A  go to state 6
   26625 
   26626 
   26627 State 2
   26628 
   26629     2 S: 'b' . A 'b'
   26630     4 A: . 'a' 'a' 'a'
   26631     5  | . 'a' 'a'
   26632 
   26633     'a'  shift, and go to state 18
   26634 
   26635     A  go to state 7
   26636 
   26637 
   26638 State 3
   26639 
   26640     3 S: 'c' . c
   26641     4 A: . 'a' 'a' 'a'
   26642     5  | . 'a' 'a'
   26643     6 c: . 'a' 'a' 'b'
   26644     7  | . A
   26645 
   26646     'a'  shift, and go to state 8
   26647 
   26648     A  go to state 9
   26649     c  go to state 10
   26650 
   26651 
   26652 State 4
   26653 
   26654     0 \$accept: S . \$end
   26655 
   26656     \$end  shift, and go to state 11
   26657 
   26658 
   26659 State 5
   26660 
   26661     4 A: 'a' . 'a' 'a'
   26662     5  | 'a' . 'a'
   26663 
   26664     'a'  shift, and go to state 12
   26665 
   26666 
   26667 State 6
   26668 
   26669     1 S: 'a' A . 'a'
   26670 
   26671     'a'  shift, and go to state 13
   26672 
   26673 
   26674 State 7
   26675 
   26676     2 S: 'b' A . 'b'
   26677 
   26678     'b'  shift, and go to state 14
   26679 
   26680 
   26681 State 8
   26682 
   26683     4 A: 'a' . 'a' 'a'
   26684     5  | 'a' . 'a'
   26685     6 c: 'a' . 'a' 'b'
   26686 
   26687     'a'  shift, and go to state 15
   26688 
   26689 
   26690 State 9
   26691 
   26692     7 c: A .  [\$end]
   26693 
   26694     \$end  reduce using rule 7 (c)
   26695 
   26696 
   26697 State 10
   26698 
   26699     3 S: 'c' c .  [\$end]
   26700 
   26701     \$end  reduce using rule 3 (S)
   26702 
   26703 
   26704 State 11
   26705 
   26706     0 \$accept: S \$end .
   26707 
   26708     \$default  accept
   26709 
   26710 
   26711 State 12
   26712 
   26713     4 A: 'a' 'a' . 'a'
   26714     5  | 'a' 'a' .  ['a']
   26715 
   26716     'a'  reduce using rule 5 (A)
   26717 
   26718     Conflict between rule 5 and token 'a' resolved as reduce (%left 'a').
   26719 
   26720 
   26721 State 13
   26722 
   26723     1 S: 'a' A 'a' .  [\$end]
   26724 
   26725     \$end  reduce using rule 1 (S)
   26726 
   26727 
   26728 State 14
   26729 
   26730     2 S: 'b' A 'b' .  [\$end]
   26731 
   26732     \$end  reduce using rule 2 (S)
   26733 
   26734 
   26735 State 15
   26736 
   26737     4 A: 'a' 'a' . 'a'
   26738     5  | 'a' 'a' .  [\$end]
   26739     6 c: 'a' 'a' . 'b'
   26740 
   26741     'a'  shift, and go to state 19
   26742     'b'  shift, and go to state 17
   26743 
   26744     \$end  reduce using rule 5 (A)
   26745 
   26746 
   26747 State 16
   26748 
   26749     4 A: 'a' 'a' 'a' .  ['a']
   26750 
   26751     'a'  reduce using rule 4 (A)
   26752 
   26753 
   26754 State 17
   26755 
   26756     6 c: 'a' 'a' 'b' .  [\$end]
   26757 
   26758     \$end  reduce using rule 6 (c)
   26759 
   26760 
   26761 State 18
   26762 
   26763     4 A: 'a' . 'a' 'a'
   26764     5  | 'a' . 'a'
   26765 
   26766     'a'  shift, and go to state 20
   26767 
   26768 
   26769 State 19
   26770 
   26771     4 A: 'a' 'a' 'a' .  [\$end]
   26772 
   26773     \$end  reduce using rule 4 (A)
   26774 
   26775 
   26776 State 20
   26777 
   26778     4 A: 'a' 'a' . 'a'
   26779     5  | 'a' 'a' .  ['b']
   26780 
   26781     'a'  shift, and go to state 21
   26782 
   26783     'b'  reduce using rule 5 (A)
   26784 
   26785 
   26786 State 21
   26787 
   26788     4 A: 'a' 'a' 'a' .  ['b']
   26789 
   26790     'b'  reduce using rule 4 (A)
   26791 " | \
   26792   $at_diff - "$at_stdout" || at_failed=:
   26793 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   26794 $at_failed && at_fn_log_failure
   26795 $at_traceon; }
   26796 
   26797 
   26798 
   26799 
   26800 # Canonical LR generates very large tables, resulting in very long
   26801 # files with #line directives that may overflow what the standards
   26802 # (C90 and C++98) guarantee: 32767.  In that case, GCC's -pedantic
   26803 # will issue an error.
   26804 #
   26805 # There is no "" around `wc` since some indent the result.
   26806 if test 32767 -lt `wc -l < input.c`; then
   26807   CFLAGS=`echo " $CFLAGS " | sed -e 's/ -pedantic //'`
   26808   CXXFLAGS=`echo " $CXXFLAGS " | sed -e 's/ -pedantic //'`
   26809 fi
   26810 { set +x
   26811 $as_echo "$at_srcdir/reduce.at:707: \$BISON_C_WORKS"
   26812 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "reduce.at:707"
   26813 ( $at_check_trace; $BISON_C_WORKS
   26814 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26815 at_status=$? at_failed=false
   26816 $at_check_filter
   26817 echo stderr:; cat "$at_stderr"
   26818 echo stdout:; cat "$at_stdout"
   26819 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   26820 $at_failed && at_fn_log_failure
   26821 $at_traceon; }
   26822 
   26823 { set +x
   26824 $as_echo "$at_srcdir/reduce.at:707: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   26825 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "reduce.at:707"
   26826 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   26827 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26828 at_status=$? at_failed=false
   26829 $at_check_filter
   26830 echo stderr:; cat "$at_stderr"
   26831 echo stdout:; cat "$at_stdout"
   26832 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   26833 $at_failed && at_fn_log_failure
   26834 $at_traceon; }
   26835 
   26836 
   26837 { set +x
   26838 $as_echo "$at_srcdir/reduce.at:707:  \$PREPARSER ./input"
   26839 at_fn_check_prepare_dynamic " $PREPARSER ./input" "reduce.at:707"
   26840 ( $at_check_trace;  $PREPARSER ./input
   26841 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26842 at_status=$? at_failed=false
   26843 $at_check_filter
   26844 echo stderr:; tee stderr <"$at_stderr"
   26845 at_fn_diff_devnull "$at_stdout" || at_failed=:
   26846 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   26847 $at_failed && at_fn_log_failure
   26848 $at_traceon; }
   26849 
   26850 { set +x
   26851 $as_echo "$at_srcdir/reduce.at:707: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   26852 at_fn_check_prepare_trace "reduce.at:707"
   26853 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   26854 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26855 at_status=$? at_failed=false
   26856 $at_check_filter
   26857 at_fn_diff_devnull "$at_stderr" || at_failed=:
   26858 at_fn_diff_devnull "$at_stdout" || at_failed=:
   26859 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:707"
   26860 $at_failed && at_fn_log_failure
   26861 $at_traceon; }
   26862 
   26863 
   26864 
   26865 
   26866   set +x
   26867   $at_times_p && times >"$at_times_file"
   26868 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   26869 read at_status <"$at_status_file"
   26870 #AT_STOP_115
   26871 #AT_START_116
   26872 at_fn_group_banner 116 'reduce.at:951' \
   26873   "no %define lr.type: Complex Lane Split" "         " 6
   26874 at_xfail=no
   26875 (
   26876   $as_echo "116. $at_setup_line: testing $at_desc ..."
   26877   $at_traceon
   26878 
   26879 
   26880 cat >input.y <<'_ATEOF'
   26881 %code top {
   26882 #include <config.h>
   26883 /* We don't need perfect functions for these tests. */
   26884 #undef malloc
   26885 #undef memcmp
   26886 #undef realloc
   26887 }
   26888 
   26889 %code {
   26890   #include <stdio.h>
   26891   static void yyerror ( const char *msg);
   26892   static int yylex (void);
   26893 }
   26894 
   26895 %left 'a'
   26896 // Conflict resolution renders state 16 unreachable for canonical LR(1).  We
   26897 // keep it so that the paser table diff is easier to code.
   26898 %define lr.keep-unreachable-states
   26899 
   26900 %%
   26901 
   26902 
   26903 /* Similar to the last test case set but forseeing the S/R conflict from the
   26904    first state that must be split is becoming difficult.  Imagine if B were
   26905    even more complex.  Imagine if A had other RHS's ending in other
   26906    nonterminals.  */
   26907 S: 'a' A 'a'
   26908  | 'b' A 'b'
   26909  | 'c' c
   26910  ;
   26911 A: 'a' 'a' B
   26912  ;
   26913 B: 'a'
   26914  | %prec 'a'
   26915  ;
   26916 c: 'a' 'a' 'b'
   26917  | A
   26918  ;
   26919 
   26920 
   26921 %%
   26922 #include <stdio.h>
   26923 /* A C error reporting function.  */
   26924 static
   26925 void yyerror ( const char *msg)
   26926 {
   26927   fprintf (stderr, "%s\n", msg);
   26928 }
   26929 static int
   26930 yylex (void)
   26931 {
   26932   static int const input[] = {
   26933     'b', 'a', 'a', 'a', 'b', 0
   26934   };
   26935   static int const *inputp = input;
   26936   return *inputp++;
   26937 }
   26938 
   26939 int
   26940 main (void)
   26941 {
   26942   return yyparse ();
   26943 }
   26944 _ATEOF
   26945 
   26946 
   26947 
   26948 # In some versions of Autoconf, AT_CHECK invokes AS_ESCAPE before
   26949 # expanding macros, so it corrupts some special characters in the
   26950 # macros.  To avoid this, expand now and pass it the result with proper
   26951 # string quotation.  Assume args 7 through 12 expand to properly quoted
   26952 # strings.
   26953 
   26954 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   26955   at_save_special_files
   26956   mkdir xml-tests
   26957     # Don't combine these Bison invocations since we want to be sure that
   26958   # --report=all isn't required to get the full XML file.
   26959   { set +x
   26960 $as_echo "$at_srcdir/reduce.at:951: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   26961                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y"
   26962 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:951"
   26963 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   26964                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y
   26965 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26966 at_status=$? at_failed=false
   26967 $at_check_filter
   26968 echo stderr:; cat "$at_stderr"
   26969 echo stdout:; cat "$at_stdout"
   26970 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   26971 $at_failed && at_fn_log_failure
   26972 $at_traceon; }
   26973 
   26974   { set +x
   26975 $as_echo "$at_srcdir/reduce.at:951: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y"
   26976 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y" "reduce.at:951"
   26977 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y
   26978 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26979 at_status=$? at_failed=false
   26980 $at_check_filter
   26981 echo stderr:; cat "$at_stderr"
   26982 echo stdout:; cat "$at_stdout"
   26983 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   26984 $at_failed && at_fn_log_failure
   26985 $at_traceon; }
   26986 
   26987     cp xml-tests/test.output expout
   26988   { set +x
   26989 $as_echo "$at_srcdir/reduce.at:951: \$XSLTPROC \\
   26990              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   26991              xml-tests/test.xml"
   26992 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:951"
   26993 ( $at_check_trace; $XSLTPROC \
   26994              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   26995              xml-tests/test.xml
   26996 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   26997 at_status=$? at_failed=false
   26998 $at_check_filter
   26999 at_fn_diff_devnull "$at_stderr" || at_failed=:
   27000 $at_diff expout "$at_stdout" || at_failed=:
   27001 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   27002 $at_failed && at_fn_log_failure
   27003 $at_traceon; }
   27004 
   27005   sort xml-tests/test.dot > expout
   27006   { set +x
   27007 $as_echo "$at_srcdir/reduce.at:951: \$XSLTPROC \\
   27008              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   27009              xml-tests/test.xml | sort"
   27010 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:951"
   27011 ( $at_check_trace; $XSLTPROC \
   27012              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   27013              xml-tests/test.xml | sort
   27014 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27015 at_status=$? at_failed=false
   27016 $at_check_filter
   27017 at_fn_diff_devnull "$at_stderr" || at_failed=:
   27018 $at_diff expout "$at_stdout" || at_failed=:
   27019 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   27020 $at_failed && at_fn_log_failure
   27021 $at_traceon; }
   27022 
   27023   rm -rf xml-tests expout
   27024   at_restore_special_files
   27025 fi
   27026 { set +x
   27027 $as_echo "$at_srcdir/reduce.at:951: bison --report=all --defines -o input.c input.y"
   27028 at_fn_check_prepare_trace "reduce.at:951"
   27029 ( $at_check_trace; bison --report=all --defines -o input.c input.y
   27030 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27031 at_status=$? at_failed=false
   27032 $at_check_filter
   27033 at_fn_diff_devnull "$at_stderr" || at_failed=:
   27034 at_fn_diff_devnull "$at_stdout" || at_failed=:
   27035 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   27036 $at_failed && at_fn_log_failure
   27037 $at_traceon; }
   27038 
   27039 
   27040 
   27041 { set +x
   27042 $as_echo "$at_srcdir/reduce.at:951: sed -n '/^State 0\$/,\$p' input.output"
   27043 at_fn_check_prepare_dynamic "sed -n '/^State 0$/,$p' input.output" "reduce.at:951"
   27044 ( $at_check_trace; sed -n '/^State 0$/,$p' input.output
   27045 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27046 at_status=$? at_failed=false
   27047 $at_check_filter
   27048 at_fn_diff_devnull "$at_stderr" || at_failed=:
   27049 echo >>"$at_stdout"; $as_echo "State 0
   27050 
   27051     0 \$accept: . S \$end
   27052     1 S: . 'a' A 'a'
   27053     2  | . 'b' A 'b'
   27054     3  | . 'c' c
   27055 
   27056     'a'  shift, and go to state 1
   27057     'b'  shift, and go to state 2
   27058     'c'  shift, and go to state 3
   27059 
   27060     S  go to state 4
   27061 
   27062 
   27063 State 1
   27064 
   27065     1 S: 'a' . A 'a'
   27066     4 A: . 'a' 'a' B
   27067 
   27068     'a'  shift, and go to state 5
   27069 
   27070     A  go to state 6
   27071 
   27072 
   27073 State 2
   27074 
   27075     2 S: 'b' . A 'b'
   27076     4 A: . 'a' 'a' B
   27077 
   27078     'a'  shift, and go to state 5
   27079 
   27080     A  go to state 7
   27081 
   27082 
   27083 State 3
   27084 
   27085     3 S: 'c' . c
   27086     4 A: . 'a' 'a' B
   27087     7 c: . 'a' 'a' 'b'
   27088     8  | . A
   27089 
   27090     'a'  shift, and go to state 8
   27091 
   27092     A  go to state 9
   27093     c  go to state 10
   27094 
   27095 
   27096 State 4
   27097 
   27098     0 \$accept: S . \$end
   27099 
   27100     \$end  shift, and go to state 11
   27101 
   27102 
   27103 State 5
   27104 
   27105     4 A: 'a' . 'a' B
   27106 
   27107     'a'  shift, and go to state 12
   27108 
   27109 
   27110 State 6
   27111 
   27112     1 S: 'a' A . 'a'
   27113 
   27114     'a'  shift, and go to state 13
   27115 
   27116 
   27117 State 7
   27118 
   27119     2 S: 'b' A . 'b'
   27120 
   27121     'b'  shift, and go to state 14
   27122 
   27123 
   27124 State 8
   27125 
   27126     4 A: 'a' . 'a' B
   27127     7 c: 'a' . 'a' 'b'
   27128 
   27129     'a'  shift, and go to state 15
   27130 
   27131 
   27132 State 9
   27133 
   27134     8 c: A .
   27135 
   27136     \$default  reduce using rule 8 (c)
   27137 
   27138 
   27139 State 10
   27140 
   27141     3 S: 'c' c .
   27142 
   27143     \$default  reduce using rule 3 (S)
   27144 
   27145 
   27146 State 11
   27147 
   27148     0 \$accept: S \$end .
   27149 
   27150     \$default  accept
   27151 
   27152 
   27153 State 12
   27154 
   27155     4 A: 'a' 'a' . B
   27156     5 B: . 'a'
   27157     6  | .  ['a', 'b']
   27158 
   27159     \$default  reduce using rule 6 (B)
   27160 
   27161     B  go to state 17
   27162 
   27163     Conflict between rule 6 and token 'a' resolved as reduce (%left 'a').
   27164 
   27165 
   27166 State 13
   27167 
   27168     1 S: 'a' A 'a' .
   27169 
   27170     \$default  reduce using rule 1 (S)
   27171 
   27172 
   27173 State 14
   27174 
   27175     2 S: 'b' A 'b' .
   27176 
   27177     \$default  reduce using rule 2 (S)
   27178 
   27179 
   27180 State 15
   27181 
   27182     4 A: 'a' 'a' . B
   27183     5 B: . 'a'
   27184     6  | .  [\$end]
   27185     7 c: 'a' 'a' . 'b'
   27186 
   27187     'a'  shift, and go to state 16
   27188     'b'  shift, and go to state 18
   27189 
   27190     \$default  reduce using rule 6 (B)
   27191 
   27192     B  go to state 17
   27193 
   27194 
   27195 State 16
   27196 
   27197     5 B: 'a' .
   27198 
   27199     \$default  reduce using rule 5 (B)
   27200 
   27201 
   27202 State 17
   27203 
   27204     4 A: 'a' 'a' B .
   27205 
   27206     \$default  reduce using rule 4 (A)
   27207 
   27208 
   27209 State 18
   27210 
   27211     7 c: 'a' 'a' 'b' .
   27212 
   27213     \$default  reduce using rule 7 (c)
   27214 " | \
   27215   $at_diff - "$at_stdout" || at_failed=:
   27216 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   27217 $at_failed && at_fn_log_failure
   27218 $at_traceon; }
   27219 
   27220 
   27221 
   27222 
   27223 # Canonical LR generates very large tables, resulting in very long
   27224 # files with #line directives that may overflow what the standards
   27225 # (C90 and C++98) guarantee: 32767.  In that case, GCC's -pedantic
   27226 # will issue an error.
   27227 #
   27228 # There is no "" around `wc` since some indent the result.
   27229 
   27230 { set +x
   27231 $as_echo "$at_srcdir/reduce.at:951: \$BISON_C_WORKS"
   27232 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "reduce.at:951"
   27233 ( $at_check_trace; $BISON_C_WORKS
   27234 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27235 at_status=$? at_failed=false
   27236 $at_check_filter
   27237 echo stderr:; cat "$at_stderr"
   27238 echo stdout:; cat "$at_stdout"
   27239 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   27240 $at_failed && at_fn_log_failure
   27241 $at_traceon; }
   27242 
   27243 { set +x
   27244 $as_echo "$at_srcdir/reduce.at:951: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   27245 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "reduce.at:951"
   27246 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   27247 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27248 at_status=$? at_failed=false
   27249 $at_check_filter
   27250 echo stderr:; cat "$at_stderr"
   27251 echo stdout:; cat "$at_stdout"
   27252 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   27253 $at_failed && at_fn_log_failure
   27254 $at_traceon; }
   27255 
   27256 
   27257 { set +x
   27258 $as_echo "$at_srcdir/reduce.at:951:  \$PREPARSER ./input"
   27259 at_fn_check_prepare_dynamic " $PREPARSER ./input" "reduce.at:951"
   27260 ( $at_check_trace;  $PREPARSER ./input
   27261 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27262 at_status=$? at_failed=false
   27263 $at_check_filter
   27264 echo stderr:; tee stderr <"$at_stderr"
   27265 at_fn_diff_devnull "$at_stdout" || at_failed=:
   27266 at_fn_check_status 1 $at_status "$at_srcdir/reduce.at:951"
   27267 $at_failed && at_fn_log_failure
   27268 $at_traceon; }
   27269 
   27270 { set +x
   27271 $as_echo "$at_srcdir/reduce.at:951: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   27272 at_fn_check_prepare_trace "reduce.at:951"
   27273 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   27274 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27275 at_status=$? at_failed=false
   27276 $at_check_filter
   27277 echo >>"$at_stderr"; $as_echo "syntax error
   27278 " | \
   27279   $at_diff - "$at_stderr" || at_failed=:
   27280 at_fn_diff_devnull "$at_stdout" || at_failed=:
   27281 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   27282 $at_failed && at_fn_log_failure
   27283 $at_traceon; }
   27284 
   27285 
   27286 
   27287 
   27288   set +x
   27289   $at_times_p && times >"$at_times_file"
   27290 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   27291 read at_status <"$at_status_file"
   27292 #AT_STOP_116
   27293 #AT_START_117
   27294 at_fn_group_banner 117 'reduce.at:951' \
   27295   "%define lr.type lalr: Complex Lane Split" "       " 6
   27296 at_xfail=no
   27297 (
   27298   $as_echo "117. $at_setup_line: testing $at_desc ..."
   27299   $at_traceon
   27300 
   27301 
   27302 cat >input.y <<'_ATEOF'
   27303 %code top {
   27304 #include <config.h>
   27305 /* We don't need perfect functions for these tests. */
   27306 #undef malloc
   27307 #undef memcmp
   27308 #undef realloc
   27309 }
   27310 
   27311 %code {
   27312   #include <stdio.h>
   27313   static void yyerror ( const char *msg);
   27314   static int yylex (void);
   27315 }
   27316 
   27317 %define lr.type lalr
   27318 %left 'a'
   27319 // Conflict resolution renders state 16 unreachable for canonical LR(1).  We
   27320 // keep it so that the paser table diff is easier to code.
   27321 %define lr.keep-unreachable-states
   27322 
   27323 %%
   27324 
   27325 
   27326 /* Similar to the last test case set but forseeing the S/R conflict from the
   27327    first state that must be split is becoming difficult.  Imagine if B were
   27328    even more complex.  Imagine if A had other RHS's ending in other
   27329    nonterminals.  */
   27330 S: 'a' A 'a'
   27331  | 'b' A 'b'
   27332  | 'c' c
   27333  ;
   27334 A: 'a' 'a' B
   27335  ;
   27336 B: 'a'
   27337  | %prec 'a'
   27338  ;
   27339 c: 'a' 'a' 'b'
   27340  | A
   27341  ;
   27342 
   27343 
   27344 %%
   27345 #include <stdio.h>
   27346 /* A C error reporting function.  */
   27347 static
   27348 void yyerror ( const char *msg)
   27349 {
   27350   fprintf (stderr, "%s\n", msg);
   27351 }
   27352 static int
   27353 yylex (void)
   27354 {
   27355   static int const input[] = {
   27356     'b', 'a', 'a', 'a', 'b', 0
   27357   };
   27358   static int const *inputp = input;
   27359   return *inputp++;
   27360 }
   27361 
   27362 int
   27363 main (void)
   27364 {
   27365   return yyparse ();
   27366 }
   27367 _ATEOF
   27368 
   27369 
   27370 
   27371 # In some versions of Autoconf, AT_CHECK invokes AS_ESCAPE before
   27372 # expanding macros, so it corrupts some special characters in the
   27373 # macros.  To avoid this, expand now and pass it the result with proper
   27374 # string quotation.  Assume args 7 through 12 expand to properly quoted
   27375 # strings.
   27376 
   27377 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   27378   at_save_special_files
   27379   mkdir xml-tests
   27380     # Don't combine these Bison invocations since we want to be sure that
   27381   # --report=all isn't required to get the full XML file.
   27382   { set +x
   27383 $as_echo "$at_srcdir/reduce.at:951: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   27384                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y"
   27385 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:951"
   27386 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   27387                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y
   27388 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27389 at_status=$? at_failed=false
   27390 $at_check_filter
   27391 echo stderr:; cat "$at_stderr"
   27392 echo stdout:; cat "$at_stdout"
   27393 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   27394 $at_failed && at_fn_log_failure
   27395 $at_traceon; }
   27396 
   27397   { set +x
   27398 $as_echo "$at_srcdir/reduce.at:951: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y"
   27399 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y" "reduce.at:951"
   27400 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y
   27401 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27402 at_status=$? at_failed=false
   27403 $at_check_filter
   27404 echo stderr:; cat "$at_stderr"
   27405 echo stdout:; cat "$at_stdout"
   27406 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   27407 $at_failed && at_fn_log_failure
   27408 $at_traceon; }
   27409 
   27410     cp xml-tests/test.output expout
   27411   { set +x
   27412 $as_echo "$at_srcdir/reduce.at:951: \$XSLTPROC \\
   27413              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   27414              xml-tests/test.xml"
   27415 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:951"
   27416 ( $at_check_trace; $XSLTPROC \
   27417              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   27418              xml-tests/test.xml
   27419 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27420 at_status=$? at_failed=false
   27421 $at_check_filter
   27422 at_fn_diff_devnull "$at_stderr" || at_failed=:
   27423 $at_diff expout "$at_stdout" || at_failed=:
   27424 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   27425 $at_failed && at_fn_log_failure
   27426 $at_traceon; }
   27427 
   27428   sort xml-tests/test.dot > expout
   27429   { set +x
   27430 $as_echo "$at_srcdir/reduce.at:951: \$XSLTPROC \\
   27431              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   27432              xml-tests/test.xml | sort"
   27433 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:951"
   27434 ( $at_check_trace; $XSLTPROC \
   27435              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   27436              xml-tests/test.xml | sort
   27437 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27438 at_status=$? at_failed=false
   27439 $at_check_filter
   27440 at_fn_diff_devnull "$at_stderr" || at_failed=:
   27441 $at_diff expout "$at_stdout" || at_failed=:
   27442 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   27443 $at_failed && at_fn_log_failure
   27444 $at_traceon; }
   27445 
   27446   rm -rf xml-tests expout
   27447   at_restore_special_files
   27448 fi
   27449 { set +x
   27450 $as_echo "$at_srcdir/reduce.at:951: bison --report=all --defines -o input.c input.y"
   27451 at_fn_check_prepare_trace "reduce.at:951"
   27452 ( $at_check_trace; bison --report=all --defines -o input.c input.y
   27453 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27454 at_status=$? at_failed=false
   27455 $at_check_filter
   27456 at_fn_diff_devnull "$at_stderr" || at_failed=:
   27457 at_fn_diff_devnull "$at_stdout" || at_failed=:
   27458 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   27459 $at_failed && at_fn_log_failure
   27460 $at_traceon; }
   27461 
   27462 
   27463 
   27464 { set +x
   27465 $as_echo "$at_srcdir/reduce.at:951: sed -n '/^State 0\$/,\$p' input.output"
   27466 at_fn_check_prepare_dynamic "sed -n '/^State 0$/,$p' input.output" "reduce.at:951"
   27467 ( $at_check_trace; sed -n '/^State 0$/,$p' input.output
   27468 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27469 at_status=$? at_failed=false
   27470 $at_check_filter
   27471 at_fn_diff_devnull "$at_stderr" || at_failed=:
   27472 echo >>"$at_stdout"; $as_echo "State 0
   27473 
   27474     0 \$accept: . S \$end
   27475     1 S: . 'a' A 'a'
   27476     2  | . 'b' A 'b'
   27477     3  | . 'c' c
   27478 
   27479     'a'  shift, and go to state 1
   27480     'b'  shift, and go to state 2
   27481     'c'  shift, and go to state 3
   27482 
   27483     S  go to state 4
   27484 
   27485 
   27486 State 1
   27487 
   27488     1 S: 'a' . A 'a'
   27489     4 A: . 'a' 'a' B
   27490 
   27491     'a'  shift, and go to state 5
   27492 
   27493     A  go to state 6
   27494 
   27495 
   27496 State 2
   27497 
   27498     2 S: 'b' . A 'b'
   27499     4 A: . 'a' 'a' B
   27500 
   27501     'a'  shift, and go to state 5
   27502 
   27503     A  go to state 7
   27504 
   27505 
   27506 State 3
   27507 
   27508     3 S: 'c' . c
   27509     4 A: . 'a' 'a' B
   27510     7 c: . 'a' 'a' 'b'
   27511     8  | . A
   27512 
   27513     'a'  shift, and go to state 8
   27514 
   27515     A  go to state 9
   27516     c  go to state 10
   27517 
   27518 
   27519 State 4
   27520 
   27521     0 \$accept: S . \$end
   27522 
   27523     \$end  shift, and go to state 11
   27524 
   27525 
   27526 State 5
   27527 
   27528     4 A: 'a' . 'a' B
   27529 
   27530     'a'  shift, and go to state 12
   27531 
   27532 
   27533 State 6
   27534 
   27535     1 S: 'a' A . 'a'
   27536 
   27537     'a'  shift, and go to state 13
   27538 
   27539 
   27540 State 7
   27541 
   27542     2 S: 'b' A . 'b'
   27543 
   27544     'b'  shift, and go to state 14
   27545 
   27546 
   27547 State 8
   27548 
   27549     4 A: 'a' . 'a' B
   27550     7 c: 'a' . 'a' 'b'
   27551 
   27552     'a'  shift, and go to state 15
   27553 
   27554 
   27555 State 9
   27556 
   27557     8 c: A .
   27558 
   27559     \$default  reduce using rule 8 (c)
   27560 
   27561 
   27562 State 10
   27563 
   27564     3 S: 'c' c .
   27565 
   27566     \$default  reduce using rule 3 (S)
   27567 
   27568 
   27569 State 11
   27570 
   27571     0 \$accept: S \$end .
   27572 
   27573     \$default  accept
   27574 
   27575 
   27576 State 12
   27577 
   27578     4 A: 'a' 'a' . B
   27579     5 B: . 'a'
   27580     6  | .  ['a', 'b']
   27581 
   27582     \$default  reduce using rule 6 (B)
   27583 
   27584     B  go to state 17
   27585 
   27586     Conflict between rule 6 and token 'a' resolved as reduce (%left 'a').
   27587 
   27588 
   27589 State 13
   27590 
   27591     1 S: 'a' A 'a' .
   27592 
   27593     \$default  reduce using rule 1 (S)
   27594 
   27595 
   27596 State 14
   27597 
   27598     2 S: 'b' A 'b' .
   27599 
   27600     \$default  reduce using rule 2 (S)
   27601 
   27602 
   27603 State 15
   27604 
   27605     4 A: 'a' 'a' . B
   27606     5 B: . 'a'
   27607     6  | .  [\$end]
   27608     7 c: 'a' 'a' . 'b'
   27609 
   27610     'a'  shift, and go to state 16
   27611     'b'  shift, and go to state 18
   27612 
   27613     \$default  reduce using rule 6 (B)
   27614 
   27615     B  go to state 17
   27616 
   27617 
   27618 State 16
   27619 
   27620     5 B: 'a' .
   27621 
   27622     \$default  reduce using rule 5 (B)
   27623 
   27624 
   27625 State 17
   27626 
   27627     4 A: 'a' 'a' B .
   27628 
   27629     \$default  reduce using rule 4 (A)
   27630 
   27631 
   27632 State 18
   27633 
   27634     7 c: 'a' 'a' 'b' .
   27635 
   27636     \$default  reduce using rule 7 (c)
   27637 " | \
   27638   $at_diff - "$at_stdout" || at_failed=:
   27639 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   27640 $at_failed && at_fn_log_failure
   27641 $at_traceon; }
   27642 
   27643 
   27644 
   27645 
   27646 # Canonical LR generates very large tables, resulting in very long
   27647 # files with #line directives that may overflow what the standards
   27648 # (C90 and C++98) guarantee: 32767.  In that case, GCC's -pedantic
   27649 # will issue an error.
   27650 #
   27651 # There is no "" around `wc` since some indent the result.
   27652 
   27653 { set +x
   27654 $as_echo "$at_srcdir/reduce.at:951: \$BISON_C_WORKS"
   27655 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "reduce.at:951"
   27656 ( $at_check_trace; $BISON_C_WORKS
   27657 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27658 at_status=$? at_failed=false
   27659 $at_check_filter
   27660 echo stderr:; cat "$at_stderr"
   27661 echo stdout:; cat "$at_stdout"
   27662 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   27663 $at_failed && at_fn_log_failure
   27664 $at_traceon; }
   27665 
   27666 { set +x
   27667 $as_echo "$at_srcdir/reduce.at:951: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   27668 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "reduce.at:951"
   27669 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   27670 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27671 at_status=$? at_failed=false
   27672 $at_check_filter
   27673 echo stderr:; cat "$at_stderr"
   27674 echo stdout:; cat "$at_stdout"
   27675 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   27676 $at_failed && at_fn_log_failure
   27677 $at_traceon; }
   27678 
   27679 
   27680 { set +x
   27681 $as_echo "$at_srcdir/reduce.at:951:  \$PREPARSER ./input"
   27682 at_fn_check_prepare_dynamic " $PREPARSER ./input" "reduce.at:951"
   27683 ( $at_check_trace;  $PREPARSER ./input
   27684 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27685 at_status=$? at_failed=false
   27686 $at_check_filter
   27687 echo stderr:; tee stderr <"$at_stderr"
   27688 at_fn_diff_devnull "$at_stdout" || at_failed=:
   27689 at_fn_check_status 1 $at_status "$at_srcdir/reduce.at:951"
   27690 $at_failed && at_fn_log_failure
   27691 $at_traceon; }
   27692 
   27693 { set +x
   27694 $as_echo "$at_srcdir/reduce.at:951: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   27695 at_fn_check_prepare_trace "reduce.at:951"
   27696 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   27697 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27698 at_status=$? at_failed=false
   27699 $at_check_filter
   27700 echo >>"$at_stderr"; $as_echo "syntax error
   27701 " | \
   27702   $at_diff - "$at_stderr" || at_failed=:
   27703 at_fn_diff_devnull "$at_stdout" || at_failed=:
   27704 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   27705 $at_failed && at_fn_log_failure
   27706 $at_traceon; }
   27707 
   27708 
   27709 
   27710 
   27711   set +x
   27712   $at_times_p && times >"$at_times_file"
   27713 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   27714 read at_status <"$at_status_file"
   27715 #AT_STOP_117
   27716 #AT_START_118
   27717 at_fn_group_banner 118 'reduce.at:951' \
   27718   "%define lr.type ielr: Complex Lane Split" "       " 6
   27719 at_xfail=no
   27720 (
   27721   $as_echo "118. $at_setup_line: testing $at_desc ..."
   27722   $at_traceon
   27723 
   27724 
   27725 cat >input.y <<'_ATEOF'
   27726 %code top {
   27727 #include <config.h>
   27728 /* We don't need perfect functions for these tests. */
   27729 #undef malloc
   27730 #undef memcmp
   27731 #undef realloc
   27732 }
   27733 
   27734 %code {
   27735   #include <stdio.h>
   27736   static void yyerror ( const char *msg);
   27737   static int yylex (void);
   27738 }
   27739 
   27740 %define lr.type ielr
   27741 %left 'a'
   27742 // Conflict resolution renders state 16 unreachable for canonical LR(1).  We
   27743 // keep it so that the paser table diff is easier to code.
   27744 %define lr.keep-unreachable-states
   27745 
   27746 %%
   27747 
   27748 
   27749 /* Similar to the last test case set but forseeing the S/R conflict from the
   27750    first state that must be split is becoming difficult.  Imagine if B were
   27751    even more complex.  Imagine if A had other RHS's ending in other
   27752    nonterminals.  */
   27753 S: 'a' A 'a'
   27754  | 'b' A 'b'
   27755  | 'c' c
   27756  ;
   27757 A: 'a' 'a' B
   27758  ;
   27759 B: 'a'
   27760  | %prec 'a'
   27761  ;
   27762 c: 'a' 'a' 'b'
   27763  | A
   27764  ;
   27765 
   27766 
   27767 %%
   27768 #include <stdio.h>
   27769 /* A C error reporting function.  */
   27770 static
   27771 void yyerror ( const char *msg)
   27772 {
   27773   fprintf (stderr, "%s\n", msg);
   27774 }
   27775 static int
   27776 yylex (void)
   27777 {
   27778   static int const input[] = {
   27779     'b', 'a', 'a', 'a', 'b', 0
   27780   };
   27781   static int const *inputp = input;
   27782   return *inputp++;
   27783 }
   27784 
   27785 int
   27786 main (void)
   27787 {
   27788   return yyparse ();
   27789 }
   27790 _ATEOF
   27791 
   27792 
   27793 
   27794 # In some versions of Autoconf, AT_CHECK invokes AS_ESCAPE before
   27795 # expanding macros, so it corrupts some special characters in the
   27796 # macros.  To avoid this, expand now and pass it the result with proper
   27797 # string quotation.  Assume args 7 through 12 expand to properly quoted
   27798 # strings.
   27799 
   27800 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   27801   at_save_special_files
   27802   mkdir xml-tests
   27803     # Don't combine these Bison invocations since we want to be sure that
   27804   # --report=all isn't required to get the full XML file.
   27805   { set +x
   27806 $as_echo "$at_srcdir/reduce.at:951: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   27807                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y"
   27808 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:951"
   27809 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   27810                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y
   27811 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27812 at_status=$? at_failed=false
   27813 $at_check_filter
   27814 echo stderr:; cat "$at_stderr"
   27815 echo stdout:; cat "$at_stdout"
   27816 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   27817 $at_failed && at_fn_log_failure
   27818 $at_traceon; }
   27819 
   27820   { set +x
   27821 $as_echo "$at_srcdir/reduce.at:951: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y"
   27822 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y" "reduce.at:951"
   27823 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y
   27824 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27825 at_status=$? at_failed=false
   27826 $at_check_filter
   27827 echo stderr:; cat "$at_stderr"
   27828 echo stdout:; cat "$at_stdout"
   27829 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   27830 $at_failed && at_fn_log_failure
   27831 $at_traceon; }
   27832 
   27833     cp xml-tests/test.output expout
   27834   { set +x
   27835 $as_echo "$at_srcdir/reduce.at:951: \$XSLTPROC \\
   27836              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   27837              xml-tests/test.xml"
   27838 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:951"
   27839 ( $at_check_trace; $XSLTPROC \
   27840              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   27841              xml-tests/test.xml
   27842 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27843 at_status=$? at_failed=false
   27844 $at_check_filter
   27845 at_fn_diff_devnull "$at_stderr" || at_failed=:
   27846 $at_diff expout "$at_stdout" || at_failed=:
   27847 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   27848 $at_failed && at_fn_log_failure
   27849 $at_traceon; }
   27850 
   27851   sort xml-tests/test.dot > expout
   27852   { set +x
   27853 $as_echo "$at_srcdir/reduce.at:951: \$XSLTPROC \\
   27854              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   27855              xml-tests/test.xml | sort"
   27856 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:951"
   27857 ( $at_check_trace; $XSLTPROC \
   27858              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   27859              xml-tests/test.xml | sort
   27860 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27861 at_status=$? at_failed=false
   27862 $at_check_filter
   27863 at_fn_diff_devnull "$at_stderr" || at_failed=:
   27864 $at_diff expout "$at_stdout" || at_failed=:
   27865 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   27866 $at_failed && at_fn_log_failure
   27867 $at_traceon; }
   27868 
   27869   rm -rf xml-tests expout
   27870   at_restore_special_files
   27871 fi
   27872 { set +x
   27873 $as_echo "$at_srcdir/reduce.at:951: bison --report=all --defines -o input.c input.y"
   27874 at_fn_check_prepare_trace "reduce.at:951"
   27875 ( $at_check_trace; bison --report=all --defines -o input.c input.y
   27876 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27877 at_status=$? at_failed=false
   27878 $at_check_filter
   27879 at_fn_diff_devnull "$at_stderr" || at_failed=:
   27880 at_fn_diff_devnull "$at_stdout" || at_failed=:
   27881 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   27882 $at_failed && at_fn_log_failure
   27883 $at_traceon; }
   27884 
   27885 
   27886 
   27887 { set +x
   27888 $as_echo "$at_srcdir/reduce.at:951: sed -n '/^State 0\$/,\$p' input.output"
   27889 at_fn_check_prepare_dynamic "sed -n '/^State 0$/,$p' input.output" "reduce.at:951"
   27890 ( $at_check_trace; sed -n '/^State 0$/,$p' input.output
   27891 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   27892 at_status=$? at_failed=false
   27893 $at_check_filter
   27894 at_fn_diff_devnull "$at_stderr" || at_failed=:
   27895 echo >>"$at_stdout"; $as_echo "State 0
   27896 
   27897     0 \$accept: . S \$end
   27898     1 S: . 'a' A 'a'
   27899     2  | . 'b' A 'b'
   27900     3  | . 'c' c
   27901 
   27902     'a'  shift, and go to state 1
   27903     'b'  shift, and go to state 2
   27904     'c'  shift, and go to state 3
   27905 
   27906     S  go to state 4
   27907 
   27908 
   27909 State 1
   27910 
   27911     1 S: 'a' . A 'a'
   27912     4 A: . 'a' 'a' B
   27913 
   27914     'a'  shift, and go to state 5
   27915 
   27916     A  go to state 6
   27917 
   27918 
   27919 State 2
   27920 
   27921     2 S: 'b' . A 'b'
   27922     4 A: . 'a' 'a' B
   27923 
   27924     'a'  shift, and go to state 19
   27925 
   27926     A  go to state 7
   27927 
   27928 
   27929 State 3
   27930 
   27931     3 S: 'c' . c
   27932     4 A: . 'a' 'a' B
   27933     7 c: . 'a' 'a' 'b'
   27934     8  | . A
   27935 
   27936     'a'  shift, and go to state 8
   27937 
   27938     A  go to state 9
   27939     c  go to state 10
   27940 
   27941 
   27942 State 4
   27943 
   27944     0 \$accept: S . \$end
   27945 
   27946     \$end  shift, and go to state 11
   27947 
   27948 
   27949 State 5
   27950 
   27951     4 A: 'a' . 'a' B
   27952 
   27953     'a'  shift, and go to state 12
   27954 
   27955 
   27956 State 6
   27957 
   27958     1 S: 'a' A . 'a'
   27959 
   27960     'a'  shift, and go to state 13
   27961 
   27962 
   27963 State 7
   27964 
   27965     2 S: 'b' A . 'b'
   27966 
   27967     'b'  shift, and go to state 14
   27968 
   27969 
   27970 State 8
   27971 
   27972     4 A: 'a' . 'a' B
   27973     7 c: 'a' . 'a' 'b'
   27974 
   27975     'a'  shift, and go to state 15
   27976 
   27977 
   27978 State 9
   27979 
   27980     8 c: A .
   27981 
   27982     \$default  reduce using rule 8 (c)
   27983 
   27984 
   27985 State 10
   27986 
   27987     3 S: 'c' c .
   27988 
   27989     \$default  reduce using rule 3 (S)
   27990 
   27991 
   27992 State 11
   27993 
   27994     0 \$accept: S \$end .
   27995 
   27996     \$default  accept
   27997 
   27998 
   27999 State 12
   28000 
   28001     4 A: 'a' 'a' . B
   28002     5 B: . 'a'
   28003     6  | .  ['a']
   28004 
   28005     \$default  reduce using rule 6 (B)
   28006 
   28007     B  go to state 17
   28008 
   28009     Conflict between rule 6 and token 'a' resolved as reduce (%left 'a').
   28010 
   28011 
   28012 State 13
   28013 
   28014     1 S: 'a' A 'a' .
   28015 
   28016     \$default  reduce using rule 1 (S)
   28017 
   28018 
   28019 State 14
   28020 
   28021     2 S: 'b' A 'b' .
   28022 
   28023     \$default  reduce using rule 2 (S)
   28024 
   28025 
   28026 State 15
   28027 
   28028     4 A: 'a' 'a' . B
   28029     5 B: . 'a'
   28030     6  | .  [\$end]
   28031     7 c: 'a' 'a' . 'b'
   28032 
   28033     'a'  shift, and go to state 16
   28034     'b'  shift, and go to state 18
   28035 
   28036     \$default  reduce using rule 6 (B)
   28037 
   28038     B  go to state 17
   28039 
   28040 
   28041 State 16
   28042 
   28043     5 B: 'a' .
   28044 
   28045     \$default  reduce using rule 5 (B)
   28046 
   28047 
   28048 State 17
   28049 
   28050     4 A: 'a' 'a' B .
   28051 
   28052     \$default  reduce using rule 4 (A)
   28053 
   28054 
   28055 State 18
   28056 
   28057     7 c: 'a' 'a' 'b' .
   28058 
   28059     \$default  reduce using rule 7 (c)
   28060 
   28061 
   28062 State 19
   28063 
   28064     4 A: 'a' . 'a' B
   28065 
   28066     'a'  shift, and go to state 20
   28067 
   28068 
   28069 State 20
   28070 
   28071     4 A: 'a' 'a' . B
   28072     5 B: . 'a'
   28073     6  | .  ['b']
   28074 
   28075     'a'  shift, and go to state 16
   28076 
   28077     \$default  reduce using rule 6 (B)
   28078 
   28079     B  go to state 17
   28080 " | \
   28081   $at_diff - "$at_stdout" || at_failed=:
   28082 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   28083 $at_failed && at_fn_log_failure
   28084 $at_traceon; }
   28085 
   28086 
   28087 
   28088 
   28089 # Canonical LR generates very large tables, resulting in very long
   28090 # files with #line directives that may overflow what the standards
   28091 # (C90 and C++98) guarantee: 32767.  In that case, GCC's -pedantic
   28092 # will issue an error.
   28093 #
   28094 # There is no "" around `wc` since some indent the result.
   28095 
   28096 { set +x
   28097 $as_echo "$at_srcdir/reduce.at:951: \$BISON_C_WORKS"
   28098 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "reduce.at:951"
   28099 ( $at_check_trace; $BISON_C_WORKS
   28100 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   28101 at_status=$? at_failed=false
   28102 $at_check_filter
   28103 echo stderr:; cat "$at_stderr"
   28104 echo stdout:; cat "$at_stdout"
   28105 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   28106 $at_failed && at_fn_log_failure
   28107 $at_traceon; }
   28108 
   28109 { set +x
   28110 $as_echo "$at_srcdir/reduce.at:951: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   28111 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "reduce.at:951"
   28112 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   28113 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   28114 at_status=$? at_failed=false
   28115 $at_check_filter
   28116 echo stderr:; cat "$at_stderr"
   28117 echo stdout:; cat "$at_stdout"
   28118 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   28119 $at_failed && at_fn_log_failure
   28120 $at_traceon; }
   28121 
   28122 
   28123 { set +x
   28124 $as_echo "$at_srcdir/reduce.at:951:  \$PREPARSER ./input"
   28125 at_fn_check_prepare_dynamic " $PREPARSER ./input" "reduce.at:951"
   28126 ( $at_check_trace;  $PREPARSER ./input
   28127 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   28128 at_status=$? at_failed=false
   28129 $at_check_filter
   28130 echo stderr:; tee stderr <"$at_stderr"
   28131 at_fn_diff_devnull "$at_stdout" || at_failed=:
   28132 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   28133 $at_failed && at_fn_log_failure
   28134 $at_traceon; }
   28135 
   28136 { set +x
   28137 $as_echo "$at_srcdir/reduce.at:951: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   28138 at_fn_check_prepare_trace "reduce.at:951"
   28139 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   28140 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   28141 at_status=$? at_failed=false
   28142 $at_check_filter
   28143 at_fn_diff_devnull "$at_stderr" || at_failed=:
   28144 at_fn_diff_devnull "$at_stdout" || at_failed=:
   28145 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   28146 $at_failed && at_fn_log_failure
   28147 $at_traceon; }
   28148 
   28149 
   28150 
   28151 
   28152   set +x
   28153   $at_times_p && times >"$at_times_file"
   28154 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   28155 read at_status <"$at_status_file"
   28156 #AT_STOP_118
   28157 #AT_START_119
   28158 at_fn_group_banner 119 'reduce.at:951' \
   28159   "%define lr.type canonical-lr: Complex Lane Split" "" 6
   28160 at_xfail=no
   28161 (
   28162   $as_echo "119. $at_setup_line: testing $at_desc ..."
   28163   $at_traceon
   28164 
   28165 
   28166 cat >input.y <<'_ATEOF'
   28167 %code top {
   28168 #include <config.h>
   28169 /* We don't need perfect functions for these tests. */
   28170 #undef malloc
   28171 #undef memcmp
   28172 #undef realloc
   28173 }
   28174 
   28175 %code {
   28176   #include <stdio.h>
   28177   static void yyerror ( const char *msg);
   28178   static int yylex (void);
   28179 }
   28180 
   28181 %define lr.type canonical-lr
   28182 %left 'a'
   28183 // Conflict resolution renders state 16 unreachable for canonical LR(1).  We
   28184 // keep it so that the paser table diff is easier to code.
   28185 %define lr.keep-unreachable-states
   28186 
   28187 %%
   28188 
   28189 
   28190 /* Similar to the last test case set but forseeing the S/R conflict from the
   28191    first state that must be split is becoming difficult.  Imagine if B were
   28192    even more complex.  Imagine if A had other RHS's ending in other
   28193    nonterminals.  */
   28194 S: 'a' A 'a'
   28195  | 'b' A 'b'
   28196  | 'c' c
   28197  ;
   28198 A: 'a' 'a' B
   28199  ;
   28200 B: 'a'
   28201  | %prec 'a'
   28202  ;
   28203 c: 'a' 'a' 'b'
   28204  | A
   28205  ;
   28206 
   28207 
   28208 %%
   28209 #include <stdio.h>
   28210 /* A C error reporting function.  */
   28211 static
   28212 void yyerror ( const char *msg)
   28213 {
   28214   fprintf (stderr, "%s\n", msg);
   28215 }
   28216 static int
   28217 yylex (void)
   28218 {
   28219   static int const input[] = {
   28220     'b', 'a', 'a', 'a', 'b', 0
   28221   };
   28222   static int const *inputp = input;
   28223   return *inputp++;
   28224 }
   28225 
   28226 int
   28227 main (void)
   28228 {
   28229   return yyparse ();
   28230 }
   28231 _ATEOF
   28232 
   28233 
   28234 
   28235 # In some versions of Autoconf, AT_CHECK invokes AS_ESCAPE before
   28236 # expanding macros, so it corrupts some special characters in the
   28237 # macros.  To avoid this, expand now and pass it the result with proper
   28238 # string quotation.  Assume args 7 through 12 expand to properly quoted
   28239 # strings.
   28240 
   28241 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   28242   at_save_special_files
   28243   mkdir xml-tests
   28244     # Don't combine these Bison invocations since we want to be sure that
   28245   # --report=all isn't required to get the full XML file.
   28246   { set +x
   28247 $as_echo "$at_srcdir/reduce.at:951: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   28248                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y"
   28249 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:951"
   28250 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   28251                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y
   28252 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   28253 at_status=$? at_failed=false
   28254 $at_check_filter
   28255 echo stderr:; cat "$at_stderr"
   28256 echo stdout:; cat "$at_stdout"
   28257 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   28258 $at_failed && at_fn_log_failure
   28259 $at_traceon; }
   28260 
   28261   { set +x
   28262 $as_echo "$at_srcdir/reduce.at:951: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y"
   28263 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y" "reduce.at:951"
   28264 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y
   28265 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   28266 at_status=$? at_failed=false
   28267 $at_check_filter
   28268 echo stderr:; cat "$at_stderr"
   28269 echo stdout:; cat "$at_stdout"
   28270 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   28271 $at_failed && at_fn_log_failure
   28272 $at_traceon; }
   28273 
   28274     cp xml-tests/test.output expout
   28275   { set +x
   28276 $as_echo "$at_srcdir/reduce.at:951: \$XSLTPROC \\
   28277              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   28278              xml-tests/test.xml"
   28279 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:951"
   28280 ( $at_check_trace; $XSLTPROC \
   28281              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   28282              xml-tests/test.xml
   28283 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   28284 at_status=$? at_failed=false
   28285 $at_check_filter
   28286 at_fn_diff_devnull "$at_stderr" || at_failed=:
   28287 $at_diff expout "$at_stdout" || at_failed=:
   28288 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   28289 $at_failed && at_fn_log_failure
   28290 $at_traceon; }
   28291 
   28292   sort xml-tests/test.dot > expout
   28293   { set +x
   28294 $as_echo "$at_srcdir/reduce.at:951: \$XSLTPROC \\
   28295              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   28296              xml-tests/test.xml | sort"
   28297 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:951"
   28298 ( $at_check_trace; $XSLTPROC \
   28299              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   28300              xml-tests/test.xml | sort
   28301 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   28302 at_status=$? at_failed=false
   28303 $at_check_filter
   28304 at_fn_diff_devnull "$at_stderr" || at_failed=:
   28305 $at_diff expout "$at_stdout" || at_failed=:
   28306 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   28307 $at_failed && at_fn_log_failure
   28308 $at_traceon; }
   28309 
   28310   rm -rf xml-tests expout
   28311   at_restore_special_files
   28312 fi
   28313 { set +x
   28314 $as_echo "$at_srcdir/reduce.at:951: bison --report=all --defines -o input.c input.y"
   28315 at_fn_check_prepare_trace "reduce.at:951"
   28316 ( $at_check_trace; bison --report=all --defines -o input.c input.y
   28317 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   28318 at_status=$? at_failed=false
   28319 $at_check_filter
   28320 at_fn_diff_devnull "$at_stderr" || at_failed=:
   28321 at_fn_diff_devnull "$at_stdout" || at_failed=:
   28322 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   28323 $at_failed && at_fn_log_failure
   28324 $at_traceon; }
   28325 
   28326 
   28327 
   28328 { set +x
   28329 $as_echo "$at_srcdir/reduce.at:951: sed -n '/^State 0\$/,\$p' input.output"
   28330 at_fn_check_prepare_dynamic "sed -n '/^State 0$/,$p' input.output" "reduce.at:951"
   28331 ( $at_check_trace; sed -n '/^State 0$/,$p' input.output
   28332 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   28333 at_status=$? at_failed=false
   28334 $at_check_filter
   28335 at_fn_diff_devnull "$at_stderr" || at_failed=:
   28336 echo >>"$at_stdout"; $as_echo "State 0
   28337 
   28338     0 \$accept: . S \$end
   28339     1 S: . 'a' A 'a'
   28340     2  | . 'b' A 'b'
   28341     3  | . 'c' c
   28342 
   28343     'a'  shift, and go to state 1
   28344     'b'  shift, and go to state 2
   28345     'c'  shift, and go to state 3
   28346 
   28347     S  go to state 4
   28348 
   28349 
   28350 State 1
   28351 
   28352     1 S: 'a' . A 'a'
   28353     4 A: . 'a' 'a' B
   28354 
   28355     'a'  shift, and go to state 5
   28356 
   28357     A  go to state 6
   28358 
   28359 
   28360 State 2
   28361 
   28362     2 S: 'b' . A 'b'
   28363     4 A: . 'a' 'a' B
   28364 
   28365     'a'  shift, and go to state 19
   28366 
   28367     A  go to state 7
   28368 
   28369 
   28370 State 3
   28371 
   28372     3 S: 'c' . c
   28373     4 A: . 'a' 'a' B
   28374     7 c: . 'a' 'a' 'b'
   28375     8  | . A
   28376 
   28377     'a'  shift, and go to state 8
   28378 
   28379     A  go to state 9
   28380     c  go to state 10
   28381 
   28382 
   28383 State 4
   28384 
   28385     0 \$accept: S . \$end
   28386 
   28387     \$end  shift, and go to state 11
   28388 
   28389 
   28390 State 5
   28391 
   28392     4 A: 'a' . 'a' B
   28393 
   28394     'a'  shift, and go to state 12
   28395 
   28396 
   28397 State 6
   28398 
   28399     1 S: 'a' A . 'a'
   28400 
   28401     'a'  shift, and go to state 13
   28402 
   28403 
   28404 State 7
   28405 
   28406     2 S: 'b' A . 'b'
   28407 
   28408     'b'  shift, and go to state 14
   28409 
   28410 
   28411 State 8
   28412 
   28413     4 A: 'a' . 'a' B
   28414     7 c: 'a' . 'a' 'b'
   28415 
   28416     'a'  shift, and go to state 15
   28417 
   28418 
   28419 State 9
   28420 
   28421     8 c: A .  [\$end]
   28422 
   28423     \$end  reduce using rule 8 (c)
   28424 
   28425 
   28426 State 10
   28427 
   28428     3 S: 'c' c .  [\$end]
   28429 
   28430     \$end  reduce using rule 3 (S)
   28431 
   28432 
   28433 State 11
   28434 
   28435     0 \$accept: S \$end .
   28436 
   28437     \$default  accept
   28438 
   28439 
   28440 State 12
   28441 
   28442     4 A: 'a' 'a' . B
   28443     5 B: . 'a'
   28444     6  | .  ['a']
   28445 
   28446     'a'  reduce using rule 6 (B)
   28447 
   28448     B  go to state 17
   28449 
   28450     Conflict between rule 6 and token 'a' resolved as reduce (%left 'a').
   28451 
   28452 
   28453 State 13
   28454 
   28455     1 S: 'a' A 'a' .  [\$end]
   28456 
   28457     \$end  reduce using rule 1 (S)
   28458 
   28459 
   28460 State 14
   28461 
   28462     2 S: 'b' A 'b' .  [\$end]
   28463 
   28464     \$end  reduce using rule 2 (S)
   28465 
   28466 
   28467 State 15
   28468 
   28469     4 A: 'a' 'a' . B
   28470     5 B: . 'a'
   28471     6  | .  [\$end]
   28472     7 c: 'a' 'a' . 'b'
   28473 
   28474     'a'  shift, and go to state 20
   28475     'b'  shift, and go to state 18
   28476 
   28477     \$end  reduce using rule 6 (B)
   28478 
   28479     B  go to state 21
   28480 
   28481 
   28482 State 16
   28483 
   28484     5 B: 'a' .  ['a']
   28485 
   28486     'a'  reduce using rule 5 (B)
   28487 
   28488 
   28489 State 17
   28490 
   28491     4 A: 'a' 'a' B .  ['a']
   28492 
   28493     'a'  reduce using rule 4 (A)
   28494 
   28495 
   28496 State 18
   28497 
   28498     7 c: 'a' 'a' 'b' .  [\$end]
   28499 
   28500     \$end  reduce using rule 7 (c)
   28501 
   28502 
   28503 State 19
   28504 
   28505     4 A: 'a' . 'a' B
   28506 
   28507     'a'  shift, and go to state 22
   28508 
   28509 
   28510 State 20
   28511 
   28512     5 B: 'a' .  [\$end]
   28513 
   28514     \$end  reduce using rule 5 (B)
   28515 
   28516 
   28517 State 21
   28518 
   28519     4 A: 'a' 'a' B .  [\$end]
   28520 
   28521     \$end  reduce using rule 4 (A)
   28522 
   28523 
   28524 State 22
   28525 
   28526     4 A: 'a' 'a' . B
   28527     5 B: . 'a'
   28528     6  | .  ['b']
   28529 
   28530     'a'  shift, and go to state 23
   28531 
   28532     'b'  reduce using rule 6 (B)
   28533 
   28534     B  go to state 24
   28535 
   28536 
   28537 State 23
   28538 
   28539     5 B: 'a' .  ['b']
   28540 
   28541     'b'  reduce using rule 5 (B)
   28542 
   28543 
   28544 State 24
   28545 
   28546     4 A: 'a' 'a' B .  ['b']
   28547 
   28548     'b'  reduce using rule 4 (A)
   28549 " | \
   28550   $at_diff - "$at_stdout" || at_failed=:
   28551 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   28552 $at_failed && at_fn_log_failure
   28553 $at_traceon; }
   28554 
   28555 
   28556 
   28557 
   28558 # Canonical LR generates very large tables, resulting in very long
   28559 # files with #line directives that may overflow what the standards
   28560 # (C90 and C++98) guarantee: 32767.  In that case, GCC's -pedantic
   28561 # will issue an error.
   28562 #
   28563 # There is no "" around `wc` since some indent the result.
   28564 if test 32767 -lt `wc -l < input.c`; then
   28565   CFLAGS=`echo " $CFLAGS " | sed -e 's/ -pedantic //'`
   28566   CXXFLAGS=`echo " $CXXFLAGS " | sed -e 's/ -pedantic //'`
   28567 fi
   28568 { set +x
   28569 $as_echo "$at_srcdir/reduce.at:951: \$BISON_C_WORKS"
   28570 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "reduce.at:951"
   28571 ( $at_check_trace; $BISON_C_WORKS
   28572 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   28573 at_status=$? at_failed=false
   28574 $at_check_filter
   28575 echo stderr:; cat "$at_stderr"
   28576 echo stdout:; cat "$at_stdout"
   28577 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   28578 $at_failed && at_fn_log_failure
   28579 $at_traceon; }
   28580 
   28581 { set +x
   28582 $as_echo "$at_srcdir/reduce.at:951: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   28583 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "reduce.at:951"
   28584 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   28585 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   28586 at_status=$? at_failed=false
   28587 $at_check_filter
   28588 echo stderr:; cat "$at_stderr"
   28589 echo stdout:; cat "$at_stdout"
   28590 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   28591 $at_failed && at_fn_log_failure
   28592 $at_traceon; }
   28593 
   28594 
   28595 { set +x
   28596 $as_echo "$at_srcdir/reduce.at:951:  \$PREPARSER ./input"
   28597 at_fn_check_prepare_dynamic " $PREPARSER ./input" "reduce.at:951"
   28598 ( $at_check_trace;  $PREPARSER ./input
   28599 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   28600 at_status=$? at_failed=false
   28601 $at_check_filter
   28602 echo stderr:; tee stderr <"$at_stderr"
   28603 at_fn_diff_devnull "$at_stdout" || at_failed=:
   28604 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   28605 $at_failed && at_fn_log_failure
   28606 $at_traceon; }
   28607 
   28608 { set +x
   28609 $as_echo "$at_srcdir/reduce.at:951: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   28610 at_fn_check_prepare_trace "reduce.at:951"
   28611 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   28612 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   28613 at_status=$? at_failed=false
   28614 $at_check_filter
   28615 at_fn_diff_devnull "$at_stderr" || at_failed=:
   28616 at_fn_diff_devnull "$at_stdout" || at_failed=:
   28617 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:951"
   28618 $at_failed && at_fn_log_failure
   28619 $at_traceon; }
   28620 
   28621 
   28622 
   28623 
   28624   set +x
   28625   $at_times_p && times >"$at_times_file"
   28626 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   28627 read at_status <"$at_status_file"
   28628 #AT_STOP_119
   28629 #AT_START_120
   28630 at_fn_group_banner 120 'reduce.at:1220' \
   28631   "no %define lr.type: Split During Added Lookahead Propagation" "" 6
   28632 at_xfail=no
   28633 (
   28634   $as_echo "120. $at_setup_line: testing $at_desc ..."
   28635   $at_traceon
   28636 
   28637 
   28638 cat >input.y <<'_ATEOF'
   28639 %code top {
   28640 #include <config.h>
   28641 /* We don't need perfect functions for these tests. */
   28642 #undef malloc
   28643 #undef memcmp
   28644 #undef realloc
   28645 }
   28646 
   28647 %code {
   28648   #include <stdio.h>
   28649   static void yyerror ( const char *msg);
   28650   static int yylex (void);
   28651 }
   28652 
   28653 %define lr.keep-unreachable-states
   28654 
   28655 %%
   28656 
   28657 
   28658 /* The partial state chart diagram below is for LALR(1).  State 0 is the start
   28659    state.  States are iterated for successor construction in numerical order.
   28660    Transitions are downwards.
   28661 
   28662    State 13 has a R/R conflict that cannot be predicted by Bison's LR(1)
   28663    algorithm using annotations alone.  That is, when state 11's successor on
   28664    'd' is merged with state 5 (which is originally just state 1's successor on
   28665    'd'), state 5's successor on 'e' must then be changed because the resulting
   28666    lookaheads that propagate to it now make it incompatible with state 8's
   28667    successor on 'e'.  In other words, state 13 must be split to avoid the
   28668    conflict.
   28669 
   28670           0
   28671         / | \
   28672      a / c|  \ b
   28673       1   3   2
   28674       |   |   |
   28675      d|   |c  | d
   28676       |  11   |
   28677       |   |   |
   28678        \ /d   |
   28679         5     8
   28680          \    |
   28681         e \  / e
   28682            13
   28683            R/R
   28684 
   28685    This grammar is designed carefully to make sure that, despite Bison's LR(1)
   28686    algorithm's bread-first iteration of transitions to reconstruct states,
   28687    state 11's successors are constructed after state 5's and state 8's.
   28688    Otherwise (for example, if you remove the first 'c' in each of rules 6 and
   28689    7), state 5's successor on 'e' would never be merged with state 8's, so the
   28690    split of the resulting state 13 would never need to be performed.  */
   28691 S: 'a' A 'f'
   28692  | 'a' B
   28693  | 'b' A 'f'
   28694  | 'b' B 'g'
   28695  | 'b' 'd'
   28696  | 'c' 'c' A 'g'
   28697  | 'c' 'c' B
   28698  ;
   28699 A: 'd' 'e' ;
   28700 B: 'd' 'e' ;
   28701 
   28702 
   28703 %%
   28704 #include <stdio.h>
   28705 /* A C error reporting function.  */
   28706 static
   28707 void yyerror ( const char *msg)
   28708 {
   28709   fprintf (stderr, "%s\n", msg);
   28710 }
   28711 static int
   28712 yylex (void)
   28713 {
   28714   static int const input[] = {
   28715     'b', 'd', 'e', 'g', 0
   28716   };
   28717   static int const *inputp = input;
   28718   return *inputp++;
   28719 }
   28720 
   28721 int
   28722 main (void)
   28723 {
   28724   return yyparse ();
   28725 }
   28726 _ATEOF
   28727 
   28728 
   28729 
   28730 # In some versions of Autoconf, AT_CHECK invokes AS_ESCAPE before
   28731 # expanding macros, so it corrupts some special characters in the
   28732 # macros.  To avoid this, expand now and pass it the result with proper
   28733 # string quotation.  Assume args 7 through 12 expand to properly quoted
   28734 # strings.
   28735 
   28736 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   28737   at_save_special_files
   28738   mkdir xml-tests
   28739     # Don't combine these Bison invocations since we want to be sure that
   28740   # --report=all isn't required to get the full XML file.
   28741   { set +x
   28742 $as_echo "$at_srcdir/reduce.at:1220: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   28743                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y"
   28744 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:1220"
   28745 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   28746                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y
   28747 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   28748 at_status=$? at_failed=false
   28749 $at_check_filter
   28750 echo stderr:; cat "$at_stderr"
   28751 echo stdout:; cat "$at_stdout"
   28752 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   28753 $at_failed && at_fn_log_failure
   28754 $at_traceon; }
   28755 
   28756   { set +x
   28757 $as_echo "$at_srcdir/reduce.at:1220: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y"
   28758 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y" "reduce.at:1220"
   28759 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y
   28760 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   28761 at_status=$? at_failed=false
   28762 $at_check_filter
   28763 echo stderr:; cat "$at_stderr"
   28764 echo stdout:; cat "$at_stdout"
   28765 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   28766 $at_failed && at_fn_log_failure
   28767 $at_traceon; }
   28768 
   28769     cp xml-tests/test.output expout
   28770   { set +x
   28771 $as_echo "$at_srcdir/reduce.at:1220: \$XSLTPROC \\
   28772              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   28773              xml-tests/test.xml"
   28774 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:1220"
   28775 ( $at_check_trace; $XSLTPROC \
   28776              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   28777              xml-tests/test.xml
   28778 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   28779 at_status=$? at_failed=false
   28780 $at_check_filter
   28781 at_fn_diff_devnull "$at_stderr" || at_failed=:
   28782 $at_diff expout "$at_stdout" || at_failed=:
   28783 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   28784 $at_failed && at_fn_log_failure
   28785 $at_traceon; }
   28786 
   28787   sort xml-tests/test.dot > expout
   28788   { set +x
   28789 $as_echo "$at_srcdir/reduce.at:1220: \$XSLTPROC \\
   28790              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   28791              xml-tests/test.xml | sort"
   28792 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:1220"
   28793 ( $at_check_trace; $XSLTPROC \
   28794              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   28795              xml-tests/test.xml | sort
   28796 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   28797 at_status=$? at_failed=false
   28798 $at_check_filter
   28799 at_fn_diff_devnull "$at_stderr" || at_failed=:
   28800 $at_diff expout "$at_stdout" || at_failed=:
   28801 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   28802 $at_failed && at_fn_log_failure
   28803 $at_traceon; }
   28804 
   28805   rm -rf xml-tests expout
   28806   at_restore_special_files
   28807 fi
   28808 { set +x
   28809 $as_echo "$at_srcdir/reduce.at:1220: bison --report=all --defines -o input.c input.y"
   28810 at_fn_check_prepare_trace "reduce.at:1220"
   28811 ( $at_check_trace; bison --report=all --defines -o input.c input.y
   28812 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   28813 at_status=$? at_failed=false
   28814 $at_check_filter
   28815 echo >>"$at_stderr"; $as_echo "input.y: conflicts: 1 reduce/reduce
   28816 " | \
   28817   $at_diff - "$at_stderr" || at_failed=:
   28818 at_fn_diff_devnull "$at_stdout" || at_failed=:
   28819 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   28820 $at_failed && at_fn_log_failure
   28821 $at_traceon; }
   28822 
   28823 
   28824 
   28825 { set +x
   28826 $as_echo "$at_srcdir/reduce.at:1220: sed -n '/^State 0\$/,\$p' input.output"
   28827 at_fn_check_prepare_dynamic "sed -n '/^State 0$/,$p' input.output" "reduce.at:1220"
   28828 ( $at_check_trace; sed -n '/^State 0$/,$p' input.output
   28829 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   28830 at_status=$? at_failed=false
   28831 $at_check_filter
   28832 at_fn_diff_devnull "$at_stderr" || at_failed=:
   28833 echo >>"$at_stdout"; $as_echo "State 0
   28834 
   28835     0 \$accept: . S \$end
   28836     1 S: . 'a' A 'f'
   28837     2  | . 'a' B
   28838     3  | . 'b' A 'f'
   28839     4  | . 'b' B 'g'
   28840     5  | . 'b' 'd'
   28841     6  | . 'c' 'c' A 'g'
   28842     7  | . 'c' 'c' B
   28843 
   28844     'a'  shift, and go to state 1
   28845     'b'  shift, and go to state 2
   28846     'c'  shift, and go to state 3
   28847 
   28848     S  go to state 4
   28849 
   28850 
   28851 State 1
   28852 
   28853     1 S: 'a' . A 'f'
   28854     2  | 'a' . B
   28855     8 A: . 'd' 'e'
   28856     9 B: . 'd' 'e'
   28857 
   28858     'd'  shift, and go to state 5
   28859 
   28860     A  go to state 6
   28861     B  go to state 7
   28862 
   28863 
   28864 State 2
   28865 
   28866     3 S: 'b' . A 'f'
   28867     4  | 'b' . B 'g'
   28868     5  | 'b' . 'd'
   28869     8 A: . 'd' 'e'
   28870     9 B: . 'd' 'e'
   28871 
   28872     'd'  shift, and go to state 8
   28873 
   28874     A  go to state 9
   28875     B  go to state 10
   28876 
   28877 
   28878 State 3
   28879 
   28880     6 S: 'c' . 'c' A 'g'
   28881     7  | 'c' . 'c' B
   28882 
   28883     'c'  shift, and go to state 11
   28884 
   28885 
   28886 State 4
   28887 
   28888     0 \$accept: S . \$end
   28889 
   28890     \$end  shift, and go to state 12
   28891 
   28892 
   28893 State 5
   28894 
   28895     8 A: 'd' . 'e'
   28896     9 B: 'd' . 'e'
   28897 
   28898     'e'  shift, and go to state 13
   28899 
   28900 
   28901 State 6
   28902 
   28903     1 S: 'a' A . 'f'
   28904 
   28905     'f'  shift, and go to state 14
   28906 
   28907 
   28908 State 7
   28909 
   28910     2 S: 'a' B .
   28911 
   28912     \$default  reduce using rule 2 (S)
   28913 
   28914 
   28915 State 8
   28916 
   28917     5 S: 'b' 'd' .  [\$end]
   28918     8 A: 'd' . 'e'
   28919     9 B: 'd' . 'e'
   28920 
   28921     'e'  shift, and go to state 13
   28922 
   28923     \$default  reduce using rule 5 (S)
   28924 
   28925 
   28926 State 9
   28927 
   28928     3 S: 'b' A . 'f'
   28929 
   28930     'f'  shift, and go to state 15
   28931 
   28932 
   28933 State 10
   28934 
   28935     4 S: 'b' B . 'g'
   28936 
   28937     'g'  shift, and go to state 16
   28938 
   28939 
   28940 State 11
   28941 
   28942     6 S: 'c' 'c' . A 'g'
   28943     7  | 'c' 'c' . B
   28944     8 A: . 'd' 'e'
   28945     9 B: . 'd' 'e'
   28946 
   28947     'd'  shift, and go to state 5
   28948 
   28949     A  go to state 17
   28950     B  go to state 18
   28951 
   28952 
   28953 State 12
   28954 
   28955     0 \$accept: S \$end .
   28956 
   28957     \$default  accept
   28958 
   28959 
   28960 State 13
   28961 
   28962     8 A: 'd' 'e' .  ['f', 'g']
   28963     9 B: 'd' 'e' .  [\$end, 'g']
   28964 
   28965     \$end      reduce using rule 9 (B)
   28966     'g'       reduce using rule 8 (A)
   28967     'g'       [reduce using rule 9 (B)]
   28968     \$default  reduce using rule 8 (A)
   28969 
   28970 
   28971 State 14
   28972 
   28973     1 S: 'a' A 'f' .
   28974 
   28975     \$default  reduce using rule 1 (S)
   28976 
   28977 
   28978 State 15
   28979 
   28980     3 S: 'b' A 'f' .
   28981 
   28982     \$default  reduce using rule 3 (S)
   28983 
   28984 
   28985 State 16
   28986 
   28987     4 S: 'b' B 'g' .
   28988 
   28989     \$default  reduce using rule 4 (S)
   28990 
   28991 
   28992 State 17
   28993 
   28994     6 S: 'c' 'c' A . 'g'
   28995 
   28996     'g'  shift, and go to state 19
   28997 
   28998 
   28999 State 18
   29000 
   29001     7 S: 'c' 'c' B .
   29002 
   29003     \$default  reduce using rule 7 (S)
   29004 
   29005 
   29006 State 19
   29007 
   29008     6 S: 'c' 'c' A 'g' .
   29009 
   29010     \$default  reduce using rule 6 (S)
   29011 " | \
   29012   $at_diff - "$at_stdout" || at_failed=:
   29013 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   29014 $at_failed && at_fn_log_failure
   29015 $at_traceon; }
   29016 
   29017 
   29018 
   29019 
   29020 # Canonical LR generates very large tables, resulting in very long
   29021 # files with #line directives that may overflow what the standards
   29022 # (C90 and C++98) guarantee: 32767.  In that case, GCC's -pedantic
   29023 # will issue an error.
   29024 #
   29025 # There is no "" around `wc` since some indent the result.
   29026 
   29027 { set +x
   29028 $as_echo "$at_srcdir/reduce.at:1220: \$BISON_C_WORKS"
   29029 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "reduce.at:1220"
   29030 ( $at_check_trace; $BISON_C_WORKS
   29031 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29032 at_status=$? at_failed=false
   29033 $at_check_filter
   29034 echo stderr:; cat "$at_stderr"
   29035 echo stdout:; cat "$at_stdout"
   29036 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   29037 $at_failed && at_fn_log_failure
   29038 $at_traceon; }
   29039 
   29040 { set +x
   29041 $as_echo "$at_srcdir/reduce.at:1220: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   29042 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "reduce.at:1220"
   29043 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   29044 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29045 at_status=$? at_failed=false
   29046 $at_check_filter
   29047 echo stderr:; cat "$at_stderr"
   29048 echo stdout:; cat "$at_stdout"
   29049 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   29050 $at_failed && at_fn_log_failure
   29051 $at_traceon; }
   29052 
   29053 
   29054 { set +x
   29055 $as_echo "$at_srcdir/reduce.at:1220:  \$PREPARSER ./input"
   29056 at_fn_check_prepare_dynamic " $PREPARSER ./input" "reduce.at:1220"
   29057 ( $at_check_trace;  $PREPARSER ./input
   29058 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29059 at_status=$? at_failed=false
   29060 $at_check_filter
   29061 echo stderr:; tee stderr <"$at_stderr"
   29062 at_fn_diff_devnull "$at_stdout" || at_failed=:
   29063 at_fn_check_status 1 $at_status "$at_srcdir/reduce.at:1220"
   29064 $at_failed && at_fn_log_failure
   29065 $at_traceon; }
   29066 
   29067 { set +x
   29068 $as_echo "$at_srcdir/reduce.at:1220: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   29069 at_fn_check_prepare_trace "reduce.at:1220"
   29070 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   29071 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29072 at_status=$? at_failed=false
   29073 $at_check_filter
   29074 echo >>"$at_stderr"; $as_echo "syntax error
   29075 " | \
   29076   $at_diff - "$at_stderr" || at_failed=:
   29077 at_fn_diff_devnull "$at_stdout" || at_failed=:
   29078 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   29079 $at_failed && at_fn_log_failure
   29080 $at_traceon; }
   29081 
   29082 
   29083 
   29084 
   29085   set +x
   29086   $at_times_p && times >"$at_times_file"
   29087 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   29088 read at_status <"$at_status_file"
   29089 #AT_STOP_120
   29090 #AT_START_121
   29091 at_fn_group_banner 121 'reduce.at:1220' \
   29092   "%define lr.type lalr: Split During Added Lookahead Propagation" "" 6
   29093 at_xfail=no
   29094 (
   29095   $as_echo "121. $at_setup_line: testing $at_desc ..."
   29096   $at_traceon
   29097 
   29098 
   29099 cat >input.y <<'_ATEOF'
   29100 %code top {
   29101 #include <config.h>
   29102 /* We don't need perfect functions for these tests. */
   29103 #undef malloc
   29104 #undef memcmp
   29105 #undef realloc
   29106 }
   29107 
   29108 %code {
   29109   #include <stdio.h>
   29110   static void yyerror ( const char *msg);
   29111   static int yylex (void);
   29112 }
   29113 
   29114 %define lr.type lalr
   29115 %define lr.keep-unreachable-states
   29116 
   29117 %%
   29118 
   29119 
   29120 /* The partial state chart diagram below is for LALR(1).  State 0 is the start
   29121    state.  States are iterated for successor construction in numerical order.
   29122    Transitions are downwards.
   29123 
   29124    State 13 has a R/R conflict that cannot be predicted by Bison's LR(1)
   29125    algorithm using annotations alone.  That is, when state 11's successor on
   29126    'd' is merged with state 5 (which is originally just state 1's successor on
   29127    'd'), state 5's successor on 'e' must then be changed because the resulting
   29128    lookaheads that propagate to it now make it incompatible with state 8's
   29129    successor on 'e'.  In other words, state 13 must be split to avoid the
   29130    conflict.
   29131 
   29132           0
   29133         / | \
   29134      a / c|  \ b
   29135       1   3   2
   29136       |   |   |
   29137      d|   |c  | d
   29138       |  11   |
   29139       |   |   |
   29140        \ /d   |
   29141         5     8
   29142          \    |
   29143         e \  / e
   29144            13
   29145            R/R
   29146 
   29147    This grammar is designed carefully to make sure that, despite Bison's LR(1)
   29148    algorithm's bread-first iteration of transitions to reconstruct states,
   29149    state 11's successors are constructed after state 5's and state 8's.
   29150    Otherwise (for example, if you remove the first 'c' in each of rules 6 and
   29151    7), state 5's successor on 'e' would never be merged with state 8's, so the
   29152    split of the resulting state 13 would never need to be performed.  */
   29153 S: 'a' A 'f'
   29154  | 'a' B
   29155  | 'b' A 'f'
   29156  | 'b' B 'g'
   29157  | 'b' 'd'
   29158  | 'c' 'c' A 'g'
   29159  | 'c' 'c' B
   29160  ;
   29161 A: 'd' 'e' ;
   29162 B: 'd' 'e' ;
   29163 
   29164 
   29165 %%
   29166 #include <stdio.h>
   29167 /* A C error reporting function.  */
   29168 static
   29169 void yyerror ( const char *msg)
   29170 {
   29171   fprintf (stderr, "%s\n", msg);
   29172 }
   29173 static int
   29174 yylex (void)
   29175 {
   29176   static int const input[] = {
   29177     'b', 'd', 'e', 'g', 0
   29178   };
   29179   static int const *inputp = input;
   29180   return *inputp++;
   29181 }
   29182 
   29183 int
   29184 main (void)
   29185 {
   29186   return yyparse ();
   29187 }
   29188 _ATEOF
   29189 
   29190 
   29191 
   29192 # In some versions of Autoconf, AT_CHECK invokes AS_ESCAPE before
   29193 # expanding macros, so it corrupts some special characters in the
   29194 # macros.  To avoid this, expand now and pass it the result with proper
   29195 # string quotation.  Assume args 7 through 12 expand to properly quoted
   29196 # strings.
   29197 
   29198 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   29199   at_save_special_files
   29200   mkdir xml-tests
   29201     # Don't combine these Bison invocations since we want to be sure that
   29202   # --report=all isn't required to get the full XML file.
   29203   { set +x
   29204 $as_echo "$at_srcdir/reduce.at:1220: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   29205                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y"
   29206 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:1220"
   29207 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   29208                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y
   29209 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29210 at_status=$? at_failed=false
   29211 $at_check_filter
   29212 echo stderr:; cat "$at_stderr"
   29213 echo stdout:; cat "$at_stdout"
   29214 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   29215 $at_failed && at_fn_log_failure
   29216 $at_traceon; }
   29217 
   29218   { set +x
   29219 $as_echo "$at_srcdir/reduce.at:1220: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y"
   29220 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y" "reduce.at:1220"
   29221 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y
   29222 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29223 at_status=$? at_failed=false
   29224 $at_check_filter
   29225 echo stderr:; cat "$at_stderr"
   29226 echo stdout:; cat "$at_stdout"
   29227 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   29228 $at_failed && at_fn_log_failure
   29229 $at_traceon; }
   29230 
   29231     cp xml-tests/test.output expout
   29232   { set +x
   29233 $as_echo "$at_srcdir/reduce.at:1220: \$XSLTPROC \\
   29234              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   29235              xml-tests/test.xml"
   29236 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:1220"
   29237 ( $at_check_trace; $XSLTPROC \
   29238              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   29239              xml-tests/test.xml
   29240 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29241 at_status=$? at_failed=false
   29242 $at_check_filter
   29243 at_fn_diff_devnull "$at_stderr" || at_failed=:
   29244 $at_diff expout "$at_stdout" || at_failed=:
   29245 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   29246 $at_failed && at_fn_log_failure
   29247 $at_traceon; }
   29248 
   29249   sort xml-tests/test.dot > expout
   29250   { set +x
   29251 $as_echo "$at_srcdir/reduce.at:1220: \$XSLTPROC \\
   29252              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   29253              xml-tests/test.xml | sort"
   29254 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:1220"
   29255 ( $at_check_trace; $XSLTPROC \
   29256              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   29257              xml-tests/test.xml | sort
   29258 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29259 at_status=$? at_failed=false
   29260 $at_check_filter
   29261 at_fn_diff_devnull "$at_stderr" || at_failed=:
   29262 $at_diff expout "$at_stdout" || at_failed=:
   29263 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   29264 $at_failed && at_fn_log_failure
   29265 $at_traceon; }
   29266 
   29267   rm -rf xml-tests expout
   29268   at_restore_special_files
   29269 fi
   29270 { set +x
   29271 $as_echo "$at_srcdir/reduce.at:1220: bison --report=all --defines -o input.c input.y"
   29272 at_fn_check_prepare_trace "reduce.at:1220"
   29273 ( $at_check_trace; bison --report=all --defines -o input.c input.y
   29274 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29275 at_status=$? at_failed=false
   29276 $at_check_filter
   29277 echo >>"$at_stderr"; $as_echo "input.y: conflicts: 1 reduce/reduce
   29278 " | \
   29279   $at_diff - "$at_stderr" || at_failed=:
   29280 at_fn_diff_devnull "$at_stdout" || at_failed=:
   29281 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   29282 $at_failed && at_fn_log_failure
   29283 $at_traceon; }
   29284 
   29285 
   29286 
   29287 { set +x
   29288 $as_echo "$at_srcdir/reduce.at:1220: sed -n '/^State 0\$/,\$p' input.output"
   29289 at_fn_check_prepare_dynamic "sed -n '/^State 0$/,$p' input.output" "reduce.at:1220"
   29290 ( $at_check_trace; sed -n '/^State 0$/,$p' input.output
   29291 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29292 at_status=$? at_failed=false
   29293 $at_check_filter
   29294 at_fn_diff_devnull "$at_stderr" || at_failed=:
   29295 echo >>"$at_stdout"; $as_echo "State 0
   29296 
   29297     0 \$accept: . S \$end
   29298     1 S: . 'a' A 'f'
   29299     2  | . 'a' B
   29300     3  | . 'b' A 'f'
   29301     4  | . 'b' B 'g'
   29302     5  | . 'b' 'd'
   29303     6  | . 'c' 'c' A 'g'
   29304     7  | . 'c' 'c' B
   29305 
   29306     'a'  shift, and go to state 1
   29307     'b'  shift, and go to state 2
   29308     'c'  shift, and go to state 3
   29309 
   29310     S  go to state 4
   29311 
   29312 
   29313 State 1
   29314 
   29315     1 S: 'a' . A 'f'
   29316     2  | 'a' . B
   29317     8 A: . 'd' 'e'
   29318     9 B: . 'd' 'e'
   29319 
   29320     'd'  shift, and go to state 5
   29321 
   29322     A  go to state 6
   29323     B  go to state 7
   29324 
   29325 
   29326 State 2
   29327 
   29328     3 S: 'b' . A 'f'
   29329     4  | 'b' . B 'g'
   29330     5  | 'b' . 'd'
   29331     8 A: . 'd' 'e'
   29332     9 B: . 'd' 'e'
   29333 
   29334     'd'  shift, and go to state 8
   29335 
   29336     A  go to state 9
   29337     B  go to state 10
   29338 
   29339 
   29340 State 3
   29341 
   29342     6 S: 'c' . 'c' A 'g'
   29343     7  | 'c' . 'c' B
   29344 
   29345     'c'  shift, and go to state 11
   29346 
   29347 
   29348 State 4
   29349 
   29350     0 \$accept: S . \$end
   29351 
   29352     \$end  shift, and go to state 12
   29353 
   29354 
   29355 State 5
   29356 
   29357     8 A: 'd' . 'e'
   29358     9 B: 'd' . 'e'
   29359 
   29360     'e'  shift, and go to state 13
   29361 
   29362 
   29363 State 6
   29364 
   29365     1 S: 'a' A . 'f'
   29366 
   29367     'f'  shift, and go to state 14
   29368 
   29369 
   29370 State 7
   29371 
   29372     2 S: 'a' B .
   29373 
   29374     \$default  reduce using rule 2 (S)
   29375 
   29376 
   29377 State 8
   29378 
   29379     5 S: 'b' 'd' .  [\$end]
   29380     8 A: 'd' . 'e'
   29381     9 B: 'd' . 'e'
   29382 
   29383     'e'  shift, and go to state 13
   29384 
   29385     \$default  reduce using rule 5 (S)
   29386 
   29387 
   29388 State 9
   29389 
   29390     3 S: 'b' A . 'f'
   29391 
   29392     'f'  shift, and go to state 15
   29393 
   29394 
   29395 State 10
   29396 
   29397     4 S: 'b' B . 'g'
   29398 
   29399     'g'  shift, and go to state 16
   29400 
   29401 
   29402 State 11
   29403 
   29404     6 S: 'c' 'c' . A 'g'
   29405     7  | 'c' 'c' . B
   29406     8 A: . 'd' 'e'
   29407     9 B: . 'd' 'e'
   29408 
   29409     'd'  shift, and go to state 5
   29410 
   29411     A  go to state 17
   29412     B  go to state 18
   29413 
   29414 
   29415 State 12
   29416 
   29417     0 \$accept: S \$end .
   29418 
   29419     \$default  accept
   29420 
   29421 
   29422 State 13
   29423 
   29424     8 A: 'd' 'e' .  ['f', 'g']
   29425     9 B: 'd' 'e' .  [\$end, 'g']
   29426 
   29427     \$end      reduce using rule 9 (B)
   29428     'g'       reduce using rule 8 (A)
   29429     'g'       [reduce using rule 9 (B)]
   29430     \$default  reduce using rule 8 (A)
   29431 
   29432 
   29433 State 14
   29434 
   29435     1 S: 'a' A 'f' .
   29436 
   29437     \$default  reduce using rule 1 (S)
   29438 
   29439 
   29440 State 15
   29441 
   29442     3 S: 'b' A 'f' .
   29443 
   29444     \$default  reduce using rule 3 (S)
   29445 
   29446 
   29447 State 16
   29448 
   29449     4 S: 'b' B 'g' .
   29450 
   29451     \$default  reduce using rule 4 (S)
   29452 
   29453 
   29454 State 17
   29455 
   29456     6 S: 'c' 'c' A . 'g'
   29457 
   29458     'g'  shift, and go to state 19
   29459 
   29460 
   29461 State 18
   29462 
   29463     7 S: 'c' 'c' B .
   29464 
   29465     \$default  reduce using rule 7 (S)
   29466 
   29467 
   29468 State 19
   29469 
   29470     6 S: 'c' 'c' A 'g' .
   29471 
   29472     \$default  reduce using rule 6 (S)
   29473 " | \
   29474   $at_diff - "$at_stdout" || at_failed=:
   29475 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   29476 $at_failed && at_fn_log_failure
   29477 $at_traceon; }
   29478 
   29479 
   29480 
   29481 
   29482 # Canonical LR generates very large tables, resulting in very long
   29483 # files with #line directives that may overflow what the standards
   29484 # (C90 and C++98) guarantee: 32767.  In that case, GCC's -pedantic
   29485 # will issue an error.
   29486 #
   29487 # There is no "" around `wc` since some indent the result.
   29488 
   29489 { set +x
   29490 $as_echo "$at_srcdir/reduce.at:1220: \$BISON_C_WORKS"
   29491 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "reduce.at:1220"
   29492 ( $at_check_trace; $BISON_C_WORKS
   29493 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29494 at_status=$? at_failed=false
   29495 $at_check_filter
   29496 echo stderr:; cat "$at_stderr"
   29497 echo stdout:; cat "$at_stdout"
   29498 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   29499 $at_failed && at_fn_log_failure
   29500 $at_traceon; }
   29501 
   29502 { set +x
   29503 $as_echo "$at_srcdir/reduce.at:1220: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   29504 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "reduce.at:1220"
   29505 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   29506 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29507 at_status=$? at_failed=false
   29508 $at_check_filter
   29509 echo stderr:; cat "$at_stderr"
   29510 echo stdout:; cat "$at_stdout"
   29511 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   29512 $at_failed && at_fn_log_failure
   29513 $at_traceon; }
   29514 
   29515 
   29516 { set +x
   29517 $as_echo "$at_srcdir/reduce.at:1220:  \$PREPARSER ./input"
   29518 at_fn_check_prepare_dynamic " $PREPARSER ./input" "reduce.at:1220"
   29519 ( $at_check_trace;  $PREPARSER ./input
   29520 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29521 at_status=$? at_failed=false
   29522 $at_check_filter
   29523 echo stderr:; tee stderr <"$at_stderr"
   29524 at_fn_diff_devnull "$at_stdout" || at_failed=:
   29525 at_fn_check_status 1 $at_status "$at_srcdir/reduce.at:1220"
   29526 $at_failed && at_fn_log_failure
   29527 $at_traceon; }
   29528 
   29529 { set +x
   29530 $as_echo "$at_srcdir/reduce.at:1220: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   29531 at_fn_check_prepare_trace "reduce.at:1220"
   29532 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   29533 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29534 at_status=$? at_failed=false
   29535 $at_check_filter
   29536 echo >>"$at_stderr"; $as_echo "syntax error
   29537 " | \
   29538   $at_diff - "$at_stderr" || at_failed=:
   29539 at_fn_diff_devnull "$at_stdout" || at_failed=:
   29540 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   29541 $at_failed && at_fn_log_failure
   29542 $at_traceon; }
   29543 
   29544 
   29545 
   29546 
   29547   set +x
   29548   $at_times_p && times >"$at_times_file"
   29549 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   29550 read at_status <"$at_status_file"
   29551 #AT_STOP_121
   29552 #AT_START_122
   29553 at_fn_group_banner 122 'reduce.at:1220' \
   29554   "%define lr.type ielr: Split During Added Lookahead Propagation" "" 6
   29555 at_xfail=no
   29556 (
   29557   $as_echo "122. $at_setup_line: testing $at_desc ..."
   29558   $at_traceon
   29559 
   29560 
   29561 cat >input.y <<'_ATEOF'
   29562 %code top {
   29563 #include <config.h>
   29564 /* We don't need perfect functions for these tests. */
   29565 #undef malloc
   29566 #undef memcmp
   29567 #undef realloc
   29568 }
   29569 
   29570 %code {
   29571   #include <stdio.h>
   29572   static void yyerror ( const char *msg);
   29573   static int yylex (void);
   29574 }
   29575 
   29576 %define lr.type ielr
   29577 %define lr.keep-unreachable-states
   29578 
   29579 %%
   29580 
   29581 
   29582 /* The partial state chart diagram below is for LALR(1).  State 0 is the start
   29583    state.  States are iterated for successor construction in numerical order.
   29584    Transitions are downwards.
   29585 
   29586    State 13 has a R/R conflict that cannot be predicted by Bison's LR(1)
   29587    algorithm using annotations alone.  That is, when state 11's successor on
   29588    'd' is merged with state 5 (which is originally just state 1's successor on
   29589    'd'), state 5's successor on 'e' must then be changed because the resulting
   29590    lookaheads that propagate to it now make it incompatible with state 8's
   29591    successor on 'e'.  In other words, state 13 must be split to avoid the
   29592    conflict.
   29593 
   29594           0
   29595         / | \
   29596      a / c|  \ b
   29597       1   3   2
   29598       |   |   |
   29599      d|   |c  | d
   29600       |  11   |
   29601       |   |   |
   29602        \ /d   |
   29603         5     8
   29604          \    |
   29605         e \  / e
   29606            13
   29607            R/R
   29608 
   29609    This grammar is designed carefully to make sure that, despite Bison's LR(1)
   29610    algorithm's bread-first iteration of transitions to reconstruct states,
   29611    state 11's successors are constructed after state 5's and state 8's.
   29612    Otherwise (for example, if you remove the first 'c' in each of rules 6 and
   29613    7), state 5's successor on 'e' would never be merged with state 8's, so the
   29614    split of the resulting state 13 would never need to be performed.  */
   29615 S: 'a' A 'f'
   29616  | 'a' B
   29617  | 'b' A 'f'
   29618  | 'b' B 'g'
   29619  | 'b' 'd'
   29620  | 'c' 'c' A 'g'
   29621  | 'c' 'c' B
   29622  ;
   29623 A: 'd' 'e' ;
   29624 B: 'd' 'e' ;
   29625 
   29626 
   29627 %%
   29628 #include <stdio.h>
   29629 /* A C error reporting function.  */
   29630 static
   29631 void yyerror ( const char *msg)
   29632 {
   29633   fprintf (stderr, "%s\n", msg);
   29634 }
   29635 static int
   29636 yylex (void)
   29637 {
   29638   static int const input[] = {
   29639     'b', 'd', 'e', 'g', 0
   29640   };
   29641   static int const *inputp = input;
   29642   return *inputp++;
   29643 }
   29644 
   29645 int
   29646 main (void)
   29647 {
   29648   return yyparse ();
   29649 }
   29650 _ATEOF
   29651 
   29652 
   29653 
   29654 # In some versions of Autoconf, AT_CHECK invokes AS_ESCAPE before
   29655 # expanding macros, so it corrupts some special characters in the
   29656 # macros.  To avoid this, expand now and pass it the result with proper
   29657 # string quotation.  Assume args 7 through 12 expand to properly quoted
   29658 # strings.
   29659 
   29660 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   29661   at_save_special_files
   29662   mkdir xml-tests
   29663     # Don't combine these Bison invocations since we want to be sure that
   29664   # --report=all isn't required to get the full XML file.
   29665   { set +x
   29666 $as_echo "$at_srcdir/reduce.at:1220: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   29667                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y"
   29668 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:1220"
   29669 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   29670                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y
   29671 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29672 at_status=$? at_failed=false
   29673 $at_check_filter
   29674 echo stderr:; cat "$at_stderr"
   29675 echo stdout:; cat "$at_stdout"
   29676 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   29677 $at_failed && at_fn_log_failure
   29678 $at_traceon; }
   29679 
   29680   { set +x
   29681 $as_echo "$at_srcdir/reduce.at:1220: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y"
   29682 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y" "reduce.at:1220"
   29683 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y
   29684 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29685 at_status=$? at_failed=false
   29686 $at_check_filter
   29687 echo stderr:; cat "$at_stderr"
   29688 echo stdout:; cat "$at_stdout"
   29689 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   29690 $at_failed && at_fn_log_failure
   29691 $at_traceon; }
   29692 
   29693     cp xml-tests/test.output expout
   29694   { set +x
   29695 $as_echo "$at_srcdir/reduce.at:1220: \$XSLTPROC \\
   29696              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   29697              xml-tests/test.xml"
   29698 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:1220"
   29699 ( $at_check_trace; $XSLTPROC \
   29700              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   29701              xml-tests/test.xml
   29702 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29703 at_status=$? at_failed=false
   29704 $at_check_filter
   29705 at_fn_diff_devnull "$at_stderr" || at_failed=:
   29706 $at_diff expout "$at_stdout" || at_failed=:
   29707 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   29708 $at_failed && at_fn_log_failure
   29709 $at_traceon; }
   29710 
   29711   sort xml-tests/test.dot > expout
   29712   { set +x
   29713 $as_echo "$at_srcdir/reduce.at:1220: \$XSLTPROC \\
   29714              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   29715              xml-tests/test.xml | sort"
   29716 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:1220"
   29717 ( $at_check_trace; $XSLTPROC \
   29718              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   29719              xml-tests/test.xml | sort
   29720 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29721 at_status=$? at_failed=false
   29722 $at_check_filter
   29723 at_fn_diff_devnull "$at_stderr" || at_failed=:
   29724 $at_diff expout "$at_stdout" || at_failed=:
   29725 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   29726 $at_failed && at_fn_log_failure
   29727 $at_traceon; }
   29728 
   29729   rm -rf xml-tests expout
   29730   at_restore_special_files
   29731 fi
   29732 { set +x
   29733 $as_echo "$at_srcdir/reduce.at:1220: bison --report=all --defines -o input.c input.y"
   29734 at_fn_check_prepare_trace "reduce.at:1220"
   29735 ( $at_check_trace; bison --report=all --defines -o input.c input.y
   29736 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29737 at_status=$? at_failed=false
   29738 $at_check_filter
   29739 at_fn_diff_devnull "$at_stderr" || at_failed=:
   29740 at_fn_diff_devnull "$at_stdout" || at_failed=:
   29741 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   29742 $at_failed && at_fn_log_failure
   29743 $at_traceon; }
   29744 
   29745 
   29746 
   29747 { set +x
   29748 $as_echo "$at_srcdir/reduce.at:1220: sed -n '/^State 0\$/,\$p' input.output"
   29749 at_fn_check_prepare_dynamic "sed -n '/^State 0$/,$p' input.output" "reduce.at:1220"
   29750 ( $at_check_trace; sed -n '/^State 0$/,$p' input.output
   29751 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29752 at_status=$? at_failed=false
   29753 $at_check_filter
   29754 at_fn_diff_devnull "$at_stderr" || at_failed=:
   29755 echo >>"$at_stdout"; $as_echo "State 0
   29756 
   29757     0 \$accept: . S \$end
   29758     1 S: . 'a' A 'f'
   29759     2  | . 'a' B
   29760     3  | . 'b' A 'f'
   29761     4  | . 'b' B 'g'
   29762     5  | . 'b' 'd'
   29763     6  | . 'c' 'c' A 'g'
   29764     7  | . 'c' 'c' B
   29765 
   29766     'a'  shift, and go to state 1
   29767     'b'  shift, and go to state 2
   29768     'c'  shift, and go to state 3
   29769 
   29770     S  go to state 4
   29771 
   29772 
   29773 State 1
   29774 
   29775     1 S: 'a' . A 'f'
   29776     2  | 'a' . B
   29777     8 A: . 'd' 'e'
   29778     9 B: . 'd' 'e'
   29779 
   29780     'd'  shift, and go to state 5
   29781 
   29782     A  go to state 6
   29783     B  go to state 7
   29784 
   29785 
   29786 State 2
   29787 
   29788     3 S: 'b' . A 'f'
   29789     4  | 'b' . B 'g'
   29790     5  | 'b' . 'd'
   29791     8 A: . 'd' 'e'
   29792     9 B: . 'd' 'e'
   29793 
   29794     'd'  shift, and go to state 8
   29795 
   29796     A  go to state 9
   29797     B  go to state 10
   29798 
   29799 
   29800 State 3
   29801 
   29802     6 S: 'c' . 'c' A 'g'
   29803     7  | 'c' . 'c' B
   29804 
   29805     'c'  shift, and go to state 11
   29806 
   29807 
   29808 State 4
   29809 
   29810     0 \$accept: S . \$end
   29811 
   29812     \$end  shift, and go to state 12
   29813 
   29814 
   29815 State 5
   29816 
   29817     8 A: 'd' . 'e'
   29818     9 B: 'd' . 'e'
   29819 
   29820     'e'  shift, and go to state 20
   29821 
   29822 
   29823 State 6
   29824 
   29825     1 S: 'a' A . 'f'
   29826 
   29827     'f'  shift, and go to state 14
   29828 
   29829 
   29830 State 7
   29831 
   29832     2 S: 'a' B .
   29833 
   29834     \$default  reduce using rule 2 (S)
   29835 
   29836 
   29837 State 8
   29838 
   29839     5 S: 'b' 'd' .  [\$end]
   29840     8 A: 'd' . 'e'
   29841     9 B: 'd' . 'e'
   29842 
   29843     'e'  shift, and go to state 13
   29844 
   29845     \$default  reduce using rule 5 (S)
   29846 
   29847 
   29848 State 9
   29849 
   29850     3 S: 'b' A . 'f'
   29851 
   29852     'f'  shift, and go to state 15
   29853 
   29854 
   29855 State 10
   29856 
   29857     4 S: 'b' B . 'g'
   29858 
   29859     'g'  shift, and go to state 16
   29860 
   29861 
   29862 State 11
   29863 
   29864     6 S: 'c' 'c' . A 'g'
   29865     7  | 'c' 'c' . B
   29866     8 A: . 'd' 'e'
   29867     9 B: . 'd' 'e'
   29868 
   29869     'd'  shift, and go to state 5
   29870 
   29871     A  go to state 17
   29872     B  go to state 18
   29873 
   29874 
   29875 State 12
   29876 
   29877     0 \$accept: S \$end .
   29878 
   29879     \$default  accept
   29880 
   29881 
   29882 State 13
   29883 
   29884     8 A: 'd' 'e' .  ['f']
   29885     9 B: 'd' 'e' .  ['g']
   29886 
   29887     'g'       reduce using rule 9 (B)
   29888     \$default  reduce using rule 8 (A)
   29889 
   29890 
   29891 State 14
   29892 
   29893     1 S: 'a' A 'f' .
   29894 
   29895     \$default  reduce using rule 1 (S)
   29896 
   29897 
   29898 State 15
   29899 
   29900     3 S: 'b' A 'f' .
   29901 
   29902     \$default  reduce using rule 3 (S)
   29903 
   29904 
   29905 State 16
   29906 
   29907     4 S: 'b' B 'g' .
   29908 
   29909     \$default  reduce using rule 4 (S)
   29910 
   29911 
   29912 State 17
   29913 
   29914     6 S: 'c' 'c' A . 'g'
   29915 
   29916     'g'  shift, and go to state 19
   29917 
   29918 
   29919 State 18
   29920 
   29921     7 S: 'c' 'c' B .
   29922 
   29923     \$default  reduce using rule 7 (S)
   29924 
   29925 
   29926 State 19
   29927 
   29928     6 S: 'c' 'c' A 'g' .
   29929 
   29930     \$default  reduce using rule 6 (S)
   29931 
   29932 
   29933 State 20
   29934 
   29935     8 A: 'd' 'e' .  ['f', 'g']
   29936     9 B: 'd' 'e' .  [\$end]
   29937 
   29938     \$end      reduce using rule 9 (B)
   29939     \$default  reduce using rule 8 (A)
   29940 " | \
   29941   $at_diff - "$at_stdout" || at_failed=:
   29942 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   29943 $at_failed && at_fn_log_failure
   29944 $at_traceon; }
   29945 
   29946 
   29947 
   29948 
   29949 # Canonical LR generates very large tables, resulting in very long
   29950 # files with #line directives that may overflow what the standards
   29951 # (C90 and C++98) guarantee: 32767.  In that case, GCC's -pedantic
   29952 # will issue an error.
   29953 #
   29954 # There is no "" around `wc` since some indent the result.
   29955 
   29956 { set +x
   29957 $as_echo "$at_srcdir/reduce.at:1220: \$BISON_C_WORKS"
   29958 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "reduce.at:1220"
   29959 ( $at_check_trace; $BISON_C_WORKS
   29960 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29961 at_status=$? at_failed=false
   29962 $at_check_filter
   29963 echo stderr:; cat "$at_stderr"
   29964 echo stdout:; cat "$at_stdout"
   29965 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   29966 $at_failed && at_fn_log_failure
   29967 $at_traceon; }
   29968 
   29969 { set +x
   29970 $as_echo "$at_srcdir/reduce.at:1220: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   29971 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "reduce.at:1220"
   29972 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   29973 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29974 at_status=$? at_failed=false
   29975 $at_check_filter
   29976 echo stderr:; cat "$at_stderr"
   29977 echo stdout:; cat "$at_stdout"
   29978 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   29979 $at_failed && at_fn_log_failure
   29980 $at_traceon; }
   29981 
   29982 
   29983 { set +x
   29984 $as_echo "$at_srcdir/reduce.at:1220:  \$PREPARSER ./input"
   29985 at_fn_check_prepare_dynamic " $PREPARSER ./input" "reduce.at:1220"
   29986 ( $at_check_trace;  $PREPARSER ./input
   29987 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   29988 at_status=$? at_failed=false
   29989 $at_check_filter
   29990 echo stderr:; tee stderr <"$at_stderr"
   29991 at_fn_diff_devnull "$at_stdout" || at_failed=:
   29992 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   29993 $at_failed && at_fn_log_failure
   29994 $at_traceon; }
   29995 
   29996 { set +x
   29997 $as_echo "$at_srcdir/reduce.at:1220: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   29998 at_fn_check_prepare_trace "reduce.at:1220"
   29999 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   30000 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30001 at_status=$? at_failed=false
   30002 $at_check_filter
   30003 at_fn_diff_devnull "$at_stderr" || at_failed=:
   30004 at_fn_diff_devnull "$at_stdout" || at_failed=:
   30005 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   30006 $at_failed && at_fn_log_failure
   30007 $at_traceon; }
   30008 
   30009 
   30010 
   30011 
   30012   set +x
   30013   $at_times_p && times >"$at_times_file"
   30014 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   30015 read at_status <"$at_status_file"
   30016 #AT_STOP_122
   30017 #AT_START_123
   30018 at_fn_group_banner 123 'reduce.at:1220' \
   30019   "%define lr.type canonical-lr: Split During Added Lookahead Propagation" "" 6
   30020 at_xfail=no
   30021 (
   30022   $as_echo "123. $at_setup_line: testing $at_desc ..."
   30023   $at_traceon
   30024 
   30025 
   30026 cat >input.y <<'_ATEOF'
   30027 %code top {
   30028 #include <config.h>
   30029 /* We don't need perfect functions for these tests. */
   30030 #undef malloc
   30031 #undef memcmp
   30032 #undef realloc
   30033 }
   30034 
   30035 %code {
   30036   #include <stdio.h>
   30037   static void yyerror ( const char *msg);
   30038   static int yylex (void);
   30039 }
   30040 
   30041 %define lr.type canonical-lr
   30042 %define lr.keep-unreachable-states
   30043 
   30044 %%
   30045 
   30046 
   30047 /* The partial state chart diagram below is for LALR(1).  State 0 is the start
   30048    state.  States are iterated for successor construction in numerical order.
   30049    Transitions are downwards.
   30050 
   30051    State 13 has a R/R conflict that cannot be predicted by Bison's LR(1)
   30052    algorithm using annotations alone.  That is, when state 11's successor on
   30053    'd' is merged with state 5 (which is originally just state 1's successor on
   30054    'd'), state 5's successor on 'e' must then be changed because the resulting
   30055    lookaheads that propagate to it now make it incompatible with state 8's
   30056    successor on 'e'.  In other words, state 13 must be split to avoid the
   30057    conflict.
   30058 
   30059           0
   30060         / | \
   30061      a / c|  \ b
   30062       1   3   2
   30063       |   |   |
   30064      d|   |c  | d
   30065       |  11   |
   30066       |   |   |
   30067        \ /d   |
   30068         5     8
   30069          \    |
   30070         e \  / e
   30071            13
   30072            R/R
   30073 
   30074    This grammar is designed carefully to make sure that, despite Bison's LR(1)
   30075    algorithm's bread-first iteration of transitions to reconstruct states,
   30076    state 11's successors are constructed after state 5's and state 8's.
   30077    Otherwise (for example, if you remove the first 'c' in each of rules 6 and
   30078    7), state 5's successor on 'e' would never be merged with state 8's, so the
   30079    split of the resulting state 13 would never need to be performed.  */
   30080 S: 'a' A 'f'
   30081  | 'a' B
   30082  | 'b' A 'f'
   30083  | 'b' B 'g'
   30084  | 'b' 'd'
   30085  | 'c' 'c' A 'g'
   30086  | 'c' 'c' B
   30087  ;
   30088 A: 'd' 'e' ;
   30089 B: 'd' 'e' ;
   30090 
   30091 
   30092 %%
   30093 #include <stdio.h>
   30094 /* A C error reporting function.  */
   30095 static
   30096 void yyerror ( const char *msg)
   30097 {
   30098   fprintf (stderr, "%s\n", msg);
   30099 }
   30100 static int
   30101 yylex (void)
   30102 {
   30103   static int const input[] = {
   30104     'b', 'd', 'e', 'g', 0
   30105   };
   30106   static int const *inputp = input;
   30107   return *inputp++;
   30108 }
   30109 
   30110 int
   30111 main (void)
   30112 {
   30113   return yyparse ();
   30114 }
   30115 _ATEOF
   30116 
   30117 
   30118 
   30119 # In some versions of Autoconf, AT_CHECK invokes AS_ESCAPE before
   30120 # expanding macros, so it corrupts some special characters in the
   30121 # macros.  To avoid this, expand now and pass it the result with proper
   30122 # string quotation.  Assume args 7 through 12 expand to properly quoted
   30123 # strings.
   30124 
   30125 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   30126   at_save_special_files
   30127   mkdir xml-tests
   30128     # Don't combine these Bison invocations since we want to be sure that
   30129   # --report=all isn't required to get the full XML file.
   30130   { set +x
   30131 $as_echo "$at_srcdir/reduce.at:1220: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   30132                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y"
   30133 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:1220"
   30134 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   30135                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y
   30136 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30137 at_status=$? at_failed=false
   30138 $at_check_filter
   30139 echo stderr:; cat "$at_stderr"
   30140 echo stdout:; cat "$at_stdout"
   30141 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   30142 $at_failed && at_fn_log_failure
   30143 $at_traceon; }
   30144 
   30145   { set +x
   30146 $as_echo "$at_srcdir/reduce.at:1220: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y"
   30147 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y" "reduce.at:1220"
   30148 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y
   30149 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30150 at_status=$? at_failed=false
   30151 $at_check_filter
   30152 echo stderr:; cat "$at_stderr"
   30153 echo stdout:; cat "$at_stdout"
   30154 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   30155 $at_failed && at_fn_log_failure
   30156 $at_traceon; }
   30157 
   30158     cp xml-tests/test.output expout
   30159   { set +x
   30160 $as_echo "$at_srcdir/reduce.at:1220: \$XSLTPROC \\
   30161              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   30162              xml-tests/test.xml"
   30163 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:1220"
   30164 ( $at_check_trace; $XSLTPROC \
   30165              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   30166              xml-tests/test.xml
   30167 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30168 at_status=$? at_failed=false
   30169 $at_check_filter
   30170 at_fn_diff_devnull "$at_stderr" || at_failed=:
   30171 $at_diff expout "$at_stdout" || at_failed=:
   30172 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   30173 $at_failed && at_fn_log_failure
   30174 $at_traceon; }
   30175 
   30176   sort xml-tests/test.dot > expout
   30177   { set +x
   30178 $as_echo "$at_srcdir/reduce.at:1220: \$XSLTPROC \\
   30179              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   30180              xml-tests/test.xml | sort"
   30181 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:1220"
   30182 ( $at_check_trace; $XSLTPROC \
   30183              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   30184              xml-tests/test.xml | sort
   30185 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30186 at_status=$? at_failed=false
   30187 $at_check_filter
   30188 at_fn_diff_devnull "$at_stderr" || at_failed=:
   30189 $at_diff expout "$at_stdout" || at_failed=:
   30190 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   30191 $at_failed && at_fn_log_failure
   30192 $at_traceon; }
   30193 
   30194   rm -rf xml-tests expout
   30195   at_restore_special_files
   30196 fi
   30197 { set +x
   30198 $as_echo "$at_srcdir/reduce.at:1220: bison --report=all --defines -o input.c input.y"
   30199 at_fn_check_prepare_trace "reduce.at:1220"
   30200 ( $at_check_trace; bison --report=all --defines -o input.c input.y
   30201 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30202 at_status=$? at_failed=false
   30203 $at_check_filter
   30204 at_fn_diff_devnull "$at_stderr" || at_failed=:
   30205 at_fn_diff_devnull "$at_stdout" || at_failed=:
   30206 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   30207 $at_failed && at_fn_log_failure
   30208 $at_traceon; }
   30209 
   30210 
   30211 
   30212 { set +x
   30213 $as_echo "$at_srcdir/reduce.at:1220: sed -n '/^State 0\$/,\$p' input.output"
   30214 at_fn_check_prepare_dynamic "sed -n '/^State 0$/,$p' input.output" "reduce.at:1220"
   30215 ( $at_check_trace; sed -n '/^State 0$/,$p' input.output
   30216 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30217 at_status=$? at_failed=false
   30218 $at_check_filter
   30219 at_fn_diff_devnull "$at_stderr" || at_failed=:
   30220 echo >>"$at_stdout"; $as_echo "State 0
   30221 
   30222     0 \$accept: . S \$end
   30223     1 S: . 'a' A 'f'
   30224     2  | . 'a' B
   30225     3  | . 'b' A 'f'
   30226     4  | . 'b' B 'g'
   30227     5  | . 'b' 'd'
   30228     6  | . 'c' 'c' A 'g'
   30229     7  | . 'c' 'c' B
   30230 
   30231     'a'  shift, and go to state 1
   30232     'b'  shift, and go to state 2
   30233     'c'  shift, and go to state 3
   30234 
   30235     S  go to state 4
   30236 
   30237 
   30238 State 1
   30239 
   30240     1 S: 'a' . A 'f'
   30241     2  | 'a' . B
   30242     8 A: . 'd' 'e'
   30243     9 B: . 'd' 'e'
   30244 
   30245     'd'  shift, and go to state 5
   30246 
   30247     A  go to state 6
   30248     B  go to state 7
   30249 
   30250 
   30251 State 2
   30252 
   30253     3 S: 'b' . A 'f'
   30254     4  | 'b' . B 'g'
   30255     5  | 'b' . 'd'
   30256     8 A: . 'd' 'e'
   30257     9 B: . 'd' 'e'
   30258 
   30259     'd'  shift, and go to state 8
   30260 
   30261     A  go to state 9
   30262     B  go to state 10
   30263 
   30264 
   30265 State 3
   30266 
   30267     6 S: 'c' . 'c' A 'g'
   30268     7  | 'c' . 'c' B
   30269 
   30270     'c'  shift, and go to state 11
   30271 
   30272 
   30273 State 4
   30274 
   30275     0 \$accept: S . \$end
   30276 
   30277     \$end  shift, and go to state 12
   30278 
   30279 
   30280 State 5
   30281 
   30282     8 A: 'd' . 'e'
   30283     9 B: 'd' . 'e'
   30284 
   30285     'e'  shift, and go to state 13
   30286 
   30287 
   30288 State 6
   30289 
   30290     1 S: 'a' A . 'f'
   30291 
   30292     'f'  shift, and go to state 14
   30293 
   30294 
   30295 State 7
   30296 
   30297     2 S: 'a' B .  [\$end]
   30298 
   30299     \$end  reduce using rule 2 (S)
   30300 
   30301 
   30302 State 8
   30303 
   30304     5 S: 'b' 'd' .  [\$end]
   30305     8 A: 'd' . 'e'
   30306     9 B: 'd' . 'e'
   30307 
   30308     'e'  shift, and go to state 20
   30309 
   30310     \$end  reduce using rule 5 (S)
   30311 
   30312 
   30313 State 9
   30314 
   30315     3 S: 'b' A . 'f'
   30316 
   30317     'f'  shift, and go to state 15
   30318 
   30319 
   30320 State 10
   30321 
   30322     4 S: 'b' B . 'g'
   30323 
   30324     'g'  shift, and go to state 16
   30325 
   30326 
   30327 State 11
   30328 
   30329     6 S: 'c' 'c' . A 'g'
   30330     7  | 'c' 'c' . B
   30331     8 A: . 'd' 'e'
   30332     9 B: . 'd' 'e'
   30333 
   30334     'd'  shift, and go to state 21
   30335 
   30336     A  go to state 17
   30337     B  go to state 18
   30338 
   30339 
   30340 State 12
   30341 
   30342     0 \$accept: S \$end .
   30343 
   30344     \$default  accept
   30345 
   30346 
   30347 State 13
   30348 
   30349     8 A: 'd' 'e' .  ['f']
   30350     9 B: 'd' 'e' .  [\$end]
   30351 
   30352     \$end  reduce using rule 9 (B)
   30353     'f'   reduce using rule 8 (A)
   30354 
   30355 
   30356 State 14
   30357 
   30358     1 S: 'a' A 'f' .  [\$end]
   30359 
   30360     \$end  reduce using rule 1 (S)
   30361 
   30362 
   30363 State 15
   30364 
   30365     3 S: 'b' A 'f' .  [\$end]
   30366 
   30367     \$end  reduce using rule 3 (S)
   30368 
   30369 
   30370 State 16
   30371 
   30372     4 S: 'b' B 'g' .  [\$end]
   30373 
   30374     \$end  reduce using rule 4 (S)
   30375 
   30376 
   30377 State 17
   30378 
   30379     6 S: 'c' 'c' A . 'g'
   30380 
   30381     'g'  shift, and go to state 19
   30382 
   30383 
   30384 State 18
   30385 
   30386     7 S: 'c' 'c' B .  [\$end]
   30387 
   30388     \$end  reduce using rule 7 (S)
   30389 
   30390 
   30391 State 19
   30392 
   30393     6 S: 'c' 'c' A 'g' .  [\$end]
   30394 
   30395     \$end  reduce using rule 6 (S)
   30396 
   30397 
   30398 State 20
   30399 
   30400     8 A: 'd' 'e' .  ['f']
   30401     9 B: 'd' 'e' .  ['g']
   30402 
   30403     'f'  reduce using rule 8 (A)
   30404     'g'  reduce using rule 9 (B)
   30405 
   30406 
   30407 State 21
   30408 
   30409     8 A: 'd' . 'e'
   30410     9 B: 'd' . 'e'
   30411 
   30412     'e'  shift, and go to state 22
   30413 
   30414 
   30415 State 22
   30416 
   30417     8 A: 'd' 'e' .  ['g']
   30418     9 B: 'd' 'e' .  [\$end]
   30419 
   30420     \$end  reduce using rule 9 (B)
   30421     'g'   reduce using rule 8 (A)
   30422 " | \
   30423   $at_diff - "$at_stdout" || at_failed=:
   30424 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   30425 $at_failed && at_fn_log_failure
   30426 $at_traceon; }
   30427 
   30428 
   30429 
   30430 
   30431 # Canonical LR generates very large tables, resulting in very long
   30432 # files with #line directives that may overflow what the standards
   30433 # (C90 and C++98) guarantee: 32767.  In that case, GCC's -pedantic
   30434 # will issue an error.
   30435 #
   30436 # There is no "" around `wc` since some indent the result.
   30437 if test 32767 -lt `wc -l < input.c`; then
   30438   CFLAGS=`echo " $CFLAGS " | sed -e 's/ -pedantic //'`
   30439   CXXFLAGS=`echo " $CXXFLAGS " | sed -e 's/ -pedantic //'`
   30440 fi
   30441 { set +x
   30442 $as_echo "$at_srcdir/reduce.at:1220: \$BISON_C_WORKS"
   30443 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "reduce.at:1220"
   30444 ( $at_check_trace; $BISON_C_WORKS
   30445 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30446 at_status=$? at_failed=false
   30447 $at_check_filter
   30448 echo stderr:; cat "$at_stderr"
   30449 echo stdout:; cat "$at_stdout"
   30450 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   30451 $at_failed && at_fn_log_failure
   30452 $at_traceon; }
   30453 
   30454 { set +x
   30455 $as_echo "$at_srcdir/reduce.at:1220: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   30456 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "reduce.at:1220"
   30457 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   30458 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30459 at_status=$? at_failed=false
   30460 $at_check_filter
   30461 echo stderr:; cat "$at_stderr"
   30462 echo stdout:; cat "$at_stdout"
   30463 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   30464 $at_failed && at_fn_log_failure
   30465 $at_traceon; }
   30466 
   30467 
   30468 { set +x
   30469 $as_echo "$at_srcdir/reduce.at:1220:  \$PREPARSER ./input"
   30470 at_fn_check_prepare_dynamic " $PREPARSER ./input" "reduce.at:1220"
   30471 ( $at_check_trace;  $PREPARSER ./input
   30472 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30473 at_status=$? at_failed=false
   30474 $at_check_filter
   30475 echo stderr:; tee stderr <"$at_stderr"
   30476 at_fn_diff_devnull "$at_stdout" || at_failed=:
   30477 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   30478 $at_failed && at_fn_log_failure
   30479 $at_traceon; }
   30480 
   30481 { set +x
   30482 $as_echo "$at_srcdir/reduce.at:1220: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   30483 at_fn_check_prepare_trace "reduce.at:1220"
   30484 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   30485 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30486 at_status=$? at_failed=false
   30487 $at_check_filter
   30488 at_fn_diff_devnull "$at_stderr" || at_failed=:
   30489 at_fn_diff_devnull "$at_stdout" || at_failed=:
   30490 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1220"
   30491 $at_failed && at_fn_log_failure
   30492 $at_traceon; }
   30493 
   30494 
   30495 
   30496 
   30497   set +x
   30498   $at_times_p && times >"$at_times_file"
   30499 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   30500 read at_status <"$at_status_file"
   30501 #AT_STOP_123
   30502 #AT_START_124
   30503 at_fn_group_banner 124 'reduce.at:1550' \
   30504   "no %define lr.default-reductions" "               " 6
   30505 at_xfail=no
   30506 (
   30507   $as_echo "124. $at_setup_line: testing $at_desc ..."
   30508   $at_traceon
   30509 
   30510 
   30511 cat >input.y <<'_ATEOF'
   30512 %code top {
   30513 #include <config.h>
   30514 /* We don't need perfect functions for these tests. */
   30515 #undef malloc
   30516 #undef memcmp
   30517 #undef realloc
   30518 }
   30519 
   30520 %code {
   30521   #include <stdio.h>
   30522   static void yyerror ( const char *msg);
   30523   static int yylex (void);
   30524 }
   30525 
   30526 
   30527 
   30528 %%
   30529 
   30530 
   30531 /* The start state is consistent and has a shift on 'a' and no reductions.
   30532    After pushing the b below, enter an inconsistent state that has a shift and
   30533    one reduction with one lookahead.  */
   30534 start:
   30535     a b
   30536   | a b 'a'
   30537   | a c 'b'
   30538   ;
   30539 
   30540 /* After shifting this 'a', enter a consistent state that has no shift and 1
   30541    reduction with multiple lookaheads.  */
   30542 a: 'a' ;
   30543 
   30544 /* After the previous reduction, enter an inconsistent state that has no shift
   30545    and multiple reductions.  The first reduction has more lookaheads than the
   30546    second, so the first should always be preferred as the default reduction if
   30547    enabled.  The second reduction has one lookahead.  */
   30548 b: ;
   30549 c: ;
   30550 
   30551 
   30552 %%
   30553 #include <stdio.h>
   30554 /* A C error reporting function.  */
   30555 static
   30556 void yyerror ( const char *msg)
   30557 {
   30558   fprintf (stderr, "%s\n", msg);
   30559 }
   30560 static int
   30561 yylex (void)
   30562 {
   30563   static int const input[] = {
   30564     'a', 'a', 0
   30565   };
   30566   static int const *inputp = input;
   30567   return *inputp++;
   30568 }
   30569 
   30570 int
   30571 main (void)
   30572 {
   30573   return yyparse ();
   30574 }
   30575 _ATEOF
   30576 
   30577 
   30578 
   30579 # In some versions of Autoconf, AT_CHECK invokes AS_ESCAPE before
   30580 # expanding macros, so it corrupts some special characters in the
   30581 # macros.  To avoid this, expand now and pass it the result with proper
   30582 # string quotation.  Assume args 7 through 12 expand to properly quoted
   30583 # strings.
   30584 
   30585 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   30586   at_save_special_files
   30587   mkdir xml-tests
   30588     # Don't combine these Bison invocations since we want to be sure that
   30589   # --report=all isn't required to get the full XML file.
   30590   { set +x
   30591 $as_echo "$at_srcdir/reduce.at:1550: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   30592                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y"
   30593 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:1550"
   30594 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   30595                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y
   30596 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30597 at_status=$? at_failed=false
   30598 $at_check_filter
   30599 echo stderr:; cat "$at_stderr"
   30600 echo stdout:; cat "$at_stdout"
   30601 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   30602 $at_failed && at_fn_log_failure
   30603 $at_traceon; }
   30604 
   30605   { set +x
   30606 $as_echo "$at_srcdir/reduce.at:1550: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y"
   30607 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y" "reduce.at:1550"
   30608 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y
   30609 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30610 at_status=$? at_failed=false
   30611 $at_check_filter
   30612 echo stderr:; cat "$at_stderr"
   30613 echo stdout:; cat "$at_stdout"
   30614 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   30615 $at_failed && at_fn_log_failure
   30616 $at_traceon; }
   30617 
   30618     cp xml-tests/test.output expout
   30619   { set +x
   30620 $as_echo "$at_srcdir/reduce.at:1550: \$XSLTPROC \\
   30621              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   30622              xml-tests/test.xml"
   30623 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:1550"
   30624 ( $at_check_trace; $XSLTPROC \
   30625              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   30626              xml-tests/test.xml
   30627 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30628 at_status=$? at_failed=false
   30629 $at_check_filter
   30630 at_fn_diff_devnull "$at_stderr" || at_failed=:
   30631 $at_diff expout "$at_stdout" || at_failed=:
   30632 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   30633 $at_failed && at_fn_log_failure
   30634 $at_traceon; }
   30635 
   30636   sort xml-tests/test.dot > expout
   30637   { set +x
   30638 $as_echo "$at_srcdir/reduce.at:1550: \$XSLTPROC \\
   30639              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   30640              xml-tests/test.xml | sort"
   30641 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:1550"
   30642 ( $at_check_trace; $XSLTPROC \
   30643              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   30644              xml-tests/test.xml | sort
   30645 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30646 at_status=$? at_failed=false
   30647 $at_check_filter
   30648 at_fn_diff_devnull "$at_stderr" || at_failed=:
   30649 $at_diff expout "$at_stdout" || at_failed=:
   30650 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   30651 $at_failed && at_fn_log_failure
   30652 $at_traceon; }
   30653 
   30654   rm -rf xml-tests expout
   30655   at_restore_special_files
   30656 fi
   30657 { set +x
   30658 $as_echo "$at_srcdir/reduce.at:1550: bison --report=all --defines -o input.c input.y"
   30659 at_fn_check_prepare_trace "reduce.at:1550"
   30660 ( $at_check_trace; bison --report=all --defines -o input.c input.y
   30661 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30662 at_status=$? at_failed=false
   30663 $at_check_filter
   30664 at_fn_diff_devnull "$at_stderr" || at_failed=:
   30665 at_fn_diff_devnull "$at_stdout" || at_failed=:
   30666 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   30667 $at_failed && at_fn_log_failure
   30668 $at_traceon; }
   30669 
   30670 
   30671 
   30672 { set +x
   30673 $as_echo "$at_srcdir/reduce.at:1550: sed -n '/^State 0\$/,\$p' input.output"
   30674 at_fn_check_prepare_dynamic "sed -n '/^State 0$/,$p' input.output" "reduce.at:1550"
   30675 ( $at_check_trace; sed -n '/^State 0$/,$p' input.output
   30676 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30677 at_status=$? at_failed=false
   30678 $at_check_filter
   30679 at_fn_diff_devnull "$at_stderr" || at_failed=:
   30680 echo >>"$at_stdout"; $as_echo "State 0
   30681 
   30682     0 \$accept: . start \$end
   30683     1 start: . a b
   30684     2      | . a b 'a'
   30685     3      | . a c 'b'
   30686     4 a: . 'a'
   30687 
   30688     'a'  shift, and go to state 1
   30689 
   30690     start  go to state 2
   30691     a      go to state 3
   30692 
   30693 
   30694 State 1
   30695 
   30696     4 a: 'a' .
   30697 
   30698     \$default  reduce using rule 4 (a)
   30699 
   30700 
   30701 State 2
   30702 
   30703     0 \$accept: start . \$end
   30704 
   30705     \$end  shift, and go to state 4
   30706 
   30707 
   30708 State 3
   30709 
   30710     1 start: a . b
   30711     2      | a . b 'a'
   30712     3      | a . c 'b'
   30713     5 b: .  [\$end, 'a']
   30714     6 c: .  ['b']
   30715 
   30716     'b'       reduce using rule 6 (c)
   30717     \$default  reduce using rule 5 (b)
   30718 
   30719     b  go to state 5
   30720     c  go to state 6
   30721 
   30722 
   30723 State 4
   30724 
   30725     0 \$accept: start \$end .
   30726 
   30727     \$default  accept
   30728 
   30729 
   30730 State 5
   30731 
   30732     1 start: a b .  [\$end]
   30733     2      | a b . 'a'
   30734 
   30735     'a'  shift, and go to state 7
   30736 
   30737     \$default  reduce using rule 1 (start)
   30738 
   30739 
   30740 State 6
   30741 
   30742     3 start: a c . 'b'
   30743 
   30744     'b'  shift, and go to state 8
   30745 
   30746 
   30747 State 7
   30748 
   30749     2 start: a b 'a' .
   30750 
   30751     \$default  reduce using rule 2 (start)
   30752 
   30753 
   30754 State 8
   30755 
   30756     3 start: a c 'b' .
   30757 
   30758     \$default  reduce using rule 3 (start)
   30759 " | \
   30760   $at_diff - "$at_stdout" || at_failed=:
   30761 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   30762 $at_failed && at_fn_log_failure
   30763 $at_traceon; }
   30764 
   30765 
   30766 
   30767 
   30768 # Canonical LR generates very large tables, resulting in very long
   30769 # files with #line directives that may overflow what the standards
   30770 # (C90 and C++98) guarantee: 32767.  In that case, GCC's -pedantic
   30771 # will issue an error.
   30772 #
   30773 # There is no "" around `wc` since some indent the result.
   30774 
   30775 { set +x
   30776 $as_echo "$at_srcdir/reduce.at:1550: \$BISON_C_WORKS"
   30777 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "reduce.at:1550"
   30778 ( $at_check_trace; $BISON_C_WORKS
   30779 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30780 at_status=$? at_failed=false
   30781 $at_check_filter
   30782 echo stderr:; cat "$at_stderr"
   30783 echo stdout:; cat "$at_stdout"
   30784 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   30785 $at_failed && at_fn_log_failure
   30786 $at_traceon; }
   30787 
   30788 { set +x
   30789 $as_echo "$at_srcdir/reduce.at:1550: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   30790 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "reduce.at:1550"
   30791 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   30792 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30793 at_status=$? at_failed=false
   30794 $at_check_filter
   30795 echo stderr:; cat "$at_stderr"
   30796 echo stdout:; cat "$at_stdout"
   30797 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   30798 $at_failed && at_fn_log_failure
   30799 $at_traceon; }
   30800 
   30801 
   30802 { set +x
   30803 $as_echo "$at_srcdir/reduce.at:1550:  \$PREPARSER ./input"
   30804 at_fn_check_prepare_dynamic " $PREPARSER ./input" "reduce.at:1550"
   30805 ( $at_check_trace;  $PREPARSER ./input
   30806 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30807 at_status=$? at_failed=false
   30808 $at_check_filter
   30809 echo stderr:; tee stderr <"$at_stderr"
   30810 at_fn_diff_devnull "$at_stdout" || at_failed=:
   30811 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   30812 $at_failed && at_fn_log_failure
   30813 $at_traceon; }
   30814 
   30815 { set +x
   30816 $as_echo "$at_srcdir/reduce.at:1550: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   30817 at_fn_check_prepare_trace "reduce.at:1550"
   30818 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   30819 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30820 at_status=$? at_failed=false
   30821 $at_check_filter
   30822 at_fn_diff_devnull "$at_stderr" || at_failed=:
   30823 at_fn_diff_devnull "$at_stdout" || at_failed=:
   30824 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   30825 $at_failed && at_fn_log_failure
   30826 $at_traceon; }
   30827 
   30828 
   30829 
   30830 
   30831   set +x
   30832   $at_times_p && times >"$at_times_file"
   30833 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   30834 read at_status <"$at_status_file"
   30835 #AT_STOP_124
   30836 #AT_START_125
   30837 at_fn_group_banner 125 'reduce.at:1550' \
   30838   "%define lr.default-reductions most" "             " 6
   30839 at_xfail=no
   30840 (
   30841   $as_echo "125. $at_setup_line: testing $at_desc ..."
   30842   $at_traceon
   30843 
   30844 
   30845 cat >input.y <<'_ATEOF'
   30846 %code top {
   30847 #include <config.h>
   30848 /* We don't need perfect functions for these tests. */
   30849 #undef malloc
   30850 #undef memcmp
   30851 #undef realloc
   30852 }
   30853 
   30854 %code {
   30855   #include <stdio.h>
   30856   static void yyerror ( const char *msg);
   30857   static int yylex (void);
   30858 }
   30859 
   30860 %define lr.default-reductions most
   30861 
   30862 %%
   30863 
   30864 
   30865 /* The start state is consistent and has a shift on 'a' and no reductions.
   30866    After pushing the b below, enter an inconsistent state that has a shift and
   30867    one reduction with one lookahead.  */
   30868 start:
   30869     a b
   30870   | a b 'a'
   30871   | a c 'b'
   30872   ;
   30873 
   30874 /* After shifting this 'a', enter a consistent state that has no shift and 1
   30875    reduction with multiple lookaheads.  */
   30876 a: 'a' ;
   30877 
   30878 /* After the previous reduction, enter an inconsistent state that has no shift
   30879    and multiple reductions.  The first reduction has more lookaheads than the
   30880    second, so the first should always be preferred as the default reduction if
   30881    enabled.  The second reduction has one lookahead.  */
   30882 b: ;
   30883 c: ;
   30884 
   30885 
   30886 %%
   30887 #include <stdio.h>
   30888 /* A C error reporting function.  */
   30889 static
   30890 void yyerror ( const char *msg)
   30891 {
   30892   fprintf (stderr, "%s\n", msg);
   30893 }
   30894 static int
   30895 yylex (void)
   30896 {
   30897   static int const input[] = {
   30898     'a', 'a', 0
   30899   };
   30900   static int const *inputp = input;
   30901   return *inputp++;
   30902 }
   30903 
   30904 int
   30905 main (void)
   30906 {
   30907   return yyparse ();
   30908 }
   30909 _ATEOF
   30910 
   30911 
   30912 
   30913 # In some versions of Autoconf, AT_CHECK invokes AS_ESCAPE before
   30914 # expanding macros, so it corrupts some special characters in the
   30915 # macros.  To avoid this, expand now and pass it the result with proper
   30916 # string quotation.  Assume args 7 through 12 expand to properly quoted
   30917 # strings.
   30918 
   30919 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   30920   at_save_special_files
   30921   mkdir xml-tests
   30922     # Don't combine these Bison invocations since we want to be sure that
   30923   # --report=all isn't required to get the full XML file.
   30924   { set +x
   30925 $as_echo "$at_srcdir/reduce.at:1550: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   30926                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y"
   30927 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:1550"
   30928 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   30929                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y
   30930 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30931 at_status=$? at_failed=false
   30932 $at_check_filter
   30933 echo stderr:; cat "$at_stderr"
   30934 echo stdout:; cat "$at_stdout"
   30935 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   30936 $at_failed && at_fn_log_failure
   30937 $at_traceon; }
   30938 
   30939   { set +x
   30940 $as_echo "$at_srcdir/reduce.at:1550: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y"
   30941 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y" "reduce.at:1550"
   30942 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y
   30943 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30944 at_status=$? at_failed=false
   30945 $at_check_filter
   30946 echo stderr:; cat "$at_stderr"
   30947 echo stdout:; cat "$at_stdout"
   30948 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   30949 $at_failed && at_fn_log_failure
   30950 $at_traceon; }
   30951 
   30952     cp xml-tests/test.output expout
   30953   { set +x
   30954 $as_echo "$at_srcdir/reduce.at:1550: \$XSLTPROC \\
   30955              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   30956              xml-tests/test.xml"
   30957 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:1550"
   30958 ( $at_check_trace; $XSLTPROC \
   30959              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   30960              xml-tests/test.xml
   30961 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30962 at_status=$? at_failed=false
   30963 $at_check_filter
   30964 at_fn_diff_devnull "$at_stderr" || at_failed=:
   30965 $at_diff expout "$at_stdout" || at_failed=:
   30966 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   30967 $at_failed && at_fn_log_failure
   30968 $at_traceon; }
   30969 
   30970   sort xml-tests/test.dot > expout
   30971   { set +x
   30972 $as_echo "$at_srcdir/reduce.at:1550: \$XSLTPROC \\
   30973              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   30974              xml-tests/test.xml | sort"
   30975 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:1550"
   30976 ( $at_check_trace; $XSLTPROC \
   30977              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   30978              xml-tests/test.xml | sort
   30979 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30980 at_status=$? at_failed=false
   30981 $at_check_filter
   30982 at_fn_diff_devnull "$at_stderr" || at_failed=:
   30983 $at_diff expout "$at_stdout" || at_failed=:
   30984 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   30985 $at_failed && at_fn_log_failure
   30986 $at_traceon; }
   30987 
   30988   rm -rf xml-tests expout
   30989   at_restore_special_files
   30990 fi
   30991 { set +x
   30992 $as_echo "$at_srcdir/reduce.at:1550: bison --report=all --defines -o input.c input.y"
   30993 at_fn_check_prepare_trace "reduce.at:1550"
   30994 ( $at_check_trace; bison --report=all --defines -o input.c input.y
   30995 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   30996 at_status=$? at_failed=false
   30997 $at_check_filter
   30998 at_fn_diff_devnull "$at_stderr" || at_failed=:
   30999 at_fn_diff_devnull "$at_stdout" || at_failed=:
   31000 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31001 $at_failed && at_fn_log_failure
   31002 $at_traceon; }
   31003 
   31004 
   31005 
   31006 { set +x
   31007 $as_echo "$at_srcdir/reduce.at:1550: sed -n '/^State 0\$/,\$p' input.output"
   31008 at_fn_check_prepare_dynamic "sed -n '/^State 0$/,$p' input.output" "reduce.at:1550"
   31009 ( $at_check_trace; sed -n '/^State 0$/,$p' input.output
   31010 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31011 at_status=$? at_failed=false
   31012 $at_check_filter
   31013 at_fn_diff_devnull "$at_stderr" || at_failed=:
   31014 echo >>"$at_stdout"; $as_echo "State 0
   31015 
   31016     0 \$accept: . start \$end
   31017     1 start: . a b
   31018     2      | . a b 'a'
   31019     3      | . a c 'b'
   31020     4 a: . 'a'
   31021 
   31022     'a'  shift, and go to state 1
   31023 
   31024     start  go to state 2
   31025     a      go to state 3
   31026 
   31027 
   31028 State 1
   31029 
   31030     4 a: 'a' .
   31031 
   31032     \$default  reduce using rule 4 (a)
   31033 
   31034 
   31035 State 2
   31036 
   31037     0 \$accept: start . \$end
   31038 
   31039     \$end  shift, and go to state 4
   31040 
   31041 
   31042 State 3
   31043 
   31044     1 start: a . b
   31045     2      | a . b 'a'
   31046     3      | a . c 'b'
   31047     5 b: .  [\$end, 'a']
   31048     6 c: .  ['b']
   31049 
   31050     'b'       reduce using rule 6 (c)
   31051     \$default  reduce using rule 5 (b)
   31052 
   31053     b  go to state 5
   31054     c  go to state 6
   31055 
   31056 
   31057 State 4
   31058 
   31059     0 \$accept: start \$end .
   31060 
   31061     \$default  accept
   31062 
   31063 
   31064 State 5
   31065 
   31066     1 start: a b .  [\$end]
   31067     2      | a b . 'a'
   31068 
   31069     'a'  shift, and go to state 7
   31070 
   31071     \$default  reduce using rule 1 (start)
   31072 
   31073 
   31074 State 6
   31075 
   31076     3 start: a c . 'b'
   31077 
   31078     'b'  shift, and go to state 8
   31079 
   31080 
   31081 State 7
   31082 
   31083     2 start: a b 'a' .
   31084 
   31085     \$default  reduce using rule 2 (start)
   31086 
   31087 
   31088 State 8
   31089 
   31090     3 start: a c 'b' .
   31091 
   31092     \$default  reduce using rule 3 (start)
   31093 " | \
   31094   $at_diff - "$at_stdout" || at_failed=:
   31095 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31096 $at_failed && at_fn_log_failure
   31097 $at_traceon; }
   31098 
   31099 
   31100 
   31101 
   31102 # Canonical LR generates very large tables, resulting in very long
   31103 # files with #line directives that may overflow what the standards
   31104 # (C90 and C++98) guarantee: 32767.  In that case, GCC's -pedantic
   31105 # will issue an error.
   31106 #
   31107 # There is no "" around `wc` since some indent the result.
   31108 
   31109 { set +x
   31110 $as_echo "$at_srcdir/reduce.at:1550: \$BISON_C_WORKS"
   31111 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "reduce.at:1550"
   31112 ( $at_check_trace; $BISON_C_WORKS
   31113 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31114 at_status=$? at_failed=false
   31115 $at_check_filter
   31116 echo stderr:; cat "$at_stderr"
   31117 echo stdout:; cat "$at_stdout"
   31118 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31119 $at_failed && at_fn_log_failure
   31120 $at_traceon; }
   31121 
   31122 { set +x
   31123 $as_echo "$at_srcdir/reduce.at:1550: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   31124 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "reduce.at:1550"
   31125 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   31126 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31127 at_status=$? at_failed=false
   31128 $at_check_filter
   31129 echo stderr:; cat "$at_stderr"
   31130 echo stdout:; cat "$at_stdout"
   31131 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31132 $at_failed && at_fn_log_failure
   31133 $at_traceon; }
   31134 
   31135 
   31136 { set +x
   31137 $as_echo "$at_srcdir/reduce.at:1550:  \$PREPARSER ./input"
   31138 at_fn_check_prepare_dynamic " $PREPARSER ./input" "reduce.at:1550"
   31139 ( $at_check_trace;  $PREPARSER ./input
   31140 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31141 at_status=$? at_failed=false
   31142 $at_check_filter
   31143 echo stderr:; tee stderr <"$at_stderr"
   31144 at_fn_diff_devnull "$at_stdout" || at_failed=:
   31145 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31146 $at_failed && at_fn_log_failure
   31147 $at_traceon; }
   31148 
   31149 { set +x
   31150 $as_echo "$at_srcdir/reduce.at:1550: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   31151 at_fn_check_prepare_trace "reduce.at:1550"
   31152 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   31153 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31154 at_status=$? at_failed=false
   31155 $at_check_filter
   31156 at_fn_diff_devnull "$at_stderr" || at_failed=:
   31157 at_fn_diff_devnull "$at_stdout" || at_failed=:
   31158 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31159 $at_failed && at_fn_log_failure
   31160 $at_traceon; }
   31161 
   31162 
   31163 
   31164 
   31165   set +x
   31166   $at_times_p && times >"$at_times_file"
   31167 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   31168 read at_status <"$at_status_file"
   31169 #AT_STOP_125
   31170 #AT_START_126
   31171 at_fn_group_banner 126 'reduce.at:1550' \
   31172   "%define lr.default-reductions consistent" "       " 6
   31173 at_xfail=no
   31174 (
   31175   $as_echo "126. $at_setup_line: testing $at_desc ..."
   31176   $at_traceon
   31177 
   31178 
   31179 cat >input.y <<'_ATEOF'
   31180 %code top {
   31181 #include <config.h>
   31182 /* We don't need perfect functions for these tests. */
   31183 #undef malloc
   31184 #undef memcmp
   31185 #undef realloc
   31186 }
   31187 
   31188 %code {
   31189   #include <stdio.h>
   31190   static void yyerror ( const char *msg);
   31191   static int yylex (void);
   31192 }
   31193 
   31194 %define lr.default-reductions consistent
   31195 
   31196 %%
   31197 
   31198 
   31199 /* The start state is consistent and has a shift on 'a' and no reductions.
   31200    After pushing the b below, enter an inconsistent state that has a shift and
   31201    one reduction with one lookahead.  */
   31202 start:
   31203     a b
   31204   | a b 'a'
   31205   | a c 'b'
   31206   ;
   31207 
   31208 /* After shifting this 'a', enter a consistent state that has no shift and 1
   31209    reduction with multiple lookaheads.  */
   31210 a: 'a' ;
   31211 
   31212 /* After the previous reduction, enter an inconsistent state that has no shift
   31213    and multiple reductions.  The first reduction has more lookaheads than the
   31214    second, so the first should always be preferred as the default reduction if
   31215    enabled.  The second reduction has one lookahead.  */
   31216 b: ;
   31217 c: ;
   31218 
   31219 
   31220 %%
   31221 #include <stdio.h>
   31222 /* A C error reporting function.  */
   31223 static
   31224 void yyerror ( const char *msg)
   31225 {
   31226   fprintf (stderr, "%s\n", msg);
   31227 }
   31228 static int
   31229 yylex (void)
   31230 {
   31231   static int const input[] = {
   31232     'a', 'a', 0
   31233   };
   31234   static int const *inputp = input;
   31235   return *inputp++;
   31236 }
   31237 
   31238 int
   31239 main (void)
   31240 {
   31241   return yyparse ();
   31242 }
   31243 _ATEOF
   31244 
   31245 
   31246 
   31247 # In some versions of Autoconf, AT_CHECK invokes AS_ESCAPE before
   31248 # expanding macros, so it corrupts some special characters in the
   31249 # macros.  To avoid this, expand now and pass it the result with proper
   31250 # string quotation.  Assume args 7 through 12 expand to properly quoted
   31251 # strings.
   31252 
   31253 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   31254   at_save_special_files
   31255   mkdir xml-tests
   31256     # Don't combine these Bison invocations since we want to be sure that
   31257   # --report=all isn't required to get the full XML file.
   31258   { set +x
   31259 $as_echo "$at_srcdir/reduce.at:1550: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   31260                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y"
   31261 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:1550"
   31262 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   31263                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y
   31264 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31265 at_status=$? at_failed=false
   31266 $at_check_filter
   31267 echo stderr:; cat "$at_stderr"
   31268 echo stdout:; cat "$at_stdout"
   31269 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31270 $at_failed && at_fn_log_failure
   31271 $at_traceon; }
   31272 
   31273   { set +x
   31274 $as_echo "$at_srcdir/reduce.at:1550: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y"
   31275 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y" "reduce.at:1550"
   31276 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y
   31277 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31278 at_status=$? at_failed=false
   31279 $at_check_filter
   31280 echo stderr:; cat "$at_stderr"
   31281 echo stdout:; cat "$at_stdout"
   31282 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31283 $at_failed && at_fn_log_failure
   31284 $at_traceon; }
   31285 
   31286     cp xml-tests/test.output expout
   31287   { set +x
   31288 $as_echo "$at_srcdir/reduce.at:1550: \$XSLTPROC \\
   31289              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   31290              xml-tests/test.xml"
   31291 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:1550"
   31292 ( $at_check_trace; $XSLTPROC \
   31293              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   31294              xml-tests/test.xml
   31295 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31296 at_status=$? at_failed=false
   31297 $at_check_filter
   31298 at_fn_diff_devnull "$at_stderr" || at_failed=:
   31299 $at_diff expout "$at_stdout" || at_failed=:
   31300 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31301 $at_failed && at_fn_log_failure
   31302 $at_traceon; }
   31303 
   31304   sort xml-tests/test.dot > expout
   31305   { set +x
   31306 $as_echo "$at_srcdir/reduce.at:1550: \$XSLTPROC \\
   31307              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   31308              xml-tests/test.xml | sort"
   31309 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:1550"
   31310 ( $at_check_trace; $XSLTPROC \
   31311              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   31312              xml-tests/test.xml | sort
   31313 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31314 at_status=$? at_failed=false
   31315 $at_check_filter
   31316 at_fn_diff_devnull "$at_stderr" || at_failed=:
   31317 $at_diff expout "$at_stdout" || at_failed=:
   31318 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31319 $at_failed && at_fn_log_failure
   31320 $at_traceon; }
   31321 
   31322   rm -rf xml-tests expout
   31323   at_restore_special_files
   31324 fi
   31325 { set +x
   31326 $as_echo "$at_srcdir/reduce.at:1550: bison --report=all --defines -o input.c input.y"
   31327 at_fn_check_prepare_trace "reduce.at:1550"
   31328 ( $at_check_trace; bison --report=all --defines -o input.c input.y
   31329 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31330 at_status=$? at_failed=false
   31331 $at_check_filter
   31332 at_fn_diff_devnull "$at_stderr" || at_failed=:
   31333 at_fn_diff_devnull "$at_stdout" || at_failed=:
   31334 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31335 $at_failed && at_fn_log_failure
   31336 $at_traceon; }
   31337 
   31338 
   31339 
   31340 { set +x
   31341 $as_echo "$at_srcdir/reduce.at:1550: sed -n '/^State 0\$/,\$p' input.output"
   31342 at_fn_check_prepare_dynamic "sed -n '/^State 0$/,$p' input.output" "reduce.at:1550"
   31343 ( $at_check_trace; sed -n '/^State 0$/,$p' input.output
   31344 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31345 at_status=$? at_failed=false
   31346 $at_check_filter
   31347 at_fn_diff_devnull "$at_stderr" || at_failed=:
   31348 echo >>"$at_stdout"; $as_echo "State 0
   31349 
   31350     0 \$accept: . start \$end
   31351     1 start: . a b
   31352     2      | . a b 'a'
   31353     3      | . a c 'b'
   31354     4 a: . 'a'
   31355 
   31356     'a'  shift, and go to state 1
   31357 
   31358     start  go to state 2
   31359     a      go to state 3
   31360 
   31361 
   31362 State 1
   31363 
   31364     4 a: 'a' .
   31365 
   31366     \$default  reduce using rule 4 (a)
   31367 
   31368 
   31369 State 2
   31370 
   31371     0 \$accept: start . \$end
   31372 
   31373     \$end  shift, and go to state 4
   31374 
   31375 
   31376 State 3
   31377 
   31378     1 start: a . b
   31379     2      | a . b 'a'
   31380     3      | a . c 'b'
   31381     5 b: .  [\$end, 'a']
   31382     6 c: .  ['b']
   31383 
   31384     \$end  reduce using rule 5 (b)
   31385     'a'   reduce using rule 5 (b)
   31386     'b'   reduce using rule 6 (c)
   31387 
   31388     b  go to state 5
   31389     c  go to state 6
   31390 
   31391 
   31392 State 4
   31393 
   31394     0 \$accept: start \$end .
   31395 
   31396     \$default  accept
   31397 
   31398 
   31399 State 5
   31400 
   31401     1 start: a b .  [\$end]
   31402     2      | a b . 'a'
   31403 
   31404     'a'  shift, and go to state 7
   31405 
   31406     \$end  reduce using rule 1 (start)
   31407 
   31408 
   31409 State 6
   31410 
   31411     3 start: a c . 'b'
   31412 
   31413     'b'  shift, and go to state 8
   31414 
   31415 
   31416 State 7
   31417 
   31418     2 start: a b 'a' .
   31419 
   31420     \$default  reduce using rule 2 (start)
   31421 
   31422 
   31423 State 8
   31424 
   31425     3 start: a c 'b' .
   31426 
   31427     \$default  reduce using rule 3 (start)
   31428 " | \
   31429   $at_diff - "$at_stdout" || at_failed=:
   31430 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31431 $at_failed && at_fn_log_failure
   31432 $at_traceon; }
   31433 
   31434 
   31435 
   31436 
   31437 # Canonical LR generates very large tables, resulting in very long
   31438 # files with #line directives that may overflow what the standards
   31439 # (C90 and C++98) guarantee: 32767.  In that case, GCC's -pedantic
   31440 # will issue an error.
   31441 #
   31442 # There is no "" around `wc` since some indent the result.
   31443 
   31444 { set +x
   31445 $as_echo "$at_srcdir/reduce.at:1550: \$BISON_C_WORKS"
   31446 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "reduce.at:1550"
   31447 ( $at_check_trace; $BISON_C_WORKS
   31448 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31449 at_status=$? at_failed=false
   31450 $at_check_filter
   31451 echo stderr:; cat "$at_stderr"
   31452 echo stdout:; cat "$at_stdout"
   31453 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31454 $at_failed && at_fn_log_failure
   31455 $at_traceon; }
   31456 
   31457 { set +x
   31458 $as_echo "$at_srcdir/reduce.at:1550: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   31459 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "reduce.at:1550"
   31460 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   31461 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31462 at_status=$? at_failed=false
   31463 $at_check_filter
   31464 echo stderr:; cat "$at_stderr"
   31465 echo stdout:; cat "$at_stdout"
   31466 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31467 $at_failed && at_fn_log_failure
   31468 $at_traceon; }
   31469 
   31470 
   31471 { set +x
   31472 $as_echo "$at_srcdir/reduce.at:1550:  \$PREPARSER ./input"
   31473 at_fn_check_prepare_dynamic " $PREPARSER ./input" "reduce.at:1550"
   31474 ( $at_check_trace;  $PREPARSER ./input
   31475 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31476 at_status=$? at_failed=false
   31477 $at_check_filter
   31478 echo stderr:; tee stderr <"$at_stderr"
   31479 at_fn_diff_devnull "$at_stdout" || at_failed=:
   31480 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31481 $at_failed && at_fn_log_failure
   31482 $at_traceon; }
   31483 
   31484 { set +x
   31485 $as_echo "$at_srcdir/reduce.at:1550: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   31486 at_fn_check_prepare_trace "reduce.at:1550"
   31487 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   31488 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31489 at_status=$? at_failed=false
   31490 $at_check_filter
   31491 at_fn_diff_devnull "$at_stderr" || at_failed=:
   31492 at_fn_diff_devnull "$at_stdout" || at_failed=:
   31493 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31494 $at_failed && at_fn_log_failure
   31495 $at_traceon; }
   31496 
   31497 
   31498 
   31499 
   31500   set +x
   31501   $at_times_p && times >"$at_times_file"
   31502 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   31503 read at_status <"$at_status_file"
   31504 #AT_STOP_126
   31505 #AT_START_127
   31506 at_fn_group_banner 127 'reduce.at:1550' \
   31507   "%define lr.default-reductions accepting" "        " 6
   31508 at_xfail=no
   31509 (
   31510   $as_echo "127. $at_setup_line: testing $at_desc ..."
   31511   $at_traceon
   31512 
   31513 
   31514 cat >input.y <<'_ATEOF'
   31515 %code top {
   31516 #include <config.h>
   31517 /* We don't need perfect functions for these tests. */
   31518 #undef malloc
   31519 #undef memcmp
   31520 #undef realloc
   31521 }
   31522 
   31523 %code {
   31524   #include <stdio.h>
   31525   static void yyerror ( const char *msg);
   31526   static int yylex (void);
   31527 }
   31528 
   31529 %define lr.default-reductions accepting
   31530 
   31531 %%
   31532 
   31533 
   31534 /* The start state is consistent and has a shift on 'a' and no reductions.
   31535    After pushing the b below, enter an inconsistent state that has a shift and
   31536    one reduction with one lookahead.  */
   31537 start:
   31538     a b
   31539   | a b 'a'
   31540   | a c 'b'
   31541   ;
   31542 
   31543 /* After shifting this 'a', enter a consistent state that has no shift and 1
   31544    reduction with multiple lookaheads.  */
   31545 a: 'a' ;
   31546 
   31547 /* After the previous reduction, enter an inconsistent state that has no shift
   31548    and multiple reductions.  The first reduction has more lookaheads than the
   31549    second, so the first should always be preferred as the default reduction if
   31550    enabled.  The second reduction has one lookahead.  */
   31551 b: ;
   31552 c: ;
   31553 
   31554 
   31555 %%
   31556 #include <stdio.h>
   31557 /* A C error reporting function.  */
   31558 static
   31559 void yyerror ( const char *msg)
   31560 {
   31561   fprintf (stderr, "%s\n", msg);
   31562 }
   31563 static int
   31564 yylex (void)
   31565 {
   31566   static int const input[] = {
   31567     'a', 'a', 0
   31568   };
   31569   static int const *inputp = input;
   31570   return *inputp++;
   31571 }
   31572 
   31573 int
   31574 main (void)
   31575 {
   31576   return yyparse ();
   31577 }
   31578 _ATEOF
   31579 
   31580 
   31581 
   31582 # In some versions of Autoconf, AT_CHECK invokes AS_ESCAPE before
   31583 # expanding macros, so it corrupts some special characters in the
   31584 # macros.  To avoid this, expand now and pass it the result with proper
   31585 # string quotation.  Assume args 7 through 12 expand to properly quoted
   31586 # strings.
   31587 
   31588 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   31589   at_save_special_files
   31590   mkdir xml-tests
   31591     # Don't combine these Bison invocations since we want to be sure that
   31592   # --report=all isn't required to get the full XML file.
   31593   { set +x
   31594 $as_echo "$at_srcdir/reduce.at:1550: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   31595                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y"
   31596 at_fn_check_prepare_notrace 'an embedded newline' "reduce.at:1550"
   31597 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   31598                   --graph=xml-tests/test.dot --report=all --defines -o input.c input.y
   31599 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31600 at_status=$? at_failed=false
   31601 $at_check_filter
   31602 echo stderr:; cat "$at_stderr"
   31603 echo stdout:; cat "$at_stdout"
   31604 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31605 $at_failed && at_fn_log_failure
   31606 $at_traceon; }
   31607 
   31608   { set +x
   31609 $as_echo "$at_srcdir/reduce.at:1550: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y"
   31610 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y" "reduce.at:1550"
   31611 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all --defines -o input.c input.y
   31612 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31613 at_status=$? at_failed=false
   31614 $at_check_filter
   31615 echo stderr:; cat "$at_stderr"
   31616 echo stdout:; cat "$at_stdout"
   31617 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31618 $at_failed && at_fn_log_failure
   31619 $at_traceon; }
   31620 
   31621     cp xml-tests/test.output expout
   31622   { set +x
   31623 $as_echo "$at_srcdir/reduce.at:1550: \$XSLTPROC \\
   31624              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   31625              xml-tests/test.xml"
   31626 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:1550"
   31627 ( $at_check_trace; $XSLTPROC \
   31628              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   31629              xml-tests/test.xml
   31630 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31631 at_status=$? at_failed=false
   31632 $at_check_filter
   31633 at_fn_diff_devnull "$at_stderr" || at_failed=:
   31634 $at_diff expout "$at_stdout" || at_failed=:
   31635 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31636 $at_failed && at_fn_log_failure
   31637 $at_traceon; }
   31638 
   31639   sort xml-tests/test.dot > expout
   31640   { set +x
   31641 $as_echo "$at_srcdir/reduce.at:1550: \$XSLTPROC \\
   31642              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   31643              xml-tests/test.xml | sort"
   31644 at_fn_check_prepare_notrace 'a `...` command substitution' "reduce.at:1550"
   31645 ( $at_check_trace; $XSLTPROC \
   31646              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   31647              xml-tests/test.xml | sort
   31648 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31649 at_status=$? at_failed=false
   31650 $at_check_filter
   31651 at_fn_diff_devnull "$at_stderr" || at_failed=:
   31652 $at_diff expout "$at_stdout" || at_failed=:
   31653 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31654 $at_failed && at_fn_log_failure
   31655 $at_traceon; }
   31656 
   31657   rm -rf xml-tests expout
   31658   at_restore_special_files
   31659 fi
   31660 { set +x
   31661 $as_echo "$at_srcdir/reduce.at:1550: bison --report=all --defines -o input.c input.y"
   31662 at_fn_check_prepare_trace "reduce.at:1550"
   31663 ( $at_check_trace; bison --report=all --defines -o input.c input.y
   31664 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31665 at_status=$? at_failed=false
   31666 $at_check_filter
   31667 at_fn_diff_devnull "$at_stderr" || at_failed=:
   31668 at_fn_diff_devnull "$at_stdout" || at_failed=:
   31669 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31670 $at_failed && at_fn_log_failure
   31671 $at_traceon; }
   31672 
   31673 
   31674 
   31675 { set +x
   31676 $as_echo "$at_srcdir/reduce.at:1550: sed -n '/^State 0\$/,\$p' input.output"
   31677 at_fn_check_prepare_dynamic "sed -n '/^State 0$/,$p' input.output" "reduce.at:1550"
   31678 ( $at_check_trace; sed -n '/^State 0$/,$p' input.output
   31679 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31680 at_status=$? at_failed=false
   31681 $at_check_filter
   31682 at_fn_diff_devnull "$at_stderr" || at_failed=:
   31683 echo >>"$at_stdout"; $as_echo "State 0
   31684 
   31685     0 \$accept: . start \$end
   31686     1 start: . a b
   31687     2      | . a b 'a'
   31688     3      | . a c 'b'
   31689     4 a: . 'a'
   31690 
   31691     'a'  shift, and go to state 1
   31692 
   31693     start  go to state 2
   31694     a      go to state 3
   31695 
   31696 
   31697 State 1
   31698 
   31699     4 a: 'a' .  [\$end, 'a', 'b']
   31700 
   31701     \$end  reduce using rule 4 (a)
   31702     'a'   reduce using rule 4 (a)
   31703     'b'   reduce using rule 4 (a)
   31704 
   31705 
   31706 State 2
   31707 
   31708     0 \$accept: start . \$end
   31709 
   31710     \$end  shift, and go to state 4
   31711 
   31712 
   31713 State 3
   31714 
   31715     1 start: a . b
   31716     2      | a . b 'a'
   31717     3      | a . c 'b'
   31718     5 b: .  [\$end, 'a']
   31719     6 c: .  ['b']
   31720 
   31721     \$end  reduce using rule 5 (b)
   31722     'a'   reduce using rule 5 (b)
   31723     'b'   reduce using rule 6 (c)
   31724 
   31725     b  go to state 5
   31726     c  go to state 6
   31727 
   31728 
   31729 State 4
   31730 
   31731     0 \$accept: start \$end .
   31732 
   31733     \$default  accept
   31734 
   31735 
   31736 State 5
   31737 
   31738     1 start: a b .  [\$end]
   31739     2      | a b . 'a'
   31740 
   31741     'a'  shift, and go to state 7
   31742 
   31743     \$end  reduce using rule 1 (start)
   31744 
   31745 
   31746 State 6
   31747 
   31748     3 start: a c . 'b'
   31749 
   31750     'b'  shift, and go to state 8
   31751 
   31752 
   31753 State 7
   31754 
   31755     2 start: a b 'a' .  [\$end]
   31756 
   31757     \$end  reduce using rule 2 (start)
   31758 
   31759 
   31760 State 8
   31761 
   31762     3 start: a c 'b' .  [\$end]
   31763 
   31764     \$end  reduce using rule 3 (start)
   31765 " | \
   31766   $at_diff - "$at_stdout" || at_failed=:
   31767 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31768 $at_failed && at_fn_log_failure
   31769 $at_traceon; }
   31770 
   31771 
   31772 
   31773 
   31774 # Canonical LR generates very large tables, resulting in very long
   31775 # files with #line directives that may overflow what the standards
   31776 # (C90 and C++98) guarantee: 32767.  In that case, GCC's -pedantic
   31777 # will issue an error.
   31778 #
   31779 # There is no "" around `wc` since some indent the result.
   31780 
   31781 { set +x
   31782 $as_echo "$at_srcdir/reduce.at:1550: \$BISON_C_WORKS"
   31783 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "reduce.at:1550"
   31784 ( $at_check_trace; $BISON_C_WORKS
   31785 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31786 at_status=$? at_failed=false
   31787 $at_check_filter
   31788 echo stderr:; cat "$at_stderr"
   31789 echo stdout:; cat "$at_stdout"
   31790 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31791 $at_failed && at_fn_log_failure
   31792 $at_traceon; }
   31793 
   31794 { set +x
   31795 $as_echo "$at_srcdir/reduce.at:1550: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   31796 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "reduce.at:1550"
   31797 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   31798 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31799 at_status=$? at_failed=false
   31800 $at_check_filter
   31801 echo stderr:; cat "$at_stderr"
   31802 echo stdout:; cat "$at_stdout"
   31803 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31804 $at_failed && at_fn_log_failure
   31805 $at_traceon; }
   31806 
   31807 
   31808 { set +x
   31809 $as_echo "$at_srcdir/reduce.at:1550:  \$PREPARSER ./input"
   31810 at_fn_check_prepare_dynamic " $PREPARSER ./input" "reduce.at:1550"
   31811 ( $at_check_trace;  $PREPARSER ./input
   31812 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31813 at_status=$? at_failed=false
   31814 $at_check_filter
   31815 echo stderr:; tee stderr <"$at_stderr"
   31816 at_fn_diff_devnull "$at_stdout" || at_failed=:
   31817 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31818 $at_failed && at_fn_log_failure
   31819 $at_traceon; }
   31820 
   31821 { set +x
   31822 $as_echo "$at_srcdir/reduce.at:1550: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   31823 at_fn_check_prepare_trace "reduce.at:1550"
   31824 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   31825 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31826 at_status=$? at_failed=false
   31827 $at_check_filter
   31828 at_fn_diff_devnull "$at_stderr" || at_failed=:
   31829 at_fn_diff_devnull "$at_stdout" || at_failed=:
   31830 at_fn_check_status 0 $at_status "$at_srcdir/reduce.at:1550"
   31831 $at_failed && at_fn_log_failure
   31832 $at_traceon; }
   31833 
   31834 
   31835 
   31836 
   31837   set +x
   31838   $at_times_p && times >"$at_times_file"
   31839 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   31840 read at_status <"$at_status_file"
   31841 #AT_STOP_127
   31842 #AT_START_128
   31843 at_fn_group_banner 128 'synclines.at:150' \
   31844   "Prologue syncline" "                              " 7
   31845 at_xfail=no
   31846 (
   31847   $as_echo "128. $at_setup_line: testing $at_desc ..."
   31848   $at_traceon
   31849 
   31850 
   31851 # It seems impossible to find a generic scheme to check the location
   31852 # of an error.  Even requiring GCC is not sufficient, since for instance
   31853 # the version modified by Apple:
   31854 #
   31855 # | Reading specs from /usr/libexec/gcc/darwin/ppc/2.95.2/specs
   31856 # | Apple Computer, Inc. version gcc-934.3, based on gcc version 2.95.2
   31857 # | 19991024 (release) configure:2124: $? = 0
   31858 #
   31859 # instead of:
   31860 #
   31861 # | input.y:2: #error "2"
   31862 #
   31863 # it reports:
   31864 #
   31865 # | input.y:2: "2"
   31866 # | cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
   31867 
   31868 cat >syncline.c <<'_ATEOF'
   31869 #error "1"
   31870 int i; /* avoids -pedantic warning about an empty translation unit. */
   31871 _ATEOF
   31872 
   31873 
   31874 { set +x
   31875 $as_echo "$at_srcdir/synclines.at:150: \$CC \$CFLAGS \$CPPFLAGS -c syncline.c"
   31876 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c syncline.c" "synclines.at:150"
   31877 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c syncline.c
   31878 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31879 at_status=$? at_failed=false
   31880 $at_check_filter
   31881 echo stderr:; tee stderr <"$at_stderr"
   31882 at_fn_diff_devnull "$at_stdout" || at_failed=:
   31883 at_fn_check_skip $at_status "$at_srcdir/synclines.at:150"
   31884 $at_failed && at_fn_log_failure
   31885 $at_traceon; }
   31886 
   31887 
   31888 # Transform stderr into something like this:
   31889 #
   31890 #   input.y:4: #error "4"
   31891 #
   31892 # In case GCC displays column information, strip it down.
   31893 #
   31894 #   input.y:4:2: #error "4"    or
   31895 #   input.y:4.2: #error "4"    or
   31896 #   input.y:4:2: error: #error "4"
   31897 # =>
   31898 #   input.y:4: #error "4"
   31899 #
   31900 # It may also issue more context information:
   31901 #
   31902 #   input.y: In function 'yyparse':
   31903 #   input.y:8: #error "8"
   31904 # =>
   31905 #   input.y:4: #error "8"
   31906 #
   31907 # The message may include a caret-error (indented by GCC 4.8,
   31908 # not by clang 3.2):
   31909 #
   31910 #   input.y:1:2: error: #error "1"
   31911 #    #error "1"
   31912 #     ^
   31913 #
   31914 # Possibly distcc adds its bits.
   31915 #
   31916 #   distcc[33187] ERROR: compile (null) on localhost failed
   31917 #   syncline.c:1:2: error: #error "1"
   31918 #   distcc[33185] ERROR: compile syncline.c on localhost failed
   31919 #
   31920 # or even
   31921 #
   31922 #   distcc[35882] (dcc_connect_by_name) ERROR: failed to look up host "chrisimac": Unknown host
   31923 #   distcc[35882] Warning: failed to distribute input.c to chrisimac/4, running locally instead
   31924 #
   31925 # The compiler might end by the number of messages issued (Clang 3.2):
   31926 #
   31927 #    syncline.c:1:2: error: "1"
   31928 #    #error "1"
   31929 #     ^
   31930 #    1 error generated.
   31931 #
   31932 # When c++ is used to compiler C, we might have more messages (Clang 3.2):
   31933 #
   31934 #    clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
   31935 
   31936 { set +x
   31937 $as_echo "$at_srcdir/synclines.at:150: \$PERL -p -0777 - stderr <<\\EOF
   31938   # 1. Remove useless lines.
   31939 
   31940   # distcc clutter.
   31941   s/^distcc\\[\\d+\\] .*\\n//gm;
   31942   # c vs. c++.
   31943   s/^clang: warning: treating 'c' input as 'c\\+\\+'.*\\n//gm;
   31944   # Function context.
   31945   s/^[^:]*: In function '[^']+':\\n//gm;
   31946   # Caret error.
   31947   s/^ *#error.*\\n *\\^\\n//gm;
   31948   # Number of errors.
   31949   s/^1 error generated\\.\\n//gm;
   31950 
   31951   # 2. Normalize the lines we kept.
   31952 
   31953   # Remove column.
   31954   s/^([^:]+:\\d+)[.:][^:]+:(.+)\$/\$1:\$2/gm;
   31955   # Map all combinations of \"error: \" and \"#error: \" to \"#error \".
   31956   s/^([^:]+:\\d+):( |#error|error|:)+/\$1: #error /gm;
   31957 EOF
   31958 "
   31959 at_fn_check_prepare_notrace 'an embedded newline' "synclines.at:150"
   31960 ( $at_check_trace; $PERL -p -0777 - stderr <<\EOF
   31961   # 1. Remove useless lines.
   31962 
   31963   # distcc clutter.
   31964   s/^distcc\[\d+\] .*\n//gm;
   31965   # c vs. c++.
   31966   s/^clang: warning: treating 'c' input as 'c\+\+'.*\n//gm;
   31967   # Function context.
   31968   s/^[^:]*: In function '[^']+':\n//gm;
   31969   # Caret error.
   31970   s/^ *#error.*\n *\^\n//gm;
   31971   # Number of errors.
   31972   s/^1 error generated\.\n//gm;
   31973 
   31974   # 2. Normalize the lines we kept.
   31975 
   31976   # Remove column.
   31977   s/^([^:]+:\d+)[.:][^:]+:(.+)$/$1:$2/gm;
   31978   # Map all combinations of "error: " and "#error: " to "#error ".
   31979   s/^([^:]+:\d+):( |#error|error|:)+/$1: #error /gm;
   31980 EOF
   31981 
   31982 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31983 at_status=$? at_failed=false
   31984 $at_check_filter
   31985 at_fn_diff_devnull "$at_stderr" || at_failed=:
   31986 echo stdout:; tee stdout <"$at_stdout"
   31987 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:150"
   31988 $at_failed && at_fn_log_failure
   31989 $at_traceon; }
   31990 
   31991 
   31992 { set +x
   31993 $as_echo "$at_srcdir/synclines.at:150: test \"\`cat stdout\`\" = 'syncline.c:1: #error \"1\"' || exit 77"
   31994 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:150"
   31995 ( $at_check_trace; test "`cat stdout`" = 'syncline.c:1: #error "1"' || exit 77
   31996 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   31997 at_status=$? at_failed=false
   31998 $at_check_filter
   31999 at_fn_diff_devnull "$at_stderr" || at_failed=:
   32000 at_fn_diff_devnull "$at_stdout" || at_failed=:
   32001 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:150"
   32002 $at_failed && at_fn_log_failure
   32003 $at_traceon; }
   32004 
   32005 
   32006 cat >input.y <<'_ATEOF'
   32007 %{
   32008 #error "2"
   32009 void yyerror ( const char *msg);
   32010 int yylex (void);
   32011 %}
   32012 %%
   32013 exp: '0';
   32014 %%
   32015 _ATEOF
   32016 
   32017 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   32018   at_save_special_files
   32019   mkdir xml-tests
   32020     # Don't combine these Bison invocations since we want to be sure that
   32021   # --report=all isn't required to get the full XML file.
   32022   { set +x
   32023 $as_echo "$at_srcdir/synclines.at:150: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   32024                   --graph=xml-tests/test.dot -o input.c input.y"
   32025 at_fn_check_prepare_notrace 'an embedded newline' "synclines.at:150"
   32026 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   32027                   --graph=xml-tests/test.dot -o input.c input.y
   32028 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32029 at_status=$? at_failed=false
   32030 $at_check_filter
   32031 echo stderr:; cat "$at_stderr"
   32032 echo stdout:; cat "$at_stdout"
   32033 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:150"
   32034 $at_failed && at_fn_log_failure
   32035 $at_traceon; }
   32036 
   32037   { set +x
   32038 $as_echo "$at_srcdir/synclines.at:150: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   32039 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "synclines.at:150"
   32040 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   32041 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32042 at_status=$? at_failed=false
   32043 $at_check_filter
   32044 echo stderr:; cat "$at_stderr"
   32045 echo stdout:; cat "$at_stdout"
   32046 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:150"
   32047 $at_failed && at_fn_log_failure
   32048 $at_traceon; }
   32049 
   32050     cp xml-tests/test.output expout
   32051   { set +x
   32052 $as_echo "$at_srcdir/synclines.at:150: \$XSLTPROC \\
   32053              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   32054              xml-tests/test.xml"
   32055 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:150"
   32056 ( $at_check_trace; $XSLTPROC \
   32057              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   32058              xml-tests/test.xml
   32059 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32060 at_status=$? at_failed=false
   32061 $at_check_filter
   32062 at_fn_diff_devnull "$at_stderr" || at_failed=:
   32063 $at_diff expout "$at_stdout" || at_failed=:
   32064 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:150"
   32065 $at_failed && at_fn_log_failure
   32066 $at_traceon; }
   32067 
   32068   sort xml-tests/test.dot > expout
   32069   { set +x
   32070 $as_echo "$at_srcdir/synclines.at:150: \$XSLTPROC \\
   32071              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   32072              xml-tests/test.xml | sort"
   32073 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:150"
   32074 ( $at_check_trace; $XSLTPROC \
   32075              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   32076              xml-tests/test.xml | sort
   32077 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32078 at_status=$? at_failed=false
   32079 $at_check_filter
   32080 at_fn_diff_devnull "$at_stderr" || at_failed=:
   32081 $at_diff expout "$at_stdout" || at_failed=:
   32082 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:150"
   32083 $at_failed && at_fn_log_failure
   32084 $at_traceon; }
   32085 
   32086   rm -rf xml-tests expout
   32087   at_restore_special_files
   32088 fi
   32089 { set +x
   32090 $as_echo "$at_srcdir/synclines.at:150: bison -o input.c input.y"
   32091 at_fn_check_prepare_trace "synclines.at:150"
   32092 ( $at_check_trace; bison -o input.c input.y
   32093 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32094 at_status=$? at_failed=false
   32095 $at_check_filter
   32096 at_fn_diff_devnull "$at_stderr" || at_failed=:
   32097 at_fn_diff_devnull "$at_stdout" || at_failed=:
   32098 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:150"
   32099 $at_failed && at_fn_log_failure
   32100 $at_traceon; }
   32101 
   32102 
   32103 { set +x
   32104 $as_echo "$at_srcdir/synclines.at:150: \$CC \$CFLAGS \$CPPFLAGS -c input.c"
   32105 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c input.c" "synclines.at:150"
   32106 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c input.c
   32107 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32108 at_status=$? at_failed=false
   32109 $at_check_filter
   32110 echo stderr:; tee stderr <"$at_stderr"
   32111 at_fn_diff_devnull "$at_stdout" || at_failed=:
   32112 at_fn_check_skip $at_status "$at_srcdir/synclines.at:150"
   32113 $at_failed && at_fn_log_failure
   32114 $at_traceon; }
   32115 
   32116 
   32117 # Transform stderr into something like this:
   32118 #
   32119 #   input.y:4: #error "4"
   32120 #
   32121 # In case GCC displays column information, strip it down.
   32122 #
   32123 #   input.y:4:2: #error "4"    or
   32124 #   input.y:4.2: #error "4"    or
   32125 #   input.y:4:2: error: #error "4"
   32126 # =>
   32127 #   input.y:4: #error "4"
   32128 #
   32129 # It may also issue more context information:
   32130 #
   32131 #   input.y: In function 'yyparse':
   32132 #   input.y:8: #error "8"
   32133 # =>
   32134 #   input.y:4: #error "8"
   32135 #
   32136 # The message may include a caret-error (indented by GCC 4.8,
   32137 # not by clang 3.2):
   32138 #
   32139 #   input.y:1:2: error: #error "1"
   32140 #    #error "1"
   32141 #     ^
   32142 #
   32143 # Possibly distcc adds its bits.
   32144 #
   32145 #   distcc[33187] ERROR: compile (null) on localhost failed
   32146 #   syncline.c:1:2: error: #error "1"
   32147 #   distcc[33185] ERROR: compile syncline.c on localhost failed
   32148 #
   32149 # or even
   32150 #
   32151 #   distcc[35882] (dcc_connect_by_name) ERROR: failed to look up host "chrisimac": Unknown host
   32152 #   distcc[35882] Warning: failed to distribute input.c to chrisimac/4, running locally instead
   32153 #
   32154 # The compiler might end by the number of messages issued (Clang 3.2):
   32155 #
   32156 #    syncline.c:1:2: error: "1"
   32157 #    #error "1"
   32158 #     ^
   32159 #    1 error generated.
   32160 #
   32161 # When c++ is used to compiler C, we might have more messages (Clang 3.2):
   32162 #
   32163 #    clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
   32164 
   32165 { set +x
   32166 $as_echo "$at_srcdir/synclines.at:150: \$PERL -p -0777 - stderr <<\\EOF
   32167   # 1. Remove useless lines.
   32168 
   32169   # distcc clutter.
   32170   s/^distcc\\[\\d+\\] .*\\n//gm;
   32171   # c vs. c++.
   32172   s/^clang: warning: treating 'c' input as 'c\\+\\+'.*\\n//gm;
   32173   # Function context.
   32174   s/^[^:]*: In function '[^']+':\\n//gm;
   32175   # Caret error.
   32176   s/^ *#error.*\\n *\\^\\n//gm;
   32177   # Number of errors.
   32178   s/^1 error generated\\.\\n//gm;
   32179 
   32180   # 2. Normalize the lines we kept.
   32181 
   32182   # Remove column.
   32183   s/^([^:]+:\\d+)[.:][^:]+:(.+)\$/\$1:\$2/gm;
   32184   # Map all combinations of \"error: \" and \"#error: \" to \"#error \".
   32185   s/^([^:]+:\\d+):( |#error|error|:)+/\$1: #error /gm;
   32186 EOF
   32187 "
   32188 at_fn_check_prepare_notrace 'an embedded newline' "synclines.at:150"
   32189 ( $at_check_trace; $PERL -p -0777 - stderr <<\EOF
   32190   # 1. Remove useless lines.
   32191 
   32192   # distcc clutter.
   32193   s/^distcc\[\d+\] .*\n//gm;
   32194   # c vs. c++.
   32195   s/^clang: warning: treating 'c' input as 'c\+\+'.*\n//gm;
   32196   # Function context.
   32197   s/^[^:]*: In function '[^']+':\n//gm;
   32198   # Caret error.
   32199   s/^ *#error.*\n *\^\n//gm;
   32200   # Number of errors.
   32201   s/^1 error generated\.\n//gm;
   32202 
   32203   # 2. Normalize the lines we kept.
   32204 
   32205   # Remove column.
   32206   s/^([^:]+:\d+)[.:][^:]+:(.+)$/$1:$2/gm;
   32207   # Map all combinations of "error: " and "#error: " to "#error ".
   32208   s/^([^:]+:\d+):( |#error|error|:)+/$1: #error /gm;
   32209 EOF
   32210 
   32211 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32212 at_status=$? at_failed=false
   32213 $at_check_filter
   32214 at_fn_diff_devnull "$at_stderr" || at_failed=:
   32215 echo stdout:; tee stdout <"$at_stdout"
   32216 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:150"
   32217 $at_failed && at_fn_log_failure
   32218 $at_traceon; }
   32219 
   32220 
   32221 { set +x
   32222 $as_echo "$at_srcdir/synclines.at:150: cat stdout"
   32223 at_fn_check_prepare_trace "synclines.at:150"
   32224 ( $at_check_trace; cat stdout
   32225 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32226 at_status=$? at_failed=false
   32227 $at_check_filter
   32228 at_fn_diff_devnull "$at_stderr" || at_failed=:
   32229 echo >>"$at_stdout"; $as_echo "input.y:2: #error \"2\"
   32230 " | \
   32231   $at_diff - "$at_stdout" || at_failed=:
   32232 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:150"
   32233 $at_failed && at_fn_log_failure
   32234 $at_traceon; }
   32235 
   32236 
   32237   set +x
   32238   $at_times_p && times >"$at_times_file"
   32239 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   32240 read at_status <"$at_status_file"
   32241 #AT_STOP_128
   32242 #AT_START_129
   32243 at_fn_group_banner 129 'synclines.at:168' \
   32244   "%union syncline" "                                " 7
   32245 at_xfail=no
   32246 (
   32247   $as_echo "129. $at_setup_line: testing $at_desc ..."
   32248   $at_traceon
   32249 
   32250 
   32251 # It seems impossible to find a generic scheme to check the location
   32252 # of an error.  Even requiring GCC is not sufficient, since for instance
   32253 # the version modified by Apple:
   32254 #
   32255 # | Reading specs from /usr/libexec/gcc/darwin/ppc/2.95.2/specs
   32256 # | Apple Computer, Inc. version gcc-934.3, based on gcc version 2.95.2
   32257 # | 19991024 (release) configure:2124: $? = 0
   32258 #
   32259 # instead of:
   32260 #
   32261 # | input.y:2: #error "2"
   32262 #
   32263 # it reports:
   32264 #
   32265 # | input.y:2: "2"
   32266 # | cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
   32267 
   32268 cat >syncline.c <<'_ATEOF'
   32269 #error "1"
   32270 int i; /* avoids -pedantic warning about an empty translation unit. */
   32271 _ATEOF
   32272 
   32273 
   32274 { set +x
   32275 $as_echo "$at_srcdir/synclines.at:168: \$CC \$CFLAGS \$CPPFLAGS -c syncline.c"
   32276 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c syncline.c" "synclines.at:168"
   32277 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c syncline.c
   32278 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32279 at_status=$? at_failed=false
   32280 $at_check_filter
   32281 echo stderr:; tee stderr <"$at_stderr"
   32282 at_fn_diff_devnull "$at_stdout" || at_failed=:
   32283 at_fn_check_skip $at_status "$at_srcdir/synclines.at:168"
   32284 $at_failed && at_fn_log_failure
   32285 $at_traceon; }
   32286 
   32287 
   32288 # Transform stderr into something like this:
   32289 #
   32290 #   input.y:4: #error "4"
   32291 #
   32292 # In case GCC displays column information, strip it down.
   32293 #
   32294 #   input.y:4:2: #error "4"    or
   32295 #   input.y:4.2: #error "4"    or
   32296 #   input.y:4:2: error: #error "4"
   32297 # =>
   32298 #   input.y:4: #error "4"
   32299 #
   32300 # It may also issue more context information:
   32301 #
   32302 #   input.y: In function 'yyparse':
   32303 #   input.y:8: #error "8"
   32304 # =>
   32305 #   input.y:4: #error "8"
   32306 #
   32307 # The message may include a caret-error (indented by GCC 4.8,
   32308 # not by clang 3.2):
   32309 #
   32310 #   input.y:1:2: error: #error "1"
   32311 #    #error "1"
   32312 #     ^
   32313 #
   32314 # Possibly distcc adds its bits.
   32315 #
   32316 #   distcc[33187] ERROR: compile (null) on localhost failed
   32317 #   syncline.c:1:2: error: #error "1"
   32318 #   distcc[33185] ERROR: compile syncline.c on localhost failed
   32319 #
   32320 # or even
   32321 #
   32322 #   distcc[35882] (dcc_connect_by_name) ERROR: failed to look up host "chrisimac": Unknown host
   32323 #   distcc[35882] Warning: failed to distribute input.c to chrisimac/4, running locally instead
   32324 #
   32325 # The compiler might end by the number of messages issued (Clang 3.2):
   32326 #
   32327 #    syncline.c:1:2: error: "1"
   32328 #    #error "1"
   32329 #     ^
   32330 #    1 error generated.
   32331 #
   32332 # When c++ is used to compiler C, we might have more messages (Clang 3.2):
   32333 #
   32334 #    clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
   32335 
   32336 { set +x
   32337 $as_echo "$at_srcdir/synclines.at:168: \$PERL -p -0777 - stderr <<\\EOF
   32338   # 1. Remove useless lines.
   32339 
   32340   # distcc clutter.
   32341   s/^distcc\\[\\d+\\] .*\\n//gm;
   32342   # c vs. c++.
   32343   s/^clang: warning: treating 'c' input as 'c\\+\\+'.*\\n//gm;
   32344   # Function context.
   32345   s/^[^:]*: In function '[^']+':\\n//gm;
   32346   # Caret error.
   32347   s/^ *#error.*\\n *\\^\\n//gm;
   32348   # Number of errors.
   32349   s/^1 error generated\\.\\n//gm;
   32350 
   32351   # 2. Normalize the lines we kept.
   32352 
   32353   # Remove column.
   32354   s/^([^:]+:\\d+)[.:][^:]+:(.+)\$/\$1:\$2/gm;
   32355   # Map all combinations of \"error: \" and \"#error: \" to \"#error \".
   32356   s/^([^:]+:\\d+):( |#error|error|:)+/\$1: #error /gm;
   32357 EOF
   32358 "
   32359 at_fn_check_prepare_notrace 'an embedded newline' "synclines.at:168"
   32360 ( $at_check_trace; $PERL -p -0777 - stderr <<\EOF
   32361   # 1. Remove useless lines.
   32362 
   32363   # distcc clutter.
   32364   s/^distcc\[\d+\] .*\n//gm;
   32365   # c vs. c++.
   32366   s/^clang: warning: treating 'c' input as 'c\+\+'.*\n//gm;
   32367   # Function context.
   32368   s/^[^:]*: In function '[^']+':\n//gm;
   32369   # Caret error.
   32370   s/^ *#error.*\n *\^\n//gm;
   32371   # Number of errors.
   32372   s/^1 error generated\.\n//gm;
   32373 
   32374   # 2. Normalize the lines we kept.
   32375 
   32376   # Remove column.
   32377   s/^([^:]+:\d+)[.:][^:]+:(.+)$/$1:$2/gm;
   32378   # Map all combinations of "error: " and "#error: " to "#error ".
   32379   s/^([^:]+:\d+):( |#error|error|:)+/$1: #error /gm;
   32380 EOF
   32381 
   32382 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32383 at_status=$? at_failed=false
   32384 $at_check_filter
   32385 at_fn_diff_devnull "$at_stderr" || at_failed=:
   32386 echo stdout:; tee stdout <"$at_stdout"
   32387 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:168"
   32388 $at_failed && at_fn_log_failure
   32389 $at_traceon; }
   32390 
   32391 
   32392 { set +x
   32393 $as_echo "$at_srcdir/synclines.at:168: test \"\`cat stdout\`\" = 'syncline.c:1: #error \"1\"' || exit 77"
   32394 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:168"
   32395 ( $at_check_trace; test "`cat stdout`" = 'syncline.c:1: #error "1"' || exit 77
   32396 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32397 at_status=$? at_failed=false
   32398 $at_check_filter
   32399 at_fn_diff_devnull "$at_stderr" || at_failed=:
   32400 at_fn_diff_devnull "$at_stdout" || at_failed=:
   32401 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:168"
   32402 $at_failed && at_fn_log_failure
   32403 $at_traceon; }
   32404 
   32405 
   32406 cat >input.y <<'_ATEOF'
   32407 %union {
   32408 #error "2"
   32409   char dummy;
   32410 }
   32411 %{
   32412 void yyerror ( const char *msg);
   32413 int yylex (void);
   32414 %}
   32415 %%
   32416 exp: '0';
   32417 %%
   32418 _ATEOF
   32419 
   32420 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   32421   at_save_special_files
   32422   mkdir xml-tests
   32423     # Don't combine these Bison invocations since we want to be sure that
   32424   # --report=all isn't required to get the full XML file.
   32425   { set +x
   32426 $as_echo "$at_srcdir/synclines.at:168: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   32427                   --graph=xml-tests/test.dot -o input.c input.y"
   32428 at_fn_check_prepare_notrace 'an embedded newline' "synclines.at:168"
   32429 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   32430                   --graph=xml-tests/test.dot -o input.c input.y
   32431 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32432 at_status=$? at_failed=false
   32433 $at_check_filter
   32434 echo stderr:; cat "$at_stderr"
   32435 echo stdout:; cat "$at_stdout"
   32436 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:168"
   32437 $at_failed && at_fn_log_failure
   32438 $at_traceon; }
   32439 
   32440   { set +x
   32441 $as_echo "$at_srcdir/synclines.at:168: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   32442 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "synclines.at:168"
   32443 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   32444 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32445 at_status=$? at_failed=false
   32446 $at_check_filter
   32447 echo stderr:; cat "$at_stderr"
   32448 echo stdout:; cat "$at_stdout"
   32449 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:168"
   32450 $at_failed && at_fn_log_failure
   32451 $at_traceon; }
   32452 
   32453     cp xml-tests/test.output expout
   32454   { set +x
   32455 $as_echo "$at_srcdir/synclines.at:168: \$XSLTPROC \\
   32456              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   32457              xml-tests/test.xml"
   32458 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:168"
   32459 ( $at_check_trace; $XSLTPROC \
   32460              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   32461              xml-tests/test.xml
   32462 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32463 at_status=$? at_failed=false
   32464 $at_check_filter
   32465 at_fn_diff_devnull "$at_stderr" || at_failed=:
   32466 $at_diff expout "$at_stdout" || at_failed=:
   32467 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:168"
   32468 $at_failed && at_fn_log_failure
   32469 $at_traceon; }
   32470 
   32471   sort xml-tests/test.dot > expout
   32472   { set +x
   32473 $as_echo "$at_srcdir/synclines.at:168: \$XSLTPROC \\
   32474              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   32475              xml-tests/test.xml | sort"
   32476 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:168"
   32477 ( $at_check_trace; $XSLTPROC \
   32478              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   32479              xml-tests/test.xml | sort
   32480 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32481 at_status=$? at_failed=false
   32482 $at_check_filter
   32483 at_fn_diff_devnull "$at_stderr" || at_failed=:
   32484 $at_diff expout "$at_stdout" || at_failed=:
   32485 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:168"
   32486 $at_failed && at_fn_log_failure
   32487 $at_traceon; }
   32488 
   32489   rm -rf xml-tests expout
   32490   at_restore_special_files
   32491 fi
   32492 { set +x
   32493 $as_echo "$at_srcdir/synclines.at:168: bison -o input.c input.y"
   32494 at_fn_check_prepare_trace "synclines.at:168"
   32495 ( $at_check_trace; bison -o input.c input.y
   32496 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32497 at_status=$? at_failed=false
   32498 $at_check_filter
   32499 at_fn_diff_devnull "$at_stderr" || at_failed=:
   32500 at_fn_diff_devnull "$at_stdout" || at_failed=:
   32501 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:168"
   32502 $at_failed && at_fn_log_failure
   32503 $at_traceon; }
   32504 
   32505 
   32506 { set +x
   32507 $as_echo "$at_srcdir/synclines.at:168: \$CC \$CFLAGS \$CPPFLAGS -c input.c"
   32508 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c input.c" "synclines.at:168"
   32509 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c input.c
   32510 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32511 at_status=$? at_failed=false
   32512 $at_check_filter
   32513 echo stderr:; tee stderr <"$at_stderr"
   32514 at_fn_diff_devnull "$at_stdout" || at_failed=:
   32515 at_fn_check_skip $at_status "$at_srcdir/synclines.at:168"
   32516 $at_failed && at_fn_log_failure
   32517 $at_traceon; }
   32518 
   32519 
   32520 # Transform stderr into something like this:
   32521 #
   32522 #   input.y:4: #error "4"
   32523 #
   32524 # In case GCC displays column information, strip it down.
   32525 #
   32526 #   input.y:4:2: #error "4"    or
   32527 #   input.y:4.2: #error "4"    or
   32528 #   input.y:4:2: error: #error "4"
   32529 # =>
   32530 #   input.y:4: #error "4"
   32531 #
   32532 # It may also issue more context information:
   32533 #
   32534 #   input.y: In function 'yyparse':
   32535 #   input.y:8: #error "8"
   32536 # =>
   32537 #   input.y:4: #error "8"
   32538 #
   32539 # The message may include a caret-error (indented by GCC 4.8,
   32540 # not by clang 3.2):
   32541 #
   32542 #   input.y:1:2: error: #error "1"
   32543 #    #error "1"
   32544 #     ^
   32545 #
   32546 # Possibly distcc adds its bits.
   32547 #
   32548 #   distcc[33187] ERROR: compile (null) on localhost failed
   32549 #   syncline.c:1:2: error: #error "1"
   32550 #   distcc[33185] ERROR: compile syncline.c on localhost failed
   32551 #
   32552 # or even
   32553 #
   32554 #   distcc[35882] (dcc_connect_by_name) ERROR: failed to look up host "chrisimac": Unknown host
   32555 #   distcc[35882] Warning: failed to distribute input.c to chrisimac/4, running locally instead
   32556 #
   32557 # The compiler might end by the number of messages issued (Clang 3.2):
   32558 #
   32559 #    syncline.c:1:2: error: "1"
   32560 #    #error "1"
   32561 #     ^
   32562 #    1 error generated.
   32563 #
   32564 # When c++ is used to compiler C, we might have more messages (Clang 3.2):
   32565 #
   32566 #    clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
   32567 
   32568 { set +x
   32569 $as_echo "$at_srcdir/synclines.at:168: \$PERL -p -0777 - stderr <<\\EOF
   32570   # 1. Remove useless lines.
   32571 
   32572   # distcc clutter.
   32573   s/^distcc\\[\\d+\\] .*\\n//gm;
   32574   # c vs. c++.
   32575   s/^clang: warning: treating 'c' input as 'c\\+\\+'.*\\n//gm;
   32576   # Function context.
   32577   s/^[^:]*: In function '[^']+':\\n//gm;
   32578   # Caret error.
   32579   s/^ *#error.*\\n *\\^\\n//gm;
   32580   # Number of errors.
   32581   s/^1 error generated\\.\\n//gm;
   32582 
   32583   # 2. Normalize the lines we kept.
   32584 
   32585   # Remove column.
   32586   s/^([^:]+:\\d+)[.:][^:]+:(.+)\$/\$1:\$2/gm;
   32587   # Map all combinations of \"error: \" and \"#error: \" to \"#error \".
   32588   s/^([^:]+:\\d+):( |#error|error|:)+/\$1: #error /gm;
   32589 EOF
   32590 "
   32591 at_fn_check_prepare_notrace 'an embedded newline' "synclines.at:168"
   32592 ( $at_check_trace; $PERL -p -0777 - stderr <<\EOF
   32593   # 1. Remove useless lines.
   32594 
   32595   # distcc clutter.
   32596   s/^distcc\[\d+\] .*\n//gm;
   32597   # c vs. c++.
   32598   s/^clang: warning: treating 'c' input as 'c\+\+'.*\n//gm;
   32599   # Function context.
   32600   s/^[^:]*: In function '[^']+':\n//gm;
   32601   # Caret error.
   32602   s/^ *#error.*\n *\^\n//gm;
   32603   # Number of errors.
   32604   s/^1 error generated\.\n//gm;
   32605 
   32606   # 2. Normalize the lines we kept.
   32607 
   32608   # Remove column.
   32609   s/^([^:]+:\d+)[.:][^:]+:(.+)$/$1:$2/gm;
   32610   # Map all combinations of "error: " and "#error: " to "#error ".
   32611   s/^([^:]+:\d+):( |#error|error|:)+/$1: #error /gm;
   32612 EOF
   32613 
   32614 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32615 at_status=$? at_failed=false
   32616 $at_check_filter
   32617 at_fn_diff_devnull "$at_stderr" || at_failed=:
   32618 echo stdout:; tee stdout <"$at_stdout"
   32619 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:168"
   32620 $at_failed && at_fn_log_failure
   32621 $at_traceon; }
   32622 
   32623 
   32624 { set +x
   32625 $as_echo "$at_srcdir/synclines.at:168: cat stdout"
   32626 at_fn_check_prepare_trace "synclines.at:168"
   32627 ( $at_check_trace; cat stdout
   32628 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32629 at_status=$? at_failed=false
   32630 $at_check_filter
   32631 at_fn_diff_devnull "$at_stderr" || at_failed=:
   32632 echo >>"$at_stdout"; $as_echo "input.y:2: #error \"2\"
   32633 " | \
   32634   $at_diff - "$at_stdout" || at_failed=:
   32635 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:168"
   32636 $at_failed && at_fn_log_failure
   32637 $at_traceon; }
   32638 
   32639 
   32640   set +x
   32641   $at_times_p && times >"$at_times_file"
   32642 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   32643 read at_status <"$at_status_file"
   32644 #AT_STOP_129
   32645 #AT_START_130
   32646 at_fn_group_banner 130 'synclines.at:189' \
   32647   "Postprologue syncline" "                          " 7
   32648 at_xfail=no
   32649 (
   32650   $as_echo "130. $at_setup_line: testing $at_desc ..."
   32651   $at_traceon
   32652 
   32653 
   32654 # It seems impossible to find a generic scheme to check the location
   32655 # of an error.  Even requiring GCC is not sufficient, since for instance
   32656 # the version modified by Apple:
   32657 #
   32658 # | Reading specs from /usr/libexec/gcc/darwin/ppc/2.95.2/specs
   32659 # | Apple Computer, Inc. version gcc-934.3, based on gcc version 2.95.2
   32660 # | 19991024 (release) configure:2124: $? = 0
   32661 #
   32662 # instead of:
   32663 #
   32664 # | input.y:2: #error "2"
   32665 #
   32666 # it reports:
   32667 #
   32668 # | input.y:2: "2"
   32669 # | cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
   32670 
   32671 cat >syncline.c <<'_ATEOF'
   32672 #error "1"
   32673 int i; /* avoids -pedantic warning about an empty translation unit. */
   32674 _ATEOF
   32675 
   32676 
   32677 { set +x
   32678 $as_echo "$at_srcdir/synclines.at:189: \$CC \$CFLAGS \$CPPFLAGS -c syncline.c"
   32679 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c syncline.c" "synclines.at:189"
   32680 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c syncline.c
   32681 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32682 at_status=$? at_failed=false
   32683 $at_check_filter
   32684 echo stderr:; tee stderr <"$at_stderr"
   32685 at_fn_diff_devnull "$at_stdout" || at_failed=:
   32686 at_fn_check_skip $at_status "$at_srcdir/synclines.at:189"
   32687 $at_failed && at_fn_log_failure
   32688 $at_traceon; }
   32689 
   32690 
   32691 # Transform stderr into something like this:
   32692 #
   32693 #   input.y:4: #error "4"
   32694 #
   32695 # In case GCC displays column information, strip it down.
   32696 #
   32697 #   input.y:4:2: #error "4"    or
   32698 #   input.y:4.2: #error "4"    or
   32699 #   input.y:4:2: error: #error "4"
   32700 # =>
   32701 #   input.y:4: #error "4"
   32702 #
   32703 # It may also issue more context information:
   32704 #
   32705 #   input.y: In function 'yyparse':
   32706 #   input.y:8: #error "8"
   32707 # =>
   32708 #   input.y:4: #error "8"
   32709 #
   32710 # The message may include a caret-error (indented by GCC 4.8,
   32711 # not by clang 3.2):
   32712 #
   32713 #   input.y:1:2: error: #error "1"
   32714 #    #error "1"
   32715 #     ^
   32716 #
   32717 # Possibly distcc adds its bits.
   32718 #
   32719 #   distcc[33187] ERROR: compile (null) on localhost failed
   32720 #   syncline.c:1:2: error: #error "1"
   32721 #   distcc[33185] ERROR: compile syncline.c on localhost failed
   32722 #
   32723 # or even
   32724 #
   32725 #   distcc[35882] (dcc_connect_by_name) ERROR: failed to look up host "chrisimac": Unknown host
   32726 #   distcc[35882] Warning: failed to distribute input.c to chrisimac/4, running locally instead
   32727 #
   32728 # The compiler might end by the number of messages issued (Clang 3.2):
   32729 #
   32730 #    syncline.c:1:2: error: "1"
   32731 #    #error "1"
   32732 #     ^
   32733 #    1 error generated.
   32734 #
   32735 # When c++ is used to compiler C, we might have more messages (Clang 3.2):
   32736 #
   32737 #    clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
   32738 
   32739 { set +x
   32740 $as_echo "$at_srcdir/synclines.at:189: \$PERL -p -0777 - stderr <<\\EOF
   32741   # 1. Remove useless lines.
   32742 
   32743   # distcc clutter.
   32744   s/^distcc\\[\\d+\\] .*\\n//gm;
   32745   # c vs. c++.
   32746   s/^clang: warning: treating 'c' input as 'c\\+\\+'.*\\n//gm;
   32747   # Function context.
   32748   s/^[^:]*: In function '[^']+':\\n//gm;
   32749   # Caret error.
   32750   s/^ *#error.*\\n *\\^\\n//gm;
   32751   # Number of errors.
   32752   s/^1 error generated\\.\\n//gm;
   32753 
   32754   # 2. Normalize the lines we kept.
   32755 
   32756   # Remove column.
   32757   s/^([^:]+:\\d+)[.:][^:]+:(.+)\$/\$1:\$2/gm;
   32758   # Map all combinations of \"error: \" and \"#error: \" to \"#error \".
   32759   s/^([^:]+:\\d+):( |#error|error|:)+/\$1: #error /gm;
   32760 EOF
   32761 "
   32762 at_fn_check_prepare_notrace 'an embedded newline' "synclines.at:189"
   32763 ( $at_check_trace; $PERL -p -0777 - stderr <<\EOF
   32764   # 1. Remove useless lines.
   32765 
   32766   # distcc clutter.
   32767   s/^distcc\[\d+\] .*\n//gm;
   32768   # c vs. c++.
   32769   s/^clang: warning: treating 'c' input as 'c\+\+'.*\n//gm;
   32770   # Function context.
   32771   s/^[^:]*: In function '[^']+':\n//gm;
   32772   # Caret error.
   32773   s/^ *#error.*\n *\^\n//gm;
   32774   # Number of errors.
   32775   s/^1 error generated\.\n//gm;
   32776 
   32777   # 2. Normalize the lines we kept.
   32778 
   32779   # Remove column.
   32780   s/^([^:]+:\d+)[.:][^:]+:(.+)$/$1:$2/gm;
   32781   # Map all combinations of "error: " and "#error: " to "#error ".
   32782   s/^([^:]+:\d+):( |#error|error|:)+/$1: #error /gm;
   32783 EOF
   32784 
   32785 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32786 at_status=$? at_failed=false
   32787 $at_check_filter
   32788 at_fn_diff_devnull "$at_stderr" || at_failed=:
   32789 echo stdout:; tee stdout <"$at_stdout"
   32790 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:189"
   32791 $at_failed && at_fn_log_failure
   32792 $at_traceon; }
   32793 
   32794 
   32795 { set +x
   32796 $as_echo "$at_srcdir/synclines.at:189: test \"\`cat stdout\`\" = 'syncline.c:1: #error \"1\"' || exit 77"
   32797 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:189"
   32798 ( $at_check_trace; test "`cat stdout`" = 'syncline.c:1: #error "1"' || exit 77
   32799 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32800 at_status=$? at_failed=false
   32801 $at_check_filter
   32802 at_fn_diff_devnull "$at_stderr" || at_failed=:
   32803 at_fn_diff_devnull "$at_stdout" || at_failed=:
   32804 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:189"
   32805 $at_failed && at_fn_log_failure
   32806 $at_traceon; }
   32807 
   32808 
   32809 cat >input.y <<'_ATEOF'
   32810 %{
   32811 void yyerror ( const char *msg);
   32812 int yylex (void);
   32813 %}
   32814 %union
   32815 {
   32816   int ival;
   32817 }
   32818 %{
   32819 #error "10"
   32820 %}
   32821 %%
   32822 exp: '0';
   32823 %%
   32824 _ATEOF
   32825 
   32826 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   32827   at_save_special_files
   32828   mkdir xml-tests
   32829     # Don't combine these Bison invocations since we want to be sure that
   32830   # --report=all isn't required to get the full XML file.
   32831   { set +x
   32832 $as_echo "$at_srcdir/synclines.at:189: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   32833                   --graph=xml-tests/test.dot -o input.c input.y"
   32834 at_fn_check_prepare_notrace 'an embedded newline' "synclines.at:189"
   32835 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   32836                   --graph=xml-tests/test.dot -o input.c input.y
   32837 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32838 at_status=$? at_failed=false
   32839 $at_check_filter
   32840 echo stderr:; cat "$at_stderr"
   32841 echo stdout:; cat "$at_stdout"
   32842 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:189"
   32843 $at_failed && at_fn_log_failure
   32844 $at_traceon; }
   32845 
   32846   { set +x
   32847 $as_echo "$at_srcdir/synclines.at:189: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   32848 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "synclines.at:189"
   32849 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   32850 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32851 at_status=$? at_failed=false
   32852 $at_check_filter
   32853 echo stderr:; cat "$at_stderr"
   32854 echo stdout:; cat "$at_stdout"
   32855 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:189"
   32856 $at_failed && at_fn_log_failure
   32857 $at_traceon; }
   32858 
   32859     cp xml-tests/test.output expout
   32860   { set +x
   32861 $as_echo "$at_srcdir/synclines.at:189: \$XSLTPROC \\
   32862              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   32863              xml-tests/test.xml"
   32864 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:189"
   32865 ( $at_check_trace; $XSLTPROC \
   32866              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   32867              xml-tests/test.xml
   32868 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32869 at_status=$? at_failed=false
   32870 $at_check_filter
   32871 at_fn_diff_devnull "$at_stderr" || at_failed=:
   32872 $at_diff expout "$at_stdout" || at_failed=:
   32873 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:189"
   32874 $at_failed && at_fn_log_failure
   32875 $at_traceon; }
   32876 
   32877   sort xml-tests/test.dot > expout
   32878   { set +x
   32879 $as_echo "$at_srcdir/synclines.at:189: \$XSLTPROC \\
   32880              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   32881              xml-tests/test.xml | sort"
   32882 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:189"
   32883 ( $at_check_trace; $XSLTPROC \
   32884              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   32885              xml-tests/test.xml | sort
   32886 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32887 at_status=$? at_failed=false
   32888 $at_check_filter
   32889 at_fn_diff_devnull "$at_stderr" || at_failed=:
   32890 $at_diff expout "$at_stdout" || at_failed=:
   32891 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:189"
   32892 $at_failed && at_fn_log_failure
   32893 $at_traceon; }
   32894 
   32895   rm -rf xml-tests expout
   32896   at_restore_special_files
   32897 fi
   32898 { set +x
   32899 $as_echo "$at_srcdir/synclines.at:189: bison -o input.c input.y"
   32900 at_fn_check_prepare_trace "synclines.at:189"
   32901 ( $at_check_trace; bison -o input.c input.y
   32902 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32903 at_status=$? at_failed=false
   32904 $at_check_filter
   32905 at_fn_diff_devnull "$at_stderr" || at_failed=:
   32906 at_fn_diff_devnull "$at_stdout" || at_failed=:
   32907 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:189"
   32908 $at_failed && at_fn_log_failure
   32909 $at_traceon; }
   32910 
   32911 
   32912 { set +x
   32913 $as_echo "$at_srcdir/synclines.at:189: \$CC \$CFLAGS \$CPPFLAGS -c input.c"
   32914 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c input.c" "synclines.at:189"
   32915 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c input.c
   32916 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   32917 at_status=$? at_failed=false
   32918 $at_check_filter
   32919 echo stderr:; tee stderr <"$at_stderr"
   32920 at_fn_diff_devnull "$at_stdout" || at_failed=:
   32921 at_fn_check_skip $at_status "$at_srcdir/synclines.at:189"
   32922 $at_failed && at_fn_log_failure
   32923 $at_traceon; }
   32924 
   32925 
   32926 # Transform stderr into something like this:
   32927 #
   32928 #   input.y:4: #error "4"
   32929 #
   32930 # In case GCC displays column information, strip it down.
   32931 #
   32932 #   input.y:4:2: #error "4"    or
   32933 #   input.y:4.2: #error "4"    or
   32934 #   input.y:4:2: error: #error "4"
   32935 # =>
   32936 #   input.y:4: #error "4"
   32937 #
   32938 # It may also issue more context information:
   32939 #
   32940 #   input.y: In function 'yyparse':
   32941 #   input.y:8: #error "8"
   32942 # =>
   32943 #   input.y:4: #error "8"
   32944 #
   32945 # The message may include a caret-error (indented by GCC 4.8,
   32946 # not by clang 3.2):
   32947 #
   32948 #   input.y:1:2: error: #error "1"
   32949 #    #error "1"
   32950 #     ^
   32951 #
   32952 # Possibly distcc adds its bits.
   32953 #
   32954 #   distcc[33187] ERROR: compile (null) on localhost failed
   32955 #   syncline.c:1:2: error: #error "1"
   32956 #   distcc[33185] ERROR: compile syncline.c on localhost failed
   32957 #
   32958 # or even
   32959 #
   32960 #   distcc[35882] (dcc_connect_by_name) ERROR: failed to look up host "chrisimac": Unknown host
   32961 #   distcc[35882] Warning: failed to distribute input.c to chrisimac/4, running locally instead
   32962 #
   32963 # The compiler might end by the number of messages issued (Clang 3.2):
   32964 #
   32965 #    syncline.c:1:2: error: "1"
   32966 #    #error "1"
   32967 #     ^
   32968 #    1 error generated.
   32969 #
   32970 # When c++ is used to compiler C, we might have more messages (Clang 3.2):
   32971 #
   32972 #    clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
   32973 
   32974 { set +x
   32975 $as_echo "$at_srcdir/synclines.at:189: \$PERL -p -0777 - stderr <<\\EOF
   32976   # 1. Remove useless lines.
   32977 
   32978   # distcc clutter.
   32979   s/^distcc\\[\\d+\\] .*\\n//gm;
   32980   # c vs. c++.
   32981   s/^clang: warning: treating 'c' input as 'c\\+\\+'.*\\n//gm;
   32982   # Function context.
   32983   s/^[^:]*: In function '[^']+':\\n//gm;
   32984   # Caret error.
   32985   s/^ *#error.*\\n *\\^\\n//gm;
   32986   # Number of errors.
   32987   s/^1 error generated\\.\\n//gm;
   32988 
   32989   # 2. Normalize the lines we kept.
   32990 
   32991   # Remove column.
   32992   s/^([^:]+:\\d+)[.:][^:]+:(.+)\$/\$1:\$2/gm;
   32993   # Map all combinations of \"error: \" and \"#error: \" to \"#error \".
   32994   s/^([^:]+:\\d+):( |#error|error|:)+/\$1: #error /gm;
   32995 EOF
   32996 "
   32997 at_fn_check_prepare_notrace 'an embedded newline' "synclines.at:189"
   32998 ( $at_check_trace; $PERL -p -0777 - stderr <<\EOF
   32999   # 1. Remove useless lines.
   33000 
   33001   # distcc clutter.
   33002   s/^distcc\[\d+\] .*\n//gm;
   33003   # c vs. c++.
   33004   s/^clang: warning: treating 'c' input as 'c\+\+'.*\n//gm;
   33005   # Function context.
   33006   s/^[^:]*: In function '[^']+':\n//gm;
   33007   # Caret error.
   33008   s/^ *#error.*\n *\^\n//gm;
   33009   # Number of errors.
   33010   s/^1 error generated\.\n//gm;
   33011 
   33012   # 2. Normalize the lines we kept.
   33013 
   33014   # Remove column.
   33015   s/^([^:]+:\d+)[.:][^:]+:(.+)$/$1:$2/gm;
   33016   # Map all combinations of "error: " and "#error: " to "#error ".
   33017   s/^([^:]+:\d+):( |#error|error|:)+/$1: #error /gm;
   33018 EOF
   33019 
   33020 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33021 at_status=$? at_failed=false
   33022 $at_check_filter
   33023 at_fn_diff_devnull "$at_stderr" || at_failed=:
   33024 echo stdout:; tee stdout <"$at_stdout"
   33025 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:189"
   33026 $at_failed && at_fn_log_failure
   33027 $at_traceon; }
   33028 
   33029 
   33030 { set +x
   33031 $as_echo "$at_srcdir/synclines.at:189: cat stdout"
   33032 at_fn_check_prepare_trace "synclines.at:189"
   33033 ( $at_check_trace; cat stdout
   33034 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33035 at_status=$? at_failed=false
   33036 $at_check_filter
   33037 at_fn_diff_devnull "$at_stderr" || at_failed=:
   33038 echo >>"$at_stdout"; $as_echo "input.y:10: #error \"10\"
   33039 " | \
   33040   $at_diff - "$at_stdout" || at_failed=:
   33041 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:189"
   33042 $at_failed && at_fn_log_failure
   33043 $at_traceon; }
   33044 
   33045 
   33046   set +x
   33047   $at_times_p && times >"$at_times_file"
   33048 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   33049 read at_status <"$at_status_file"
   33050 #AT_STOP_130
   33051 #AT_START_131
   33052 at_fn_group_banner 131 'synclines.at:213' \
   33053   "Action syncline" "                                " 7
   33054 at_xfail=no
   33055 (
   33056   $as_echo "131. $at_setup_line: testing $at_desc ..."
   33057   $at_traceon
   33058 
   33059 
   33060 # It seems impossible to find a generic scheme to check the location
   33061 # of an error.  Even requiring GCC is not sufficient, since for instance
   33062 # the version modified by Apple:
   33063 #
   33064 # | Reading specs from /usr/libexec/gcc/darwin/ppc/2.95.2/specs
   33065 # | Apple Computer, Inc. version gcc-934.3, based on gcc version 2.95.2
   33066 # | 19991024 (release) configure:2124: $? = 0
   33067 #
   33068 # instead of:
   33069 #
   33070 # | input.y:2: #error "2"
   33071 #
   33072 # it reports:
   33073 #
   33074 # | input.y:2: "2"
   33075 # | cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
   33076 
   33077 cat >syncline.c <<'_ATEOF'
   33078 #error "1"
   33079 int i; /* avoids -pedantic warning about an empty translation unit. */
   33080 _ATEOF
   33081 
   33082 
   33083 { set +x
   33084 $as_echo "$at_srcdir/synclines.at:213: \$CC \$CFLAGS \$CPPFLAGS -c syncline.c"
   33085 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c syncline.c" "synclines.at:213"
   33086 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c syncline.c
   33087 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33088 at_status=$? at_failed=false
   33089 $at_check_filter
   33090 echo stderr:; tee stderr <"$at_stderr"
   33091 at_fn_diff_devnull "$at_stdout" || at_failed=:
   33092 at_fn_check_skip $at_status "$at_srcdir/synclines.at:213"
   33093 $at_failed && at_fn_log_failure
   33094 $at_traceon; }
   33095 
   33096 
   33097 # Transform stderr into something like this:
   33098 #
   33099 #   input.y:4: #error "4"
   33100 #
   33101 # In case GCC displays column information, strip it down.
   33102 #
   33103 #   input.y:4:2: #error "4"    or
   33104 #   input.y:4.2: #error "4"    or
   33105 #   input.y:4:2: error: #error "4"
   33106 # =>
   33107 #   input.y:4: #error "4"
   33108 #
   33109 # It may also issue more context information:
   33110 #
   33111 #   input.y: In function 'yyparse':
   33112 #   input.y:8: #error "8"
   33113 # =>
   33114 #   input.y:4: #error "8"
   33115 #
   33116 # The message may include a caret-error (indented by GCC 4.8,
   33117 # not by clang 3.2):
   33118 #
   33119 #   input.y:1:2: error: #error "1"
   33120 #    #error "1"
   33121 #     ^
   33122 #
   33123 # Possibly distcc adds its bits.
   33124 #
   33125 #   distcc[33187] ERROR: compile (null) on localhost failed
   33126 #   syncline.c:1:2: error: #error "1"
   33127 #   distcc[33185] ERROR: compile syncline.c on localhost failed
   33128 #
   33129 # or even
   33130 #
   33131 #   distcc[35882] (dcc_connect_by_name) ERROR: failed to look up host "chrisimac": Unknown host
   33132 #   distcc[35882] Warning: failed to distribute input.c to chrisimac/4, running locally instead
   33133 #
   33134 # The compiler might end by the number of messages issued (Clang 3.2):
   33135 #
   33136 #    syncline.c:1:2: error: "1"
   33137 #    #error "1"
   33138 #     ^
   33139 #    1 error generated.
   33140 #
   33141 # When c++ is used to compiler C, we might have more messages (Clang 3.2):
   33142 #
   33143 #    clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
   33144 
   33145 { set +x
   33146 $as_echo "$at_srcdir/synclines.at:213: \$PERL -p -0777 - stderr <<\\EOF
   33147   # 1. Remove useless lines.
   33148 
   33149   # distcc clutter.
   33150   s/^distcc\\[\\d+\\] .*\\n//gm;
   33151   # c vs. c++.
   33152   s/^clang: warning: treating 'c' input as 'c\\+\\+'.*\\n//gm;
   33153   # Function context.
   33154   s/^[^:]*: In function '[^']+':\\n//gm;
   33155   # Caret error.
   33156   s/^ *#error.*\\n *\\^\\n//gm;
   33157   # Number of errors.
   33158   s/^1 error generated\\.\\n//gm;
   33159 
   33160   # 2. Normalize the lines we kept.
   33161 
   33162   # Remove column.
   33163   s/^([^:]+:\\d+)[.:][^:]+:(.+)\$/\$1:\$2/gm;
   33164   # Map all combinations of \"error: \" and \"#error: \" to \"#error \".
   33165   s/^([^:]+:\\d+):( |#error|error|:)+/\$1: #error /gm;
   33166 EOF
   33167 "
   33168 at_fn_check_prepare_notrace 'an embedded newline' "synclines.at:213"
   33169 ( $at_check_trace; $PERL -p -0777 - stderr <<\EOF
   33170   # 1. Remove useless lines.
   33171 
   33172   # distcc clutter.
   33173   s/^distcc\[\d+\] .*\n//gm;
   33174   # c vs. c++.
   33175   s/^clang: warning: treating 'c' input as 'c\+\+'.*\n//gm;
   33176   # Function context.
   33177   s/^[^:]*: In function '[^']+':\n//gm;
   33178   # Caret error.
   33179   s/^ *#error.*\n *\^\n//gm;
   33180   # Number of errors.
   33181   s/^1 error generated\.\n//gm;
   33182 
   33183   # 2. Normalize the lines we kept.
   33184 
   33185   # Remove column.
   33186   s/^([^:]+:\d+)[.:][^:]+:(.+)$/$1:$2/gm;
   33187   # Map all combinations of "error: " and "#error: " to "#error ".
   33188   s/^([^:]+:\d+):( |#error|error|:)+/$1: #error /gm;
   33189 EOF
   33190 
   33191 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33192 at_status=$? at_failed=false
   33193 $at_check_filter
   33194 at_fn_diff_devnull "$at_stderr" || at_failed=:
   33195 echo stdout:; tee stdout <"$at_stdout"
   33196 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:213"
   33197 $at_failed && at_fn_log_failure
   33198 $at_traceon; }
   33199 
   33200 
   33201 { set +x
   33202 $as_echo "$at_srcdir/synclines.at:213: test \"\`cat stdout\`\" = 'syncline.c:1: #error \"1\"' || exit 77"
   33203 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:213"
   33204 ( $at_check_trace; test "`cat stdout`" = 'syncline.c:1: #error "1"' || exit 77
   33205 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33206 at_status=$? at_failed=false
   33207 $at_check_filter
   33208 at_fn_diff_devnull "$at_stderr" || at_failed=:
   33209 at_fn_diff_devnull "$at_stdout" || at_failed=:
   33210 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:213"
   33211 $at_failed && at_fn_log_failure
   33212 $at_traceon; }
   33213 
   33214 
   33215 cat >input.y <<'_ATEOF'
   33216 %{
   33217 void yyerror ( const char *msg);
   33218 int yylex (void);
   33219 %}
   33220 %%
   33221 exp:
   33222 {
   33223 #error "8"
   33224 };
   33225 _ATEOF
   33226 
   33227 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   33228   at_save_special_files
   33229   mkdir xml-tests
   33230     # Don't combine these Bison invocations since we want to be sure that
   33231   # --report=all isn't required to get the full XML file.
   33232   { set +x
   33233 $as_echo "$at_srcdir/synclines.at:213: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   33234                   --graph=xml-tests/test.dot -o input.c input.y"
   33235 at_fn_check_prepare_notrace 'an embedded newline' "synclines.at:213"
   33236 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   33237                   --graph=xml-tests/test.dot -o input.c input.y
   33238 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33239 at_status=$? at_failed=false
   33240 $at_check_filter
   33241 echo stderr:; cat "$at_stderr"
   33242 echo stdout:; cat "$at_stdout"
   33243 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:213"
   33244 $at_failed && at_fn_log_failure
   33245 $at_traceon; }
   33246 
   33247   { set +x
   33248 $as_echo "$at_srcdir/synclines.at:213: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   33249 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "synclines.at:213"
   33250 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   33251 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33252 at_status=$? at_failed=false
   33253 $at_check_filter
   33254 echo stderr:; cat "$at_stderr"
   33255 echo stdout:; cat "$at_stdout"
   33256 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:213"
   33257 $at_failed && at_fn_log_failure
   33258 $at_traceon; }
   33259 
   33260     cp xml-tests/test.output expout
   33261   { set +x
   33262 $as_echo "$at_srcdir/synclines.at:213: \$XSLTPROC \\
   33263              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   33264              xml-tests/test.xml"
   33265 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:213"
   33266 ( $at_check_trace; $XSLTPROC \
   33267              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   33268              xml-tests/test.xml
   33269 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33270 at_status=$? at_failed=false
   33271 $at_check_filter
   33272 at_fn_diff_devnull "$at_stderr" || at_failed=:
   33273 $at_diff expout "$at_stdout" || at_failed=:
   33274 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:213"
   33275 $at_failed && at_fn_log_failure
   33276 $at_traceon; }
   33277 
   33278   sort xml-tests/test.dot > expout
   33279   { set +x
   33280 $as_echo "$at_srcdir/synclines.at:213: \$XSLTPROC \\
   33281              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   33282              xml-tests/test.xml | sort"
   33283 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:213"
   33284 ( $at_check_trace; $XSLTPROC \
   33285              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   33286              xml-tests/test.xml | sort
   33287 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33288 at_status=$? at_failed=false
   33289 $at_check_filter
   33290 at_fn_diff_devnull "$at_stderr" || at_failed=:
   33291 $at_diff expout "$at_stdout" || at_failed=:
   33292 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:213"
   33293 $at_failed && at_fn_log_failure
   33294 $at_traceon; }
   33295 
   33296   rm -rf xml-tests expout
   33297   at_restore_special_files
   33298 fi
   33299 { set +x
   33300 $as_echo "$at_srcdir/synclines.at:213: bison -o input.c input.y"
   33301 at_fn_check_prepare_trace "synclines.at:213"
   33302 ( $at_check_trace; bison -o input.c input.y
   33303 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33304 at_status=$? at_failed=false
   33305 $at_check_filter
   33306 at_fn_diff_devnull "$at_stderr" || at_failed=:
   33307 at_fn_diff_devnull "$at_stdout" || at_failed=:
   33308 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:213"
   33309 $at_failed && at_fn_log_failure
   33310 $at_traceon; }
   33311 
   33312 
   33313 { set +x
   33314 $as_echo "$at_srcdir/synclines.at:213: \$CC \$CFLAGS \$CPPFLAGS -c input.c"
   33315 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c input.c" "synclines.at:213"
   33316 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c input.c
   33317 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33318 at_status=$? at_failed=false
   33319 $at_check_filter
   33320 echo stderr:; tee stderr <"$at_stderr"
   33321 at_fn_diff_devnull "$at_stdout" || at_failed=:
   33322 at_fn_check_skip $at_status "$at_srcdir/synclines.at:213"
   33323 $at_failed && at_fn_log_failure
   33324 $at_traceon; }
   33325 
   33326 
   33327 # Transform stderr into something like this:
   33328 #
   33329 #   input.y:4: #error "4"
   33330 #
   33331 # In case GCC displays column information, strip it down.
   33332 #
   33333 #   input.y:4:2: #error "4"    or
   33334 #   input.y:4.2: #error "4"    or
   33335 #   input.y:4:2: error: #error "4"
   33336 # =>
   33337 #   input.y:4: #error "4"
   33338 #
   33339 # It may also issue more context information:
   33340 #
   33341 #   input.y: In function 'yyparse':
   33342 #   input.y:8: #error "8"
   33343 # =>
   33344 #   input.y:4: #error "8"
   33345 #
   33346 # The message may include a caret-error (indented by GCC 4.8,
   33347 # not by clang 3.2):
   33348 #
   33349 #   input.y:1:2: error: #error "1"
   33350 #    #error "1"
   33351 #     ^
   33352 #
   33353 # Possibly distcc adds its bits.
   33354 #
   33355 #   distcc[33187] ERROR: compile (null) on localhost failed
   33356 #   syncline.c:1:2: error: #error "1"
   33357 #   distcc[33185] ERROR: compile syncline.c on localhost failed
   33358 #
   33359 # or even
   33360 #
   33361 #   distcc[35882] (dcc_connect_by_name) ERROR: failed to look up host "chrisimac": Unknown host
   33362 #   distcc[35882] Warning: failed to distribute input.c to chrisimac/4, running locally instead
   33363 #
   33364 # The compiler might end by the number of messages issued (Clang 3.2):
   33365 #
   33366 #    syncline.c:1:2: error: "1"
   33367 #    #error "1"
   33368 #     ^
   33369 #    1 error generated.
   33370 #
   33371 # When c++ is used to compiler C, we might have more messages (Clang 3.2):
   33372 #
   33373 #    clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
   33374 
   33375 { set +x
   33376 $as_echo "$at_srcdir/synclines.at:213: \$PERL -p -0777 - stderr <<\\EOF
   33377   # 1. Remove useless lines.
   33378 
   33379   # distcc clutter.
   33380   s/^distcc\\[\\d+\\] .*\\n//gm;
   33381   # c vs. c++.
   33382   s/^clang: warning: treating 'c' input as 'c\\+\\+'.*\\n//gm;
   33383   # Function context.
   33384   s/^[^:]*: In function '[^']+':\\n//gm;
   33385   # Caret error.
   33386   s/^ *#error.*\\n *\\^\\n//gm;
   33387   # Number of errors.
   33388   s/^1 error generated\\.\\n//gm;
   33389 
   33390   # 2. Normalize the lines we kept.
   33391 
   33392   # Remove column.
   33393   s/^([^:]+:\\d+)[.:][^:]+:(.+)\$/\$1:\$2/gm;
   33394   # Map all combinations of \"error: \" and \"#error: \" to \"#error \".
   33395   s/^([^:]+:\\d+):( |#error|error|:)+/\$1: #error /gm;
   33396 EOF
   33397 "
   33398 at_fn_check_prepare_notrace 'an embedded newline' "synclines.at:213"
   33399 ( $at_check_trace; $PERL -p -0777 - stderr <<\EOF
   33400   # 1. Remove useless lines.
   33401 
   33402   # distcc clutter.
   33403   s/^distcc\[\d+\] .*\n//gm;
   33404   # c vs. c++.
   33405   s/^clang: warning: treating 'c' input as 'c\+\+'.*\n//gm;
   33406   # Function context.
   33407   s/^[^:]*: In function '[^']+':\n//gm;
   33408   # Caret error.
   33409   s/^ *#error.*\n *\^\n//gm;
   33410   # Number of errors.
   33411   s/^1 error generated\.\n//gm;
   33412 
   33413   # 2. Normalize the lines we kept.
   33414 
   33415   # Remove column.
   33416   s/^([^:]+:\d+)[.:][^:]+:(.+)$/$1:$2/gm;
   33417   # Map all combinations of "error: " and "#error: " to "#error ".
   33418   s/^([^:]+:\d+):( |#error|error|:)+/$1: #error /gm;
   33419 EOF
   33420 
   33421 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33422 at_status=$? at_failed=false
   33423 $at_check_filter
   33424 at_fn_diff_devnull "$at_stderr" || at_failed=:
   33425 echo stdout:; tee stdout <"$at_stdout"
   33426 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:213"
   33427 $at_failed && at_fn_log_failure
   33428 $at_traceon; }
   33429 
   33430 
   33431 { set +x
   33432 $as_echo "$at_srcdir/synclines.at:213: cat stdout"
   33433 at_fn_check_prepare_trace "synclines.at:213"
   33434 ( $at_check_trace; cat stdout
   33435 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33436 at_status=$? at_failed=false
   33437 $at_check_filter
   33438 at_fn_diff_devnull "$at_stderr" || at_failed=:
   33439 echo >>"$at_stdout"; $as_echo "input.y:8: #error \"8\"
   33440 " | \
   33441   $at_diff - "$at_stdout" || at_failed=:
   33442 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:213"
   33443 $at_failed && at_fn_log_failure
   33444 $at_traceon; }
   33445 
   33446 
   33447   set +x
   33448   $at_times_p && times >"$at_times_file"
   33449 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   33450 read at_status <"$at_status_file"
   33451 #AT_STOP_131
   33452 #AT_START_132
   33453 at_fn_group_banner 132 'synclines.at:232' \
   33454   "Epilogue syncline" "                              " 7
   33455 at_xfail=no
   33456 (
   33457   $as_echo "132. $at_setup_line: testing $at_desc ..."
   33458   $at_traceon
   33459 
   33460 
   33461 # It seems impossible to find a generic scheme to check the location
   33462 # of an error.  Even requiring GCC is not sufficient, since for instance
   33463 # the version modified by Apple:
   33464 #
   33465 # | Reading specs from /usr/libexec/gcc/darwin/ppc/2.95.2/specs
   33466 # | Apple Computer, Inc. version gcc-934.3, based on gcc version 2.95.2
   33467 # | 19991024 (release) configure:2124: $? = 0
   33468 #
   33469 # instead of:
   33470 #
   33471 # | input.y:2: #error "2"
   33472 #
   33473 # it reports:
   33474 #
   33475 # | input.y:2: "2"
   33476 # | cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
   33477 
   33478 cat >syncline.c <<'_ATEOF'
   33479 #error "1"
   33480 int i; /* avoids -pedantic warning about an empty translation unit. */
   33481 _ATEOF
   33482 
   33483 
   33484 { set +x
   33485 $as_echo "$at_srcdir/synclines.at:232: \$CC \$CFLAGS \$CPPFLAGS -c syncline.c"
   33486 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c syncline.c" "synclines.at:232"
   33487 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c syncline.c
   33488 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33489 at_status=$? at_failed=false
   33490 $at_check_filter
   33491 echo stderr:; tee stderr <"$at_stderr"
   33492 at_fn_diff_devnull "$at_stdout" || at_failed=:
   33493 at_fn_check_skip $at_status "$at_srcdir/synclines.at:232"
   33494 $at_failed && at_fn_log_failure
   33495 $at_traceon; }
   33496 
   33497 
   33498 # Transform stderr into something like this:
   33499 #
   33500 #   input.y:4: #error "4"
   33501 #
   33502 # In case GCC displays column information, strip it down.
   33503 #
   33504 #   input.y:4:2: #error "4"    or
   33505 #   input.y:4.2: #error "4"    or
   33506 #   input.y:4:2: error: #error "4"
   33507 # =>
   33508 #   input.y:4: #error "4"
   33509 #
   33510 # It may also issue more context information:
   33511 #
   33512 #   input.y: In function 'yyparse':
   33513 #   input.y:8: #error "8"
   33514 # =>
   33515 #   input.y:4: #error "8"
   33516 #
   33517 # The message may include a caret-error (indented by GCC 4.8,
   33518 # not by clang 3.2):
   33519 #
   33520 #   input.y:1:2: error: #error "1"
   33521 #    #error "1"
   33522 #     ^
   33523 #
   33524 # Possibly distcc adds its bits.
   33525 #
   33526 #   distcc[33187] ERROR: compile (null) on localhost failed
   33527 #   syncline.c:1:2: error: #error "1"
   33528 #   distcc[33185] ERROR: compile syncline.c on localhost failed
   33529 #
   33530 # or even
   33531 #
   33532 #   distcc[35882] (dcc_connect_by_name) ERROR: failed to look up host "chrisimac": Unknown host
   33533 #   distcc[35882] Warning: failed to distribute input.c to chrisimac/4, running locally instead
   33534 #
   33535 # The compiler might end by the number of messages issued (Clang 3.2):
   33536 #
   33537 #    syncline.c:1:2: error: "1"
   33538 #    #error "1"
   33539 #     ^
   33540 #    1 error generated.
   33541 #
   33542 # When c++ is used to compiler C, we might have more messages (Clang 3.2):
   33543 #
   33544 #    clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
   33545 
   33546 { set +x
   33547 $as_echo "$at_srcdir/synclines.at:232: \$PERL -p -0777 - stderr <<\\EOF
   33548   # 1. Remove useless lines.
   33549 
   33550   # distcc clutter.
   33551   s/^distcc\\[\\d+\\] .*\\n//gm;
   33552   # c vs. c++.
   33553   s/^clang: warning: treating 'c' input as 'c\\+\\+'.*\\n//gm;
   33554   # Function context.
   33555   s/^[^:]*: In function '[^']+':\\n//gm;
   33556   # Caret error.
   33557   s/^ *#error.*\\n *\\^\\n//gm;
   33558   # Number of errors.
   33559   s/^1 error generated\\.\\n//gm;
   33560 
   33561   # 2. Normalize the lines we kept.
   33562 
   33563   # Remove column.
   33564   s/^([^:]+:\\d+)[.:][^:]+:(.+)\$/\$1:\$2/gm;
   33565   # Map all combinations of \"error: \" and \"#error: \" to \"#error \".
   33566   s/^([^:]+:\\d+):( |#error|error|:)+/\$1: #error /gm;
   33567 EOF
   33568 "
   33569 at_fn_check_prepare_notrace 'an embedded newline' "synclines.at:232"
   33570 ( $at_check_trace; $PERL -p -0777 - stderr <<\EOF
   33571   # 1. Remove useless lines.
   33572 
   33573   # distcc clutter.
   33574   s/^distcc\[\d+\] .*\n//gm;
   33575   # c vs. c++.
   33576   s/^clang: warning: treating 'c' input as 'c\+\+'.*\n//gm;
   33577   # Function context.
   33578   s/^[^:]*: In function '[^']+':\n//gm;
   33579   # Caret error.
   33580   s/^ *#error.*\n *\^\n//gm;
   33581   # Number of errors.
   33582   s/^1 error generated\.\n//gm;
   33583 
   33584   # 2. Normalize the lines we kept.
   33585 
   33586   # Remove column.
   33587   s/^([^:]+:\d+)[.:][^:]+:(.+)$/$1:$2/gm;
   33588   # Map all combinations of "error: " and "#error: " to "#error ".
   33589   s/^([^:]+:\d+):( |#error|error|:)+/$1: #error /gm;
   33590 EOF
   33591 
   33592 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33593 at_status=$? at_failed=false
   33594 $at_check_filter
   33595 at_fn_diff_devnull "$at_stderr" || at_failed=:
   33596 echo stdout:; tee stdout <"$at_stdout"
   33597 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:232"
   33598 $at_failed && at_fn_log_failure
   33599 $at_traceon; }
   33600 
   33601 
   33602 { set +x
   33603 $as_echo "$at_srcdir/synclines.at:232: test \"\`cat stdout\`\" = 'syncline.c:1: #error \"1\"' || exit 77"
   33604 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:232"
   33605 ( $at_check_trace; test "`cat stdout`" = 'syncline.c:1: #error "1"' || exit 77
   33606 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33607 at_status=$? at_failed=false
   33608 $at_check_filter
   33609 at_fn_diff_devnull "$at_stderr" || at_failed=:
   33610 at_fn_diff_devnull "$at_stdout" || at_failed=:
   33611 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:232"
   33612 $at_failed && at_fn_log_failure
   33613 $at_traceon; }
   33614 
   33615 
   33616 cat >input.y <<'_ATEOF'
   33617 %{
   33618 void yyerror ( const char *msg);
   33619 int yylex (void);
   33620 %}
   33621 %%
   33622 exp: '0';
   33623 %%
   33624 #error "8"
   33625 _ATEOF
   33626 
   33627 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   33628   at_save_special_files
   33629   mkdir xml-tests
   33630     # Don't combine these Bison invocations since we want to be sure that
   33631   # --report=all isn't required to get the full XML file.
   33632   { set +x
   33633 $as_echo "$at_srcdir/synclines.at:232: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   33634                   --graph=xml-tests/test.dot -o input.c input.y"
   33635 at_fn_check_prepare_notrace 'an embedded newline' "synclines.at:232"
   33636 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   33637                   --graph=xml-tests/test.dot -o input.c input.y
   33638 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33639 at_status=$? at_failed=false
   33640 $at_check_filter
   33641 echo stderr:; cat "$at_stderr"
   33642 echo stdout:; cat "$at_stdout"
   33643 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:232"
   33644 $at_failed && at_fn_log_failure
   33645 $at_traceon; }
   33646 
   33647   { set +x
   33648 $as_echo "$at_srcdir/synclines.at:232: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   33649 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "synclines.at:232"
   33650 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   33651 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33652 at_status=$? at_failed=false
   33653 $at_check_filter
   33654 echo stderr:; cat "$at_stderr"
   33655 echo stdout:; cat "$at_stdout"
   33656 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:232"
   33657 $at_failed && at_fn_log_failure
   33658 $at_traceon; }
   33659 
   33660     cp xml-tests/test.output expout
   33661   { set +x
   33662 $as_echo "$at_srcdir/synclines.at:232: \$XSLTPROC \\
   33663              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   33664              xml-tests/test.xml"
   33665 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:232"
   33666 ( $at_check_trace; $XSLTPROC \
   33667              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   33668              xml-tests/test.xml
   33669 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33670 at_status=$? at_failed=false
   33671 $at_check_filter
   33672 at_fn_diff_devnull "$at_stderr" || at_failed=:
   33673 $at_diff expout "$at_stdout" || at_failed=:
   33674 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:232"
   33675 $at_failed && at_fn_log_failure
   33676 $at_traceon; }
   33677 
   33678   sort xml-tests/test.dot > expout
   33679   { set +x
   33680 $as_echo "$at_srcdir/synclines.at:232: \$XSLTPROC \\
   33681              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   33682              xml-tests/test.xml | sort"
   33683 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:232"
   33684 ( $at_check_trace; $XSLTPROC \
   33685              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   33686              xml-tests/test.xml | sort
   33687 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33688 at_status=$? at_failed=false
   33689 $at_check_filter
   33690 at_fn_diff_devnull "$at_stderr" || at_failed=:
   33691 $at_diff expout "$at_stdout" || at_failed=:
   33692 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:232"
   33693 $at_failed && at_fn_log_failure
   33694 $at_traceon; }
   33695 
   33696   rm -rf xml-tests expout
   33697   at_restore_special_files
   33698 fi
   33699 { set +x
   33700 $as_echo "$at_srcdir/synclines.at:232: bison -o input.c input.y"
   33701 at_fn_check_prepare_trace "synclines.at:232"
   33702 ( $at_check_trace; bison -o input.c input.y
   33703 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33704 at_status=$? at_failed=false
   33705 $at_check_filter
   33706 at_fn_diff_devnull "$at_stderr" || at_failed=:
   33707 at_fn_diff_devnull "$at_stdout" || at_failed=:
   33708 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:232"
   33709 $at_failed && at_fn_log_failure
   33710 $at_traceon; }
   33711 
   33712 
   33713 { set +x
   33714 $as_echo "$at_srcdir/synclines.at:232: \$CC \$CFLAGS \$CPPFLAGS -c input.c"
   33715 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c input.c" "synclines.at:232"
   33716 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c input.c
   33717 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33718 at_status=$? at_failed=false
   33719 $at_check_filter
   33720 echo stderr:; tee stderr <"$at_stderr"
   33721 at_fn_diff_devnull "$at_stdout" || at_failed=:
   33722 at_fn_check_skip $at_status "$at_srcdir/synclines.at:232"
   33723 $at_failed && at_fn_log_failure
   33724 $at_traceon; }
   33725 
   33726 
   33727 # Transform stderr into something like this:
   33728 #
   33729 #   input.y:4: #error "4"
   33730 #
   33731 # In case GCC displays column information, strip it down.
   33732 #
   33733 #   input.y:4:2: #error "4"    or
   33734 #   input.y:4.2: #error "4"    or
   33735 #   input.y:4:2: error: #error "4"
   33736 # =>
   33737 #   input.y:4: #error "4"
   33738 #
   33739 # It may also issue more context information:
   33740 #
   33741 #   input.y: In function 'yyparse':
   33742 #   input.y:8: #error "8"
   33743 # =>
   33744 #   input.y:4: #error "8"
   33745 #
   33746 # The message may include a caret-error (indented by GCC 4.8,
   33747 # not by clang 3.2):
   33748 #
   33749 #   input.y:1:2: error: #error "1"
   33750 #    #error "1"
   33751 #     ^
   33752 #
   33753 # Possibly distcc adds its bits.
   33754 #
   33755 #   distcc[33187] ERROR: compile (null) on localhost failed
   33756 #   syncline.c:1:2: error: #error "1"
   33757 #   distcc[33185] ERROR: compile syncline.c on localhost failed
   33758 #
   33759 # or even
   33760 #
   33761 #   distcc[35882] (dcc_connect_by_name) ERROR: failed to look up host "chrisimac": Unknown host
   33762 #   distcc[35882] Warning: failed to distribute input.c to chrisimac/4, running locally instead
   33763 #
   33764 # The compiler might end by the number of messages issued (Clang 3.2):
   33765 #
   33766 #    syncline.c:1:2: error: "1"
   33767 #    #error "1"
   33768 #     ^
   33769 #    1 error generated.
   33770 #
   33771 # When c++ is used to compiler C, we might have more messages (Clang 3.2):
   33772 #
   33773 #    clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
   33774 
   33775 { set +x
   33776 $as_echo "$at_srcdir/synclines.at:232: \$PERL -p -0777 - stderr <<\\EOF
   33777   # 1. Remove useless lines.
   33778 
   33779   # distcc clutter.
   33780   s/^distcc\\[\\d+\\] .*\\n//gm;
   33781   # c vs. c++.
   33782   s/^clang: warning: treating 'c' input as 'c\\+\\+'.*\\n//gm;
   33783   # Function context.
   33784   s/^[^:]*: In function '[^']+':\\n//gm;
   33785   # Caret error.
   33786   s/^ *#error.*\\n *\\^\\n//gm;
   33787   # Number of errors.
   33788   s/^1 error generated\\.\\n//gm;
   33789 
   33790   # 2. Normalize the lines we kept.
   33791 
   33792   # Remove column.
   33793   s/^([^:]+:\\d+)[.:][^:]+:(.+)\$/\$1:\$2/gm;
   33794   # Map all combinations of \"error: \" and \"#error: \" to \"#error \".
   33795   s/^([^:]+:\\d+):( |#error|error|:)+/\$1: #error /gm;
   33796 EOF
   33797 "
   33798 at_fn_check_prepare_notrace 'an embedded newline' "synclines.at:232"
   33799 ( $at_check_trace; $PERL -p -0777 - stderr <<\EOF
   33800   # 1. Remove useless lines.
   33801 
   33802   # distcc clutter.
   33803   s/^distcc\[\d+\] .*\n//gm;
   33804   # c vs. c++.
   33805   s/^clang: warning: treating 'c' input as 'c\+\+'.*\n//gm;
   33806   # Function context.
   33807   s/^[^:]*: In function '[^']+':\n//gm;
   33808   # Caret error.
   33809   s/^ *#error.*\n *\^\n//gm;
   33810   # Number of errors.
   33811   s/^1 error generated\.\n//gm;
   33812 
   33813   # 2. Normalize the lines we kept.
   33814 
   33815   # Remove column.
   33816   s/^([^:]+:\d+)[.:][^:]+:(.+)$/$1:$2/gm;
   33817   # Map all combinations of "error: " and "#error: " to "#error ".
   33818   s/^([^:]+:\d+):( |#error|error|:)+/$1: #error /gm;
   33819 EOF
   33820 
   33821 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33822 at_status=$? at_failed=false
   33823 $at_check_filter
   33824 at_fn_diff_devnull "$at_stderr" || at_failed=:
   33825 echo stdout:; tee stdout <"$at_stdout"
   33826 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:232"
   33827 $at_failed && at_fn_log_failure
   33828 $at_traceon; }
   33829 
   33830 
   33831 { set +x
   33832 $as_echo "$at_srcdir/synclines.at:232: cat stdout"
   33833 at_fn_check_prepare_trace "synclines.at:232"
   33834 ( $at_check_trace; cat stdout
   33835 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33836 at_status=$? at_failed=false
   33837 $at_check_filter
   33838 at_fn_diff_devnull "$at_stderr" || at_failed=:
   33839 echo >>"$at_stdout"; $as_echo "input.y:8: #error \"8\"
   33840 " | \
   33841   $at_diff - "$at_stdout" || at_failed=:
   33842 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:232"
   33843 $at_failed && at_fn_log_failure
   33844 $at_traceon; }
   33845 
   33846 
   33847   set +x
   33848   $at_times_p && times >"$at_times_file"
   33849 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   33850 read at_status <"$at_status_file"
   33851 #AT_STOP_132
   33852 #AT_START_133
   33853 at_fn_group_banner 133 'synclines.at:249' \
   33854   "%code top syncline" "                             " 7
   33855 at_xfail=no
   33856 (
   33857   $as_echo "133. $at_setup_line: testing $at_desc ..."
   33858   $at_traceon
   33859 
   33860 
   33861 # It seems impossible to find a generic scheme to check the location
   33862 # of an error.  Even requiring GCC is not sufficient, since for instance
   33863 # the version modified by Apple:
   33864 #
   33865 # | Reading specs from /usr/libexec/gcc/darwin/ppc/2.95.2/specs
   33866 # | Apple Computer, Inc. version gcc-934.3, based on gcc version 2.95.2
   33867 # | 19991024 (release) configure:2124: $? = 0
   33868 #
   33869 # instead of:
   33870 #
   33871 # | input.y:2: #error "2"
   33872 #
   33873 # it reports:
   33874 #
   33875 # | input.y:2: "2"
   33876 # | cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
   33877 
   33878 cat >syncline.c <<'_ATEOF'
   33879 #error "1"
   33880 int i; /* avoids -pedantic warning about an empty translation unit. */
   33881 _ATEOF
   33882 
   33883 
   33884 { set +x
   33885 $as_echo "$at_srcdir/synclines.at:249: \$CC \$CFLAGS \$CPPFLAGS -c syncline.c"
   33886 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c syncline.c" "synclines.at:249"
   33887 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c syncline.c
   33888 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33889 at_status=$? at_failed=false
   33890 $at_check_filter
   33891 echo stderr:; tee stderr <"$at_stderr"
   33892 at_fn_diff_devnull "$at_stdout" || at_failed=:
   33893 at_fn_check_skip $at_status "$at_srcdir/synclines.at:249"
   33894 $at_failed && at_fn_log_failure
   33895 $at_traceon; }
   33896 
   33897 
   33898 # Transform stderr into something like this:
   33899 #
   33900 #   input.y:4: #error "4"
   33901 #
   33902 # In case GCC displays column information, strip it down.
   33903 #
   33904 #   input.y:4:2: #error "4"    or
   33905 #   input.y:4.2: #error "4"    or
   33906 #   input.y:4:2: error: #error "4"
   33907 # =>
   33908 #   input.y:4: #error "4"
   33909 #
   33910 # It may also issue more context information:
   33911 #
   33912 #   input.y: In function 'yyparse':
   33913 #   input.y:8: #error "8"
   33914 # =>
   33915 #   input.y:4: #error "8"
   33916 #
   33917 # The message may include a caret-error (indented by GCC 4.8,
   33918 # not by clang 3.2):
   33919 #
   33920 #   input.y:1:2: error: #error "1"
   33921 #    #error "1"
   33922 #     ^
   33923 #
   33924 # Possibly distcc adds its bits.
   33925 #
   33926 #   distcc[33187] ERROR: compile (null) on localhost failed
   33927 #   syncline.c:1:2: error: #error "1"
   33928 #   distcc[33185] ERROR: compile syncline.c on localhost failed
   33929 #
   33930 # or even
   33931 #
   33932 #   distcc[35882] (dcc_connect_by_name) ERROR: failed to look up host "chrisimac": Unknown host
   33933 #   distcc[35882] Warning: failed to distribute input.c to chrisimac/4, running locally instead
   33934 #
   33935 # The compiler might end by the number of messages issued (Clang 3.2):
   33936 #
   33937 #    syncline.c:1:2: error: "1"
   33938 #    #error "1"
   33939 #     ^
   33940 #    1 error generated.
   33941 #
   33942 # When c++ is used to compiler C, we might have more messages (Clang 3.2):
   33943 #
   33944 #    clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
   33945 
   33946 { set +x
   33947 $as_echo "$at_srcdir/synclines.at:249: \$PERL -p -0777 - stderr <<\\EOF
   33948   # 1. Remove useless lines.
   33949 
   33950   # distcc clutter.
   33951   s/^distcc\\[\\d+\\] .*\\n//gm;
   33952   # c vs. c++.
   33953   s/^clang: warning: treating 'c' input as 'c\\+\\+'.*\\n//gm;
   33954   # Function context.
   33955   s/^[^:]*: In function '[^']+':\\n//gm;
   33956   # Caret error.
   33957   s/^ *#error.*\\n *\\^\\n//gm;
   33958   # Number of errors.
   33959   s/^1 error generated\\.\\n//gm;
   33960 
   33961   # 2. Normalize the lines we kept.
   33962 
   33963   # Remove column.
   33964   s/^([^:]+:\\d+)[.:][^:]+:(.+)\$/\$1:\$2/gm;
   33965   # Map all combinations of \"error: \" and \"#error: \" to \"#error \".
   33966   s/^([^:]+:\\d+):( |#error|error|:)+/\$1: #error /gm;
   33967 EOF
   33968 "
   33969 at_fn_check_prepare_notrace 'an embedded newline' "synclines.at:249"
   33970 ( $at_check_trace; $PERL -p -0777 - stderr <<\EOF
   33971   # 1. Remove useless lines.
   33972 
   33973   # distcc clutter.
   33974   s/^distcc\[\d+\] .*\n//gm;
   33975   # c vs. c++.
   33976   s/^clang: warning: treating 'c' input as 'c\+\+'.*\n//gm;
   33977   # Function context.
   33978   s/^[^:]*: In function '[^']+':\n//gm;
   33979   # Caret error.
   33980   s/^ *#error.*\n *\^\n//gm;
   33981   # Number of errors.
   33982   s/^1 error generated\.\n//gm;
   33983 
   33984   # 2. Normalize the lines we kept.
   33985 
   33986   # Remove column.
   33987   s/^([^:]+:\d+)[.:][^:]+:(.+)$/$1:$2/gm;
   33988   # Map all combinations of "error: " and "#error: " to "#error ".
   33989   s/^([^:]+:\d+):( |#error|error|:)+/$1: #error /gm;
   33990 EOF
   33991 
   33992 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   33993 at_status=$? at_failed=false
   33994 $at_check_filter
   33995 at_fn_diff_devnull "$at_stderr" || at_failed=:
   33996 echo stdout:; tee stdout <"$at_stdout"
   33997 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:249"
   33998 $at_failed && at_fn_log_failure
   33999 $at_traceon; }
   34000 
   34001 
   34002 { set +x
   34003 $as_echo "$at_srcdir/synclines.at:249: test \"\`cat stdout\`\" = 'syncline.c:1: #error \"1\"' || exit 77"
   34004 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:249"
   34005 ( $at_check_trace; test "`cat stdout`" = 'syncline.c:1: #error "1"' || exit 77
   34006 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34007 at_status=$? at_failed=false
   34008 $at_check_filter
   34009 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34010 at_fn_diff_devnull "$at_stdout" || at_failed=:
   34011 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:249"
   34012 $at_failed && at_fn_log_failure
   34013 $at_traceon; }
   34014 
   34015 
   34016 cat >input.y <<'_ATEOF'
   34017 %code top {
   34018 #error "2"
   34019 }
   34020 %{
   34021 void yyerror ( const char *msg);
   34022 int yylex (void);
   34023 %}
   34024 %%
   34025 exp: '0';
   34026 %%
   34027 _ATEOF
   34028 
   34029 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   34030   at_save_special_files
   34031   mkdir xml-tests
   34032     # Don't combine these Bison invocations since we want to be sure that
   34033   # --report=all isn't required to get the full XML file.
   34034   { set +x
   34035 $as_echo "$at_srcdir/synclines.at:249: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   34036                   --graph=xml-tests/test.dot -o input.c input.y"
   34037 at_fn_check_prepare_notrace 'an embedded newline' "synclines.at:249"
   34038 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   34039                   --graph=xml-tests/test.dot -o input.c input.y
   34040 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34041 at_status=$? at_failed=false
   34042 $at_check_filter
   34043 echo stderr:; cat "$at_stderr"
   34044 echo stdout:; cat "$at_stdout"
   34045 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:249"
   34046 $at_failed && at_fn_log_failure
   34047 $at_traceon; }
   34048 
   34049   { set +x
   34050 $as_echo "$at_srcdir/synclines.at:249: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   34051 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "synclines.at:249"
   34052 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   34053 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34054 at_status=$? at_failed=false
   34055 $at_check_filter
   34056 echo stderr:; cat "$at_stderr"
   34057 echo stdout:; cat "$at_stdout"
   34058 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:249"
   34059 $at_failed && at_fn_log_failure
   34060 $at_traceon; }
   34061 
   34062     cp xml-tests/test.output expout
   34063   { set +x
   34064 $as_echo "$at_srcdir/synclines.at:249: \$XSLTPROC \\
   34065              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   34066              xml-tests/test.xml"
   34067 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:249"
   34068 ( $at_check_trace; $XSLTPROC \
   34069              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   34070              xml-tests/test.xml
   34071 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34072 at_status=$? at_failed=false
   34073 $at_check_filter
   34074 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34075 $at_diff expout "$at_stdout" || at_failed=:
   34076 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:249"
   34077 $at_failed && at_fn_log_failure
   34078 $at_traceon; }
   34079 
   34080   sort xml-tests/test.dot > expout
   34081   { set +x
   34082 $as_echo "$at_srcdir/synclines.at:249: \$XSLTPROC \\
   34083              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   34084              xml-tests/test.xml | sort"
   34085 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:249"
   34086 ( $at_check_trace; $XSLTPROC \
   34087              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   34088              xml-tests/test.xml | sort
   34089 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34090 at_status=$? at_failed=false
   34091 $at_check_filter
   34092 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34093 $at_diff expout "$at_stdout" || at_failed=:
   34094 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:249"
   34095 $at_failed && at_fn_log_failure
   34096 $at_traceon; }
   34097 
   34098   rm -rf xml-tests expout
   34099   at_restore_special_files
   34100 fi
   34101 { set +x
   34102 $as_echo "$at_srcdir/synclines.at:249: bison -o input.c input.y"
   34103 at_fn_check_prepare_trace "synclines.at:249"
   34104 ( $at_check_trace; bison -o input.c input.y
   34105 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34106 at_status=$? at_failed=false
   34107 $at_check_filter
   34108 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34109 at_fn_diff_devnull "$at_stdout" || at_failed=:
   34110 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:249"
   34111 $at_failed && at_fn_log_failure
   34112 $at_traceon; }
   34113 
   34114 
   34115 { set +x
   34116 $as_echo "$at_srcdir/synclines.at:249: \$CC \$CFLAGS \$CPPFLAGS -c input.c"
   34117 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c input.c" "synclines.at:249"
   34118 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c input.c
   34119 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34120 at_status=$? at_failed=false
   34121 $at_check_filter
   34122 echo stderr:; tee stderr <"$at_stderr"
   34123 at_fn_diff_devnull "$at_stdout" || at_failed=:
   34124 at_fn_check_skip $at_status "$at_srcdir/synclines.at:249"
   34125 $at_failed && at_fn_log_failure
   34126 $at_traceon; }
   34127 
   34128 
   34129 # Transform stderr into something like this:
   34130 #
   34131 #   input.y:4: #error "4"
   34132 #
   34133 # In case GCC displays column information, strip it down.
   34134 #
   34135 #   input.y:4:2: #error "4"    or
   34136 #   input.y:4.2: #error "4"    or
   34137 #   input.y:4:2: error: #error "4"
   34138 # =>
   34139 #   input.y:4: #error "4"
   34140 #
   34141 # It may also issue more context information:
   34142 #
   34143 #   input.y: In function 'yyparse':
   34144 #   input.y:8: #error "8"
   34145 # =>
   34146 #   input.y:4: #error "8"
   34147 #
   34148 # The message may include a caret-error (indented by GCC 4.8,
   34149 # not by clang 3.2):
   34150 #
   34151 #   input.y:1:2: error: #error "1"
   34152 #    #error "1"
   34153 #     ^
   34154 #
   34155 # Possibly distcc adds its bits.
   34156 #
   34157 #   distcc[33187] ERROR: compile (null) on localhost failed
   34158 #   syncline.c:1:2: error: #error "1"
   34159 #   distcc[33185] ERROR: compile syncline.c on localhost failed
   34160 #
   34161 # or even
   34162 #
   34163 #   distcc[35882] (dcc_connect_by_name) ERROR: failed to look up host "chrisimac": Unknown host
   34164 #   distcc[35882] Warning: failed to distribute input.c to chrisimac/4, running locally instead
   34165 #
   34166 # The compiler might end by the number of messages issued (Clang 3.2):
   34167 #
   34168 #    syncline.c:1:2: error: "1"
   34169 #    #error "1"
   34170 #     ^
   34171 #    1 error generated.
   34172 #
   34173 # When c++ is used to compiler C, we might have more messages (Clang 3.2):
   34174 #
   34175 #    clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
   34176 
   34177 { set +x
   34178 $as_echo "$at_srcdir/synclines.at:249: \$PERL -p -0777 - stderr <<\\EOF
   34179   # 1. Remove useless lines.
   34180 
   34181   # distcc clutter.
   34182   s/^distcc\\[\\d+\\] .*\\n//gm;
   34183   # c vs. c++.
   34184   s/^clang: warning: treating 'c' input as 'c\\+\\+'.*\\n//gm;
   34185   # Function context.
   34186   s/^[^:]*: In function '[^']+':\\n//gm;
   34187   # Caret error.
   34188   s/^ *#error.*\\n *\\^\\n//gm;
   34189   # Number of errors.
   34190   s/^1 error generated\\.\\n//gm;
   34191 
   34192   # 2. Normalize the lines we kept.
   34193 
   34194   # Remove column.
   34195   s/^([^:]+:\\d+)[.:][^:]+:(.+)\$/\$1:\$2/gm;
   34196   # Map all combinations of \"error: \" and \"#error: \" to \"#error \".
   34197   s/^([^:]+:\\d+):( |#error|error|:)+/\$1: #error /gm;
   34198 EOF
   34199 "
   34200 at_fn_check_prepare_notrace 'an embedded newline' "synclines.at:249"
   34201 ( $at_check_trace; $PERL -p -0777 - stderr <<\EOF
   34202   # 1. Remove useless lines.
   34203 
   34204   # distcc clutter.
   34205   s/^distcc\[\d+\] .*\n//gm;
   34206   # c vs. c++.
   34207   s/^clang: warning: treating 'c' input as 'c\+\+'.*\n//gm;
   34208   # Function context.
   34209   s/^[^:]*: In function '[^']+':\n//gm;
   34210   # Caret error.
   34211   s/^ *#error.*\n *\^\n//gm;
   34212   # Number of errors.
   34213   s/^1 error generated\.\n//gm;
   34214 
   34215   # 2. Normalize the lines we kept.
   34216 
   34217   # Remove column.
   34218   s/^([^:]+:\d+)[.:][^:]+:(.+)$/$1:$2/gm;
   34219   # Map all combinations of "error: " and "#error: " to "#error ".
   34220   s/^([^:]+:\d+):( |#error|error|:)+/$1: #error /gm;
   34221 EOF
   34222 
   34223 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34224 at_status=$? at_failed=false
   34225 $at_check_filter
   34226 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34227 echo stdout:; tee stdout <"$at_stdout"
   34228 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:249"
   34229 $at_failed && at_fn_log_failure
   34230 $at_traceon; }
   34231 
   34232 
   34233 { set +x
   34234 $as_echo "$at_srcdir/synclines.at:249: cat stdout"
   34235 at_fn_check_prepare_trace "synclines.at:249"
   34236 ( $at_check_trace; cat stdout
   34237 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34238 at_status=$? at_failed=false
   34239 $at_check_filter
   34240 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34241 echo >>"$at_stdout"; $as_echo "input.y:2: #error \"2\"
   34242 " | \
   34243   $at_diff - "$at_stdout" || at_failed=:
   34244 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:249"
   34245 $at_failed && at_fn_log_failure
   34246 $at_traceon; }
   34247 
   34248 
   34249   set +x
   34250   $at_times_p && times >"$at_times_file"
   34251 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   34252 read at_status <"$at_status_file"
   34253 #AT_STOP_133
   34254 #AT_START_134
   34255 at_fn_group_banner 134 'synclines.at:290' \
   34256   "%no-lines" "                                      " 7
   34257 at_xfail=no
   34258 (
   34259   $as_echo "134. $at_setup_line: testing $at_desc ..."
   34260   $at_traceon
   34261 
   34262 
   34263 
   34264 cat >input.y <<'_ATEOF'
   34265 %code top {
   34266 #include <config.h>
   34267 /* We don't need perfect functions for these tests. */
   34268 #undef malloc
   34269 #undef memcmp
   34270 #undef realloc
   34271 }
   34272 
   34273 %skeleton "yacc.c" %defines
   34274 %{
   34275 void yyerror ( const char *msg);
   34276 int yylex (void);
   34277 %}
   34278 %%
   34279 exp: '0'
   34280 _ATEOF
   34281 
   34282 
   34283 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   34284   at_save_special_files
   34285   mkdir xml-tests
   34286     # Don't combine these Bison invocations since we want to be sure that
   34287   # --report=all isn't required to get the full XML file.
   34288   { set +x
   34289 $as_echo "$at_srcdir/synclines.at:290: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   34290                   --graph=xml-tests/test.dot --no-lines -o input.c -d input.y"
   34291 at_fn_check_prepare_notrace 'an embedded newline' "synclines.at:290"
   34292 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   34293                   --graph=xml-tests/test.dot --no-lines -o input.c -d input.y
   34294 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34295 at_status=$? at_failed=false
   34296 $at_check_filter
   34297 echo stderr:; cat "$at_stderr"
   34298 echo stdout:; cat "$at_stdout"
   34299 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:290"
   34300 $at_failed && at_fn_log_failure
   34301 $at_traceon; }
   34302 
   34303   { set +x
   34304 $as_echo "$at_srcdir/synclines.at:290: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --no-lines -o input.c -d input.y"
   34305 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --no-lines -o input.c -d input.y" "synclines.at:290"
   34306 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --no-lines -o input.c -d input.y
   34307 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34308 at_status=$? at_failed=false
   34309 $at_check_filter
   34310 echo stderr:; cat "$at_stderr"
   34311 echo stdout:; cat "$at_stdout"
   34312 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:290"
   34313 $at_failed && at_fn_log_failure
   34314 $at_traceon; }
   34315 
   34316     cp xml-tests/test.output expout
   34317   { set +x
   34318 $as_echo "$at_srcdir/synclines.at:290: \$XSLTPROC \\
   34319              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   34320              xml-tests/test.xml"
   34321 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:290"
   34322 ( $at_check_trace; $XSLTPROC \
   34323              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   34324              xml-tests/test.xml
   34325 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34326 at_status=$? at_failed=false
   34327 $at_check_filter
   34328 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34329 $at_diff expout "$at_stdout" || at_failed=:
   34330 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:290"
   34331 $at_failed && at_fn_log_failure
   34332 $at_traceon; }
   34333 
   34334   sort xml-tests/test.dot > expout
   34335   { set +x
   34336 $as_echo "$at_srcdir/synclines.at:290: \$XSLTPROC \\
   34337              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   34338              xml-tests/test.xml | sort"
   34339 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:290"
   34340 ( $at_check_trace; $XSLTPROC \
   34341              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   34342              xml-tests/test.xml | sort
   34343 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34344 at_status=$? at_failed=false
   34345 $at_check_filter
   34346 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34347 $at_diff expout "$at_stdout" || at_failed=:
   34348 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:290"
   34349 $at_failed && at_fn_log_failure
   34350 $at_traceon; }
   34351 
   34352   rm -rf xml-tests expout
   34353   at_restore_special_files
   34354 fi
   34355 { set +x
   34356 $as_echo "$at_srcdir/synclines.at:290: bison --no-lines -o input.c -d input.y"
   34357 at_fn_check_prepare_trace "synclines.at:290"
   34358 ( $at_check_trace; bison --no-lines -o input.c -d input.y
   34359 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34360 at_status=$? at_failed=false
   34361 $at_check_filter
   34362 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34363 at_fn_diff_devnull "$at_stdout" || at_failed=:
   34364 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:290"
   34365 $at_failed && at_fn_log_failure
   34366 $at_traceon; }
   34367 
   34368 
   34369 { set +x
   34370 $as_echo "$at_srcdir/synclines.at:290: grep '#line' *.c *.h"
   34371 at_fn_check_prepare_trace "synclines.at:290"
   34372 ( $at_check_trace; grep '#line' *.c *.h
   34373 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34374 at_status=$? at_failed=false
   34375 $at_check_filter
   34376 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34377 at_fn_diff_devnull "$at_stdout" || at_failed=:
   34378 at_fn_check_status 1 $at_status "$at_srcdir/synclines.at:290"
   34379 $at_failed && at_fn_log_failure
   34380 $at_traceon; }
   34381 
   34382 
   34383 
   34384   set +x
   34385   $at_times_p && times >"$at_times_file"
   34386 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   34387 read at_status <"$at_status_file"
   34388 #AT_STOP_134
   34389 #AT_START_135
   34390 at_fn_group_banner 135 'synclines.at:291' \
   34391   "%no-lines" "                                      " 7
   34392 at_xfail=no
   34393 (
   34394   $as_echo "135. $at_setup_line: testing $at_desc ..."
   34395   $at_traceon
   34396 
   34397 
   34398 
   34399 cat >input.y <<'_ATEOF'
   34400 %code top {
   34401 #include <config.h>
   34402 /* We don't need perfect functions for these tests. */
   34403 #undef malloc
   34404 #undef memcmp
   34405 #undef realloc
   34406 }
   34407 
   34408 %skeleton "glr.c" %defines
   34409 %{
   34410 void yyerror ( const char *msg);
   34411 int yylex (void);
   34412 %}
   34413 %%
   34414 exp: '0'
   34415 _ATEOF
   34416 
   34417 
   34418 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   34419   at_save_special_files
   34420   mkdir xml-tests
   34421     # Don't combine these Bison invocations since we want to be sure that
   34422   # --report=all isn't required to get the full XML file.
   34423   { set +x
   34424 $as_echo "$at_srcdir/synclines.at:291: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   34425                   --graph=xml-tests/test.dot --no-lines -o input.c -d input.y"
   34426 at_fn_check_prepare_notrace 'an embedded newline' "synclines.at:291"
   34427 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   34428                   --graph=xml-tests/test.dot --no-lines -o input.c -d input.y
   34429 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34430 at_status=$? at_failed=false
   34431 $at_check_filter
   34432 echo stderr:; cat "$at_stderr"
   34433 echo stdout:; cat "$at_stdout"
   34434 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:291"
   34435 $at_failed && at_fn_log_failure
   34436 $at_traceon; }
   34437 
   34438   { set +x
   34439 $as_echo "$at_srcdir/synclines.at:291: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --no-lines -o input.c -d input.y"
   34440 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --no-lines -o input.c -d input.y" "synclines.at:291"
   34441 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --no-lines -o input.c -d input.y
   34442 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34443 at_status=$? at_failed=false
   34444 $at_check_filter
   34445 echo stderr:; cat "$at_stderr"
   34446 echo stdout:; cat "$at_stdout"
   34447 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:291"
   34448 $at_failed && at_fn_log_failure
   34449 $at_traceon; }
   34450 
   34451     cp xml-tests/test.output expout
   34452   { set +x
   34453 $as_echo "$at_srcdir/synclines.at:291: \$XSLTPROC \\
   34454              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   34455              xml-tests/test.xml"
   34456 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:291"
   34457 ( $at_check_trace; $XSLTPROC \
   34458              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   34459              xml-tests/test.xml
   34460 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34461 at_status=$? at_failed=false
   34462 $at_check_filter
   34463 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34464 $at_diff expout "$at_stdout" || at_failed=:
   34465 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:291"
   34466 $at_failed && at_fn_log_failure
   34467 $at_traceon; }
   34468 
   34469   sort xml-tests/test.dot > expout
   34470   { set +x
   34471 $as_echo "$at_srcdir/synclines.at:291: \$XSLTPROC \\
   34472              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   34473              xml-tests/test.xml | sort"
   34474 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:291"
   34475 ( $at_check_trace; $XSLTPROC \
   34476              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   34477              xml-tests/test.xml | sort
   34478 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34479 at_status=$? at_failed=false
   34480 $at_check_filter
   34481 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34482 $at_diff expout "$at_stdout" || at_failed=:
   34483 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:291"
   34484 $at_failed && at_fn_log_failure
   34485 $at_traceon; }
   34486 
   34487   rm -rf xml-tests expout
   34488   at_restore_special_files
   34489 fi
   34490 { set +x
   34491 $as_echo "$at_srcdir/synclines.at:291: bison --no-lines -o input.c -d input.y"
   34492 at_fn_check_prepare_trace "synclines.at:291"
   34493 ( $at_check_trace; bison --no-lines -o input.c -d input.y
   34494 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34495 at_status=$? at_failed=false
   34496 $at_check_filter
   34497 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34498 at_fn_diff_devnull "$at_stdout" || at_failed=:
   34499 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:291"
   34500 $at_failed && at_fn_log_failure
   34501 $at_traceon; }
   34502 
   34503 
   34504 { set +x
   34505 $as_echo "$at_srcdir/synclines.at:291: grep '#line' *.c *.h"
   34506 at_fn_check_prepare_trace "synclines.at:291"
   34507 ( $at_check_trace; grep '#line' *.c *.h
   34508 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34509 at_status=$? at_failed=false
   34510 $at_check_filter
   34511 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34512 at_fn_diff_devnull "$at_stdout" || at_failed=:
   34513 at_fn_check_status 1 $at_status "$at_srcdir/synclines.at:291"
   34514 $at_failed && at_fn_log_failure
   34515 $at_traceon; }
   34516 
   34517 
   34518 
   34519   set +x
   34520   $at_times_p && times >"$at_times_file"
   34521 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   34522 read at_status <"$at_status_file"
   34523 #AT_STOP_135
   34524 #AT_START_136
   34525 at_fn_group_banner 136 'synclines.at:292' \
   34526   "%no-lines" "                                      " 7
   34527 at_xfail=no
   34528 (
   34529   $as_echo "136. $at_setup_line: testing $at_desc ..."
   34530   $at_traceon
   34531 
   34532 
   34533 
   34534 cat >input.y <<'_ATEOF'
   34535 %code top {
   34536 #include <config.h>
   34537 /* We don't need perfect functions for these tests. */
   34538 #undef malloc
   34539 #undef memcmp
   34540 #undef realloc
   34541 }
   34542 
   34543 %skeleton "lalr1.cc" %defines
   34544 %{
   34545 
   34546 int yylex (yy::parser::semantic_type *lvalp);
   34547 %}
   34548 %%
   34549 exp: '0'
   34550 _ATEOF
   34551 
   34552 
   34553 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   34554   at_save_special_files
   34555   mkdir xml-tests
   34556     # Don't combine these Bison invocations since we want to be sure that
   34557   # --report=all isn't required to get the full XML file.
   34558   { set +x
   34559 $as_echo "$at_srcdir/synclines.at:292: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   34560                   --graph=xml-tests/test.dot --no-lines -o input.cc -d input.y"
   34561 at_fn_check_prepare_notrace 'an embedded newline' "synclines.at:292"
   34562 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   34563                   --graph=xml-tests/test.dot --no-lines -o input.cc -d input.y
   34564 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34565 at_status=$? at_failed=false
   34566 $at_check_filter
   34567 echo stderr:; cat "$at_stderr"
   34568 echo stdout:; cat "$at_stdout"
   34569 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:292"
   34570 $at_failed && at_fn_log_failure
   34571 $at_traceon; }
   34572 
   34573   { set +x
   34574 $as_echo "$at_srcdir/synclines.at:292: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --no-lines -o input.cc -d input.y"
   34575 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --no-lines -o input.cc -d input.y" "synclines.at:292"
   34576 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --no-lines -o input.cc -d input.y
   34577 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34578 at_status=$? at_failed=false
   34579 $at_check_filter
   34580 echo stderr:; cat "$at_stderr"
   34581 echo stdout:; cat "$at_stdout"
   34582 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:292"
   34583 $at_failed && at_fn_log_failure
   34584 $at_traceon; }
   34585 
   34586     cp xml-tests/test.output expout
   34587   { set +x
   34588 $as_echo "$at_srcdir/synclines.at:292: \$XSLTPROC \\
   34589              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   34590              xml-tests/test.xml"
   34591 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:292"
   34592 ( $at_check_trace; $XSLTPROC \
   34593              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   34594              xml-tests/test.xml
   34595 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34596 at_status=$? at_failed=false
   34597 $at_check_filter
   34598 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34599 $at_diff expout "$at_stdout" || at_failed=:
   34600 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:292"
   34601 $at_failed && at_fn_log_failure
   34602 $at_traceon; }
   34603 
   34604   sort xml-tests/test.dot > expout
   34605   { set +x
   34606 $as_echo "$at_srcdir/synclines.at:292: \$XSLTPROC \\
   34607              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   34608              xml-tests/test.xml | sort"
   34609 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:292"
   34610 ( $at_check_trace; $XSLTPROC \
   34611              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   34612              xml-tests/test.xml | sort
   34613 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34614 at_status=$? at_failed=false
   34615 $at_check_filter
   34616 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34617 $at_diff expout "$at_stdout" || at_failed=:
   34618 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:292"
   34619 $at_failed && at_fn_log_failure
   34620 $at_traceon; }
   34621 
   34622   rm -rf xml-tests expout
   34623   at_restore_special_files
   34624 fi
   34625 { set +x
   34626 $as_echo "$at_srcdir/synclines.at:292: bison --no-lines -o input.cc -d input.y"
   34627 at_fn_check_prepare_trace "synclines.at:292"
   34628 ( $at_check_trace; bison --no-lines -o input.cc -d input.y
   34629 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34630 at_status=$? at_failed=false
   34631 $at_check_filter
   34632 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34633 at_fn_diff_devnull "$at_stdout" || at_failed=:
   34634 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:292"
   34635 $at_failed && at_fn_log_failure
   34636 $at_traceon; }
   34637 
   34638 
   34639 { set +x
   34640 $as_echo "$at_srcdir/synclines.at:292: grep '#line' *.cc *.hh"
   34641 at_fn_check_prepare_trace "synclines.at:292"
   34642 ( $at_check_trace; grep '#line' *.cc *.hh
   34643 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34644 at_status=$? at_failed=false
   34645 $at_check_filter
   34646 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34647 at_fn_diff_devnull "$at_stdout" || at_failed=:
   34648 at_fn_check_status 1 $at_status "$at_srcdir/synclines.at:292"
   34649 $at_failed && at_fn_log_failure
   34650 $at_traceon; }
   34651 
   34652 
   34653 
   34654   set +x
   34655   $at_times_p && times >"$at_times_file"
   34656 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   34657 read at_status <"$at_status_file"
   34658 #AT_STOP_136
   34659 #AT_START_137
   34660 at_fn_group_banner 137 'synclines.at:293' \
   34661   "%no-lines" "                                      " 7
   34662 at_xfail=no
   34663 (
   34664   $as_echo "137. $at_setup_line: testing $at_desc ..."
   34665   $at_traceon
   34666 
   34667 
   34668 
   34669 cat >input.y <<'_ATEOF'
   34670 %code top {
   34671 #include <config.h>
   34672 /* We don't need perfect functions for these tests. */
   34673 #undef malloc
   34674 #undef memcmp
   34675 #undef realloc
   34676 }
   34677 
   34678 %skeleton "glr.cc" %defines
   34679 %{
   34680 
   34681 int yylex (yy::parser::semantic_type *lvalp);
   34682 %}
   34683 %%
   34684 exp: '0'
   34685 _ATEOF
   34686 
   34687 
   34688 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   34689   at_save_special_files
   34690   mkdir xml-tests
   34691     # Don't combine these Bison invocations since we want to be sure that
   34692   # --report=all isn't required to get the full XML file.
   34693   { set +x
   34694 $as_echo "$at_srcdir/synclines.at:293: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   34695                   --graph=xml-tests/test.dot --no-lines -o input.cc -d input.y"
   34696 at_fn_check_prepare_notrace 'an embedded newline' "synclines.at:293"
   34697 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   34698                   --graph=xml-tests/test.dot --no-lines -o input.cc -d input.y
   34699 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34700 at_status=$? at_failed=false
   34701 $at_check_filter
   34702 echo stderr:; cat "$at_stderr"
   34703 echo stdout:; cat "$at_stdout"
   34704 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:293"
   34705 $at_failed && at_fn_log_failure
   34706 $at_traceon; }
   34707 
   34708   { set +x
   34709 $as_echo "$at_srcdir/synclines.at:293: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --no-lines -o input.cc -d input.y"
   34710 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --no-lines -o input.cc -d input.y" "synclines.at:293"
   34711 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --no-lines -o input.cc -d input.y
   34712 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34713 at_status=$? at_failed=false
   34714 $at_check_filter
   34715 echo stderr:; cat "$at_stderr"
   34716 echo stdout:; cat "$at_stdout"
   34717 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:293"
   34718 $at_failed && at_fn_log_failure
   34719 $at_traceon; }
   34720 
   34721     cp xml-tests/test.output expout
   34722   { set +x
   34723 $as_echo "$at_srcdir/synclines.at:293: \$XSLTPROC \\
   34724              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   34725              xml-tests/test.xml"
   34726 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:293"
   34727 ( $at_check_trace; $XSLTPROC \
   34728              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   34729              xml-tests/test.xml
   34730 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34731 at_status=$? at_failed=false
   34732 $at_check_filter
   34733 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34734 $at_diff expout "$at_stdout" || at_failed=:
   34735 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:293"
   34736 $at_failed && at_fn_log_failure
   34737 $at_traceon; }
   34738 
   34739   sort xml-tests/test.dot > expout
   34740   { set +x
   34741 $as_echo "$at_srcdir/synclines.at:293: \$XSLTPROC \\
   34742              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   34743              xml-tests/test.xml | sort"
   34744 at_fn_check_prepare_notrace 'a `...` command substitution' "synclines.at:293"
   34745 ( $at_check_trace; $XSLTPROC \
   34746              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   34747              xml-tests/test.xml | sort
   34748 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34749 at_status=$? at_failed=false
   34750 $at_check_filter
   34751 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34752 $at_diff expout "$at_stdout" || at_failed=:
   34753 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:293"
   34754 $at_failed && at_fn_log_failure
   34755 $at_traceon; }
   34756 
   34757   rm -rf xml-tests expout
   34758   at_restore_special_files
   34759 fi
   34760 { set +x
   34761 $as_echo "$at_srcdir/synclines.at:293: bison --no-lines -o input.cc -d input.y"
   34762 at_fn_check_prepare_trace "synclines.at:293"
   34763 ( $at_check_trace; bison --no-lines -o input.cc -d input.y
   34764 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34765 at_status=$? at_failed=false
   34766 $at_check_filter
   34767 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34768 at_fn_diff_devnull "$at_stdout" || at_failed=:
   34769 at_fn_check_status 0 $at_status "$at_srcdir/synclines.at:293"
   34770 $at_failed && at_fn_log_failure
   34771 $at_traceon; }
   34772 
   34773 
   34774 { set +x
   34775 $as_echo "$at_srcdir/synclines.at:293: grep '#line' *.cc *.hh"
   34776 at_fn_check_prepare_trace "synclines.at:293"
   34777 ( $at_check_trace; grep '#line' *.cc *.hh
   34778 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34779 at_status=$? at_failed=false
   34780 $at_check_filter
   34781 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34782 at_fn_diff_devnull "$at_stdout" || at_failed=:
   34783 at_fn_check_status 1 $at_status "$at_srcdir/synclines.at:293"
   34784 $at_failed && at_fn_log_failure
   34785 $at_traceon; }
   34786 
   34787 
   34788 
   34789   set +x
   34790   $at_times_p && times >"$at_times_file"
   34791 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   34792 read at_status <"$at_status_file"
   34793 #AT_STOP_137
   34794 #AT_START_138
   34795 at_fn_group_banner 138 'headers.at:57' \
   34796   "Invalid CPP guards:  --defines=input/input.h" "   " 8
   34797 at_xfail=no
   34798 (
   34799   $as_echo "138. $at_setup_line: testing $at_desc ..."
   34800   $at_traceon
   34801 
   34802 
   34803 # Possibly create inner directories.
   34804 dirname=`$as_dirname -- input/input ||
   34805 $as_expr Xinput/input : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
   34806 	 Xinput/input : 'X\(//\)[^/]' \| \
   34807 	 Xinput/input : 'X\(//\)$' \| \
   34808 	 Xinput/input : 'X\(/\)' \| . 2>/dev/null ||
   34809 $as_echo Xinput/input |
   34810     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
   34811 	    s//\1/
   34812 	    q
   34813 	  }
   34814 	  /^X\(\/\/\)[^/].*/{
   34815 	    s//\1/
   34816 	    q
   34817 	  }
   34818 	  /^X\(\/\/\)$/{
   34819 	    s//\1/
   34820 	    q
   34821 	  }
   34822 	  /^X\(\/\).*/{
   34823 	    s//\1/
   34824 	    q
   34825 	  }
   34826 	  s/.*/./; q'`
   34827 as_dir=$dirname; as_fn_mkdir_p
   34828 
   34829 cat >input/input.y <<'_ATEOF'
   34830 %code top {
   34831 #include <config.h>
   34832 /* We don't need perfect functions for these tests. */
   34833 #undef malloc
   34834 #undef memcmp
   34835 #undef realloc
   34836 }
   34837 
   34838 
   34839 %{
   34840 #include <input/input.h>
   34841 void yyerror ( const char *msg);
   34842 int yylex (void);
   34843 %}
   34844 %%
   34845 dummy:;
   34846 %%
   34847 #include <input/input.h>
   34848 _ATEOF
   34849 
   34850 
   34851 
   34852 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   34853   at_save_special_files
   34854   mkdir xml-tests
   34855     # Don't combine these Bison invocations since we want to be sure that
   34856   # --report=all isn't required to get the full XML file.
   34857   { set +x
   34858 $as_echo "$at_srcdir/headers.at:57: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   34859                   --graph=xml-tests/test.dot --defines=input/input.h --output=input/input.c input/input.y"
   34860 at_fn_check_prepare_notrace 'an embedded newline' "headers.at:57"
   34861 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   34862                   --graph=xml-tests/test.dot --defines=input/input.h --output=input/input.c input/input.y
   34863 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34864 at_status=$? at_failed=false
   34865 $at_check_filter
   34866 echo stderr:; cat "$at_stderr"
   34867 echo stdout:; cat "$at_stdout"
   34868 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:57"
   34869 $at_failed && at_fn_log_failure
   34870 $at_traceon; }
   34871 
   34872   { set +x
   34873 $as_echo "$at_srcdir/headers.at:57: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --defines=input/input.h --output=input/input.c input/input.y"
   34874 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --defines=input/input.h --output=input/input.c input/input.y" "headers.at:57"
   34875 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --defines=input/input.h --output=input/input.c input/input.y
   34876 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34877 at_status=$? at_failed=false
   34878 $at_check_filter
   34879 echo stderr:; cat "$at_stderr"
   34880 echo stdout:; cat "$at_stdout"
   34881 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:57"
   34882 $at_failed && at_fn_log_failure
   34883 $at_traceon; }
   34884 
   34885     cp xml-tests/test.output expout
   34886   { set +x
   34887 $as_echo "$at_srcdir/headers.at:57: \$XSLTPROC \\
   34888              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   34889              xml-tests/test.xml"
   34890 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:57"
   34891 ( $at_check_trace; $XSLTPROC \
   34892              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   34893              xml-tests/test.xml
   34894 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34895 at_status=$? at_failed=false
   34896 $at_check_filter
   34897 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34898 $at_diff expout "$at_stdout" || at_failed=:
   34899 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:57"
   34900 $at_failed && at_fn_log_failure
   34901 $at_traceon; }
   34902 
   34903   sort xml-tests/test.dot > expout
   34904   { set +x
   34905 $as_echo "$at_srcdir/headers.at:57: \$XSLTPROC \\
   34906              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   34907              xml-tests/test.xml | sort"
   34908 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:57"
   34909 ( $at_check_trace; $XSLTPROC \
   34910              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   34911              xml-tests/test.xml | sort
   34912 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34913 at_status=$? at_failed=false
   34914 $at_check_filter
   34915 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34916 $at_diff expout "$at_stdout" || at_failed=:
   34917 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:57"
   34918 $at_failed && at_fn_log_failure
   34919 $at_traceon; }
   34920 
   34921   rm -rf xml-tests expout
   34922   at_restore_special_files
   34923 fi
   34924 { set +x
   34925 $as_echo "$at_srcdir/headers.at:57: bison --defines=input/input.h --output=input/input.c input/input.y"
   34926 at_fn_check_prepare_trace "headers.at:57"
   34927 ( $at_check_trace; bison --defines=input/input.h --output=input/input.c input/input.y
   34928 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34929 at_status=$? at_failed=false
   34930 $at_check_filter
   34931 at_fn_diff_devnull "$at_stderr" || at_failed=:
   34932 at_fn_diff_devnull "$at_stdout" || at_failed=:
   34933 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:57"
   34934 $at_failed && at_fn_log_failure
   34935 $at_traceon; }
   34936 
   34937 
   34938 
   34939 { set +x
   34940 $as_echo "$at_srcdir/headers.at:57: \$BISON_C_WORKS"
   34941 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "headers.at:57"
   34942 ( $at_check_trace; $BISON_C_WORKS
   34943 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34944 at_status=$? at_failed=false
   34945 $at_check_filter
   34946 echo stderr:; cat "$at_stderr"
   34947 echo stdout:; cat "$at_stdout"
   34948 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:57"
   34949 $at_failed && at_fn_log_failure
   34950 $at_traceon; }
   34951 
   34952 { set +x
   34953 $as_echo "$at_srcdir/headers.at:57: \$CC \$CFLAGS \$CPPFLAGS -c -o input/input.o -I. -c input/input.c "
   34954 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o input/input.o -I. -c input/input.c " "headers.at:57"
   34955 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o input/input.o -I. -c input/input.c
   34956 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   34957 at_status=$? at_failed=false
   34958 $at_check_filter
   34959 echo stderr:; cat "$at_stderr"
   34960 echo stdout:; cat "$at_stdout"
   34961 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:57"
   34962 $at_failed && at_fn_log_failure
   34963 $at_traceon; }
   34964 
   34965 
   34966 
   34967   set +x
   34968   $at_times_p && times >"$at_times_file"
   34969 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   34970 read at_status <"$at_status_file"
   34971 #AT_STOP_138
   34972 #AT_START_139
   34973 at_fn_group_banner 139 'headers.at:58' \
   34974   "Invalid CPP guards:  --defines=9foo.h" "          " 8
   34975 at_xfail=no
   34976 (
   34977   $as_echo "139. $at_setup_line: testing $at_desc ..."
   34978   $at_traceon
   34979 
   34980 
   34981 # Possibly create inner directories.
   34982 dirname=`$as_dirname -- 9foo ||
   34983 $as_expr X9foo : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
   34984 	 X9foo : 'X\(//\)[^/]' \| \
   34985 	 X9foo : 'X\(//\)$' \| \
   34986 	 X9foo : 'X\(/\)' \| . 2>/dev/null ||
   34987 $as_echo X9foo |
   34988     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
   34989 	    s//\1/
   34990 	    q
   34991 	  }
   34992 	  /^X\(\/\/\)[^/].*/{
   34993 	    s//\1/
   34994 	    q
   34995 	  }
   34996 	  /^X\(\/\/\)$/{
   34997 	    s//\1/
   34998 	    q
   34999 	  }
   35000 	  /^X\(\/\).*/{
   35001 	    s//\1/
   35002 	    q
   35003 	  }
   35004 	  s/.*/./; q'`
   35005 as_dir=$dirname; as_fn_mkdir_p
   35006 
   35007 cat >9foo.y <<'_ATEOF'
   35008 %code top {
   35009 #include <config.h>
   35010 /* We don't need perfect functions for these tests. */
   35011 #undef malloc
   35012 #undef memcmp
   35013 #undef realloc
   35014 }
   35015 
   35016 
   35017 %{
   35018 #include <9foo.h>
   35019 void yyerror ( const char *msg);
   35020 int yylex (void);
   35021 %}
   35022 %%
   35023 dummy:;
   35024 %%
   35025 #include <9foo.h>
   35026 _ATEOF
   35027 
   35028 
   35029 
   35030 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   35031   at_save_special_files
   35032   mkdir xml-tests
   35033     # Don't combine these Bison invocations since we want to be sure that
   35034   # --report=all isn't required to get the full XML file.
   35035   { set +x
   35036 $as_echo "$at_srcdir/headers.at:58: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   35037                   --graph=xml-tests/test.dot --defines=9foo.h --output=9foo.c 9foo.y"
   35038 at_fn_check_prepare_notrace 'an embedded newline' "headers.at:58"
   35039 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   35040                   --graph=xml-tests/test.dot --defines=9foo.h --output=9foo.c 9foo.y
   35041 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35042 at_status=$? at_failed=false
   35043 $at_check_filter
   35044 echo stderr:; cat "$at_stderr"
   35045 echo stdout:; cat "$at_stdout"
   35046 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:58"
   35047 $at_failed && at_fn_log_failure
   35048 $at_traceon; }
   35049 
   35050   { set +x
   35051 $as_echo "$at_srcdir/headers.at:58: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --defines=9foo.h --output=9foo.c 9foo.y"
   35052 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --defines=9foo.h --output=9foo.c 9foo.y" "headers.at:58"
   35053 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --defines=9foo.h --output=9foo.c 9foo.y
   35054 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35055 at_status=$? at_failed=false
   35056 $at_check_filter
   35057 echo stderr:; cat "$at_stderr"
   35058 echo stdout:; cat "$at_stdout"
   35059 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:58"
   35060 $at_failed && at_fn_log_failure
   35061 $at_traceon; }
   35062 
   35063     cp xml-tests/test.output expout
   35064   { set +x
   35065 $as_echo "$at_srcdir/headers.at:58: \$XSLTPROC \\
   35066              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   35067              xml-tests/test.xml"
   35068 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:58"
   35069 ( $at_check_trace; $XSLTPROC \
   35070              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   35071              xml-tests/test.xml
   35072 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35073 at_status=$? at_failed=false
   35074 $at_check_filter
   35075 at_fn_diff_devnull "$at_stderr" || at_failed=:
   35076 $at_diff expout "$at_stdout" || at_failed=:
   35077 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:58"
   35078 $at_failed && at_fn_log_failure
   35079 $at_traceon; }
   35080 
   35081   sort xml-tests/test.dot > expout
   35082   { set +x
   35083 $as_echo "$at_srcdir/headers.at:58: \$XSLTPROC \\
   35084              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   35085              xml-tests/test.xml | sort"
   35086 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:58"
   35087 ( $at_check_trace; $XSLTPROC \
   35088              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   35089              xml-tests/test.xml | sort
   35090 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35091 at_status=$? at_failed=false
   35092 $at_check_filter
   35093 at_fn_diff_devnull "$at_stderr" || at_failed=:
   35094 $at_diff expout "$at_stdout" || at_failed=:
   35095 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:58"
   35096 $at_failed && at_fn_log_failure
   35097 $at_traceon; }
   35098 
   35099   rm -rf xml-tests expout
   35100   at_restore_special_files
   35101 fi
   35102 { set +x
   35103 $as_echo "$at_srcdir/headers.at:58: bison --defines=9foo.h --output=9foo.c 9foo.y"
   35104 at_fn_check_prepare_trace "headers.at:58"
   35105 ( $at_check_trace; bison --defines=9foo.h --output=9foo.c 9foo.y
   35106 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35107 at_status=$? at_failed=false
   35108 $at_check_filter
   35109 at_fn_diff_devnull "$at_stderr" || at_failed=:
   35110 at_fn_diff_devnull "$at_stdout" || at_failed=:
   35111 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:58"
   35112 $at_failed && at_fn_log_failure
   35113 $at_traceon; }
   35114 
   35115 
   35116 
   35117 { set +x
   35118 $as_echo "$at_srcdir/headers.at:58: \$BISON_C_WORKS"
   35119 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "headers.at:58"
   35120 ( $at_check_trace; $BISON_C_WORKS
   35121 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35122 at_status=$? at_failed=false
   35123 $at_check_filter
   35124 echo stderr:; cat "$at_stderr"
   35125 echo stdout:; cat "$at_stdout"
   35126 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:58"
   35127 $at_failed && at_fn_log_failure
   35128 $at_traceon; }
   35129 
   35130 { set +x
   35131 $as_echo "$at_srcdir/headers.at:58: \$CC \$CFLAGS \$CPPFLAGS -c -o 9foo.o -I. -c 9foo.c "
   35132 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o 9foo.o -I. -c 9foo.c " "headers.at:58"
   35133 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o 9foo.o -I. -c 9foo.c
   35134 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35135 at_status=$? at_failed=false
   35136 $at_check_filter
   35137 echo stderr:; cat "$at_stderr"
   35138 echo stdout:; cat "$at_stdout"
   35139 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:58"
   35140 $at_failed && at_fn_log_failure
   35141 $at_traceon; }
   35142 
   35143 
   35144 
   35145   set +x
   35146   $at_times_p && times >"$at_times_file"
   35147 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   35148 read at_status <"$at_status_file"
   35149 #AT_STOP_139
   35150 #AT_START_140
   35151 at_fn_group_banner 140 'headers.at:59' \
   35152   "Invalid CPP guards: %glr-parser --defines=input/input.h" "" 8
   35153 at_xfail=no
   35154 (
   35155   $as_echo "140. $at_setup_line: testing $at_desc ..."
   35156   $at_traceon
   35157 
   35158 
   35159 # Possibly create inner directories.
   35160 dirname=`$as_dirname -- input/input ||
   35161 $as_expr Xinput/input : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
   35162 	 Xinput/input : 'X\(//\)[^/]' \| \
   35163 	 Xinput/input : 'X\(//\)$' \| \
   35164 	 Xinput/input : 'X\(/\)' \| . 2>/dev/null ||
   35165 $as_echo Xinput/input |
   35166     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
   35167 	    s//\1/
   35168 	    q
   35169 	  }
   35170 	  /^X\(\/\/\)[^/].*/{
   35171 	    s//\1/
   35172 	    q
   35173 	  }
   35174 	  /^X\(\/\/\)$/{
   35175 	    s//\1/
   35176 	    q
   35177 	  }
   35178 	  /^X\(\/\).*/{
   35179 	    s//\1/
   35180 	    q
   35181 	  }
   35182 	  s/.*/./; q'`
   35183 as_dir=$dirname; as_fn_mkdir_p
   35184 
   35185 cat >input/input.y <<'_ATEOF'
   35186 %code top {
   35187 #include <config.h>
   35188 /* We don't need perfect functions for these tests. */
   35189 #undef malloc
   35190 #undef memcmp
   35191 #undef realloc
   35192 }
   35193 
   35194 %glr-parser
   35195 %{
   35196 #include <input/input.h>
   35197 void yyerror ( const char *msg);
   35198 int yylex (void);
   35199 %}
   35200 %%
   35201 dummy:;
   35202 %%
   35203 #include <input/input.h>
   35204 _ATEOF
   35205 
   35206 
   35207 
   35208 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   35209   at_save_special_files
   35210   mkdir xml-tests
   35211     # Don't combine these Bison invocations since we want to be sure that
   35212   # --report=all isn't required to get the full XML file.
   35213   { set +x
   35214 $as_echo "$at_srcdir/headers.at:59: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   35215                   --graph=xml-tests/test.dot --defines=input/input.h --output=input/input.c input/input.y"
   35216 at_fn_check_prepare_notrace 'an embedded newline' "headers.at:59"
   35217 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   35218                   --graph=xml-tests/test.dot --defines=input/input.h --output=input/input.c input/input.y
   35219 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35220 at_status=$? at_failed=false
   35221 $at_check_filter
   35222 echo stderr:; cat "$at_stderr"
   35223 echo stdout:; cat "$at_stdout"
   35224 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:59"
   35225 $at_failed && at_fn_log_failure
   35226 $at_traceon; }
   35227 
   35228   { set +x
   35229 $as_echo "$at_srcdir/headers.at:59: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --defines=input/input.h --output=input/input.c input/input.y"
   35230 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --defines=input/input.h --output=input/input.c input/input.y" "headers.at:59"
   35231 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --defines=input/input.h --output=input/input.c input/input.y
   35232 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35233 at_status=$? at_failed=false
   35234 $at_check_filter
   35235 echo stderr:; cat "$at_stderr"
   35236 echo stdout:; cat "$at_stdout"
   35237 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:59"
   35238 $at_failed && at_fn_log_failure
   35239 $at_traceon; }
   35240 
   35241     cp xml-tests/test.output expout
   35242   { set +x
   35243 $as_echo "$at_srcdir/headers.at:59: \$XSLTPROC \\
   35244              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   35245              xml-tests/test.xml"
   35246 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:59"
   35247 ( $at_check_trace; $XSLTPROC \
   35248              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   35249              xml-tests/test.xml
   35250 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35251 at_status=$? at_failed=false
   35252 $at_check_filter
   35253 at_fn_diff_devnull "$at_stderr" || at_failed=:
   35254 $at_diff expout "$at_stdout" || at_failed=:
   35255 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:59"
   35256 $at_failed && at_fn_log_failure
   35257 $at_traceon; }
   35258 
   35259   sort xml-tests/test.dot > expout
   35260   { set +x
   35261 $as_echo "$at_srcdir/headers.at:59: \$XSLTPROC \\
   35262              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   35263              xml-tests/test.xml | sort"
   35264 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:59"
   35265 ( $at_check_trace; $XSLTPROC \
   35266              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   35267              xml-tests/test.xml | sort
   35268 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35269 at_status=$? at_failed=false
   35270 $at_check_filter
   35271 at_fn_diff_devnull "$at_stderr" || at_failed=:
   35272 $at_diff expout "$at_stdout" || at_failed=:
   35273 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:59"
   35274 $at_failed && at_fn_log_failure
   35275 $at_traceon; }
   35276 
   35277   rm -rf xml-tests expout
   35278   at_restore_special_files
   35279 fi
   35280 { set +x
   35281 $as_echo "$at_srcdir/headers.at:59: bison --defines=input/input.h --output=input/input.c input/input.y"
   35282 at_fn_check_prepare_trace "headers.at:59"
   35283 ( $at_check_trace; bison --defines=input/input.h --output=input/input.c input/input.y
   35284 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35285 at_status=$? at_failed=false
   35286 $at_check_filter
   35287 at_fn_diff_devnull "$at_stderr" || at_failed=:
   35288 at_fn_diff_devnull "$at_stdout" || at_failed=:
   35289 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:59"
   35290 $at_failed && at_fn_log_failure
   35291 $at_traceon; }
   35292 
   35293 
   35294 
   35295 { set +x
   35296 $as_echo "$at_srcdir/headers.at:59: \$BISON_C_WORKS"
   35297 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "headers.at:59"
   35298 ( $at_check_trace; $BISON_C_WORKS
   35299 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35300 at_status=$? at_failed=false
   35301 $at_check_filter
   35302 echo stderr:; cat "$at_stderr"
   35303 echo stdout:; cat "$at_stdout"
   35304 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:59"
   35305 $at_failed && at_fn_log_failure
   35306 $at_traceon; }
   35307 
   35308 { set +x
   35309 $as_echo "$at_srcdir/headers.at:59: \$CC \$CFLAGS \$CPPFLAGS -c -o input/input.o -I. -c input/input.c "
   35310 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o input/input.o -I. -c input/input.c " "headers.at:59"
   35311 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o input/input.o -I. -c input/input.c
   35312 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35313 at_status=$? at_failed=false
   35314 $at_check_filter
   35315 echo stderr:; cat "$at_stderr"
   35316 echo stdout:; cat "$at_stdout"
   35317 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:59"
   35318 $at_failed && at_fn_log_failure
   35319 $at_traceon; }
   35320 
   35321 
   35322 
   35323   set +x
   35324   $at_times_p && times >"$at_times_file"
   35325 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   35326 read at_status <"$at_status_file"
   35327 #AT_STOP_140
   35328 #AT_START_141
   35329 at_fn_group_banner 141 'headers.at:60' \
   35330   "Invalid CPP guards: %glr-parser --defines=9foo.h" "" 8
   35331 at_xfail=no
   35332 (
   35333   $as_echo "141. $at_setup_line: testing $at_desc ..."
   35334   $at_traceon
   35335 
   35336 
   35337 # Possibly create inner directories.
   35338 dirname=`$as_dirname -- 9foo ||
   35339 $as_expr X9foo : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
   35340 	 X9foo : 'X\(//\)[^/]' \| \
   35341 	 X9foo : 'X\(//\)$' \| \
   35342 	 X9foo : 'X\(/\)' \| . 2>/dev/null ||
   35343 $as_echo X9foo |
   35344     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
   35345 	    s//\1/
   35346 	    q
   35347 	  }
   35348 	  /^X\(\/\/\)[^/].*/{
   35349 	    s//\1/
   35350 	    q
   35351 	  }
   35352 	  /^X\(\/\/\)$/{
   35353 	    s//\1/
   35354 	    q
   35355 	  }
   35356 	  /^X\(\/\).*/{
   35357 	    s//\1/
   35358 	    q
   35359 	  }
   35360 	  s/.*/./; q'`
   35361 as_dir=$dirname; as_fn_mkdir_p
   35362 
   35363 cat >9foo.y <<'_ATEOF'
   35364 %code top {
   35365 #include <config.h>
   35366 /* We don't need perfect functions for these tests. */
   35367 #undef malloc
   35368 #undef memcmp
   35369 #undef realloc
   35370 }
   35371 
   35372 %glr-parser
   35373 %{
   35374 #include <9foo.h>
   35375 void yyerror ( const char *msg);
   35376 int yylex (void);
   35377 %}
   35378 %%
   35379 dummy:;
   35380 %%
   35381 #include <9foo.h>
   35382 _ATEOF
   35383 
   35384 
   35385 
   35386 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   35387   at_save_special_files
   35388   mkdir xml-tests
   35389     # Don't combine these Bison invocations since we want to be sure that
   35390   # --report=all isn't required to get the full XML file.
   35391   { set +x
   35392 $as_echo "$at_srcdir/headers.at:60: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   35393                   --graph=xml-tests/test.dot --defines=9foo.h --output=9foo.c 9foo.y"
   35394 at_fn_check_prepare_notrace 'an embedded newline' "headers.at:60"
   35395 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   35396                   --graph=xml-tests/test.dot --defines=9foo.h --output=9foo.c 9foo.y
   35397 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35398 at_status=$? at_failed=false
   35399 $at_check_filter
   35400 echo stderr:; cat "$at_stderr"
   35401 echo stdout:; cat "$at_stdout"
   35402 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:60"
   35403 $at_failed && at_fn_log_failure
   35404 $at_traceon; }
   35405 
   35406   { set +x
   35407 $as_echo "$at_srcdir/headers.at:60: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --defines=9foo.h --output=9foo.c 9foo.y"
   35408 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --defines=9foo.h --output=9foo.c 9foo.y" "headers.at:60"
   35409 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --defines=9foo.h --output=9foo.c 9foo.y
   35410 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35411 at_status=$? at_failed=false
   35412 $at_check_filter
   35413 echo stderr:; cat "$at_stderr"
   35414 echo stdout:; cat "$at_stdout"
   35415 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:60"
   35416 $at_failed && at_fn_log_failure
   35417 $at_traceon; }
   35418 
   35419     cp xml-tests/test.output expout
   35420   { set +x
   35421 $as_echo "$at_srcdir/headers.at:60: \$XSLTPROC \\
   35422              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   35423              xml-tests/test.xml"
   35424 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:60"
   35425 ( $at_check_trace; $XSLTPROC \
   35426              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   35427              xml-tests/test.xml
   35428 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35429 at_status=$? at_failed=false
   35430 $at_check_filter
   35431 at_fn_diff_devnull "$at_stderr" || at_failed=:
   35432 $at_diff expout "$at_stdout" || at_failed=:
   35433 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:60"
   35434 $at_failed && at_fn_log_failure
   35435 $at_traceon; }
   35436 
   35437   sort xml-tests/test.dot > expout
   35438   { set +x
   35439 $as_echo "$at_srcdir/headers.at:60: \$XSLTPROC \\
   35440              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   35441              xml-tests/test.xml | sort"
   35442 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:60"
   35443 ( $at_check_trace; $XSLTPROC \
   35444              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   35445              xml-tests/test.xml | sort
   35446 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35447 at_status=$? at_failed=false
   35448 $at_check_filter
   35449 at_fn_diff_devnull "$at_stderr" || at_failed=:
   35450 $at_diff expout "$at_stdout" || at_failed=:
   35451 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:60"
   35452 $at_failed && at_fn_log_failure
   35453 $at_traceon; }
   35454 
   35455   rm -rf xml-tests expout
   35456   at_restore_special_files
   35457 fi
   35458 { set +x
   35459 $as_echo "$at_srcdir/headers.at:60: bison --defines=9foo.h --output=9foo.c 9foo.y"
   35460 at_fn_check_prepare_trace "headers.at:60"
   35461 ( $at_check_trace; bison --defines=9foo.h --output=9foo.c 9foo.y
   35462 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35463 at_status=$? at_failed=false
   35464 $at_check_filter
   35465 at_fn_diff_devnull "$at_stderr" || at_failed=:
   35466 at_fn_diff_devnull "$at_stdout" || at_failed=:
   35467 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:60"
   35468 $at_failed && at_fn_log_failure
   35469 $at_traceon; }
   35470 
   35471 
   35472 
   35473 { set +x
   35474 $as_echo "$at_srcdir/headers.at:60: \$BISON_C_WORKS"
   35475 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "headers.at:60"
   35476 ( $at_check_trace; $BISON_C_WORKS
   35477 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35478 at_status=$? at_failed=false
   35479 $at_check_filter
   35480 echo stderr:; cat "$at_stderr"
   35481 echo stdout:; cat "$at_stdout"
   35482 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:60"
   35483 $at_failed && at_fn_log_failure
   35484 $at_traceon; }
   35485 
   35486 { set +x
   35487 $as_echo "$at_srcdir/headers.at:60: \$CC \$CFLAGS \$CPPFLAGS -c -o 9foo.o -I. -c 9foo.c "
   35488 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o 9foo.o -I. -c 9foo.c " "headers.at:60"
   35489 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o 9foo.o -I. -c 9foo.c
   35490 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35491 at_status=$? at_failed=false
   35492 $at_check_filter
   35493 echo stderr:; cat "$at_stderr"
   35494 echo stdout:; cat "$at_stdout"
   35495 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:60"
   35496 $at_failed && at_fn_log_failure
   35497 $at_traceon; }
   35498 
   35499 
   35500 
   35501   set +x
   35502   $at_times_p && times >"$at_times_file"
   35503 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   35504 read at_status <"$at_status_file"
   35505 #AT_STOP_141
   35506 #AT_START_142
   35507 at_fn_group_banner 142 'headers.at:69' \
   35508   "export YYLTYPE" "                                 " 8
   35509 at_xfail=no
   35510 (
   35511   $as_echo "142. $at_setup_line: testing $at_desc ..."
   35512   $at_traceon
   35513 
   35514 
   35515 cat >input.y <<'_ATEOF'
   35516 %code top {
   35517 #include <config.h>
   35518 /* We don't need perfect functions for these tests. */
   35519 #undef malloc
   35520 #undef memcmp
   35521 #undef realloc
   35522 }
   35523 
   35524 %locations
   35525 
   35526 %name-prefix "my_"
   35527 %{
   35528 #include <stdio.h>
   35529 #include <stdlib.h>
   35530 
   35531 static int
   35532 my_lex (void)
   35533 {
   35534   return EOF;
   35535 }
   35536 
   35537 static void
   35538 my_error (const char *msg)
   35539 {
   35540   fprintf (stderr, "%s\n", msg);
   35541 }
   35542 
   35543 %}
   35544 %%
   35545 exp:;
   35546 _ATEOF
   35547 
   35548 
   35549 
   35550 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   35551   at_save_special_files
   35552   mkdir xml-tests
   35553     # Don't combine these Bison invocations since we want to be sure that
   35554   # --report=all isn't required to get the full XML file.
   35555   { set +x
   35556 $as_echo "$at_srcdir/headers.at:96: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   35557                   --graph=xml-tests/test.dot --defines -o input.c input.y"
   35558 at_fn_check_prepare_notrace 'an embedded newline' "headers.at:96"
   35559 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   35560                   --graph=xml-tests/test.dot --defines -o input.c input.y
   35561 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35562 at_status=$? at_failed=false
   35563 $at_check_filter
   35564 echo stderr:; cat "$at_stderr"
   35565 echo stdout:; cat "$at_stdout"
   35566 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:96"
   35567 $at_failed && at_fn_log_failure
   35568 $at_traceon; }
   35569 
   35570   { set +x
   35571 $as_echo "$at_srcdir/headers.at:96: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --defines -o input.c input.y"
   35572 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --defines -o input.c input.y" "headers.at:96"
   35573 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --defines -o input.c input.y
   35574 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35575 at_status=$? at_failed=false
   35576 $at_check_filter
   35577 echo stderr:; cat "$at_stderr"
   35578 echo stdout:; cat "$at_stdout"
   35579 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:96"
   35580 $at_failed && at_fn_log_failure
   35581 $at_traceon; }
   35582 
   35583     cp xml-tests/test.output expout
   35584   { set +x
   35585 $as_echo "$at_srcdir/headers.at:96: \$XSLTPROC \\
   35586              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   35587              xml-tests/test.xml"
   35588 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:96"
   35589 ( $at_check_trace; $XSLTPROC \
   35590              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   35591              xml-tests/test.xml
   35592 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35593 at_status=$? at_failed=false
   35594 $at_check_filter
   35595 at_fn_diff_devnull "$at_stderr" || at_failed=:
   35596 $at_diff expout "$at_stdout" || at_failed=:
   35597 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:96"
   35598 $at_failed && at_fn_log_failure
   35599 $at_traceon; }
   35600 
   35601   sort xml-tests/test.dot > expout
   35602   { set +x
   35603 $as_echo "$at_srcdir/headers.at:96: \$XSLTPROC \\
   35604              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   35605              xml-tests/test.xml | sort"
   35606 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:96"
   35607 ( $at_check_trace; $XSLTPROC \
   35608              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   35609              xml-tests/test.xml | sort
   35610 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35611 at_status=$? at_failed=false
   35612 $at_check_filter
   35613 at_fn_diff_devnull "$at_stderr" || at_failed=:
   35614 $at_diff expout "$at_stdout" || at_failed=:
   35615 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:96"
   35616 $at_failed && at_fn_log_failure
   35617 $at_traceon; }
   35618 
   35619   rm -rf xml-tests expout
   35620   at_restore_special_files
   35621 fi
   35622 { set +x
   35623 $as_echo "$at_srcdir/headers.at:96: bison --defines -o input.c input.y"
   35624 at_fn_check_prepare_trace "headers.at:96"
   35625 ( $at_check_trace; bison --defines -o input.c input.y
   35626 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35627 at_status=$? at_failed=false
   35628 $at_check_filter
   35629 at_fn_diff_devnull "$at_stderr" || at_failed=:
   35630 at_fn_diff_devnull "$at_stdout" || at_failed=:
   35631 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:96"
   35632 $at_failed && at_fn_log_failure
   35633 $at_traceon; }
   35634 
   35635 
   35636 
   35637 # YYLTYPE should be defined, and MY_LLOC declared.
   35638 cat >caller.c <<'_ATEOF'
   35639 #include "input.h"
   35640 YYLTYPE *my_llocp = &my_lloc;
   35641 
   35642 int my_parse (void);
   35643 
   35644 int
   35645 main (void)
   35646 {
   35647   return my_parse ();
   35648 }
   35649 _ATEOF
   35650 
   35651 
   35652 # Link and execute, just to make sure everything is fine (and in
   35653 # particular, that MY_LLOC is indeed defined somewhere).
   35654 { set +x
   35655 $as_echo "$at_srcdir/headers.at:114: \$BISON_C_WORKS"
   35656 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "headers.at:114"
   35657 ( $at_check_trace; $BISON_C_WORKS
   35658 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35659 at_status=$? at_failed=false
   35660 $at_check_filter
   35661 echo stderr:; cat "$at_stderr"
   35662 echo stdout:; cat "$at_stdout"
   35663 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:114"
   35664 $at_failed && at_fn_log_failure
   35665 $at_traceon; }
   35666 
   35667 { set +x
   35668 $as_echo "$at_srcdir/headers.at:114: \$CC \$CFLAGS \$CPPFLAGS -c -o caller.o caller.c "
   35669 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o caller.o caller.c " "headers.at:114"
   35670 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o caller.o caller.c
   35671 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35672 at_status=$? at_failed=false
   35673 $at_check_filter
   35674 echo stderr:; cat "$at_stderr"
   35675 echo stdout:; cat "$at_stdout"
   35676 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:114"
   35677 $at_failed && at_fn_log_failure
   35678 $at_traceon; }
   35679 
   35680 { set +x
   35681 $as_echo "$at_srcdir/headers.at:115: \$BISON_C_WORKS"
   35682 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "headers.at:115"
   35683 ( $at_check_trace; $BISON_C_WORKS
   35684 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35685 at_status=$? at_failed=false
   35686 $at_check_filter
   35687 echo stderr:; cat "$at_stderr"
   35688 echo stdout:; cat "$at_stdout"
   35689 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:115"
   35690 $at_failed && at_fn_log_failure
   35691 $at_traceon; }
   35692 
   35693 { set +x
   35694 $as_echo "$at_srcdir/headers.at:115: \$CC \$CFLAGS \$CPPFLAGS -c -o input.o input.c "
   35695 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o input.o input.c " "headers.at:115"
   35696 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o input.o input.c
   35697 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35698 at_status=$? at_failed=false
   35699 $at_check_filter
   35700 echo stderr:; cat "$at_stderr"
   35701 echo stdout:; cat "$at_stdout"
   35702 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:115"
   35703 $at_failed && at_fn_log_failure
   35704 $at_traceon; }
   35705 
   35706 { set +x
   35707 $as_echo "$at_srcdir/headers.at:116: \$BISON_C_WORKS"
   35708 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "headers.at:116"
   35709 ( $at_check_trace; $BISON_C_WORKS
   35710 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35711 at_status=$? at_failed=false
   35712 $at_check_filter
   35713 echo stderr:; cat "$at_stderr"
   35714 echo stdout:; cat "$at_stdout"
   35715 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:116"
   35716 $at_failed && at_fn_log_failure
   35717 $at_traceon; }
   35718 
   35719 { set +x
   35720 $as_echo "$at_srcdir/headers.at:116: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o caller caller.o input.o \$LIBS"
   35721 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o caller caller.o input.o $LIBS" "headers.at:116"
   35722 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o caller caller.o input.o $LIBS
   35723 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35724 at_status=$? at_failed=false
   35725 $at_check_filter
   35726 echo stderr:; cat "$at_stderr"
   35727 echo stdout:; cat "$at_stdout"
   35728 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:116"
   35729 $at_failed && at_fn_log_failure
   35730 $at_traceon; }
   35731 
   35732 { set +x
   35733 $as_echo "$at_srcdir/headers.at:117:  \$PREPARSER ./caller"
   35734 at_fn_check_prepare_dynamic " $PREPARSER ./caller" "headers.at:117"
   35735 ( $at_check_trace;  $PREPARSER ./caller
   35736 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35737 at_status=$? at_failed=false
   35738 $at_check_filter
   35739 echo stderr:; tee stderr <"$at_stderr"
   35740 at_fn_diff_devnull "$at_stdout" || at_failed=:
   35741 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:117"
   35742 $at_failed && at_fn_log_failure
   35743 $at_traceon; }
   35744 
   35745 { set +x
   35746 $as_echo "$at_srcdir/headers.at:117: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   35747 at_fn_check_prepare_trace "headers.at:117"
   35748 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   35749 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35750 at_status=$? at_failed=false
   35751 $at_check_filter
   35752 at_fn_diff_devnull "$at_stderr" || at_failed=:
   35753 at_fn_diff_devnull "$at_stdout" || at_failed=:
   35754 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:117"
   35755 $at_failed && at_fn_log_failure
   35756 $at_traceon; }
   35757 
   35758 
   35759 
   35760   set +x
   35761   $at_times_p && times >"$at_times_file"
   35762 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   35763 read at_status <"$at_status_file"
   35764 #AT_STOP_142
   35765 #AT_START_143
   35766 at_fn_group_banner 143 'headers.at:125' \
   35767   "Several parsers" "                                " 8
   35768 at_xfail=no
   35769 (
   35770   $as_echo "143. $at_setup_line: testing $at_desc ..."
   35771   $at_traceon
   35772 
   35773 
   35774 # AT_TEST([PREFIX], [DIRECTIVES])
   35775 # -------------------------------
   35776 # Generate and compile to *.o.  Make sure there is no (allowed) YY*
   35777 # nor yy* identifiers in the header.  Check that headers are
   35778 # self-contained, and can be compiled by a C++ compiler.
   35779 # AT_TEST
   35780 
   35781 cat >main.cc <<'_ATEOF'
   35782 #include <config.h>
   35783 /* We don't need perfect functions for these tests. */
   35784 #undef malloc
   35785 #undef memcmp
   35786 #undef realloc
   35787 
   35788 // If we are compiling with CC=$CXX, then do not load the C headers
   35789 // inside extern "C", since they were _not_ compiled this way.
   35790 #if ! CC_IS_CXX
   35791 extern "C"
   35792 {
   35793 #endif
   35794   #include "x1.h"
   35795   #include "x2.h"
   35796   #include "x3.h"
   35797   #include "x4.h"
   35798   #include "x6.h"
   35799   #include "x7.h"
   35800   #include "x8.h"
   35801 #if ! CC_IS_CXX
   35802 }
   35803 #endif
   35804 #include "x5.hh"
   35805 //#include "x6.hh"
   35806 
   35807 #define RUN(S)                                  \
   35808   do {                                          \
   35809     int res = S;                                \
   35810     if (res)                                    \
   35811       std::cerr << #S": " << res << std::endl;  \
   35812   } while (false)
   35813 
   35814 int
   35815 main (void)
   35816 {
   35817   RUN(x1_parse());
   35818   RUN(x2_parse());
   35819   RUN(x3_parse());
   35820   RUN(x4_parse());
   35821   x5_::parser p5;
   35822   RUN(p5.parse());
   35823   RUN(x6_parse());
   35824   RUN(x7_parse());
   35825   RUN(x8_parse());
   35826 //  x6_::parser p6;
   35827 //  RUN(p6.parse());
   35828   return 0;
   35829 }
   35830 _ATEOF
   35831 # main.cc
   35832 
   35833 
   35834 cat >x1.y <<'_ATEOF'
   35835 %code top {
   35836 #include <config.h>
   35837 /* We don't need perfect functions for these tests. */
   35838 #undef malloc
   35839 #undef memcmp
   35840 #undef realloc
   35841 }
   35842 
   35843 %define api.prefix "x1_"
   35844 
   35845 %error-verbose
   35846 %union
   35847 {
   35848   int integer;
   35849 }
   35850 %{
   35851 #include <stdio.h>
   35852   static void x1_error ( const char *msg);
   35853   static int x1_lex (void);
   35854 %}
   35855 %%
   35856 exp:
   35857   'x' '1' { printf ("x1\n"); }
   35858 | 'x' '2' { printf ("x2\n"); }
   35859 | 'x' '3' { printf ("x3\n"); }
   35860 | 'x' '4' { printf ("x4\n"); }
   35861 | 'x' '5' { printf ("x5\n"); }
   35862 | 'x' '6' { printf ("x6\n"); }
   35863 | 'x' '7' { printf ("x7\n"); }
   35864 | 'x' '8' { printf ("x8\n"); }
   35865 ;
   35866 
   35867 %%
   35868 #include <stdio.h>
   35869 /* A C error reporting function.  */
   35870 static
   35871 void x1_error ( const char *msg)
   35872 {
   35873   fprintf (stderr, "%s\n", msg);
   35874 }
   35875 #include <assert.h>
   35876 static
   35877 int x1_lex (void)
   35878 {
   35879   static char const input[] = "x1";
   35880   static size_t toknum = 0;
   35881   int res;
   35882   ;
   35883   assert (toknum < sizeof input / sizeof input[0]);
   35884   res = input[toknum++];
   35885   ;
   35886   return res;
   35887 }
   35888 _ATEOF
   35889 
   35890 
   35891 
   35892 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   35893   at_save_special_files
   35894   mkdir xml-tests
   35895     # Don't combine these Bison invocations since we want to be sure that
   35896   # --report=all isn't required to get the full XML file.
   35897   { set +x
   35898 $as_echo "$at_srcdir/headers.at:218: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   35899                   --graph=xml-tests/test.dot -d -o x1.c x1.y"
   35900 at_fn_check_prepare_notrace 'an embedded newline' "headers.at:218"
   35901 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   35902                   --graph=xml-tests/test.dot -d -o x1.c x1.y
   35903 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35904 at_status=$? at_failed=false
   35905 $at_check_filter
   35906 echo stderr:; cat "$at_stderr"
   35907 echo stdout:; cat "$at_stdout"
   35908 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:218"
   35909 $at_failed && at_fn_log_failure
   35910 $at_traceon; }
   35911 
   35912   { set +x
   35913 $as_echo "$at_srcdir/headers.at:218: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x1.c x1.y"
   35914 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x1.c x1.y" "headers.at:218"
   35915 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x1.c x1.y
   35916 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35917 at_status=$? at_failed=false
   35918 $at_check_filter
   35919 echo stderr:; cat "$at_stderr"
   35920 echo stdout:; cat "$at_stdout"
   35921 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:218"
   35922 $at_failed && at_fn_log_failure
   35923 $at_traceon; }
   35924 
   35925     cp xml-tests/test.output expout
   35926   { set +x
   35927 $as_echo "$at_srcdir/headers.at:218: \$XSLTPROC \\
   35928              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   35929              xml-tests/test.xml"
   35930 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:218"
   35931 ( $at_check_trace; $XSLTPROC \
   35932              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   35933              xml-tests/test.xml
   35934 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35935 at_status=$? at_failed=false
   35936 $at_check_filter
   35937 at_fn_diff_devnull "$at_stderr" || at_failed=:
   35938 $at_diff expout "$at_stdout" || at_failed=:
   35939 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:218"
   35940 $at_failed && at_fn_log_failure
   35941 $at_traceon; }
   35942 
   35943   sort xml-tests/test.dot > expout
   35944   { set +x
   35945 $as_echo "$at_srcdir/headers.at:218: \$XSLTPROC \\
   35946              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   35947              xml-tests/test.xml | sort"
   35948 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:218"
   35949 ( $at_check_trace; $XSLTPROC \
   35950              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   35951              xml-tests/test.xml | sort
   35952 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35953 at_status=$? at_failed=false
   35954 $at_check_filter
   35955 at_fn_diff_devnull "$at_stderr" || at_failed=:
   35956 $at_diff expout "$at_stdout" || at_failed=:
   35957 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:218"
   35958 $at_failed && at_fn_log_failure
   35959 $at_traceon; }
   35960 
   35961   rm -rf xml-tests expout
   35962   at_restore_special_files
   35963 fi
   35964 { set +x
   35965 $as_echo "$at_srcdir/headers.at:218: bison -d -o x1.c x1.y"
   35966 at_fn_check_prepare_trace "headers.at:218"
   35967 ( $at_check_trace; bison -d -o x1.c x1.y
   35968 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35969 at_status=$? at_failed=false
   35970 $at_check_filter
   35971 at_fn_diff_devnull "$at_stderr" || at_failed=:
   35972 at_fn_diff_devnull "$at_stdout" || at_failed=:
   35973 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:218"
   35974 $at_failed && at_fn_log_failure
   35975 $at_traceon; }
   35976 
   35977 
   35978 
   35979 { set +x
   35980 $as_echo "$at_srcdir/headers.at:218: \$BISON_C_WORKS"
   35981 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "headers.at:218"
   35982 ( $at_check_trace; $BISON_C_WORKS
   35983 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35984 at_status=$? at_failed=false
   35985 $at_check_filter
   35986 echo stderr:; cat "$at_stderr"
   35987 echo stdout:; cat "$at_stdout"
   35988 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:218"
   35989 $at_failed && at_fn_log_failure
   35990 $at_traceon; }
   35991 
   35992 { set +x
   35993 $as_echo "$at_srcdir/headers.at:218: \$CC \$CFLAGS \$CPPFLAGS -c -o x1.o x1.c "
   35994 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o x1.o x1.c " "headers.at:218"
   35995 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o x1.o x1.c
   35996 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   35997 at_status=$? at_failed=false
   35998 $at_check_filter
   35999 echo stderr:; cat "$at_stderr"
   36000 echo stdout:; cat "$at_stdout"
   36001 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:218"
   36002 $at_failed && at_fn_log_failure
   36003 $at_traceon; }
   36004 
   36005 { set +x
   36006 $as_echo "$at_srcdir/headers.at:218: echo \"x1\" >>expout"
   36007 at_fn_check_prepare_trace "headers.at:218"
   36008 ( $at_check_trace; echo "x1" >>expout
   36009 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36010 at_status=$? at_failed=false
   36011 $at_check_filter
   36012 at_fn_diff_devnull "$at_stderr" || at_failed=:
   36013 at_fn_diff_devnull "$at_stdout" || at_failed=:
   36014 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:218"
   36015 $at_failed && at_fn_log_failure
   36016 $at_traceon; }
   36017 
   36018 
   36019 
   36020 
   36021 
   36022 cat >x2.y <<'_ATEOF'
   36023 %code top {
   36024 #include <config.h>
   36025 /* We don't need perfect functions for these tests. */
   36026 #undef malloc
   36027 #undef memcmp
   36028 #undef realloc
   36029 }
   36030 
   36031 %define api.prefix "x2_"
   36032 %locations %debug
   36033 %error-verbose
   36034 %union
   36035 {
   36036   int integer;
   36037 }
   36038 %{
   36039 #include <stdio.h>
   36040   static void x2_error ( const char *msg);
   36041   static int x2_lex (void);
   36042 %}
   36043 %%
   36044 exp:
   36045   'x' '1' { printf ("x1\n"); }
   36046 | 'x' '2' { printf ("x2\n"); }
   36047 | 'x' '3' { printf ("x3\n"); }
   36048 | 'x' '4' { printf ("x4\n"); }
   36049 | 'x' '5' { printf ("x5\n"); }
   36050 | 'x' '6' { printf ("x6\n"); }
   36051 | 'x' '7' { printf ("x7\n"); }
   36052 | 'x' '8' { printf ("x8\n"); }
   36053 ;
   36054 
   36055 %%
   36056 #include <stdio.h>
   36057 /* A C error reporting function.  */
   36058 static
   36059 void x2_error ( const char *msg)
   36060 {
   36061   YY_LOCATION_PRINT (stderr, (x2_lloc));
   36062   fprintf (stderr, ": ");
   36063   fprintf (stderr, "%s\n", msg);
   36064 }
   36065 #include <assert.h>
   36066 static
   36067 int x2_lex (void)
   36068 {
   36069   static char const input[] = "x2";
   36070   static size_t toknum = 0;
   36071   int res;
   36072   ;
   36073   assert (toknum < sizeof input / sizeof input[0]);
   36074   res = input[toknum++];
   36075   ;
   36076   (x2_lloc).first_line = (x2_lloc).last_line = 1;
   36077   (x2_lloc).first_column = (x2_lloc).last_column = toknum;
   36078   return res;
   36079 }
   36080 _ATEOF
   36081 
   36082 
   36083 
   36084 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   36085   at_save_special_files
   36086   mkdir xml-tests
   36087     # Don't combine these Bison invocations since we want to be sure that
   36088   # --report=all isn't required to get the full XML file.
   36089   { set +x
   36090 $as_echo "$at_srcdir/headers.at:219: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   36091                   --graph=xml-tests/test.dot -d -o x2.c x2.y"
   36092 at_fn_check_prepare_notrace 'an embedded newline' "headers.at:219"
   36093 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   36094                   --graph=xml-tests/test.dot -d -o x2.c x2.y
   36095 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36096 at_status=$? at_failed=false
   36097 $at_check_filter
   36098 echo stderr:; cat "$at_stderr"
   36099 echo stdout:; cat "$at_stdout"
   36100 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:219"
   36101 $at_failed && at_fn_log_failure
   36102 $at_traceon; }
   36103 
   36104   { set +x
   36105 $as_echo "$at_srcdir/headers.at:219: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x2.c x2.y"
   36106 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x2.c x2.y" "headers.at:219"
   36107 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x2.c x2.y
   36108 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36109 at_status=$? at_failed=false
   36110 $at_check_filter
   36111 echo stderr:; cat "$at_stderr"
   36112 echo stdout:; cat "$at_stdout"
   36113 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:219"
   36114 $at_failed && at_fn_log_failure
   36115 $at_traceon; }
   36116 
   36117     cp xml-tests/test.output expout
   36118   { set +x
   36119 $as_echo "$at_srcdir/headers.at:219: \$XSLTPROC \\
   36120              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   36121              xml-tests/test.xml"
   36122 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:219"
   36123 ( $at_check_trace; $XSLTPROC \
   36124              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   36125              xml-tests/test.xml
   36126 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36127 at_status=$? at_failed=false
   36128 $at_check_filter
   36129 at_fn_diff_devnull "$at_stderr" || at_failed=:
   36130 $at_diff expout "$at_stdout" || at_failed=:
   36131 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:219"
   36132 $at_failed && at_fn_log_failure
   36133 $at_traceon; }
   36134 
   36135   sort xml-tests/test.dot > expout
   36136   { set +x
   36137 $as_echo "$at_srcdir/headers.at:219: \$XSLTPROC \\
   36138              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   36139              xml-tests/test.xml | sort"
   36140 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:219"
   36141 ( $at_check_trace; $XSLTPROC \
   36142              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   36143              xml-tests/test.xml | sort
   36144 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36145 at_status=$? at_failed=false
   36146 $at_check_filter
   36147 at_fn_diff_devnull "$at_stderr" || at_failed=:
   36148 $at_diff expout "$at_stdout" || at_failed=:
   36149 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:219"
   36150 $at_failed && at_fn_log_failure
   36151 $at_traceon; }
   36152 
   36153   rm -rf xml-tests expout
   36154   at_restore_special_files
   36155 fi
   36156 { set +x
   36157 $as_echo "$at_srcdir/headers.at:219: bison -d -o x2.c x2.y"
   36158 at_fn_check_prepare_trace "headers.at:219"
   36159 ( $at_check_trace; bison -d -o x2.c x2.y
   36160 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36161 at_status=$? at_failed=false
   36162 $at_check_filter
   36163 at_fn_diff_devnull "$at_stderr" || at_failed=:
   36164 at_fn_diff_devnull "$at_stdout" || at_failed=:
   36165 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:219"
   36166 $at_failed && at_fn_log_failure
   36167 $at_traceon; }
   36168 
   36169 
   36170 
   36171 { set +x
   36172 $as_echo "$at_srcdir/headers.at:219: \$BISON_C_WORKS"
   36173 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "headers.at:219"
   36174 ( $at_check_trace; $BISON_C_WORKS
   36175 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36176 at_status=$? at_failed=false
   36177 $at_check_filter
   36178 echo stderr:; cat "$at_stderr"
   36179 echo stdout:; cat "$at_stdout"
   36180 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:219"
   36181 $at_failed && at_fn_log_failure
   36182 $at_traceon; }
   36183 
   36184 { set +x
   36185 $as_echo "$at_srcdir/headers.at:219: \$CC \$CFLAGS \$CPPFLAGS -c -o x2.o x2.c "
   36186 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o x2.o x2.c " "headers.at:219"
   36187 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o x2.o x2.c
   36188 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36189 at_status=$? at_failed=false
   36190 $at_check_filter
   36191 echo stderr:; cat "$at_stderr"
   36192 echo stdout:; cat "$at_stdout"
   36193 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:219"
   36194 $at_failed && at_fn_log_failure
   36195 $at_traceon; }
   36196 
   36197 { set +x
   36198 $as_echo "$at_srcdir/headers.at:219: echo \"x2\" >>expout"
   36199 at_fn_check_prepare_trace "headers.at:219"
   36200 ( $at_check_trace; echo "x2" >>expout
   36201 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36202 at_status=$? at_failed=false
   36203 $at_check_filter
   36204 at_fn_diff_devnull "$at_stderr" || at_failed=:
   36205 at_fn_diff_devnull "$at_stdout" || at_failed=:
   36206 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:219"
   36207 $at_failed && at_fn_log_failure
   36208 $at_traceon; }
   36209 
   36210 
   36211 
   36212 
   36213 
   36214 cat >x3.y <<'_ATEOF'
   36215 %code top {
   36216 #include <config.h>
   36217 /* We don't need perfect functions for these tests. */
   36218 #undef malloc
   36219 #undef memcmp
   36220 #undef realloc
   36221 }
   36222 
   36223 %define api.prefix "x3_"
   36224 %glr-parser
   36225 %error-verbose
   36226 %union
   36227 {
   36228   int integer;
   36229 }
   36230 %{
   36231 #include <stdio.h>
   36232   static void x3_error ( const char *msg);
   36233   static int x3_lex (void);
   36234 %}
   36235 %%
   36236 exp:
   36237   'x' '1' { printf ("x1\n"); }
   36238 | 'x' '2' { printf ("x2\n"); }
   36239 | 'x' '3' { printf ("x3\n"); }
   36240 | 'x' '4' { printf ("x4\n"); }
   36241 | 'x' '5' { printf ("x5\n"); }
   36242 | 'x' '6' { printf ("x6\n"); }
   36243 | 'x' '7' { printf ("x7\n"); }
   36244 | 'x' '8' { printf ("x8\n"); }
   36245 ;
   36246 
   36247 %%
   36248 #include <stdio.h>
   36249 /* A C error reporting function.  */
   36250 static
   36251 void x3_error ( const char *msg)
   36252 {
   36253   fprintf (stderr, "%s\n", msg);
   36254 }
   36255 #include <assert.h>
   36256 static
   36257 int x3_lex (void)
   36258 {
   36259   static char const input[] = "x3";
   36260   static size_t toknum = 0;
   36261   int res;
   36262   ;
   36263   assert (toknum < sizeof input / sizeof input[0]);
   36264   res = input[toknum++];
   36265   ;
   36266   return res;
   36267 }
   36268 _ATEOF
   36269 
   36270 
   36271 
   36272 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   36273   at_save_special_files
   36274   mkdir xml-tests
   36275     # Don't combine these Bison invocations since we want to be sure that
   36276   # --report=all isn't required to get the full XML file.
   36277   { set +x
   36278 $as_echo "$at_srcdir/headers.at:220: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   36279                   --graph=xml-tests/test.dot -d -o x3.c x3.y"
   36280 at_fn_check_prepare_notrace 'an embedded newline' "headers.at:220"
   36281 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   36282                   --graph=xml-tests/test.dot -d -o x3.c x3.y
   36283 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36284 at_status=$? at_failed=false
   36285 $at_check_filter
   36286 echo stderr:; cat "$at_stderr"
   36287 echo stdout:; cat "$at_stdout"
   36288 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:220"
   36289 $at_failed && at_fn_log_failure
   36290 $at_traceon; }
   36291 
   36292   { set +x
   36293 $as_echo "$at_srcdir/headers.at:220: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x3.c x3.y"
   36294 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x3.c x3.y" "headers.at:220"
   36295 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x3.c x3.y
   36296 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36297 at_status=$? at_failed=false
   36298 $at_check_filter
   36299 echo stderr:; cat "$at_stderr"
   36300 echo stdout:; cat "$at_stdout"
   36301 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:220"
   36302 $at_failed && at_fn_log_failure
   36303 $at_traceon; }
   36304 
   36305     cp xml-tests/test.output expout
   36306   { set +x
   36307 $as_echo "$at_srcdir/headers.at:220: \$XSLTPROC \\
   36308              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   36309              xml-tests/test.xml"
   36310 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:220"
   36311 ( $at_check_trace; $XSLTPROC \
   36312              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   36313              xml-tests/test.xml
   36314 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36315 at_status=$? at_failed=false
   36316 $at_check_filter
   36317 at_fn_diff_devnull "$at_stderr" || at_failed=:
   36318 $at_diff expout "$at_stdout" || at_failed=:
   36319 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:220"
   36320 $at_failed && at_fn_log_failure
   36321 $at_traceon; }
   36322 
   36323   sort xml-tests/test.dot > expout
   36324   { set +x
   36325 $as_echo "$at_srcdir/headers.at:220: \$XSLTPROC \\
   36326              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   36327              xml-tests/test.xml | sort"
   36328 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:220"
   36329 ( $at_check_trace; $XSLTPROC \
   36330              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   36331              xml-tests/test.xml | sort
   36332 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36333 at_status=$? at_failed=false
   36334 $at_check_filter
   36335 at_fn_diff_devnull "$at_stderr" || at_failed=:
   36336 $at_diff expout "$at_stdout" || at_failed=:
   36337 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:220"
   36338 $at_failed && at_fn_log_failure
   36339 $at_traceon; }
   36340 
   36341   rm -rf xml-tests expout
   36342   at_restore_special_files
   36343 fi
   36344 { set +x
   36345 $as_echo "$at_srcdir/headers.at:220: bison -d -o x3.c x3.y"
   36346 at_fn_check_prepare_trace "headers.at:220"
   36347 ( $at_check_trace; bison -d -o x3.c x3.y
   36348 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36349 at_status=$? at_failed=false
   36350 $at_check_filter
   36351 at_fn_diff_devnull "$at_stderr" || at_failed=:
   36352 at_fn_diff_devnull "$at_stdout" || at_failed=:
   36353 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:220"
   36354 $at_failed && at_fn_log_failure
   36355 $at_traceon; }
   36356 
   36357 
   36358 
   36359 { set +x
   36360 $as_echo "$at_srcdir/headers.at:220: \$BISON_C_WORKS"
   36361 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "headers.at:220"
   36362 ( $at_check_trace; $BISON_C_WORKS
   36363 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36364 at_status=$? at_failed=false
   36365 $at_check_filter
   36366 echo stderr:; cat "$at_stderr"
   36367 echo stdout:; cat "$at_stdout"
   36368 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:220"
   36369 $at_failed && at_fn_log_failure
   36370 $at_traceon; }
   36371 
   36372 { set +x
   36373 $as_echo "$at_srcdir/headers.at:220: \$CC \$CFLAGS \$CPPFLAGS -c -o x3.o x3.c "
   36374 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o x3.o x3.c " "headers.at:220"
   36375 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o x3.o x3.c
   36376 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36377 at_status=$? at_failed=false
   36378 $at_check_filter
   36379 echo stderr:; cat "$at_stderr"
   36380 echo stdout:; cat "$at_stdout"
   36381 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:220"
   36382 $at_failed && at_fn_log_failure
   36383 $at_traceon; }
   36384 
   36385 { set +x
   36386 $as_echo "$at_srcdir/headers.at:220: echo \"x3\" >>expout"
   36387 at_fn_check_prepare_trace "headers.at:220"
   36388 ( $at_check_trace; echo "x3" >>expout
   36389 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36390 at_status=$? at_failed=false
   36391 $at_check_filter
   36392 at_fn_diff_devnull "$at_stderr" || at_failed=:
   36393 at_fn_diff_devnull "$at_stdout" || at_failed=:
   36394 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:220"
   36395 $at_failed && at_fn_log_failure
   36396 $at_traceon; }
   36397 
   36398 
   36399 
   36400 
   36401 
   36402 cat >x4.y <<'_ATEOF'
   36403 %code top {
   36404 #include <config.h>
   36405 /* We don't need perfect functions for these tests. */
   36406 #undef malloc
   36407 #undef memcmp
   36408 #undef realloc
   36409 }
   36410 
   36411 %define api.prefix "x4_"
   36412 %locations %debug %glr-parser
   36413 %error-verbose
   36414 %union
   36415 {
   36416   int integer;
   36417 }
   36418 %{
   36419 #include <stdio.h>
   36420   static void x4_error ( const char *msg);
   36421   static int x4_lex (void);
   36422 %}
   36423 %%
   36424 exp:
   36425   'x' '1' { printf ("x1\n"); }
   36426 | 'x' '2' { printf ("x2\n"); }
   36427 | 'x' '3' { printf ("x3\n"); }
   36428 | 'x' '4' { printf ("x4\n"); }
   36429 | 'x' '5' { printf ("x5\n"); }
   36430 | 'x' '6' { printf ("x6\n"); }
   36431 | 'x' '7' { printf ("x7\n"); }
   36432 | 'x' '8' { printf ("x8\n"); }
   36433 ;
   36434 
   36435 %%
   36436 #include <stdio.h>
   36437 /* A C error reporting function.  */
   36438 static
   36439 void x4_error ( const char *msg)
   36440 {
   36441   YY_LOCATION_PRINT (stderr, (x4_lloc));
   36442   fprintf (stderr, ": ");
   36443   fprintf (stderr, "%s\n", msg);
   36444 }
   36445 #include <assert.h>
   36446 static
   36447 int x4_lex (void)
   36448 {
   36449   static char const input[] = "x4";
   36450   static size_t toknum = 0;
   36451   int res;
   36452   ;
   36453   assert (toknum < sizeof input / sizeof input[0]);
   36454   res = input[toknum++];
   36455   ;
   36456   (x4_lloc).first_line = (x4_lloc).last_line = 1;
   36457   (x4_lloc).first_column = (x4_lloc).last_column = toknum;
   36458   return res;
   36459 }
   36460 _ATEOF
   36461 
   36462 
   36463 
   36464 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   36465   at_save_special_files
   36466   mkdir xml-tests
   36467     # Don't combine these Bison invocations since we want to be sure that
   36468   # --report=all isn't required to get the full XML file.
   36469   { set +x
   36470 $as_echo "$at_srcdir/headers.at:221: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   36471                   --graph=xml-tests/test.dot -d -o x4.c x4.y"
   36472 at_fn_check_prepare_notrace 'an embedded newline' "headers.at:221"
   36473 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   36474                   --graph=xml-tests/test.dot -d -o x4.c x4.y
   36475 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36476 at_status=$? at_failed=false
   36477 $at_check_filter
   36478 echo stderr:; cat "$at_stderr"
   36479 echo stdout:; cat "$at_stdout"
   36480 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:221"
   36481 $at_failed && at_fn_log_failure
   36482 $at_traceon; }
   36483 
   36484   { set +x
   36485 $as_echo "$at_srcdir/headers.at:221: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x4.c x4.y"
   36486 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x4.c x4.y" "headers.at:221"
   36487 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x4.c x4.y
   36488 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36489 at_status=$? at_failed=false
   36490 $at_check_filter
   36491 echo stderr:; cat "$at_stderr"
   36492 echo stdout:; cat "$at_stdout"
   36493 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:221"
   36494 $at_failed && at_fn_log_failure
   36495 $at_traceon; }
   36496 
   36497     cp xml-tests/test.output expout
   36498   { set +x
   36499 $as_echo "$at_srcdir/headers.at:221: \$XSLTPROC \\
   36500              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   36501              xml-tests/test.xml"
   36502 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:221"
   36503 ( $at_check_trace; $XSLTPROC \
   36504              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   36505              xml-tests/test.xml
   36506 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36507 at_status=$? at_failed=false
   36508 $at_check_filter
   36509 at_fn_diff_devnull "$at_stderr" || at_failed=:
   36510 $at_diff expout "$at_stdout" || at_failed=:
   36511 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:221"
   36512 $at_failed && at_fn_log_failure
   36513 $at_traceon; }
   36514 
   36515   sort xml-tests/test.dot > expout
   36516   { set +x
   36517 $as_echo "$at_srcdir/headers.at:221: \$XSLTPROC \\
   36518              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   36519              xml-tests/test.xml | sort"
   36520 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:221"
   36521 ( $at_check_trace; $XSLTPROC \
   36522              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   36523              xml-tests/test.xml | sort
   36524 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36525 at_status=$? at_failed=false
   36526 $at_check_filter
   36527 at_fn_diff_devnull "$at_stderr" || at_failed=:
   36528 $at_diff expout "$at_stdout" || at_failed=:
   36529 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:221"
   36530 $at_failed && at_fn_log_failure
   36531 $at_traceon; }
   36532 
   36533   rm -rf xml-tests expout
   36534   at_restore_special_files
   36535 fi
   36536 { set +x
   36537 $as_echo "$at_srcdir/headers.at:221: bison -d -o x4.c x4.y"
   36538 at_fn_check_prepare_trace "headers.at:221"
   36539 ( $at_check_trace; bison -d -o x4.c x4.y
   36540 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36541 at_status=$? at_failed=false
   36542 $at_check_filter
   36543 at_fn_diff_devnull "$at_stderr" || at_failed=:
   36544 at_fn_diff_devnull "$at_stdout" || at_failed=:
   36545 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:221"
   36546 $at_failed && at_fn_log_failure
   36547 $at_traceon; }
   36548 
   36549 
   36550 
   36551 { set +x
   36552 $as_echo "$at_srcdir/headers.at:221: \$BISON_C_WORKS"
   36553 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "headers.at:221"
   36554 ( $at_check_trace; $BISON_C_WORKS
   36555 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36556 at_status=$? at_failed=false
   36557 $at_check_filter
   36558 echo stderr:; cat "$at_stderr"
   36559 echo stdout:; cat "$at_stdout"
   36560 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:221"
   36561 $at_failed && at_fn_log_failure
   36562 $at_traceon; }
   36563 
   36564 { set +x
   36565 $as_echo "$at_srcdir/headers.at:221: \$CC \$CFLAGS \$CPPFLAGS -c -o x4.o x4.c "
   36566 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o x4.o x4.c " "headers.at:221"
   36567 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o x4.o x4.c
   36568 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36569 at_status=$? at_failed=false
   36570 $at_check_filter
   36571 echo stderr:; cat "$at_stderr"
   36572 echo stdout:; cat "$at_stdout"
   36573 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:221"
   36574 $at_failed && at_fn_log_failure
   36575 $at_traceon; }
   36576 
   36577 { set +x
   36578 $as_echo "$at_srcdir/headers.at:221: echo \"x4\" >>expout"
   36579 at_fn_check_prepare_trace "headers.at:221"
   36580 ( $at_check_trace; echo "x4" >>expout
   36581 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36582 at_status=$? at_failed=false
   36583 $at_check_filter
   36584 at_fn_diff_devnull "$at_stderr" || at_failed=:
   36585 at_fn_diff_devnull "$at_stdout" || at_failed=:
   36586 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:221"
   36587 $at_failed && at_fn_log_failure
   36588 $at_traceon; }
   36589 
   36590 
   36591 
   36592 
   36593 
   36594 cat >x5.y <<'_ATEOF'
   36595 %code top {
   36596 #include <config.h>
   36597 /* We don't need perfect functions for these tests. */
   36598 #undef malloc
   36599 #undef memcmp
   36600 #undef realloc
   36601 }
   36602 
   36603 %define api.prefix "x5_"
   36604 %locations %debug %language "c++"
   36605 %error-verbose
   36606 %union
   36607 {
   36608   int integer;
   36609 }
   36610 %{
   36611 #include <stdio.h>
   36612 
   36613   static int x5_lex (x5_::parser::semantic_type *lvalp, x5_::parser::location_type *llocp);
   36614 %}
   36615 %%
   36616 exp:
   36617   'x' '1' { printf ("x1\n"); }
   36618 | 'x' '2' { printf ("x2\n"); }
   36619 | 'x' '3' { printf ("x3\n"); }
   36620 | 'x' '4' { printf ("x4\n"); }
   36621 | 'x' '5' { printf ("x5\n"); }
   36622 | 'x' '6' { printf ("x6\n"); }
   36623 | 'x' '7' { printf ("x7\n"); }
   36624 | 'x' '8' { printf ("x8\n"); }
   36625 ;
   36626 
   36627 %%
   36628 /* A C++ error reporting function.  */
   36629 void
   36630 x5_::parser::error (const location_type& l, const std::string& m)
   36631 {
   36632   (void) l;
   36633   std::cerr << l << ": " << m << std::endl;
   36634 }
   36635 #include <assert.h>
   36636 static
   36637 int x5_lex (x5_::parser::semantic_type *lvalp, x5_::parser::location_type *llocp)
   36638 {
   36639   static char const input[] = "x5";
   36640   static size_t toknum = 0;
   36641   int res;
   36642   (void) lvalp;(void) llocp;
   36643   assert (toknum < sizeof input / sizeof input[0]);
   36644   res = input[toknum++];
   36645   ;
   36646   (*llocp).begin.line = (*llocp).end.line = 1;
   36647   (*llocp).begin.column = (*llocp).end.column = toknum;
   36648   return res;
   36649 }
   36650 _ATEOF
   36651 
   36652 
   36653 
   36654 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   36655   at_save_special_files
   36656   mkdir xml-tests
   36657     # Don't combine these Bison invocations since we want to be sure that
   36658   # --report=all isn't required to get the full XML file.
   36659   { set +x
   36660 $as_echo "$at_srcdir/headers.at:222: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   36661                   --graph=xml-tests/test.dot -d -o x5.cc x5.y"
   36662 at_fn_check_prepare_notrace 'an embedded newline' "headers.at:222"
   36663 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   36664                   --graph=xml-tests/test.dot -d -o x5.cc x5.y
   36665 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36666 at_status=$? at_failed=false
   36667 $at_check_filter
   36668 echo stderr:; cat "$at_stderr"
   36669 echo stdout:; cat "$at_stdout"
   36670 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:222"
   36671 $at_failed && at_fn_log_failure
   36672 $at_traceon; }
   36673 
   36674   { set +x
   36675 $as_echo "$at_srcdir/headers.at:222: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x5.cc x5.y"
   36676 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x5.cc x5.y" "headers.at:222"
   36677 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x5.cc x5.y
   36678 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36679 at_status=$? at_failed=false
   36680 $at_check_filter
   36681 echo stderr:; cat "$at_stderr"
   36682 echo stdout:; cat "$at_stdout"
   36683 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:222"
   36684 $at_failed && at_fn_log_failure
   36685 $at_traceon; }
   36686 
   36687     cp xml-tests/test.output expout
   36688   { set +x
   36689 $as_echo "$at_srcdir/headers.at:222: \$XSLTPROC \\
   36690              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   36691              xml-tests/test.xml"
   36692 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:222"
   36693 ( $at_check_trace; $XSLTPROC \
   36694              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   36695              xml-tests/test.xml
   36696 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36697 at_status=$? at_failed=false
   36698 $at_check_filter
   36699 at_fn_diff_devnull "$at_stderr" || at_failed=:
   36700 $at_diff expout "$at_stdout" || at_failed=:
   36701 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:222"
   36702 $at_failed && at_fn_log_failure
   36703 $at_traceon; }
   36704 
   36705   sort xml-tests/test.dot > expout
   36706   { set +x
   36707 $as_echo "$at_srcdir/headers.at:222: \$XSLTPROC \\
   36708              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   36709              xml-tests/test.xml | sort"
   36710 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:222"
   36711 ( $at_check_trace; $XSLTPROC \
   36712              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   36713              xml-tests/test.xml | sort
   36714 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36715 at_status=$? at_failed=false
   36716 $at_check_filter
   36717 at_fn_diff_devnull "$at_stderr" || at_failed=:
   36718 $at_diff expout "$at_stdout" || at_failed=:
   36719 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:222"
   36720 $at_failed && at_fn_log_failure
   36721 $at_traceon; }
   36722 
   36723   rm -rf xml-tests expout
   36724   at_restore_special_files
   36725 fi
   36726 { set +x
   36727 $as_echo "$at_srcdir/headers.at:222: bison -d -o x5.cc x5.y"
   36728 at_fn_check_prepare_trace "headers.at:222"
   36729 ( $at_check_trace; bison -d -o x5.cc x5.y
   36730 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36731 at_status=$? at_failed=false
   36732 $at_check_filter
   36733 at_fn_diff_devnull "$at_stderr" || at_failed=:
   36734 at_fn_diff_devnull "$at_stdout" || at_failed=:
   36735 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:222"
   36736 $at_failed && at_fn_log_failure
   36737 $at_traceon; }
   36738 
   36739 
   36740 
   36741 
   36742 { set +x
   36743 $as_echo "$at_srcdir/headers.at:222: \$BISON_CXX_WORKS"
   36744 at_fn_check_prepare_dynamic "$BISON_CXX_WORKS" "headers.at:222"
   36745 ( $at_check_trace; $BISON_CXX_WORKS
   36746 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36747 at_status=$? at_failed=false
   36748 $at_check_filter
   36749 echo stderr:; cat "$at_stderr"
   36750 echo stdout:; cat "$at_stdout"
   36751 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:222"
   36752 $at_failed && at_fn_log_failure
   36753 $at_traceon; }
   36754 
   36755 { set +x
   36756 $as_echo "$at_srcdir/headers.at:222: \$CXX \$CXXFLAGS \$CPPFLAGS -c -o x5.o x5.cc "
   36757 at_fn_check_prepare_dynamic "$CXX $CXXFLAGS $CPPFLAGS -c -o x5.o x5.cc " "headers.at:222"
   36758 ( $at_check_trace; $CXX $CXXFLAGS $CPPFLAGS -c -o x5.o x5.cc
   36759 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36760 at_status=$? at_failed=false
   36761 $at_check_filter
   36762 echo stderr:; cat "$at_stderr"
   36763 echo stdout:; cat "$at_stdout"
   36764 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:222"
   36765 $at_failed && at_fn_log_failure
   36766 $at_traceon; }
   36767 
   36768 { set +x
   36769 $as_echo "$at_srcdir/headers.at:222: echo \"x5\" >>expout"
   36770 at_fn_check_prepare_trace "headers.at:222"
   36771 ( $at_check_trace; echo "x5" >>expout
   36772 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36773 at_status=$? at_failed=false
   36774 $at_check_filter
   36775 at_fn_diff_devnull "$at_stderr" || at_failed=:
   36776 at_fn_diff_devnull "$at_stdout" || at_failed=:
   36777 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:222"
   36778 $at_failed && at_fn_log_failure
   36779 $at_traceon; }
   36780 
   36781 
   36782 
   36783 
   36784 
   36785 cat >x6.y <<'_ATEOF'
   36786 %code top {
   36787 #include <config.h>
   36788 /* We don't need perfect functions for these tests. */
   36789 #undef malloc
   36790 #undef memcmp
   36791 #undef realloc
   36792 }
   36793 
   36794 %define api.prefix "x6_"
   36795 %define api.pure
   36796 %error-verbose
   36797 %union
   36798 {
   36799   int integer;
   36800 }
   36801 %{
   36802 #include <stdio.h>
   36803   static void x6_error ( const char *msg);
   36804   static int x6_lex (X6_STYPE *lvalp);
   36805 %}
   36806 %%
   36807 exp:
   36808   'x' '1' { printf ("x1\n"); }
   36809 | 'x' '2' { printf ("x2\n"); }
   36810 | 'x' '3' { printf ("x3\n"); }
   36811 | 'x' '4' { printf ("x4\n"); }
   36812 | 'x' '5' { printf ("x5\n"); }
   36813 | 'x' '6' { printf ("x6\n"); }
   36814 | 'x' '7' { printf ("x7\n"); }
   36815 | 'x' '8' { printf ("x8\n"); }
   36816 ;
   36817 
   36818 %%
   36819 #include <stdio.h>
   36820 /* A C error reporting function.  */
   36821 static
   36822 void x6_error ( const char *msg)
   36823 {
   36824   fprintf (stderr, "%s\n", msg);
   36825 }
   36826 #include <assert.h>
   36827 static
   36828 int x6_lex (X6_STYPE *lvalp)
   36829 {
   36830   static char const input[] = "x6";
   36831   static size_t toknum = 0;
   36832   int res;
   36833   (void) lvalp;;
   36834   assert (toknum < sizeof input / sizeof input[0]);
   36835   res = input[toknum++];
   36836   ;
   36837   return res;
   36838 }
   36839 _ATEOF
   36840 
   36841 
   36842 
   36843 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   36844   at_save_special_files
   36845   mkdir xml-tests
   36846     # Don't combine these Bison invocations since we want to be sure that
   36847   # --report=all isn't required to get the full XML file.
   36848   { set +x
   36849 $as_echo "$at_srcdir/headers.at:223: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   36850                   --graph=xml-tests/test.dot -d -o x6.c x6.y"
   36851 at_fn_check_prepare_notrace 'an embedded newline' "headers.at:223"
   36852 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   36853                   --graph=xml-tests/test.dot -d -o x6.c x6.y
   36854 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36855 at_status=$? at_failed=false
   36856 $at_check_filter
   36857 echo stderr:; cat "$at_stderr"
   36858 echo stdout:; cat "$at_stdout"
   36859 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:223"
   36860 $at_failed && at_fn_log_failure
   36861 $at_traceon; }
   36862 
   36863   { set +x
   36864 $as_echo "$at_srcdir/headers.at:223: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x6.c x6.y"
   36865 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x6.c x6.y" "headers.at:223"
   36866 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x6.c x6.y
   36867 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36868 at_status=$? at_failed=false
   36869 $at_check_filter
   36870 echo stderr:; cat "$at_stderr"
   36871 echo stdout:; cat "$at_stdout"
   36872 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:223"
   36873 $at_failed && at_fn_log_failure
   36874 $at_traceon; }
   36875 
   36876     cp xml-tests/test.output expout
   36877   { set +x
   36878 $as_echo "$at_srcdir/headers.at:223: \$XSLTPROC \\
   36879              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   36880              xml-tests/test.xml"
   36881 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:223"
   36882 ( $at_check_trace; $XSLTPROC \
   36883              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   36884              xml-tests/test.xml
   36885 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36886 at_status=$? at_failed=false
   36887 $at_check_filter
   36888 at_fn_diff_devnull "$at_stderr" || at_failed=:
   36889 $at_diff expout "$at_stdout" || at_failed=:
   36890 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:223"
   36891 $at_failed && at_fn_log_failure
   36892 $at_traceon; }
   36893 
   36894   sort xml-tests/test.dot > expout
   36895   { set +x
   36896 $as_echo "$at_srcdir/headers.at:223: \$XSLTPROC \\
   36897              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   36898              xml-tests/test.xml | sort"
   36899 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:223"
   36900 ( $at_check_trace; $XSLTPROC \
   36901              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   36902              xml-tests/test.xml | sort
   36903 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36904 at_status=$? at_failed=false
   36905 $at_check_filter
   36906 at_fn_diff_devnull "$at_stderr" || at_failed=:
   36907 $at_diff expout "$at_stdout" || at_failed=:
   36908 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:223"
   36909 $at_failed && at_fn_log_failure
   36910 $at_traceon; }
   36911 
   36912   rm -rf xml-tests expout
   36913   at_restore_special_files
   36914 fi
   36915 { set +x
   36916 $as_echo "$at_srcdir/headers.at:223: bison -d -o x6.c x6.y"
   36917 at_fn_check_prepare_trace "headers.at:223"
   36918 ( $at_check_trace; bison -d -o x6.c x6.y
   36919 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36920 at_status=$? at_failed=false
   36921 $at_check_filter
   36922 at_fn_diff_devnull "$at_stderr" || at_failed=:
   36923 at_fn_diff_devnull "$at_stdout" || at_failed=:
   36924 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:223"
   36925 $at_failed && at_fn_log_failure
   36926 $at_traceon; }
   36927 
   36928 
   36929 
   36930 { set +x
   36931 $as_echo "$at_srcdir/headers.at:223: \$BISON_C_WORKS"
   36932 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "headers.at:223"
   36933 ( $at_check_trace; $BISON_C_WORKS
   36934 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36935 at_status=$? at_failed=false
   36936 $at_check_filter
   36937 echo stderr:; cat "$at_stderr"
   36938 echo stdout:; cat "$at_stdout"
   36939 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:223"
   36940 $at_failed && at_fn_log_failure
   36941 $at_traceon; }
   36942 
   36943 { set +x
   36944 $as_echo "$at_srcdir/headers.at:223: \$CC \$CFLAGS \$CPPFLAGS -c -o x6.o x6.c "
   36945 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o x6.o x6.c " "headers.at:223"
   36946 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o x6.o x6.c
   36947 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36948 at_status=$? at_failed=false
   36949 $at_check_filter
   36950 echo stderr:; cat "$at_stderr"
   36951 echo stdout:; cat "$at_stdout"
   36952 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:223"
   36953 $at_failed && at_fn_log_failure
   36954 $at_traceon; }
   36955 
   36956 { set +x
   36957 $as_echo "$at_srcdir/headers.at:223: echo \"x6\" >>expout"
   36958 at_fn_check_prepare_trace "headers.at:223"
   36959 ( $at_check_trace; echo "x6" >>expout
   36960 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   36961 at_status=$? at_failed=false
   36962 $at_check_filter
   36963 at_fn_diff_devnull "$at_stderr" || at_failed=:
   36964 at_fn_diff_devnull "$at_stdout" || at_failed=:
   36965 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:223"
   36966 $at_failed && at_fn_log_failure
   36967 $at_traceon; }
   36968 
   36969 
   36970 
   36971 
   36972 
   36973 cat >x7.y <<'_ATEOF'
   36974 %code top {
   36975 #include <config.h>
   36976 /* We don't need perfect functions for these tests. */
   36977 #undef malloc
   36978 #undef memcmp
   36979 #undef realloc
   36980 }
   36981 
   36982 %define api.prefix "x7_"
   36983 %define api.push-pull both
   36984 %error-verbose
   36985 %union
   36986 {
   36987   int integer;
   36988 }
   36989 %{
   36990 #include <stdio.h>
   36991   static void x7_error ( const char *msg);
   36992   static int x7_lex (void);
   36993 %}
   36994 %%
   36995 exp:
   36996   'x' '1' { printf ("x1\n"); }
   36997 | 'x' '2' { printf ("x2\n"); }
   36998 | 'x' '3' { printf ("x3\n"); }
   36999 | 'x' '4' { printf ("x4\n"); }
   37000 | 'x' '5' { printf ("x5\n"); }
   37001 | 'x' '6' { printf ("x6\n"); }
   37002 | 'x' '7' { printf ("x7\n"); }
   37003 | 'x' '8' { printf ("x8\n"); }
   37004 ;
   37005 
   37006 %%
   37007 #include <stdio.h>
   37008 /* A C error reporting function.  */
   37009 static
   37010 void x7_error ( const char *msg)
   37011 {
   37012   fprintf (stderr, "%s\n", msg);
   37013 }
   37014 #include <assert.h>
   37015 static
   37016 int x7_lex (void)
   37017 {
   37018   static char const input[] = "x7";
   37019   static size_t toknum = 0;
   37020   int res;
   37021   ;
   37022   assert (toknum < sizeof input / sizeof input[0]);
   37023   res = input[toknum++];
   37024   ;
   37025   return res;
   37026 }
   37027 _ATEOF
   37028 
   37029 
   37030 
   37031 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   37032   at_save_special_files
   37033   mkdir xml-tests
   37034     # Don't combine these Bison invocations since we want to be sure that
   37035   # --report=all isn't required to get the full XML file.
   37036   { set +x
   37037 $as_echo "$at_srcdir/headers.at:224: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   37038                   --graph=xml-tests/test.dot -d -o x7.c x7.y"
   37039 at_fn_check_prepare_notrace 'an embedded newline' "headers.at:224"
   37040 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   37041                   --graph=xml-tests/test.dot -d -o x7.c x7.y
   37042 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37043 at_status=$? at_failed=false
   37044 $at_check_filter
   37045 echo stderr:; cat "$at_stderr"
   37046 echo stdout:; cat "$at_stdout"
   37047 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:224"
   37048 $at_failed && at_fn_log_failure
   37049 $at_traceon; }
   37050 
   37051   { set +x
   37052 $as_echo "$at_srcdir/headers.at:224: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x7.c x7.y"
   37053 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x7.c x7.y" "headers.at:224"
   37054 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x7.c x7.y
   37055 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37056 at_status=$? at_failed=false
   37057 $at_check_filter
   37058 echo stderr:; cat "$at_stderr"
   37059 echo stdout:; cat "$at_stdout"
   37060 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:224"
   37061 $at_failed && at_fn_log_failure
   37062 $at_traceon; }
   37063 
   37064     cp xml-tests/test.output expout
   37065   { set +x
   37066 $as_echo "$at_srcdir/headers.at:224: \$XSLTPROC \\
   37067              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   37068              xml-tests/test.xml"
   37069 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:224"
   37070 ( $at_check_trace; $XSLTPROC \
   37071              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   37072              xml-tests/test.xml
   37073 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37074 at_status=$? at_failed=false
   37075 $at_check_filter
   37076 at_fn_diff_devnull "$at_stderr" || at_failed=:
   37077 $at_diff expout "$at_stdout" || at_failed=:
   37078 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:224"
   37079 $at_failed && at_fn_log_failure
   37080 $at_traceon; }
   37081 
   37082   sort xml-tests/test.dot > expout
   37083   { set +x
   37084 $as_echo "$at_srcdir/headers.at:224: \$XSLTPROC \\
   37085              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   37086              xml-tests/test.xml | sort"
   37087 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:224"
   37088 ( $at_check_trace; $XSLTPROC \
   37089              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   37090              xml-tests/test.xml | sort
   37091 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37092 at_status=$? at_failed=false
   37093 $at_check_filter
   37094 at_fn_diff_devnull "$at_stderr" || at_failed=:
   37095 $at_diff expout "$at_stdout" || at_failed=:
   37096 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:224"
   37097 $at_failed && at_fn_log_failure
   37098 $at_traceon; }
   37099 
   37100   rm -rf xml-tests expout
   37101   at_restore_special_files
   37102 fi
   37103 { set +x
   37104 $as_echo "$at_srcdir/headers.at:224: bison -d -o x7.c x7.y"
   37105 at_fn_check_prepare_trace "headers.at:224"
   37106 ( $at_check_trace; bison -d -o x7.c x7.y
   37107 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37108 at_status=$? at_failed=false
   37109 $at_check_filter
   37110 at_fn_diff_devnull "$at_stderr" || at_failed=:
   37111 at_fn_diff_devnull "$at_stdout" || at_failed=:
   37112 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:224"
   37113 $at_failed && at_fn_log_failure
   37114 $at_traceon; }
   37115 
   37116 
   37117 
   37118 { set +x
   37119 $as_echo "$at_srcdir/headers.at:224: \$BISON_C_WORKS"
   37120 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "headers.at:224"
   37121 ( $at_check_trace; $BISON_C_WORKS
   37122 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37123 at_status=$? at_failed=false
   37124 $at_check_filter
   37125 echo stderr:; cat "$at_stderr"
   37126 echo stdout:; cat "$at_stdout"
   37127 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:224"
   37128 $at_failed && at_fn_log_failure
   37129 $at_traceon; }
   37130 
   37131 { set +x
   37132 $as_echo "$at_srcdir/headers.at:224: \$CC \$CFLAGS \$CPPFLAGS -c -o x7.o x7.c "
   37133 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o x7.o x7.c " "headers.at:224"
   37134 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o x7.o x7.c
   37135 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37136 at_status=$? at_failed=false
   37137 $at_check_filter
   37138 echo stderr:; cat "$at_stderr"
   37139 echo stdout:; cat "$at_stdout"
   37140 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:224"
   37141 $at_failed && at_fn_log_failure
   37142 $at_traceon; }
   37143 
   37144 { set +x
   37145 $as_echo "$at_srcdir/headers.at:224: echo \"x7\" >>expout"
   37146 at_fn_check_prepare_trace "headers.at:224"
   37147 ( $at_check_trace; echo "x7" >>expout
   37148 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37149 at_status=$? at_failed=false
   37150 $at_check_filter
   37151 at_fn_diff_devnull "$at_stderr" || at_failed=:
   37152 at_fn_diff_devnull "$at_stdout" || at_failed=:
   37153 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:224"
   37154 $at_failed && at_fn_log_failure
   37155 $at_traceon; }
   37156 
   37157 
   37158 
   37159 
   37160 
   37161 cat >x8.y <<'_ATEOF'
   37162 %code top {
   37163 #include <config.h>
   37164 /* We don't need perfect functions for these tests. */
   37165 #undef malloc
   37166 #undef memcmp
   37167 #undef realloc
   37168 }
   37169 
   37170 %define api.prefix "x8_"
   37171 %define api.pure %define api.push-pull both
   37172 %error-verbose
   37173 %union
   37174 {
   37175   int integer;
   37176 }
   37177 %{
   37178 #include <stdio.h>
   37179   static void x8_error ( const char *msg);
   37180   static int x8_lex (X8_STYPE *lvalp);
   37181 %}
   37182 %%
   37183 exp:
   37184   'x' '1' { printf ("x1\n"); }
   37185 | 'x' '2' { printf ("x2\n"); }
   37186 | 'x' '3' { printf ("x3\n"); }
   37187 | 'x' '4' { printf ("x4\n"); }
   37188 | 'x' '5' { printf ("x5\n"); }
   37189 | 'x' '6' { printf ("x6\n"); }
   37190 | 'x' '7' { printf ("x7\n"); }
   37191 | 'x' '8' { printf ("x8\n"); }
   37192 ;
   37193 
   37194 %%
   37195 #include <stdio.h>
   37196 /* A C error reporting function.  */
   37197 static
   37198 void x8_error ( const char *msg)
   37199 {
   37200   fprintf (stderr, "%s\n", msg);
   37201 }
   37202 #include <assert.h>
   37203 static
   37204 int x8_lex (X8_STYPE *lvalp)
   37205 {
   37206   static char const input[] = "x8";
   37207   static size_t toknum = 0;
   37208   int res;
   37209   (void) lvalp;;
   37210   assert (toknum < sizeof input / sizeof input[0]);
   37211   res = input[toknum++];
   37212   ;
   37213   return res;
   37214 }
   37215 _ATEOF
   37216 
   37217 
   37218 
   37219 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   37220   at_save_special_files
   37221   mkdir xml-tests
   37222     # Don't combine these Bison invocations since we want to be sure that
   37223   # --report=all isn't required to get the full XML file.
   37224   { set +x
   37225 $as_echo "$at_srcdir/headers.at:225: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   37226                   --graph=xml-tests/test.dot -d -o x8.c x8.y"
   37227 at_fn_check_prepare_notrace 'an embedded newline' "headers.at:225"
   37228 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   37229                   --graph=xml-tests/test.dot -d -o x8.c x8.y
   37230 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37231 at_status=$? at_failed=false
   37232 $at_check_filter
   37233 echo stderr:; cat "$at_stderr"
   37234 echo stdout:; cat "$at_stdout"
   37235 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:225"
   37236 $at_failed && at_fn_log_failure
   37237 $at_traceon; }
   37238 
   37239   { set +x
   37240 $as_echo "$at_srcdir/headers.at:225: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x8.c x8.y"
   37241 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x8.c x8.y" "headers.at:225"
   37242 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -o x8.c x8.y
   37243 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37244 at_status=$? at_failed=false
   37245 $at_check_filter
   37246 echo stderr:; cat "$at_stderr"
   37247 echo stdout:; cat "$at_stdout"
   37248 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:225"
   37249 $at_failed && at_fn_log_failure
   37250 $at_traceon; }
   37251 
   37252     cp xml-tests/test.output expout
   37253   { set +x
   37254 $as_echo "$at_srcdir/headers.at:225: \$XSLTPROC \\
   37255              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   37256              xml-tests/test.xml"
   37257 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:225"
   37258 ( $at_check_trace; $XSLTPROC \
   37259              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   37260              xml-tests/test.xml
   37261 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37262 at_status=$? at_failed=false
   37263 $at_check_filter
   37264 at_fn_diff_devnull "$at_stderr" || at_failed=:
   37265 $at_diff expout "$at_stdout" || at_failed=:
   37266 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:225"
   37267 $at_failed && at_fn_log_failure
   37268 $at_traceon; }
   37269 
   37270   sort xml-tests/test.dot > expout
   37271   { set +x
   37272 $as_echo "$at_srcdir/headers.at:225: \$XSLTPROC \\
   37273              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   37274              xml-tests/test.xml | sort"
   37275 at_fn_check_prepare_notrace 'a `...` command substitution' "headers.at:225"
   37276 ( $at_check_trace; $XSLTPROC \
   37277              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   37278              xml-tests/test.xml | sort
   37279 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37280 at_status=$? at_failed=false
   37281 $at_check_filter
   37282 at_fn_diff_devnull "$at_stderr" || at_failed=:
   37283 $at_diff expout "$at_stdout" || at_failed=:
   37284 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:225"
   37285 $at_failed && at_fn_log_failure
   37286 $at_traceon; }
   37287 
   37288   rm -rf xml-tests expout
   37289   at_restore_special_files
   37290 fi
   37291 { set +x
   37292 $as_echo "$at_srcdir/headers.at:225: bison -d -o x8.c x8.y"
   37293 at_fn_check_prepare_trace "headers.at:225"
   37294 ( $at_check_trace; bison -d -o x8.c x8.y
   37295 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37296 at_status=$? at_failed=false
   37297 $at_check_filter
   37298 at_fn_diff_devnull "$at_stderr" || at_failed=:
   37299 at_fn_diff_devnull "$at_stdout" || at_failed=:
   37300 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:225"
   37301 $at_failed && at_fn_log_failure
   37302 $at_traceon; }
   37303 
   37304 
   37305 
   37306 { set +x
   37307 $as_echo "$at_srcdir/headers.at:225: \$BISON_C_WORKS"
   37308 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "headers.at:225"
   37309 ( $at_check_trace; $BISON_C_WORKS
   37310 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37311 at_status=$? at_failed=false
   37312 $at_check_filter
   37313 echo stderr:; cat "$at_stderr"
   37314 echo stdout:; cat "$at_stdout"
   37315 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:225"
   37316 $at_failed && at_fn_log_failure
   37317 $at_traceon; }
   37318 
   37319 { set +x
   37320 $as_echo "$at_srcdir/headers.at:225: \$CC \$CFLAGS \$CPPFLAGS -c -o x8.o x8.c "
   37321 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o x8.o x8.c " "headers.at:225"
   37322 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o x8.o x8.c
   37323 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37324 at_status=$? at_failed=false
   37325 $at_check_filter
   37326 echo stderr:; cat "$at_stderr"
   37327 echo stdout:; cat "$at_stdout"
   37328 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:225"
   37329 $at_failed && at_fn_log_failure
   37330 $at_traceon; }
   37331 
   37332 { set +x
   37333 $as_echo "$at_srcdir/headers.at:225: echo \"x8\" >>expout"
   37334 at_fn_check_prepare_trace "headers.at:225"
   37335 ( $at_check_trace; echo "x8" >>expout
   37336 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37337 at_status=$? at_failed=false
   37338 $at_check_filter
   37339 at_fn_diff_devnull "$at_stderr" || at_failed=:
   37340 at_fn_diff_devnull "$at_stdout" || at_failed=:
   37341 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:225"
   37342 $at_failed && at_fn_log_failure
   37343 $at_traceon; }
   37344 
   37345 
   37346 
   37347 
   37348 #AT_TEST([x5], [%locations %language "c++" %glr-parser])
   37349 
   37350 # Check there is no 'yy' left.
   37351 # C++ output relies on namespaces and still uses yy a lot.
   37352 #
   37353 # Check there is no 'YY' left.
   37354 # Ignore comments, YYChar (template parameter), YYPARSE_PARAM
   37355 # (obsolete), YYPUSH_MORE(_DEFINED)?  (constant definition),
   37356 # YY_\w+_INCLUDED (header guards).
   37357 #
   37358 # YYDEBUG (not renamed) can be read, but not changed.
   37359 { set +x
   37360 $as_echo "$at_srcdir/headers.at:237: \$PERL -n -0777 -e '
   37361   s{/\\*.*?\\*/}{}gs;
   37362   s{//.*}{}g;
   37363   s{\\b(YYChar
   37364       |YYPARSE_PARAM
   37365       |YYPUSH_MORE(_DEFINED)?
   37366       |YY_\\w+_INCLUDED
   37367       |YY_NULL
   37368       |(defined|if)\\ YYDEBUG
   37369       )\\b}{}gx;
   37370   while (/^(.*YY.*)\$/gm)
   37371   {
   37372     print \"\$ARGV: invalid exported YY: \$1\\n\";
   37373   }
   37374   if (\$ARGV =~ /\\.h\$/)
   37375   {
   37376     while (/^(.*yy.*)\$/gm)
   37377     {
   37378       print \"\$ARGV: invalid exported yy: \$1\\n\";
   37379     }
   37380   }
   37381 ' -- *.hh *.h"
   37382 at_fn_check_prepare_notrace 'an embedded newline' "headers.at:237"
   37383 ( $at_check_trace; $PERL -n -0777 -e '
   37384   s{/\*.*?\*/}{}gs;
   37385   s{//.*}{}g;
   37386   s{\b(YYChar
   37387       |YYPARSE_PARAM
   37388       |YYPUSH_MORE(_DEFINED)?
   37389       |YY_\w+_INCLUDED
   37390       |YY_NULL
   37391       |(defined|if)\ YYDEBUG
   37392       )\b}{}gx;
   37393   while (/^(.*YY.*)$/gm)
   37394   {
   37395     print "$ARGV: invalid exported YY: $1\n";
   37396   }
   37397   if ($ARGV =~ /\.h$/)
   37398   {
   37399     while (/^(.*yy.*)$/gm)
   37400     {
   37401       print "$ARGV: invalid exported yy: $1\n";
   37402     }
   37403   }
   37404 ' -- *.hh *.h
   37405 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37406 at_status=$? at_failed=false
   37407 $at_check_filter
   37408 at_fn_diff_devnull "$at_stderr" || at_failed=:
   37409 at_fn_diff_devnull "$at_stdout" || at_failed=:
   37410 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:237"
   37411 $at_failed && at_fn_log_failure
   37412 $at_traceon; }
   37413 
   37414 
   37415 # Check that the headers are self-contained, and protected against
   37416 # multiple inclusions.  While at it, check they are sane for C++.
   37417 for h in *.h *.hh
   37418 do
   37419   # No shell expansion with AT_DATA.
   37420   cat >$h.cc <<EOF
   37421 #include <config.h>
   37422 /* We don't need perfect functions for these tests. */
   37423 #undef malloc
   37424 #undef memcmp
   37425 #undef realloc
   37426 
   37427 #include "$h"
   37428 #include "$h"
   37429 EOF
   37430 
   37431 { set +x
   37432 $as_echo "$at_srcdir/headers.at:270: \$BISON_CXX_WORKS"
   37433 at_fn_check_prepare_dynamic "$BISON_CXX_WORKS" "headers.at:270"
   37434 ( $at_check_trace; $BISON_CXX_WORKS
   37435 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37436 at_status=$? at_failed=false
   37437 $at_check_filter
   37438 echo stderr:; cat "$at_stderr"
   37439 echo stdout:; cat "$at_stdout"
   37440 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:270"
   37441 $at_failed && at_fn_log_failure
   37442 $at_traceon; }
   37443 
   37444 { set +x
   37445 $as_echo "$at_srcdir/headers.at:270: \$CXX \$CXXFLAGS \$CPPFLAGS -c -o \$h.o \$h.cc "
   37446 at_fn_check_prepare_dynamic "$CXX $CXXFLAGS $CPPFLAGS -c -o $h.o $h.cc " "headers.at:270"
   37447 ( $at_check_trace; $CXX $CXXFLAGS $CPPFLAGS -c -o $h.o $h.cc
   37448 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37449 at_status=$? at_failed=false
   37450 $at_check_filter
   37451 echo stderr:; cat "$at_stderr"
   37452 echo stdout:; cat "$at_stdout"
   37453 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:270"
   37454 $at_failed && at_fn_log_failure
   37455 $at_traceon; }
   37456 
   37457 done
   37458 
   37459 # Do this late, so that other checks have been performed.
   37460 cat >c-and-cxx.h <<'_ATEOF'
   37461 #ifdef __cplusplus
   37462 extern "C"
   37463 {
   37464 #endif
   37465   int fortytwo (void);
   37466 #ifdef __cplusplus
   37467 }
   37468 #endif
   37469 _ATEOF
   37470 
   37471 cat >c-only.c <<'_ATEOF'
   37472 #include "c-and-cxx.h"
   37473 int
   37474 main (void)
   37475 {
   37476   return fortytwo () == 42 ? 0 : 1;
   37477 }
   37478 _ATEOF
   37479 
   37480 cat >cxx-only.cc <<'_ATEOF'
   37481 #include "c-and-cxx.h"
   37482 int fortytwo ()
   37483 {
   37484   return 42;
   37485 }
   37486 _ATEOF
   37487 
   37488 { set +x
   37489 $as_echo "$at_srcdir/headers.at:274: \$BISON_C_WORKS"
   37490 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "headers.at:274"
   37491 ( $at_check_trace; $BISON_C_WORKS
   37492 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37493 at_status=$? at_failed=false
   37494 $at_check_filter
   37495 echo stderr:; cat "$at_stderr"
   37496 echo stdout:; cat "$at_stdout"
   37497 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:274"
   37498 $at_failed && at_fn_log_failure
   37499 $at_traceon; }
   37500 
   37501 { set +x
   37502 $as_echo "$at_srcdir/headers.at:274: \$CC \$CFLAGS \$CPPFLAGS -c -o c-only.o c-only.c "
   37503 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS -c -o c-only.o c-only.c " "headers.at:274"
   37504 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS -c -o c-only.o c-only.c
   37505 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37506 at_status=$? at_failed=false
   37507 $at_check_filter
   37508 echo stderr:; cat "$at_stderr"
   37509 echo stdout:; cat "$at_stdout"
   37510 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:274"
   37511 $at_failed && at_fn_log_failure
   37512 $at_traceon; }
   37513 
   37514 
   37515 { set +x
   37516 $as_echo "$at_srcdir/headers.at:274: \$BISON_CXX_WORKS"
   37517 at_fn_check_prepare_dynamic "$BISON_CXX_WORKS" "headers.at:274"
   37518 ( $at_check_trace; $BISON_CXX_WORKS
   37519 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37520 at_status=$? at_failed=false
   37521 $at_check_filter
   37522 echo stderr:; cat "$at_stderr"
   37523 echo stdout:; cat "$at_stdout"
   37524 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:274"
   37525 $at_failed && at_fn_log_failure
   37526 $at_traceon; }
   37527 
   37528 { set +x
   37529 $as_echo "$at_srcdir/headers.at:274: \$CXX \$CXXFLAGS \$CPPFLAGS -c -o cxx-only.o cxx-only.cc "
   37530 at_fn_check_prepare_dynamic "$CXX $CXXFLAGS $CPPFLAGS -c -o cxx-only.o cxx-only.cc " "headers.at:274"
   37531 ( $at_check_trace; $CXX $CXXFLAGS $CPPFLAGS -c -o cxx-only.o cxx-only.cc
   37532 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37533 at_status=$? at_failed=false
   37534 $at_check_filter
   37535 echo stderr:; cat "$at_stderr"
   37536 echo stdout:; cat "$at_stdout"
   37537 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:274"
   37538 $at_failed && at_fn_log_failure
   37539 $at_traceon; }
   37540 
   37541 { set +x
   37542 $as_echo "$at_srcdir/headers.at:274: \$CXX \$CXXFLAGS \$CPPFLAGS \$LDFLAGS c-only.o cxx-only.o -o c-and-cxx ||
   37543           exit 77"
   37544 at_fn_check_prepare_notrace 'an embedded newline' "headers.at:274"
   37545 ( $at_check_trace; $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS c-only.o cxx-only.o -o c-and-cxx ||
   37546           exit 77
   37547 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37548 at_status=$? at_failed=false
   37549 $at_check_filter
   37550 at_fn_diff_devnull "$at_stderr" || at_failed=:
   37551 echo stdout:; cat "$at_stdout"
   37552 at_fn_check_skip $at_status "$at_srcdir/headers.at:274"
   37553 $at_failed && at_fn_log_failure
   37554 $at_traceon; }
   37555 
   37556 { set +x
   37557 $as_echo "$at_srcdir/headers.at:274:  \$PREPARSER ./c-and-cxx"
   37558 at_fn_check_prepare_dynamic " $PREPARSER ./c-and-cxx" "headers.at:274"
   37559 ( $at_check_trace;  $PREPARSER ./c-and-cxx
   37560 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37561 at_status=$? at_failed=false
   37562 $at_check_filter
   37563 echo stderr:; tee stderr <"$at_stderr"
   37564 at_fn_diff_devnull "$at_stdout" || at_failed=:
   37565 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:274"
   37566 $at_failed && at_fn_log_failure
   37567 $at_traceon; }
   37568 
   37569 { set +x
   37570 $as_echo "$at_srcdir/headers.at:274: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   37571 at_fn_check_prepare_trace "headers.at:274"
   37572 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   37573 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37574 at_status=$? at_failed=false
   37575 $at_check_filter
   37576 at_fn_diff_devnull "$at_stderr" || at_failed=:
   37577 at_fn_diff_devnull "$at_stdout" || at_failed=:
   37578 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:274"
   37579 $at_failed && at_fn_log_failure
   37580 $at_traceon; }
   37581 
   37582 
   37583 
   37584 
   37585 
   37586 { set +x
   37587 $as_echo "$at_srcdir/headers.at:276: \$BISON_CXX_WORKS"
   37588 at_fn_check_prepare_dynamic "$BISON_CXX_WORKS" "headers.at:276"
   37589 ( $at_check_trace; $BISON_CXX_WORKS
   37590 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37591 at_status=$? at_failed=false
   37592 $at_check_filter
   37593 echo stderr:; cat "$at_stderr"
   37594 echo stdout:; cat "$at_stdout"
   37595 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:276"
   37596 $at_failed && at_fn_log_failure
   37597 $at_traceon; }
   37598 
   37599 { set +x
   37600 $as_echo "$at_srcdir/headers.at:276: \$CXX \$CXXFLAGS \$CPPFLAGS \$LDFLAGS -o parser x[1-8].o -DCC_IS_CXX=\$CC_IS_CXX main.cc \$LIBS"
   37601 at_fn_check_prepare_dynamic "$CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o parser x[1-8].o -DCC_IS_CXX=$CC_IS_CXX main.cc $LIBS" "headers.at:276"
   37602 ( $at_check_trace; $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o parser x[1-8].o -DCC_IS_CXX=$CC_IS_CXX main.cc $LIBS
   37603 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37604 at_status=$? at_failed=false
   37605 $at_check_filter
   37606 echo stderr:; cat "$at_stderr"
   37607 echo stdout:; cat "$at_stdout"
   37608 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:276"
   37609 $at_failed && at_fn_log_failure
   37610 $at_traceon; }
   37611 
   37612 { set +x
   37613 $as_echo "$at_srcdir/headers.at:277:  \$PREPARSER ./parser"
   37614 at_fn_check_prepare_dynamic " $PREPARSER ./parser" "headers.at:277"
   37615 ( $at_check_trace;  $PREPARSER ./parser
   37616 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37617 at_status=$? at_failed=false
   37618 $at_check_filter
   37619 echo stderr:; tee stderr <"$at_stderr"
   37620 $at_diff expout "$at_stdout" || at_failed=:
   37621 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:277"
   37622 $at_failed && at_fn_log_failure
   37623 $at_traceon; }
   37624 
   37625 { set +x
   37626 $as_echo "$at_srcdir/headers.at:277: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   37627 at_fn_check_prepare_trace "headers.at:277"
   37628 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   37629 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37630 at_status=$? at_failed=false
   37631 $at_check_filter
   37632 at_fn_diff_devnull "$at_stderr" || at_failed=:
   37633 at_fn_diff_devnull "$at_stdout" || at_failed=:
   37634 at_fn_check_status 0 $at_status "$at_srcdir/headers.at:277"
   37635 $at_failed && at_fn_log_failure
   37636 $at_traceon; }
   37637 
   37638 
   37639 
   37640 
   37641 
   37642   set +x
   37643   $at_times_p && times >"$at_times_file"
   37644 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   37645 read at_status <"$at_status_file"
   37646 #AT_STOP_143
   37647 #AT_START_144
   37648 at_fn_group_banner 144 'actions.at:24' \
   37649   "Mid-rule actions" "                               " 9
   37650 at_xfail=no
   37651 (
   37652   $as_echo "144. $at_setup_line: testing $at_desc ..."
   37653   $at_traceon
   37654 
   37655 
   37656 # Bison once forgot the mid-rule actions.  It was because the action
   37657 # was attached to the host rule (the one with the mid-rule action),
   37658 # instead of being attached to the empty rule dedicated to this
   37659 # action.
   37660 
   37661 
   37662 cat >input.y <<'_ATEOF'
   37663 %code top {
   37664 #include <config.h>
   37665 /* We don't need perfect functions for these tests. */
   37666 #undef malloc
   37667 #undef memcmp
   37668 #undef realloc
   37669 }
   37670 
   37671 %error-verbose
   37672 %debug
   37673 %{
   37674 static void yyerror ( const char *msg);
   37675 static int yylex (void);
   37676 %}
   37677 %%
   37678 exp:     { putchar ('0'); }
   37679      '1' { putchar ('1'); }
   37680      '2' { putchar ('2'); }
   37681      '3' { putchar ('3'); }
   37682      '4' { putchar ('4'); }
   37683      '5' { putchar ('5'); }
   37684      '6' { putchar ('6'); }
   37685      '7' { putchar ('7'); }
   37686      '8' { putchar ('8'); }
   37687      '9' { putchar ('9'); }
   37688          { putchar ('\n'); }
   37689    ;
   37690 %%
   37691 #include <stdio.h>
   37692 /* A C error reporting function.  */
   37693 static
   37694 void yyerror ( const char *msg)
   37695 {
   37696   fprintf (stderr, "%s\n", msg);
   37697 }
   37698 #include <assert.h>
   37699 static
   37700 int yylex (void)
   37701 {
   37702   static char const input[] = "123456789";
   37703   static size_t toknum = 0;
   37704   int res;
   37705   ;
   37706   assert (toknum < sizeof input / sizeof input[0]);
   37707   res = input[toknum++];
   37708   ;
   37709   return res;
   37710 }
   37711 int
   37712 main (void)
   37713 {
   37714   return yyparse ();
   37715 }
   37716 _ATEOF
   37717 
   37718 
   37719 
   37720 
   37721 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   37722   at_save_special_files
   37723   mkdir xml-tests
   37724     # Don't combine these Bison invocations since we want to be sure that
   37725   # --report=all isn't required to get the full XML file.
   37726   { set +x
   37727 $as_echo "$at_srcdir/actions.at:63: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   37728                   --graph=xml-tests/test.dot -d -v -o input.c input.y"
   37729 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:63"
   37730 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   37731                   --graph=xml-tests/test.dot -d -v -o input.c input.y
   37732 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37733 at_status=$? at_failed=false
   37734 $at_check_filter
   37735 echo stderr:; cat "$at_stderr"
   37736 echo stdout:; cat "$at_stdout"
   37737 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:63"
   37738 $at_failed && at_fn_log_failure
   37739 $at_traceon; }
   37740 
   37741   { set +x
   37742 $as_echo "$at_srcdir/actions.at:63: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -v -o input.c input.y"
   37743 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -v -o input.c input.y" "actions.at:63"
   37744 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -v -o input.c input.y
   37745 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37746 at_status=$? at_failed=false
   37747 $at_check_filter
   37748 echo stderr:; cat "$at_stderr"
   37749 echo stdout:; cat "$at_stdout"
   37750 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:63"
   37751 $at_failed && at_fn_log_failure
   37752 $at_traceon; }
   37753 
   37754     cp xml-tests/test.output expout
   37755   { set +x
   37756 $as_echo "$at_srcdir/actions.at:63: \$XSLTPROC \\
   37757              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   37758              xml-tests/test.xml"
   37759 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:63"
   37760 ( $at_check_trace; $XSLTPROC \
   37761              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   37762              xml-tests/test.xml
   37763 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37764 at_status=$? at_failed=false
   37765 $at_check_filter
   37766 at_fn_diff_devnull "$at_stderr" || at_failed=:
   37767 $at_diff expout "$at_stdout" || at_failed=:
   37768 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:63"
   37769 $at_failed && at_fn_log_failure
   37770 $at_traceon; }
   37771 
   37772   sort xml-tests/test.dot > expout
   37773   { set +x
   37774 $as_echo "$at_srcdir/actions.at:63: \$XSLTPROC \\
   37775              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   37776              xml-tests/test.xml | sort"
   37777 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:63"
   37778 ( $at_check_trace; $XSLTPROC \
   37779              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   37780              xml-tests/test.xml | sort
   37781 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37782 at_status=$? at_failed=false
   37783 $at_check_filter
   37784 at_fn_diff_devnull "$at_stderr" || at_failed=:
   37785 $at_diff expout "$at_stdout" || at_failed=:
   37786 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:63"
   37787 $at_failed && at_fn_log_failure
   37788 $at_traceon; }
   37789 
   37790   rm -rf xml-tests expout
   37791   at_restore_special_files
   37792 fi
   37793 { set +x
   37794 $as_echo "$at_srcdir/actions.at:63: bison -d -v -o input.c input.y"
   37795 at_fn_check_prepare_trace "actions.at:63"
   37796 ( $at_check_trace; bison -d -v -o input.c input.y
   37797 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37798 at_status=$? at_failed=false
   37799 $at_check_filter
   37800 at_fn_diff_devnull "$at_stderr" || at_failed=:
   37801 at_fn_diff_devnull "$at_stdout" || at_failed=:
   37802 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:63"
   37803 $at_failed && at_fn_log_failure
   37804 $at_traceon; }
   37805 
   37806 
   37807 { set +x
   37808 $as_echo "$at_srcdir/actions.at:64: \$BISON_C_WORKS"
   37809 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:64"
   37810 ( $at_check_trace; $BISON_C_WORKS
   37811 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37812 at_status=$? at_failed=false
   37813 $at_check_filter
   37814 echo stderr:; cat "$at_stderr"
   37815 echo stdout:; cat "$at_stdout"
   37816 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:64"
   37817 $at_failed && at_fn_log_failure
   37818 $at_traceon; }
   37819 
   37820 { set +x
   37821 $as_echo "$at_srcdir/actions.at:64: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   37822 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:64"
   37823 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   37824 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37825 at_status=$? at_failed=false
   37826 $at_check_filter
   37827 echo stderr:; cat "$at_stderr"
   37828 echo stdout:; cat "$at_stdout"
   37829 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:64"
   37830 $at_failed && at_fn_log_failure
   37831 $at_traceon; }
   37832 
   37833 { set +x
   37834 $as_echo "$at_srcdir/actions.at:65:  \$PREPARSER ./input"
   37835 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:65"
   37836 ( $at_check_trace;  $PREPARSER ./input
   37837 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37838 at_status=$? at_failed=false
   37839 $at_check_filter
   37840 echo stderr:; tee stderr <"$at_stderr"
   37841 echo >>"$at_stdout"; $as_echo "0123456789
   37842 " | \
   37843   $at_diff - "$at_stdout" || at_failed=:
   37844 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:65"
   37845 $at_failed && at_fn_log_failure
   37846 $at_traceon; }
   37847 
   37848 { set +x
   37849 $as_echo "$at_srcdir/actions.at:65: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   37850 at_fn_check_prepare_trace "actions.at:65"
   37851 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   37852 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37853 at_status=$? at_failed=false
   37854 $at_check_filter
   37855 at_fn_diff_devnull "$at_stderr" || at_failed=:
   37856 at_fn_diff_devnull "$at_stdout" || at_failed=:
   37857 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:65"
   37858 $at_failed && at_fn_log_failure
   37859 $at_traceon; }
   37860 
   37861 
   37862 
   37863   set +x
   37864   $at_times_p && times >"$at_times_file"
   37865 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   37866 read at_status <"$at_status_file"
   37867 #AT_STOP_144
   37868 #AT_START_145
   37869 at_fn_group_banner 145 'actions.at:133' \
   37870   "Initial location: yacc.c " "                      " 9
   37871 at_xfail=no
   37872 (
   37873   $as_echo "145. $at_setup_line: testing $at_desc ..."
   37874   $at_traceon
   37875 
   37876 
   37877 
   37878 cat >input.y <<'_ATEOF'
   37879 %code top {
   37880 #include <config.h>
   37881 /* We don't need perfect functions for these tests. */
   37882 #undef malloc
   37883 #undef memcmp
   37884 #undef realloc
   37885 }
   37886 
   37887 %defines /* FIXME: Required by lalr1.cc in Bison 2.6. */
   37888 %locations
   37889 %debug
   37890 %skeleton "yacc.c"
   37891 
   37892 
   37893 %code
   37894 {
   37895 # include <stdio.h>
   37896 # include <stdlib.h> /* getenv */
   37897 static void yyerror ( const char *msg);
   37898 static int yylex (void);
   37899 }
   37900 %%
   37901 exp: { YY_LOCATION_PRINT(stderr, @$); fputc ('\n', stderr); }
   37902 %%
   37903 #include <stdio.h>
   37904 /* A C error reporting function.  */
   37905 static
   37906 void yyerror ( const char *msg)
   37907 {
   37908   YY_LOCATION_PRINT (stderr, (yylloc));
   37909   fprintf (stderr, ": ");
   37910   fprintf (stderr, "%s\n", msg);
   37911 }
   37912 
   37913 int yylex (void)
   37914 {
   37915   return 'x';
   37916 }
   37917 
   37918 int
   37919 main (void)
   37920 {
   37921   yydebug = !!getenv("YYDEBUG");
   37922   return !!yyparse ();
   37923 }
   37924 _ATEOF
   37925 
   37926 
   37927 
   37928 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   37929   at_save_special_files
   37930   mkdir xml-tests
   37931     # Don't combine these Bison invocations since we want to be sure that
   37932   # --report=all isn't required to get the full XML file.
   37933   { set +x
   37934 $as_echo "$at_srcdir/actions.at:133: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   37935                   --graph=xml-tests/test.dot -o input.c input.y"
   37936 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:133"
   37937 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   37938                   --graph=xml-tests/test.dot -o input.c input.y
   37939 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37940 at_status=$? at_failed=false
   37941 $at_check_filter
   37942 echo stderr:; cat "$at_stderr"
   37943 echo stdout:; cat "$at_stdout"
   37944 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:133"
   37945 $at_failed && at_fn_log_failure
   37946 $at_traceon; }
   37947 
   37948   { set +x
   37949 $as_echo "$at_srcdir/actions.at:133: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   37950 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:133"
   37951 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   37952 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37953 at_status=$? at_failed=false
   37954 $at_check_filter
   37955 echo stderr:; cat "$at_stderr"
   37956 echo stdout:; cat "$at_stdout"
   37957 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:133"
   37958 $at_failed && at_fn_log_failure
   37959 $at_traceon; }
   37960 
   37961     cp xml-tests/test.output expout
   37962   { set +x
   37963 $as_echo "$at_srcdir/actions.at:133: \$XSLTPROC \\
   37964              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   37965              xml-tests/test.xml"
   37966 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:133"
   37967 ( $at_check_trace; $XSLTPROC \
   37968              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   37969              xml-tests/test.xml
   37970 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37971 at_status=$? at_failed=false
   37972 $at_check_filter
   37973 at_fn_diff_devnull "$at_stderr" || at_failed=:
   37974 $at_diff expout "$at_stdout" || at_failed=:
   37975 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:133"
   37976 $at_failed && at_fn_log_failure
   37977 $at_traceon; }
   37978 
   37979   sort xml-tests/test.dot > expout
   37980   { set +x
   37981 $as_echo "$at_srcdir/actions.at:133: \$XSLTPROC \\
   37982              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   37983              xml-tests/test.xml | sort"
   37984 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:133"
   37985 ( $at_check_trace; $XSLTPROC \
   37986              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   37987              xml-tests/test.xml | sort
   37988 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   37989 at_status=$? at_failed=false
   37990 $at_check_filter
   37991 at_fn_diff_devnull "$at_stderr" || at_failed=:
   37992 $at_diff expout "$at_stdout" || at_failed=:
   37993 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:133"
   37994 $at_failed && at_fn_log_failure
   37995 $at_traceon; }
   37996 
   37997   rm -rf xml-tests expout
   37998   at_restore_special_files
   37999 fi
   38000 { set +x
   38001 $as_echo "$at_srcdir/actions.at:133: bison -o input.c input.y"
   38002 at_fn_check_prepare_trace "actions.at:133"
   38003 ( $at_check_trace; bison -o input.c input.y
   38004 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38005 at_status=$? at_failed=false
   38006 $at_check_filter
   38007 at_fn_diff_devnull "$at_stderr" || at_failed=:
   38008 at_fn_diff_devnull "$at_stdout" || at_failed=:
   38009 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:133"
   38010 $at_failed && at_fn_log_failure
   38011 $at_traceon; }
   38012 
   38013 
   38014    { set +x
   38015 $as_echo "$at_srcdir/actions.at:133: \$BISON_C_WORKS"
   38016 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:133"
   38017 ( $at_check_trace; $BISON_C_WORKS
   38018 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38019 at_status=$? at_failed=false
   38020 $at_check_filter
   38021 echo stderr:; cat "$at_stderr"
   38022 echo stdout:; cat "$at_stdout"
   38023 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:133"
   38024 $at_failed && at_fn_log_failure
   38025 $at_traceon; }
   38026 
   38027 { set +x
   38028 $as_echo "$at_srcdir/actions.at:133: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   38029 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:133"
   38030 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   38031 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38032 at_status=$? at_failed=false
   38033 $at_check_filter
   38034 echo stderr:; cat "$at_stderr"
   38035 echo stdout:; cat "$at_stdout"
   38036 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:133"
   38037 $at_failed && at_fn_log_failure
   38038 $at_traceon; }
   38039 
   38040 
   38041 { set +x
   38042 $as_echo "$at_srcdir/actions.at:133:  \$PREPARSER ./input"
   38043 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:133"
   38044 ( $at_check_trace;  $PREPARSER ./input
   38045 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38046 at_status=$? at_failed=false
   38047 $at_check_filter
   38048 echo stderr:; tee stderr <"$at_stderr"
   38049 at_fn_diff_devnull "$at_stdout" || at_failed=:
   38050 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:133"
   38051 $at_failed && at_fn_log_failure
   38052 $at_traceon; }
   38053 
   38054 { set +x
   38055 $as_echo "$at_srcdir/actions.at:133: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   38056 at_fn_check_prepare_trace "actions.at:133"
   38057 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   38058 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38059 at_status=$? at_failed=false
   38060 $at_check_filter
   38061 echo >>"$at_stderr"; $as_echo "1.1
   38062 1.1: syntax error
   38063 " | \
   38064   $at_diff - "$at_stderr" || at_failed=:
   38065 at_fn_diff_devnull "$at_stdout" || at_failed=:
   38066 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:133"
   38067 $at_failed && at_fn_log_failure
   38068 $at_traceon; }
   38069 
   38070 
   38071 
   38072   set +x
   38073   $at_times_p && times >"$at_times_file"
   38074 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   38075 read at_status <"$at_status_file"
   38076 #AT_STOP_145
   38077 #AT_START_146
   38078 at_fn_group_banner 146 'actions.at:134' \
   38079   "Initial location: yacc.c %define api.pure full" " " 9
   38080 at_xfail=no
   38081 (
   38082   $as_echo "146. $at_setup_line: testing $at_desc ..."
   38083   $at_traceon
   38084 
   38085 
   38086 
   38087 cat >input.y <<'_ATEOF'
   38088 %code top {
   38089 #include <config.h>
   38090 /* We don't need perfect functions for these tests. */
   38091 #undef malloc
   38092 #undef memcmp
   38093 #undef realloc
   38094 }
   38095 
   38096 %defines /* FIXME: Required by lalr1.cc in Bison 2.6. */
   38097 %locations
   38098 %debug
   38099 %skeleton "yacc.c"
   38100 %define api.pure full
   38101 
   38102 %code
   38103 {
   38104 # include <stdio.h>
   38105 # include <stdlib.h> /* getenv */
   38106 static void yyerror (YYLTYPE const * const llocp,  const char *msg);
   38107 static int yylex (YYSTYPE *lvalp, YYLTYPE *llocp);
   38108 }
   38109 %%
   38110 exp: { YY_LOCATION_PRINT(stderr, @$); fputc ('\n', stderr); }
   38111 %%
   38112 #include <stdio.h>
   38113 /* A C error reporting function.  */
   38114 static
   38115 void yyerror (YYLTYPE const * const llocp,  const char *msg)
   38116 {
   38117   YY_LOCATION_PRINT (stderr, (*llocp));
   38118   fprintf (stderr, ": ");
   38119   fprintf (stderr, "%s\n", msg);
   38120 }
   38121 
   38122 int yylex (YYSTYPE *lvalp, YYLTYPE *llocp)
   38123 {
   38124   YYUSE(lvalp);
   38125   YYUSE(llocp);
   38126   return 'x';
   38127 }
   38128 
   38129 int
   38130 main (void)
   38131 {
   38132   yydebug = !!getenv("YYDEBUG");
   38133   return !!yyparse ();
   38134 }
   38135 _ATEOF
   38136 
   38137 
   38138 
   38139 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   38140   at_save_special_files
   38141   mkdir xml-tests
   38142     # Don't combine these Bison invocations since we want to be sure that
   38143   # --report=all isn't required to get the full XML file.
   38144   { set +x
   38145 $as_echo "$at_srcdir/actions.at:134: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   38146                   --graph=xml-tests/test.dot -o input.c input.y"
   38147 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:134"
   38148 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   38149                   --graph=xml-tests/test.dot -o input.c input.y
   38150 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38151 at_status=$? at_failed=false
   38152 $at_check_filter
   38153 echo stderr:; cat "$at_stderr"
   38154 echo stdout:; cat "$at_stdout"
   38155 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:134"
   38156 $at_failed && at_fn_log_failure
   38157 $at_traceon; }
   38158 
   38159   { set +x
   38160 $as_echo "$at_srcdir/actions.at:134: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   38161 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:134"
   38162 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   38163 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38164 at_status=$? at_failed=false
   38165 $at_check_filter
   38166 echo stderr:; cat "$at_stderr"
   38167 echo stdout:; cat "$at_stdout"
   38168 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:134"
   38169 $at_failed && at_fn_log_failure
   38170 $at_traceon; }
   38171 
   38172     cp xml-tests/test.output expout
   38173   { set +x
   38174 $as_echo "$at_srcdir/actions.at:134: \$XSLTPROC \\
   38175              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   38176              xml-tests/test.xml"
   38177 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:134"
   38178 ( $at_check_trace; $XSLTPROC \
   38179              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   38180              xml-tests/test.xml
   38181 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38182 at_status=$? at_failed=false
   38183 $at_check_filter
   38184 at_fn_diff_devnull "$at_stderr" || at_failed=:
   38185 $at_diff expout "$at_stdout" || at_failed=:
   38186 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:134"
   38187 $at_failed && at_fn_log_failure
   38188 $at_traceon; }
   38189 
   38190   sort xml-tests/test.dot > expout
   38191   { set +x
   38192 $as_echo "$at_srcdir/actions.at:134: \$XSLTPROC \\
   38193              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   38194              xml-tests/test.xml | sort"
   38195 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:134"
   38196 ( $at_check_trace; $XSLTPROC \
   38197              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   38198              xml-tests/test.xml | sort
   38199 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38200 at_status=$? at_failed=false
   38201 $at_check_filter
   38202 at_fn_diff_devnull "$at_stderr" || at_failed=:
   38203 $at_diff expout "$at_stdout" || at_failed=:
   38204 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:134"
   38205 $at_failed && at_fn_log_failure
   38206 $at_traceon; }
   38207 
   38208   rm -rf xml-tests expout
   38209   at_restore_special_files
   38210 fi
   38211 { set +x
   38212 $as_echo "$at_srcdir/actions.at:134: bison -o input.c input.y"
   38213 at_fn_check_prepare_trace "actions.at:134"
   38214 ( $at_check_trace; bison -o input.c input.y
   38215 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38216 at_status=$? at_failed=false
   38217 $at_check_filter
   38218 at_fn_diff_devnull "$at_stderr" || at_failed=:
   38219 at_fn_diff_devnull "$at_stdout" || at_failed=:
   38220 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:134"
   38221 $at_failed && at_fn_log_failure
   38222 $at_traceon; }
   38223 
   38224 
   38225    { set +x
   38226 $as_echo "$at_srcdir/actions.at:134: \$BISON_C_WORKS"
   38227 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:134"
   38228 ( $at_check_trace; $BISON_C_WORKS
   38229 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38230 at_status=$? at_failed=false
   38231 $at_check_filter
   38232 echo stderr:; cat "$at_stderr"
   38233 echo stdout:; cat "$at_stdout"
   38234 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:134"
   38235 $at_failed && at_fn_log_failure
   38236 $at_traceon; }
   38237 
   38238 { set +x
   38239 $as_echo "$at_srcdir/actions.at:134: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   38240 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:134"
   38241 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   38242 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38243 at_status=$? at_failed=false
   38244 $at_check_filter
   38245 echo stderr:; cat "$at_stderr"
   38246 echo stdout:; cat "$at_stdout"
   38247 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:134"
   38248 $at_failed && at_fn_log_failure
   38249 $at_traceon; }
   38250 
   38251 
   38252 { set +x
   38253 $as_echo "$at_srcdir/actions.at:134:  \$PREPARSER ./input"
   38254 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:134"
   38255 ( $at_check_trace;  $PREPARSER ./input
   38256 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38257 at_status=$? at_failed=false
   38258 $at_check_filter
   38259 echo stderr:; tee stderr <"$at_stderr"
   38260 at_fn_diff_devnull "$at_stdout" || at_failed=:
   38261 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:134"
   38262 $at_failed && at_fn_log_failure
   38263 $at_traceon; }
   38264 
   38265 { set +x
   38266 $as_echo "$at_srcdir/actions.at:134: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   38267 at_fn_check_prepare_trace "actions.at:134"
   38268 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   38269 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38270 at_status=$? at_failed=false
   38271 $at_check_filter
   38272 echo >>"$at_stderr"; $as_echo "1.1
   38273 1.1: syntax error
   38274 " | \
   38275   $at_diff - "$at_stderr" || at_failed=:
   38276 at_fn_diff_devnull "$at_stdout" || at_failed=:
   38277 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:134"
   38278 $at_failed && at_fn_log_failure
   38279 $at_traceon; }
   38280 
   38281 
   38282 
   38283   set +x
   38284   $at_times_p && times >"$at_times_file"
   38285 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   38286 read at_status <"$at_status_file"
   38287 #AT_STOP_146
   38288 #AT_START_147
   38289 at_fn_group_banner 147 'actions.at:135' \
   38290   "Initial location: yacc.c %define api.pure %parse-param { int x }" "" 9
   38291 at_xfail=no
   38292 (
   38293   $as_echo "147. $at_setup_line: testing $at_desc ..."
   38294   $at_traceon
   38295 
   38296 
   38297 
   38298 cat >input.y <<'_ATEOF'
   38299 %code top {
   38300 #include <config.h>
   38301 /* We don't need perfect functions for these tests. */
   38302 #undef malloc
   38303 #undef memcmp
   38304 #undef realloc
   38305 }
   38306 
   38307 %defines /* FIXME: Required by lalr1.cc in Bison 2.6. */
   38308 %locations
   38309 %debug
   38310 %skeleton "yacc.c"
   38311 %define api.pure %parse-param { int x }
   38312 
   38313 %code
   38314 {
   38315 # include <stdio.h>
   38316 # include <stdlib.h> /* getenv */
   38317 static void yyerror (YYLTYPE const * const llocp, int x,  const char *msg);
   38318 static int yylex (YYSTYPE *lvalp, YYLTYPE *llocp);
   38319 }
   38320 %%
   38321 exp: { YY_LOCATION_PRINT(stderr, @$); fputc ('\n', stderr); }
   38322 %%
   38323 #include <stdio.h>
   38324 /* A C error reporting function.  */
   38325 static
   38326 void yyerror (YYLTYPE const * const llocp, int x,  const char *msg)
   38327 {
   38328   YYUSE(x);
   38329   YY_LOCATION_PRINT (stderr, (*llocp));
   38330   fprintf (stderr, ": ");
   38331   fprintf (stderr, "%s\n", msg);
   38332 }
   38333 
   38334 int yylex (YYSTYPE *lvalp, YYLTYPE *llocp)
   38335 {
   38336   YYUSE(lvalp);
   38337   YYUSE(llocp);
   38338   return 'x';
   38339 }
   38340 
   38341 int
   38342 main (void)
   38343 {
   38344   yydebug = !!getenv("YYDEBUG");
   38345   return !!yyparse (0);
   38346 }
   38347 _ATEOF
   38348 
   38349 
   38350 
   38351 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   38352   at_save_special_files
   38353   mkdir xml-tests
   38354     # Don't combine these Bison invocations since we want to be sure that
   38355   # --report=all isn't required to get the full XML file.
   38356   { set +x
   38357 $as_echo "$at_srcdir/actions.at:135: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   38358                   --graph=xml-tests/test.dot -o input.c input.y"
   38359 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:135"
   38360 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   38361                   --graph=xml-tests/test.dot -o input.c input.y
   38362 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38363 at_status=$? at_failed=false
   38364 $at_check_filter
   38365 echo stderr:; cat "$at_stderr"
   38366 echo stdout:; cat "$at_stdout"
   38367 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:135"
   38368 $at_failed && at_fn_log_failure
   38369 $at_traceon; }
   38370 
   38371   { set +x
   38372 $as_echo "$at_srcdir/actions.at:135: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   38373 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:135"
   38374 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   38375 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38376 at_status=$? at_failed=false
   38377 $at_check_filter
   38378 echo stderr:; cat "$at_stderr"
   38379 echo stdout:; cat "$at_stdout"
   38380 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:135"
   38381 $at_failed && at_fn_log_failure
   38382 $at_traceon; }
   38383 
   38384     cp xml-tests/test.output expout
   38385   { set +x
   38386 $as_echo "$at_srcdir/actions.at:135: \$XSLTPROC \\
   38387              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   38388              xml-tests/test.xml"
   38389 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:135"
   38390 ( $at_check_trace; $XSLTPROC \
   38391              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   38392              xml-tests/test.xml
   38393 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38394 at_status=$? at_failed=false
   38395 $at_check_filter
   38396 at_fn_diff_devnull "$at_stderr" || at_failed=:
   38397 $at_diff expout "$at_stdout" || at_failed=:
   38398 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:135"
   38399 $at_failed && at_fn_log_failure
   38400 $at_traceon; }
   38401 
   38402   sort xml-tests/test.dot > expout
   38403   { set +x
   38404 $as_echo "$at_srcdir/actions.at:135: \$XSLTPROC \\
   38405              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   38406              xml-tests/test.xml | sort"
   38407 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:135"
   38408 ( $at_check_trace; $XSLTPROC \
   38409              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   38410              xml-tests/test.xml | sort
   38411 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38412 at_status=$? at_failed=false
   38413 $at_check_filter
   38414 at_fn_diff_devnull "$at_stderr" || at_failed=:
   38415 $at_diff expout "$at_stdout" || at_failed=:
   38416 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:135"
   38417 $at_failed && at_fn_log_failure
   38418 $at_traceon; }
   38419 
   38420   rm -rf xml-tests expout
   38421   at_restore_special_files
   38422 fi
   38423 { set +x
   38424 $as_echo "$at_srcdir/actions.at:135: bison -o input.c input.y"
   38425 at_fn_check_prepare_trace "actions.at:135"
   38426 ( $at_check_trace; bison -o input.c input.y
   38427 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38428 at_status=$? at_failed=false
   38429 $at_check_filter
   38430 at_fn_diff_devnull "$at_stderr" || at_failed=:
   38431 at_fn_diff_devnull "$at_stdout" || at_failed=:
   38432 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:135"
   38433 $at_failed && at_fn_log_failure
   38434 $at_traceon; }
   38435 
   38436 
   38437    { set +x
   38438 $as_echo "$at_srcdir/actions.at:135: \$BISON_C_WORKS"
   38439 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:135"
   38440 ( $at_check_trace; $BISON_C_WORKS
   38441 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38442 at_status=$? at_failed=false
   38443 $at_check_filter
   38444 echo stderr:; cat "$at_stderr"
   38445 echo stdout:; cat "$at_stdout"
   38446 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:135"
   38447 $at_failed && at_fn_log_failure
   38448 $at_traceon; }
   38449 
   38450 { set +x
   38451 $as_echo "$at_srcdir/actions.at:135: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   38452 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:135"
   38453 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   38454 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38455 at_status=$? at_failed=false
   38456 $at_check_filter
   38457 echo stderr:; cat "$at_stderr"
   38458 echo stdout:; cat "$at_stdout"
   38459 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:135"
   38460 $at_failed && at_fn_log_failure
   38461 $at_traceon; }
   38462 
   38463 
   38464 { set +x
   38465 $as_echo "$at_srcdir/actions.at:135:  \$PREPARSER ./input"
   38466 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:135"
   38467 ( $at_check_trace;  $PREPARSER ./input
   38468 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38469 at_status=$? at_failed=false
   38470 $at_check_filter
   38471 echo stderr:; tee stderr <"$at_stderr"
   38472 at_fn_diff_devnull "$at_stdout" || at_failed=:
   38473 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:135"
   38474 $at_failed && at_fn_log_failure
   38475 $at_traceon; }
   38476 
   38477 { set +x
   38478 $as_echo "$at_srcdir/actions.at:135: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   38479 at_fn_check_prepare_trace "actions.at:135"
   38480 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   38481 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38482 at_status=$? at_failed=false
   38483 $at_check_filter
   38484 echo >>"$at_stderr"; $as_echo "1.1
   38485 1.1: syntax error
   38486 " | \
   38487   $at_diff - "$at_stderr" || at_failed=:
   38488 at_fn_diff_devnull "$at_stdout" || at_failed=:
   38489 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:135"
   38490 $at_failed && at_fn_log_failure
   38491 $at_traceon; }
   38492 
   38493 
   38494 
   38495   set +x
   38496   $at_times_p && times >"$at_times_file"
   38497 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   38498 read at_status <"$at_status_file"
   38499 #AT_STOP_147
   38500 #AT_START_148
   38501 at_fn_group_banner 148 'actions.at:136' \
   38502   "Initial location: yacc.c %define api.push-pull both" "" 9
   38503 at_xfail=no
   38504 (
   38505   $as_echo "148. $at_setup_line: testing $at_desc ..."
   38506   $at_traceon
   38507 
   38508 
   38509 
   38510 cat >input.y <<'_ATEOF'
   38511 %code top {
   38512 #include <config.h>
   38513 /* We don't need perfect functions for these tests. */
   38514 #undef malloc
   38515 #undef memcmp
   38516 #undef realloc
   38517 }
   38518 
   38519 %defines /* FIXME: Required by lalr1.cc in Bison 2.6. */
   38520 %locations
   38521 %debug
   38522 %skeleton "yacc.c"
   38523 %define api.push-pull both
   38524 
   38525 %code
   38526 {
   38527 # include <stdio.h>
   38528 # include <stdlib.h> /* getenv */
   38529 static void yyerror ( const char *msg);
   38530 static int yylex (void);
   38531 }
   38532 %%
   38533 exp: { YY_LOCATION_PRINT(stderr, @$); fputc ('\n', stderr); }
   38534 %%
   38535 #include <stdio.h>
   38536 /* A C error reporting function.  */
   38537 static
   38538 void yyerror ( const char *msg)
   38539 {
   38540   YY_LOCATION_PRINT (stderr, (yylloc));
   38541   fprintf (stderr, ": ");
   38542   fprintf (stderr, "%s\n", msg);
   38543 }
   38544 
   38545 int yylex (void)
   38546 {
   38547   return 'x';
   38548 }
   38549 
   38550 int
   38551 main (void)
   38552 {
   38553   yydebug = !!getenv("YYDEBUG");
   38554   return !!yyparse ();
   38555 }
   38556 _ATEOF
   38557 
   38558 
   38559 
   38560 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   38561   at_save_special_files
   38562   mkdir xml-tests
   38563     # Don't combine these Bison invocations since we want to be sure that
   38564   # --report=all isn't required to get the full XML file.
   38565   { set +x
   38566 $as_echo "$at_srcdir/actions.at:136: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   38567                   --graph=xml-tests/test.dot -o input.c input.y"
   38568 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:136"
   38569 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   38570                   --graph=xml-tests/test.dot -o input.c input.y
   38571 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38572 at_status=$? at_failed=false
   38573 $at_check_filter
   38574 echo stderr:; cat "$at_stderr"
   38575 echo stdout:; cat "$at_stdout"
   38576 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:136"
   38577 $at_failed && at_fn_log_failure
   38578 $at_traceon; }
   38579 
   38580   { set +x
   38581 $as_echo "$at_srcdir/actions.at:136: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   38582 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:136"
   38583 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   38584 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38585 at_status=$? at_failed=false
   38586 $at_check_filter
   38587 echo stderr:; cat "$at_stderr"
   38588 echo stdout:; cat "$at_stdout"
   38589 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:136"
   38590 $at_failed && at_fn_log_failure
   38591 $at_traceon; }
   38592 
   38593     cp xml-tests/test.output expout
   38594   { set +x
   38595 $as_echo "$at_srcdir/actions.at:136: \$XSLTPROC \\
   38596              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   38597              xml-tests/test.xml"
   38598 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:136"
   38599 ( $at_check_trace; $XSLTPROC \
   38600              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   38601              xml-tests/test.xml
   38602 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38603 at_status=$? at_failed=false
   38604 $at_check_filter
   38605 at_fn_diff_devnull "$at_stderr" || at_failed=:
   38606 $at_diff expout "$at_stdout" || at_failed=:
   38607 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:136"
   38608 $at_failed && at_fn_log_failure
   38609 $at_traceon; }
   38610 
   38611   sort xml-tests/test.dot > expout
   38612   { set +x
   38613 $as_echo "$at_srcdir/actions.at:136: \$XSLTPROC \\
   38614              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   38615              xml-tests/test.xml | sort"
   38616 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:136"
   38617 ( $at_check_trace; $XSLTPROC \
   38618              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   38619              xml-tests/test.xml | sort
   38620 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38621 at_status=$? at_failed=false
   38622 $at_check_filter
   38623 at_fn_diff_devnull "$at_stderr" || at_failed=:
   38624 $at_diff expout "$at_stdout" || at_failed=:
   38625 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:136"
   38626 $at_failed && at_fn_log_failure
   38627 $at_traceon; }
   38628 
   38629   rm -rf xml-tests expout
   38630   at_restore_special_files
   38631 fi
   38632 { set +x
   38633 $as_echo "$at_srcdir/actions.at:136: bison -o input.c input.y"
   38634 at_fn_check_prepare_trace "actions.at:136"
   38635 ( $at_check_trace; bison -o input.c input.y
   38636 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38637 at_status=$? at_failed=false
   38638 $at_check_filter
   38639 at_fn_diff_devnull "$at_stderr" || at_failed=:
   38640 at_fn_diff_devnull "$at_stdout" || at_failed=:
   38641 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:136"
   38642 $at_failed && at_fn_log_failure
   38643 $at_traceon; }
   38644 
   38645 
   38646    { set +x
   38647 $as_echo "$at_srcdir/actions.at:136: \$BISON_C_WORKS"
   38648 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:136"
   38649 ( $at_check_trace; $BISON_C_WORKS
   38650 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38651 at_status=$? at_failed=false
   38652 $at_check_filter
   38653 echo stderr:; cat "$at_stderr"
   38654 echo stdout:; cat "$at_stdout"
   38655 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:136"
   38656 $at_failed && at_fn_log_failure
   38657 $at_traceon; }
   38658 
   38659 { set +x
   38660 $as_echo "$at_srcdir/actions.at:136: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   38661 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:136"
   38662 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   38663 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38664 at_status=$? at_failed=false
   38665 $at_check_filter
   38666 echo stderr:; cat "$at_stderr"
   38667 echo stdout:; cat "$at_stdout"
   38668 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:136"
   38669 $at_failed && at_fn_log_failure
   38670 $at_traceon; }
   38671 
   38672 
   38673 { set +x
   38674 $as_echo "$at_srcdir/actions.at:136:  \$PREPARSER ./input"
   38675 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:136"
   38676 ( $at_check_trace;  $PREPARSER ./input
   38677 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38678 at_status=$? at_failed=false
   38679 $at_check_filter
   38680 echo stderr:; tee stderr <"$at_stderr"
   38681 at_fn_diff_devnull "$at_stdout" || at_failed=:
   38682 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:136"
   38683 $at_failed && at_fn_log_failure
   38684 $at_traceon; }
   38685 
   38686 { set +x
   38687 $as_echo "$at_srcdir/actions.at:136: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   38688 at_fn_check_prepare_trace "actions.at:136"
   38689 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   38690 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38691 at_status=$? at_failed=false
   38692 $at_check_filter
   38693 echo >>"$at_stderr"; $as_echo "1.1
   38694 1.1: syntax error
   38695 " | \
   38696   $at_diff - "$at_stderr" || at_failed=:
   38697 at_fn_diff_devnull "$at_stdout" || at_failed=:
   38698 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:136"
   38699 $at_failed && at_fn_log_failure
   38700 $at_traceon; }
   38701 
   38702 
   38703 
   38704   set +x
   38705   $at_times_p && times >"$at_times_file"
   38706 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   38707 read at_status <"$at_status_file"
   38708 #AT_STOP_148
   38709 #AT_START_149
   38710 at_fn_group_banner 149 'actions.at:137' \
   38711   "Initial location: yacc.c %define api.push-pull both %define api.pure full" "" 9
   38712 at_xfail=no
   38713 (
   38714   $as_echo "149. $at_setup_line: testing $at_desc ..."
   38715   $at_traceon
   38716 
   38717 
   38718 
   38719 cat >input.y <<'_ATEOF'
   38720 %code top {
   38721 #include <config.h>
   38722 /* We don't need perfect functions for these tests. */
   38723 #undef malloc
   38724 #undef memcmp
   38725 #undef realloc
   38726 }
   38727 
   38728 %defines /* FIXME: Required by lalr1.cc in Bison 2.6. */
   38729 %locations
   38730 %debug
   38731 %skeleton "yacc.c"
   38732 %define api.push-pull both %define api.pure full
   38733 
   38734 %code
   38735 {
   38736 # include <stdio.h>
   38737 # include <stdlib.h> /* getenv */
   38738 static void yyerror (YYLTYPE const * const llocp,  const char *msg);
   38739 static int yylex (YYSTYPE *lvalp, YYLTYPE *llocp);
   38740 }
   38741 %%
   38742 exp: { YY_LOCATION_PRINT(stderr, @$); fputc ('\n', stderr); }
   38743 %%
   38744 #include <stdio.h>
   38745 /* A C error reporting function.  */
   38746 static
   38747 void yyerror (YYLTYPE const * const llocp,  const char *msg)
   38748 {
   38749   YY_LOCATION_PRINT (stderr, (*llocp));
   38750   fprintf (stderr, ": ");
   38751   fprintf (stderr, "%s\n", msg);
   38752 }
   38753 
   38754 int yylex (YYSTYPE *lvalp, YYLTYPE *llocp)
   38755 {
   38756   YYUSE(lvalp);
   38757   YYUSE(llocp);
   38758   return 'x';
   38759 }
   38760 
   38761 int
   38762 main (void)
   38763 {
   38764   yydebug = !!getenv("YYDEBUG");
   38765   return !!yyparse ();
   38766 }
   38767 _ATEOF
   38768 
   38769 
   38770 
   38771 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   38772   at_save_special_files
   38773   mkdir xml-tests
   38774     # Don't combine these Bison invocations since we want to be sure that
   38775   # --report=all isn't required to get the full XML file.
   38776   { set +x
   38777 $as_echo "$at_srcdir/actions.at:137: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   38778                   --graph=xml-tests/test.dot -o input.c input.y"
   38779 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:137"
   38780 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   38781                   --graph=xml-tests/test.dot -o input.c input.y
   38782 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38783 at_status=$? at_failed=false
   38784 $at_check_filter
   38785 echo stderr:; cat "$at_stderr"
   38786 echo stdout:; cat "$at_stdout"
   38787 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:137"
   38788 $at_failed && at_fn_log_failure
   38789 $at_traceon; }
   38790 
   38791   { set +x
   38792 $as_echo "$at_srcdir/actions.at:137: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   38793 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:137"
   38794 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   38795 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38796 at_status=$? at_failed=false
   38797 $at_check_filter
   38798 echo stderr:; cat "$at_stderr"
   38799 echo stdout:; cat "$at_stdout"
   38800 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:137"
   38801 $at_failed && at_fn_log_failure
   38802 $at_traceon; }
   38803 
   38804     cp xml-tests/test.output expout
   38805   { set +x
   38806 $as_echo "$at_srcdir/actions.at:137: \$XSLTPROC \\
   38807              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   38808              xml-tests/test.xml"
   38809 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:137"
   38810 ( $at_check_trace; $XSLTPROC \
   38811              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   38812              xml-tests/test.xml
   38813 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38814 at_status=$? at_failed=false
   38815 $at_check_filter
   38816 at_fn_diff_devnull "$at_stderr" || at_failed=:
   38817 $at_diff expout "$at_stdout" || at_failed=:
   38818 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:137"
   38819 $at_failed && at_fn_log_failure
   38820 $at_traceon; }
   38821 
   38822   sort xml-tests/test.dot > expout
   38823   { set +x
   38824 $as_echo "$at_srcdir/actions.at:137: \$XSLTPROC \\
   38825              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   38826              xml-tests/test.xml | sort"
   38827 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:137"
   38828 ( $at_check_trace; $XSLTPROC \
   38829              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   38830              xml-tests/test.xml | sort
   38831 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38832 at_status=$? at_failed=false
   38833 $at_check_filter
   38834 at_fn_diff_devnull "$at_stderr" || at_failed=:
   38835 $at_diff expout "$at_stdout" || at_failed=:
   38836 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:137"
   38837 $at_failed && at_fn_log_failure
   38838 $at_traceon; }
   38839 
   38840   rm -rf xml-tests expout
   38841   at_restore_special_files
   38842 fi
   38843 { set +x
   38844 $as_echo "$at_srcdir/actions.at:137: bison -o input.c input.y"
   38845 at_fn_check_prepare_trace "actions.at:137"
   38846 ( $at_check_trace; bison -o input.c input.y
   38847 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38848 at_status=$? at_failed=false
   38849 $at_check_filter
   38850 at_fn_diff_devnull "$at_stderr" || at_failed=:
   38851 at_fn_diff_devnull "$at_stdout" || at_failed=:
   38852 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:137"
   38853 $at_failed && at_fn_log_failure
   38854 $at_traceon; }
   38855 
   38856 
   38857    { set +x
   38858 $as_echo "$at_srcdir/actions.at:137: \$BISON_C_WORKS"
   38859 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:137"
   38860 ( $at_check_trace; $BISON_C_WORKS
   38861 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38862 at_status=$? at_failed=false
   38863 $at_check_filter
   38864 echo stderr:; cat "$at_stderr"
   38865 echo stdout:; cat "$at_stdout"
   38866 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:137"
   38867 $at_failed && at_fn_log_failure
   38868 $at_traceon; }
   38869 
   38870 { set +x
   38871 $as_echo "$at_srcdir/actions.at:137: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   38872 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:137"
   38873 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   38874 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38875 at_status=$? at_failed=false
   38876 $at_check_filter
   38877 echo stderr:; cat "$at_stderr"
   38878 echo stdout:; cat "$at_stdout"
   38879 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:137"
   38880 $at_failed && at_fn_log_failure
   38881 $at_traceon; }
   38882 
   38883 
   38884 { set +x
   38885 $as_echo "$at_srcdir/actions.at:137:  \$PREPARSER ./input"
   38886 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:137"
   38887 ( $at_check_trace;  $PREPARSER ./input
   38888 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38889 at_status=$? at_failed=false
   38890 $at_check_filter
   38891 echo stderr:; tee stderr <"$at_stderr"
   38892 at_fn_diff_devnull "$at_stdout" || at_failed=:
   38893 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:137"
   38894 $at_failed && at_fn_log_failure
   38895 $at_traceon; }
   38896 
   38897 { set +x
   38898 $as_echo "$at_srcdir/actions.at:137: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   38899 at_fn_check_prepare_trace "actions.at:137"
   38900 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   38901 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38902 at_status=$? at_failed=false
   38903 $at_check_filter
   38904 echo >>"$at_stderr"; $as_echo "1.1
   38905 1.1: syntax error
   38906 " | \
   38907   $at_diff - "$at_stderr" || at_failed=:
   38908 at_fn_diff_devnull "$at_stdout" || at_failed=:
   38909 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:137"
   38910 $at_failed && at_fn_log_failure
   38911 $at_traceon; }
   38912 
   38913 
   38914 
   38915   set +x
   38916   $at_times_p && times >"$at_times_file"
   38917 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   38918 read at_status <"$at_status_file"
   38919 #AT_STOP_149
   38920 #AT_START_150
   38921 at_fn_group_banner 150 'actions.at:138' \
   38922   "Initial location: glr.c " "                       " 9
   38923 at_xfail=no
   38924 (
   38925   $as_echo "150. $at_setup_line: testing $at_desc ..."
   38926   $at_traceon
   38927 
   38928 
   38929 
   38930 cat >input.y <<'_ATEOF'
   38931 %code top {
   38932 #include <config.h>
   38933 /* We don't need perfect functions for these tests. */
   38934 #undef malloc
   38935 #undef memcmp
   38936 #undef realloc
   38937 }
   38938 
   38939 %defines /* FIXME: Required by lalr1.cc in Bison 2.6. */
   38940 %locations
   38941 %debug
   38942 %skeleton "glr.c"
   38943 
   38944 
   38945 %code
   38946 {
   38947 # include <stdio.h>
   38948 # include <stdlib.h> /* getenv */
   38949 static void yyerror ( const char *msg);
   38950 static int yylex (void);
   38951 }
   38952 %%
   38953 exp: { YY_LOCATION_PRINT(stderr, @$); fputc ('\n', stderr); }
   38954 %%
   38955 #include <stdio.h>
   38956 /* A C error reporting function.  */
   38957 static
   38958 void yyerror ( const char *msg)
   38959 {
   38960   YY_LOCATION_PRINT (stderr, (yylloc));
   38961   fprintf (stderr, ": ");
   38962   fprintf (stderr, "%s\n", msg);
   38963 }
   38964 
   38965 int yylex (void)
   38966 {
   38967   return 'x';
   38968 }
   38969 
   38970 int
   38971 main (void)
   38972 {
   38973   yydebug = !!getenv("YYDEBUG");
   38974   return !!yyparse ();
   38975 }
   38976 _ATEOF
   38977 
   38978 
   38979 
   38980 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   38981   at_save_special_files
   38982   mkdir xml-tests
   38983     # Don't combine these Bison invocations since we want to be sure that
   38984   # --report=all isn't required to get the full XML file.
   38985   { set +x
   38986 $as_echo "$at_srcdir/actions.at:138: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   38987                   --graph=xml-tests/test.dot -o input.c input.y"
   38988 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:138"
   38989 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   38990                   --graph=xml-tests/test.dot -o input.c input.y
   38991 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   38992 at_status=$? at_failed=false
   38993 $at_check_filter
   38994 echo stderr:; cat "$at_stderr"
   38995 echo stdout:; cat "$at_stdout"
   38996 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:138"
   38997 $at_failed && at_fn_log_failure
   38998 $at_traceon; }
   38999 
   39000   { set +x
   39001 $as_echo "$at_srcdir/actions.at:138: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   39002 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:138"
   39003 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   39004 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39005 at_status=$? at_failed=false
   39006 $at_check_filter
   39007 echo stderr:; cat "$at_stderr"
   39008 echo stdout:; cat "$at_stdout"
   39009 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:138"
   39010 $at_failed && at_fn_log_failure
   39011 $at_traceon; }
   39012 
   39013     cp xml-tests/test.output expout
   39014   { set +x
   39015 $as_echo "$at_srcdir/actions.at:138: \$XSLTPROC \\
   39016              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   39017              xml-tests/test.xml"
   39018 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:138"
   39019 ( $at_check_trace; $XSLTPROC \
   39020              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   39021              xml-tests/test.xml
   39022 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39023 at_status=$? at_failed=false
   39024 $at_check_filter
   39025 at_fn_diff_devnull "$at_stderr" || at_failed=:
   39026 $at_diff expout "$at_stdout" || at_failed=:
   39027 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:138"
   39028 $at_failed && at_fn_log_failure
   39029 $at_traceon; }
   39030 
   39031   sort xml-tests/test.dot > expout
   39032   { set +x
   39033 $as_echo "$at_srcdir/actions.at:138: \$XSLTPROC \\
   39034              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   39035              xml-tests/test.xml | sort"
   39036 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:138"
   39037 ( $at_check_trace; $XSLTPROC \
   39038              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   39039              xml-tests/test.xml | sort
   39040 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39041 at_status=$? at_failed=false
   39042 $at_check_filter
   39043 at_fn_diff_devnull "$at_stderr" || at_failed=:
   39044 $at_diff expout "$at_stdout" || at_failed=:
   39045 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:138"
   39046 $at_failed && at_fn_log_failure
   39047 $at_traceon; }
   39048 
   39049   rm -rf xml-tests expout
   39050   at_restore_special_files
   39051 fi
   39052 { set +x
   39053 $as_echo "$at_srcdir/actions.at:138: bison -o input.c input.y"
   39054 at_fn_check_prepare_trace "actions.at:138"
   39055 ( $at_check_trace; bison -o input.c input.y
   39056 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39057 at_status=$? at_failed=false
   39058 $at_check_filter
   39059 at_fn_diff_devnull "$at_stderr" || at_failed=:
   39060 at_fn_diff_devnull "$at_stdout" || at_failed=:
   39061 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:138"
   39062 $at_failed && at_fn_log_failure
   39063 $at_traceon; }
   39064 
   39065 
   39066    { set +x
   39067 $as_echo "$at_srcdir/actions.at:138: \$BISON_C_WORKS"
   39068 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:138"
   39069 ( $at_check_trace; $BISON_C_WORKS
   39070 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39071 at_status=$? at_failed=false
   39072 $at_check_filter
   39073 echo stderr:; cat "$at_stderr"
   39074 echo stdout:; cat "$at_stdout"
   39075 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:138"
   39076 $at_failed && at_fn_log_failure
   39077 $at_traceon; }
   39078 
   39079 { set +x
   39080 $as_echo "$at_srcdir/actions.at:138: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   39081 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:138"
   39082 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   39083 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39084 at_status=$? at_failed=false
   39085 $at_check_filter
   39086 echo stderr:; cat "$at_stderr"
   39087 echo stdout:; cat "$at_stdout"
   39088 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:138"
   39089 $at_failed && at_fn_log_failure
   39090 $at_traceon; }
   39091 
   39092 
   39093 { set +x
   39094 $as_echo "$at_srcdir/actions.at:138:  \$PREPARSER ./input"
   39095 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:138"
   39096 ( $at_check_trace;  $PREPARSER ./input
   39097 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39098 at_status=$? at_failed=false
   39099 $at_check_filter
   39100 echo stderr:; tee stderr <"$at_stderr"
   39101 at_fn_diff_devnull "$at_stdout" || at_failed=:
   39102 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:138"
   39103 $at_failed && at_fn_log_failure
   39104 $at_traceon; }
   39105 
   39106 { set +x
   39107 $as_echo "$at_srcdir/actions.at:138: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   39108 at_fn_check_prepare_trace "actions.at:138"
   39109 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   39110 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39111 at_status=$? at_failed=false
   39112 $at_check_filter
   39113 echo >>"$at_stderr"; $as_echo "1.1
   39114 1.1: syntax error
   39115 " | \
   39116   $at_diff - "$at_stderr" || at_failed=:
   39117 at_fn_diff_devnull "$at_stdout" || at_failed=:
   39118 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:138"
   39119 $at_failed && at_fn_log_failure
   39120 $at_traceon; }
   39121 
   39122 
   39123 
   39124   set +x
   39125   $at_times_p && times >"$at_times_file"
   39126 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   39127 read at_status <"$at_status_file"
   39128 #AT_STOP_150
   39129 #AT_START_151
   39130 at_fn_group_banner 151 'actions.at:139' \
   39131   "Initial location: glr.c %define api.pure" "       " 9
   39132 at_xfail=no
   39133 (
   39134   $as_echo "151. $at_setup_line: testing $at_desc ..."
   39135   $at_traceon
   39136 
   39137 
   39138 
   39139 cat >input.y <<'_ATEOF'
   39140 %code top {
   39141 #include <config.h>
   39142 /* We don't need perfect functions for these tests. */
   39143 #undef malloc
   39144 #undef memcmp
   39145 #undef realloc
   39146 }
   39147 
   39148 %defines /* FIXME: Required by lalr1.cc in Bison 2.6. */
   39149 %locations
   39150 %debug
   39151 %skeleton "glr.c"
   39152 %define api.pure
   39153 
   39154 %code
   39155 {
   39156 # include <stdio.h>
   39157 # include <stdlib.h> /* getenv */
   39158 static void yyerror (YYLTYPE const * const llocp,  const char *msg);
   39159 static int yylex (YYSTYPE *lvalp, YYLTYPE *llocp);
   39160 }
   39161 %%
   39162 exp: { YY_LOCATION_PRINT(stderr, @$); fputc ('\n', stderr); }
   39163 %%
   39164 #include <stdio.h>
   39165 /* A C error reporting function.  */
   39166 static
   39167 void yyerror (YYLTYPE const * const llocp,  const char *msg)
   39168 {
   39169   YY_LOCATION_PRINT (stderr, (*llocp));
   39170   fprintf (stderr, ": ");
   39171   fprintf (stderr, "%s\n", msg);
   39172 }
   39173 
   39174 int yylex (YYSTYPE *lvalp, YYLTYPE *llocp)
   39175 {
   39176   YYUSE(lvalp);
   39177   YYUSE(llocp);
   39178   return 'x';
   39179 }
   39180 
   39181 int
   39182 main (void)
   39183 {
   39184   yydebug = !!getenv("YYDEBUG");
   39185   return !!yyparse ();
   39186 }
   39187 _ATEOF
   39188 
   39189 
   39190 
   39191 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   39192   at_save_special_files
   39193   mkdir xml-tests
   39194     # Don't combine these Bison invocations since we want to be sure that
   39195   # --report=all isn't required to get the full XML file.
   39196   { set +x
   39197 $as_echo "$at_srcdir/actions.at:139: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   39198                   --graph=xml-tests/test.dot -o input.c input.y"
   39199 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:139"
   39200 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   39201                   --graph=xml-tests/test.dot -o input.c input.y
   39202 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39203 at_status=$? at_failed=false
   39204 $at_check_filter
   39205 echo stderr:; cat "$at_stderr"
   39206 echo stdout:; cat "$at_stdout"
   39207 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:139"
   39208 $at_failed && at_fn_log_failure
   39209 $at_traceon; }
   39210 
   39211   { set +x
   39212 $as_echo "$at_srcdir/actions.at:139: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   39213 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:139"
   39214 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   39215 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39216 at_status=$? at_failed=false
   39217 $at_check_filter
   39218 echo stderr:; cat "$at_stderr"
   39219 echo stdout:; cat "$at_stdout"
   39220 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:139"
   39221 $at_failed && at_fn_log_failure
   39222 $at_traceon; }
   39223 
   39224     cp xml-tests/test.output expout
   39225   { set +x
   39226 $as_echo "$at_srcdir/actions.at:139: \$XSLTPROC \\
   39227              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   39228              xml-tests/test.xml"
   39229 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:139"
   39230 ( $at_check_trace; $XSLTPROC \
   39231              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   39232              xml-tests/test.xml
   39233 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39234 at_status=$? at_failed=false
   39235 $at_check_filter
   39236 at_fn_diff_devnull "$at_stderr" || at_failed=:
   39237 $at_diff expout "$at_stdout" || at_failed=:
   39238 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:139"
   39239 $at_failed && at_fn_log_failure
   39240 $at_traceon; }
   39241 
   39242   sort xml-tests/test.dot > expout
   39243   { set +x
   39244 $as_echo "$at_srcdir/actions.at:139: \$XSLTPROC \\
   39245              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   39246              xml-tests/test.xml | sort"
   39247 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:139"
   39248 ( $at_check_trace; $XSLTPROC \
   39249              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   39250              xml-tests/test.xml | sort
   39251 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39252 at_status=$? at_failed=false
   39253 $at_check_filter
   39254 at_fn_diff_devnull "$at_stderr" || at_failed=:
   39255 $at_diff expout "$at_stdout" || at_failed=:
   39256 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:139"
   39257 $at_failed && at_fn_log_failure
   39258 $at_traceon; }
   39259 
   39260   rm -rf xml-tests expout
   39261   at_restore_special_files
   39262 fi
   39263 { set +x
   39264 $as_echo "$at_srcdir/actions.at:139: bison -o input.c input.y"
   39265 at_fn_check_prepare_trace "actions.at:139"
   39266 ( $at_check_trace; bison -o input.c input.y
   39267 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39268 at_status=$? at_failed=false
   39269 $at_check_filter
   39270 at_fn_diff_devnull "$at_stderr" || at_failed=:
   39271 at_fn_diff_devnull "$at_stdout" || at_failed=:
   39272 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:139"
   39273 $at_failed && at_fn_log_failure
   39274 $at_traceon; }
   39275 
   39276 
   39277    { set +x
   39278 $as_echo "$at_srcdir/actions.at:139: \$BISON_C_WORKS"
   39279 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:139"
   39280 ( $at_check_trace; $BISON_C_WORKS
   39281 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39282 at_status=$? at_failed=false
   39283 $at_check_filter
   39284 echo stderr:; cat "$at_stderr"
   39285 echo stdout:; cat "$at_stdout"
   39286 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:139"
   39287 $at_failed && at_fn_log_failure
   39288 $at_traceon; }
   39289 
   39290 { set +x
   39291 $as_echo "$at_srcdir/actions.at:139: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   39292 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:139"
   39293 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   39294 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39295 at_status=$? at_failed=false
   39296 $at_check_filter
   39297 echo stderr:; cat "$at_stderr"
   39298 echo stdout:; cat "$at_stdout"
   39299 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:139"
   39300 $at_failed && at_fn_log_failure
   39301 $at_traceon; }
   39302 
   39303 
   39304 { set +x
   39305 $as_echo "$at_srcdir/actions.at:139:  \$PREPARSER ./input"
   39306 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:139"
   39307 ( $at_check_trace;  $PREPARSER ./input
   39308 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39309 at_status=$? at_failed=false
   39310 $at_check_filter
   39311 echo stderr:; tee stderr <"$at_stderr"
   39312 at_fn_diff_devnull "$at_stdout" || at_failed=:
   39313 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:139"
   39314 $at_failed && at_fn_log_failure
   39315 $at_traceon; }
   39316 
   39317 { set +x
   39318 $as_echo "$at_srcdir/actions.at:139: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   39319 at_fn_check_prepare_trace "actions.at:139"
   39320 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   39321 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39322 at_status=$? at_failed=false
   39323 $at_check_filter
   39324 echo >>"$at_stderr"; $as_echo "1.1
   39325 1.1: syntax error
   39326 " | \
   39327   $at_diff - "$at_stderr" || at_failed=:
   39328 at_fn_diff_devnull "$at_stdout" || at_failed=:
   39329 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:139"
   39330 $at_failed && at_fn_log_failure
   39331 $at_traceon; }
   39332 
   39333 
   39334 
   39335   set +x
   39336   $at_times_p && times >"$at_times_file"
   39337 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   39338 read at_status <"$at_status_file"
   39339 #AT_STOP_151
   39340 #AT_START_152
   39341 at_fn_group_banner 152 'actions.at:140' \
   39342   "Initial location: lalr1.cc " "                    " 9
   39343 at_xfail=no
   39344 (
   39345   $as_echo "152. $at_setup_line: testing $at_desc ..."
   39346   $at_traceon
   39347 
   39348 
   39349 
   39350 cat >input.y <<'_ATEOF'
   39351 %code top {
   39352 #include <config.h>
   39353 /* We don't need perfect functions for these tests. */
   39354 #undef malloc
   39355 #undef memcmp
   39356 #undef realloc
   39357 }
   39358 
   39359 %defines /* FIXME: Required by lalr1.cc in Bison 2.6. */
   39360 %locations
   39361 %debug
   39362 %skeleton "lalr1.cc"
   39363 
   39364 
   39365 %code
   39366 {
   39367 # include <stdio.h>
   39368 # include <stdlib.h> /* getenv */
   39369 
   39370 static int yylex (yy::parser::semantic_type *lvalp, yy::parser::location_type *llocp);
   39371 }
   39372 %%
   39373 exp: { std::cerr << @$ << std::endl; }
   39374 %%
   39375 /* A C++ error reporting function.  */
   39376 void
   39377 yy::parser::error (const location_type& l, const std::string& m)
   39378 {
   39379   (void) l;
   39380   std::cerr << l << ": " << m << std::endl;
   39381 }
   39382 
   39383 int yylex (yy::parser::semantic_type *lvalp, yy::parser::location_type *llocp)
   39384 {
   39385   YYUSE(lvalp);
   39386   YYUSE(llocp);
   39387   return 'x';
   39388 }
   39389 
   39390 int
   39391 main (void)
   39392 {
   39393   yy::parser p;
   39394   p.set_debug_level (!!getenv("YYDEBUG"));
   39395   return p.parse ();
   39396 }
   39397 _ATEOF
   39398 
   39399 
   39400 
   39401 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   39402   at_save_special_files
   39403   mkdir xml-tests
   39404     # Don't combine these Bison invocations since we want to be sure that
   39405   # --report=all isn't required to get the full XML file.
   39406   { set +x
   39407 $as_echo "$at_srcdir/actions.at:140: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   39408                   --graph=xml-tests/test.dot -o input.cc input.y"
   39409 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:140"
   39410 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   39411                   --graph=xml-tests/test.dot -o input.cc input.y
   39412 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39413 at_status=$? at_failed=false
   39414 $at_check_filter
   39415 echo stderr:; cat "$at_stderr"
   39416 echo stdout:; cat "$at_stdout"
   39417 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:140"
   39418 $at_failed && at_fn_log_failure
   39419 $at_traceon; }
   39420 
   39421   { set +x
   39422 $as_echo "$at_srcdir/actions.at:140: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y"
   39423 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y" "actions.at:140"
   39424 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y
   39425 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39426 at_status=$? at_failed=false
   39427 $at_check_filter
   39428 echo stderr:; cat "$at_stderr"
   39429 echo stdout:; cat "$at_stdout"
   39430 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:140"
   39431 $at_failed && at_fn_log_failure
   39432 $at_traceon; }
   39433 
   39434     cp xml-tests/test.output expout
   39435   { set +x
   39436 $as_echo "$at_srcdir/actions.at:140: \$XSLTPROC \\
   39437              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   39438              xml-tests/test.xml"
   39439 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:140"
   39440 ( $at_check_trace; $XSLTPROC \
   39441              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   39442              xml-tests/test.xml
   39443 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39444 at_status=$? at_failed=false
   39445 $at_check_filter
   39446 at_fn_diff_devnull "$at_stderr" || at_failed=:
   39447 $at_diff expout "$at_stdout" || at_failed=:
   39448 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:140"
   39449 $at_failed && at_fn_log_failure
   39450 $at_traceon; }
   39451 
   39452   sort xml-tests/test.dot > expout
   39453   { set +x
   39454 $as_echo "$at_srcdir/actions.at:140: \$XSLTPROC \\
   39455              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   39456              xml-tests/test.xml | sort"
   39457 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:140"
   39458 ( $at_check_trace; $XSLTPROC \
   39459              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   39460              xml-tests/test.xml | sort
   39461 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39462 at_status=$? at_failed=false
   39463 $at_check_filter
   39464 at_fn_diff_devnull "$at_stderr" || at_failed=:
   39465 $at_diff expout "$at_stdout" || at_failed=:
   39466 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:140"
   39467 $at_failed && at_fn_log_failure
   39468 $at_traceon; }
   39469 
   39470   rm -rf xml-tests expout
   39471   at_restore_special_files
   39472 fi
   39473 { set +x
   39474 $as_echo "$at_srcdir/actions.at:140: bison -o input.cc input.y"
   39475 at_fn_check_prepare_trace "actions.at:140"
   39476 ( $at_check_trace; bison -o input.cc input.y
   39477 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39478 at_status=$? at_failed=false
   39479 $at_check_filter
   39480 at_fn_diff_devnull "$at_stderr" || at_failed=:
   39481 at_fn_diff_devnull "$at_stdout" || at_failed=:
   39482 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:140"
   39483 $at_failed && at_fn_log_failure
   39484 $at_traceon; }
   39485 
   39486 
   39487 
   39488 { set +x
   39489 $as_echo "$at_srcdir/actions.at:140: \$BISON_CXX_WORKS"
   39490 at_fn_check_prepare_dynamic "$BISON_CXX_WORKS" "actions.at:140"
   39491 ( $at_check_trace; $BISON_CXX_WORKS
   39492 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39493 at_status=$? at_failed=false
   39494 $at_check_filter
   39495 echo stderr:; cat "$at_stderr"
   39496 echo stdout:; cat "$at_stdout"
   39497 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:140"
   39498 $at_failed && at_fn_log_failure
   39499 $at_traceon; }
   39500 
   39501 { set +x
   39502 $as_echo "$at_srcdir/actions.at:140: \$CXX \$CXXFLAGS \$CPPFLAGS \$LDFLAGS -o input input.cc \$LIBS"
   39503 at_fn_check_prepare_dynamic "$CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS" "actions.at:140"
   39504 ( $at_check_trace; $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS
   39505 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39506 at_status=$? at_failed=false
   39507 $at_check_filter
   39508 echo stderr:; cat "$at_stderr"
   39509 echo stdout:; cat "$at_stdout"
   39510 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:140"
   39511 $at_failed && at_fn_log_failure
   39512 $at_traceon; }
   39513 
   39514 
   39515 { set +x
   39516 $as_echo "$at_srcdir/actions.at:140:  \$PREPARSER ./input"
   39517 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:140"
   39518 ( $at_check_trace;  $PREPARSER ./input
   39519 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39520 at_status=$? at_failed=false
   39521 $at_check_filter
   39522 echo stderr:; tee stderr <"$at_stderr"
   39523 at_fn_diff_devnull "$at_stdout" || at_failed=:
   39524 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:140"
   39525 $at_failed && at_fn_log_failure
   39526 $at_traceon; }
   39527 
   39528 { set +x
   39529 $as_echo "$at_srcdir/actions.at:140: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   39530 at_fn_check_prepare_trace "actions.at:140"
   39531 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   39532 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39533 at_status=$? at_failed=false
   39534 $at_check_filter
   39535 echo >>"$at_stderr"; $as_echo "1.1
   39536 1.1: syntax error
   39537 " | \
   39538   $at_diff - "$at_stderr" || at_failed=:
   39539 at_fn_diff_devnull "$at_stdout" || at_failed=:
   39540 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:140"
   39541 $at_failed && at_fn_log_failure
   39542 $at_traceon; }
   39543 
   39544 
   39545 
   39546   set +x
   39547   $at_times_p && times >"$at_times_file"
   39548 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   39549 read at_status <"$at_status_file"
   39550 #AT_STOP_152
   39551 #AT_START_153
   39552 at_fn_group_banner 153 'actions.at:141' \
   39553   "Initial location: glr.cc " "                      " 9
   39554 at_xfail=no
   39555 (
   39556   $as_echo "153. $at_setup_line: testing $at_desc ..."
   39557   $at_traceon
   39558 
   39559 
   39560 
   39561 cat >input.y <<'_ATEOF'
   39562 %code top {
   39563 #include <config.h>
   39564 /* We don't need perfect functions for these tests. */
   39565 #undef malloc
   39566 #undef memcmp
   39567 #undef realloc
   39568 }
   39569 
   39570 %defines /* FIXME: Required by lalr1.cc in Bison 2.6. */
   39571 %locations
   39572 %debug
   39573 %skeleton "glr.cc"
   39574 
   39575 
   39576 %code
   39577 {
   39578 # include <stdio.h>
   39579 # include <stdlib.h> /* getenv */
   39580 
   39581 static int yylex (yy::parser::semantic_type *lvalp, yy::parser::location_type *llocp);
   39582 }
   39583 %%
   39584 exp: { std::cerr << @$ << std::endl; }
   39585 %%
   39586 /* A C++ error reporting function.  */
   39587 void
   39588 yy::parser::error (const location_type& l, const std::string& m)
   39589 {
   39590   (void) l;
   39591   std::cerr << l << ": " << m << std::endl;
   39592 }
   39593 
   39594 int yylex (yy::parser::semantic_type *lvalp, yy::parser::location_type *llocp)
   39595 {
   39596   YYUSE(lvalp);
   39597   YYUSE(llocp);
   39598   return 'x';
   39599 }
   39600 
   39601 int
   39602 main (void)
   39603 {
   39604   yy::parser p;
   39605   p.set_debug_level (!!getenv("YYDEBUG"));
   39606   return p.parse ();
   39607 }
   39608 _ATEOF
   39609 
   39610 
   39611 
   39612 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   39613   at_save_special_files
   39614   mkdir xml-tests
   39615     # Don't combine these Bison invocations since we want to be sure that
   39616   # --report=all isn't required to get the full XML file.
   39617   { set +x
   39618 $as_echo "$at_srcdir/actions.at:141: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   39619                   --graph=xml-tests/test.dot -o input.cc input.y"
   39620 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:141"
   39621 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   39622                   --graph=xml-tests/test.dot -o input.cc input.y
   39623 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39624 at_status=$? at_failed=false
   39625 $at_check_filter
   39626 echo stderr:; cat "$at_stderr"
   39627 echo stdout:; cat "$at_stdout"
   39628 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:141"
   39629 $at_failed && at_fn_log_failure
   39630 $at_traceon; }
   39631 
   39632   { set +x
   39633 $as_echo "$at_srcdir/actions.at:141: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y"
   39634 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y" "actions.at:141"
   39635 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y
   39636 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39637 at_status=$? at_failed=false
   39638 $at_check_filter
   39639 echo stderr:; cat "$at_stderr"
   39640 echo stdout:; cat "$at_stdout"
   39641 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:141"
   39642 $at_failed && at_fn_log_failure
   39643 $at_traceon; }
   39644 
   39645     cp xml-tests/test.output expout
   39646   { set +x
   39647 $as_echo "$at_srcdir/actions.at:141: \$XSLTPROC \\
   39648              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   39649              xml-tests/test.xml"
   39650 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:141"
   39651 ( $at_check_trace; $XSLTPROC \
   39652              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   39653              xml-tests/test.xml
   39654 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39655 at_status=$? at_failed=false
   39656 $at_check_filter
   39657 at_fn_diff_devnull "$at_stderr" || at_failed=:
   39658 $at_diff expout "$at_stdout" || at_failed=:
   39659 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:141"
   39660 $at_failed && at_fn_log_failure
   39661 $at_traceon; }
   39662 
   39663   sort xml-tests/test.dot > expout
   39664   { set +x
   39665 $as_echo "$at_srcdir/actions.at:141: \$XSLTPROC \\
   39666              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   39667              xml-tests/test.xml | sort"
   39668 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:141"
   39669 ( $at_check_trace; $XSLTPROC \
   39670              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   39671              xml-tests/test.xml | sort
   39672 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39673 at_status=$? at_failed=false
   39674 $at_check_filter
   39675 at_fn_diff_devnull "$at_stderr" || at_failed=:
   39676 $at_diff expout "$at_stdout" || at_failed=:
   39677 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:141"
   39678 $at_failed && at_fn_log_failure
   39679 $at_traceon; }
   39680 
   39681   rm -rf xml-tests expout
   39682   at_restore_special_files
   39683 fi
   39684 { set +x
   39685 $as_echo "$at_srcdir/actions.at:141: bison -o input.cc input.y"
   39686 at_fn_check_prepare_trace "actions.at:141"
   39687 ( $at_check_trace; bison -o input.cc input.y
   39688 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39689 at_status=$? at_failed=false
   39690 $at_check_filter
   39691 at_fn_diff_devnull "$at_stderr" || at_failed=:
   39692 at_fn_diff_devnull "$at_stdout" || at_failed=:
   39693 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:141"
   39694 $at_failed && at_fn_log_failure
   39695 $at_traceon; }
   39696 
   39697 
   39698 
   39699 { set +x
   39700 $as_echo "$at_srcdir/actions.at:141: \$BISON_CXX_WORKS"
   39701 at_fn_check_prepare_dynamic "$BISON_CXX_WORKS" "actions.at:141"
   39702 ( $at_check_trace; $BISON_CXX_WORKS
   39703 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39704 at_status=$? at_failed=false
   39705 $at_check_filter
   39706 echo stderr:; cat "$at_stderr"
   39707 echo stdout:; cat "$at_stdout"
   39708 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:141"
   39709 $at_failed && at_fn_log_failure
   39710 $at_traceon; }
   39711 
   39712 { set +x
   39713 $as_echo "$at_srcdir/actions.at:141: \$CXX \$CXXFLAGS \$CPPFLAGS \$LDFLAGS -o input input.cc \$LIBS"
   39714 at_fn_check_prepare_dynamic "$CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS" "actions.at:141"
   39715 ( $at_check_trace; $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS
   39716 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39717 at_status=$? at_failed=false
   39718 $at_check_filter
   39719 echo stderr:; cat "$at_stderr"
   39720 echo stdout:; cat "$at_stdout"
   39721 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:141"
   39722 $at_failed && at_fn_log_failure
   39723 $at_traceon; }
   39724 
   39725 
   39726 { set +x
   39727 $as_echo "$at_srcdir/actions.at:141:  \$PREPARSER ./input"
   39728 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:141"
   39729 ( $at_check_trace;  $PREPARSER ./input
   39730 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39731 at_status=$? at_failed=false
   39732 $at_check_filter
   39733 echo stderr:; tee stderr <"$at_stderr"
   39734 at_fn_diff_devnull "$at_stdout" || at_failed=:
   39735 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:141"
   39736 $at_failed && at_fn_log_failure
   39737 $at_traceon; }
   39738 
   39739 { set +x
   39740 $as_echo "$at_srcdir/actions.at:141: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   39741 at_fn_check_prepare_trace "actions.at:141"
   39742 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   39743 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39744 at_status=$? at_failed=false
   39745 $at_check_filter
   39746 echo >>"$at_stderr"; $as_echo "1.1
   39747 1.1: syntax error
   39748 " | \
   39749   $at_diff - "$at_stderr" || at_failed=:
   39750 at_fn_diff_devnull "$at_stdout" || at_failed=:
   39751 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:141"
   39752 $at_failed && at_fn_log_failure
   39753 $at_traceon; }
   39754 
   39755 
   39756 
   39757   set +x
   39758   $at_times_p && times >"$at_times_file"
   39759 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   39760 read at_status <"$at_status_file"
   39761 #AT_STOP_153
   39762 #AT_START_154
   39763 at_fn_group_banner 154 'actions.at:150' \
   39764   "Initial location: yacc.c %define api.pure full" " " 9
   39765 at_xfail=no
   39766 (
   39767   $as_echo "154. $at_setup_line: testing $at_desc ..."
   39768   $at_traceon
   39769 
   39770 
   39771 
   39772 cat >input.y <<'_ATEOF'
   39773 %code top {
   39774 #include <config.h>
   39775 /* We don't need perfect functions for these tests. */
   39776 #undef malloc
   39777 #undef memcmp
   39778 #undef realloc
   39779 }
   39780 
   39781 %defines /* FIXME: Required by lalr1.cc in Bison 2.6. */
   39782 %locations
   39783 %debug
   39784 %skeleton "yacc.c"
   39785 %define api.pure full
   39786 %{
   39787 # define YYLTYPE int
   39788 # define YY_LOCATION_PRINT(Stream, Loc)      \
   39789    (void) (Loc)
   39790 # define YYLLOC_DEFAULT(Current, Rhs, N)    \
   39791   (Current) = ((Rhs)[N ? 1 : 0])
   39792 %}
   39793 
   39794 %code
   39795 {
   39796 # include <stdio.h>
   39797 # include <stdlib.h> /* getenv */
   39798 static void yyerror (YYLTYPE const * const llocp,  const char *msg);
   39799 static int yylex (YYSTYPE *lvalp, YYLTYPE *llocp);
   39800 }
   39801 %%
   39802 exp: { YY_LOCATION_PRINT(stderr, @$); fputc ('\n', stderr); }
   39803 %%
   39804 #include <stdio.h>
   39805 /* A C error reporting function.  */
   39806 static
   39807 void yyerror (YYLTYPE const * const llocp,  const char *msg)
   39808 {
   39809   YY_LOCATION_PRINT (stderr, (*llocp));
   39810   fprintf (stderr, ": ");
   39811   fprintf (stderr, "%s\n", msg);
   39812 }
   39813 
   39814 int yylex (YYSTYPE *lvalp, YYLTYPE *llocp)
   39815 {
   39816   YYUSE(lvalp);
   39817   YYUSE(llocp);
   39818   return 'x';
   39819 }
   39820 
   39821 int
   39822 main (void)
   39823 {
   39824   yydebug = !!getenv("YYDEBUG");
   39825   return !!yyparse ();
   39826 }
   39827 _ATEOF
   39828 
   39829 
   39830 
   39831 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   39832   at_save_special_files
   39833   mkdir xml-tests
   39834     # Don't combine these Bison invocations since we want to be sure that
   39835   # --report=all isn't required to get the full XML file.
   39836   { set +x
   39837 $as_echo "$at_srcdir/actions.at:150: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   39838                   --graph=xml-tests/test.dot -o input.c input.y"
   39839 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:150"
   39840 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   39841                   --graph=xml-tests/test.dot -o input.c input.y
   39842 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39843 at_status=$? at_failed=false
   39844 $at_check_filter
   39845 echo stderr:; cat "$at_stderr"
   39846 echo stdout:; cat "$at_stdout"
   39847 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:150"
   39848 $at_failed && at_fn_log_failure
   39849 $at_traceon; }
   39850 
   39851   { set +x
   39852 $as_echo "$at_srcdir/actions.at:150: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   39853 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:150"
   39854 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   39855 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39856 at_status=$? at_failed=false
   39857 $at_check_filter
   39858 echo stderr:; cat "$at_stderr"
   39859 echo stdout:; cat "$at_stdout"
   39860 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:150"
   39861 $at_failed && at_fn_log_failure
   39862 $at_traceon; }
   39863 
   39864     cp xml-tests/test.output expout
   39865   { set +x
   39866 $as_echo "$at_srcdir/actions.at:150: \$XSLTPROC \\
   39867              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   39868              xml-tests/test.xml"
   39869 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:150"
   39870 ( $at_check_trace; $XSLTPROC \
   39871              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   39872              xml-tests/test.xml
   39873 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39874 at_status=$? at_failed=false
   39875 $at_check_filter
   39876 at_fn_diff_devnull "$at_stderr" || at_failed=:
   39877 $at_diff expout "$at_stdout" || at_failed=:
   39878 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:150"
   39879 $at_failed && at_fn_log_failure
   39880 $at_traceon; }
   39881 
   39882   sort xml-tests/test.dot > expout
   39883   { set +x
   39884 $as_echo "$at_srcdir/actions.at:150: \$XSLTPROC \\
   39885              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   39886              xml-tests/test.xml | sort"
   39887 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:150"
   39888 ( $at_check_trace; $XSLTPROC \
   39889              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   39890              xml-tests/test.xml | sort
   39891 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39892 at_status=$? at_failed=false
   39893 $at_check_filter
   39894 at_fn_diff_devnull "$at_stderr" || at_failed=:
   39895 $at_diff expout "$at_stdout" || at_failed=:
   39896 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:150"
   39897 $at_failed && at_fn_log_failure
   39898 $at_traceon; }
   39899 
   39900   rm -rf xml-tests expout
   39901   at_restore_special_files
   39902 fi
   39903 { set +x
   39904 $as_echo "$at_srcdir/actions.at:150: bison -o input.c input.y"
   39905 at_fn_check_prepare_trace "actions.at:150"
   39906 ( $at_check_trace; bison -o input.c input.y
   39907 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39908 at_status=$? at_failed=false
   39909 $at_check_filter
   39910 at_fn_diff_devnull "$at_stderr" || at_failed=:
   39911 at_fn_diff_devnull "$at_stdout" || at_failed=:
   39912 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:150"
   39913 $at_failed && at_fn_log_failure
   39914 $at_traceon; }
   39915 
   39916 
   39917    { set +x
   39918 $as_echo "$at_srcdir/actions.at:150: \$BISON_C_WORKS"
   39919 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:150"
   39920 ( $at_check_trace; $BISON_C_WORKS
   39921 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39922 at_status=$? at_failed=false
   39923 $at_check_filter
   39924 echo stderr:; cat "$at_stderr"
   39925 echo stdout:; cat "$at_stdout"
   39926 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:150"
   39927 $at_failed && at_fn_log_failure
   39928 $at_traceon; }
   39929 
   39930 { set +x
   39931 $as_echo "$at_srcdir/actions.at:150: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   39932 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:150"
   39933 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   39934 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39935 at_status=$? at_failed=false
   39936 $at_check_filter
   39937 echo stderr:; cat "$at_stderr"
   39938 echo stdout:; cat "$at_stdout"
   39939 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:150"
   39940 $at_failed && at_fn_log_failure
   39941 $at_traceon; }
   39942 
   39943 
   39944 { set +x
   39945 $as_echo "$at_srcdir/actions.at:150:  \$PREPARSER ./input"
   39946 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:150"
   39947 ( $at_check_trace;  $PREPARSER ./input
   39948 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39949 at_status=$? at_failed=false
   39950 $at_check_filter
   39951 echo stderr:; tee stderr <"$at_stderr"
   39952 at_fn_diff_devnull "$at_stdout" || at_failed=:
   39953 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:150"
   39954 $at_failed && at_fn_log_failure
   39955 $at_traceon; }
   39956 
   39957 { set +x
   39958 $as_echo "$at_srcdir/actions.at:150: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   39959 at_fn_check_prepare_trace "actions.at:150"
   39960 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   39961 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   39962 at_status=$? at_failed=false
   39963 $at_check_filter
   39964 echo >>"$at_stderr"; $as_echo "
   39965 : syntax error
   39966 " | \
   39967   $at_diff - "$at_stderr" || at_failed=:
   39968 at_fn_diff_devnull "$at_stdout" || at_failed=:
   39969 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:150"
   39970 $at_failed && at_fn_log_failure
   39971 $at_traceon; }
   39972 
   39973 
   39974 
   39975   set +x
   39976   $at_times_p && times >"$at_times_file"
   39977 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   39978 read at_status <"$at_status_file"
   39979 #AT_STOP_154
   39980 #AT_START_155
   39981 at_fn_group_banner 155 'actions.at:161' \
   39982   "Initial location: yacc.c %define api.pure full" " " 9
   39983 at_xfail=no
   39984 (
   39985   $as_echo "155. $at_setup_line: testing $at_desc ..."
   39986   $at_traceon
   39987 
   39988 
   39989 
   39990 cat >input.y <<'_ATEOF'
   39991 %code top {
   39992 #include <config.h>
   39993 /* We don't need perfect functions for these tests. */
   39994 #undef malloc
   39995 #undef memcmp
   39996 #undef realloc
   39997 }
   39998 
   39999 %defines /* FIXME: Required by lalr1.cc in Bison 2.6. */
   40000 %locations
   40001 %debug
   40002 %skeleton "yacc.c"
   40003 %define api.pure full
   40004 %{
   40005 # define YYLTYPE int
   40006 # define YY_LOCATION_PRINT(Stream, Loc)      \
   40007     fprintf ((Stream), "%d", (Loc))
   40008 # define YYLLOC_DEFAULT(Current, Rhs, N)    \
   40009   (Current) = ((Rhs)[N ? 1 : 0])
   40010 %}
   40011 
   40012 %code
   40013 {
   40014 # include <stdio.h>
   40015 # include <stdlib.h> /* getenv */
   40016 static void yyerror (YYLTYPE const * const llocp,  const char *msg);
   40017 static int yylex (YYSTYPE *lvalp, YYLTYPE *llocp);
   40018 }
   40019 %%
   40020 exp: { YY_LOCATION_PRINT(stderr, @$); fputc ('\n', stderr); }
   40021 %%
   40022 #include <stdio.h>
   40023 /* A C error reporting function.  */
   40024 static
   40025 void yyerror (YYLTYPE const * const llocp,  const char *msg)
   40026 {
   40027   YY_LOCATION_PRINT (stderr, (*llocp));
   40028   fprintf (stderr, ": ");
   40029   fprintf (stderr, "%s\n", msg);
   40030 }
   40031 
   40032 int yylex (YYSTYPE *lvalp, YYLTYPE *llocp)
   40033 {
   40034   YYUSE(lvalp);
   40035   YYUSE(llocp);
   40036   return 'x';
   40037 }
   40038 
   40039 int
   40040 main (void)
   40041 {
   40042   yydebug = !!getenv("YYDEBUG");
   40043   return !!yyparse ();
   40044 }
   40045 _ATEOF
   40046 
   40047 
   40048 
   40049 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   40050   at_save_special_files
   40051   mkdir xml-tests
   40052     # Don't combine these Bison invocations since we want to be sure that
   40053   # --report=all isn't required to get the full XML file.
   40054   { set +x
   40055 $as_echo "$at_srcdir/actions.at:161: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   40056                   --graph=xml-tests/test.dot -o input.c input.y"
   40057 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:161"
   40058 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   40059                   --graph=xml-tests/test.dot -o input.c input.y
   40060 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40061 at_status=$? at_failed=false
   40062 $at_check_filter
   40063 echo stderr:; cat "$at_stderr"
   40064 echo stdout:; cat "$at_stdout"
   40065 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:161"
   40066 $at_failed && at_fn_log_failure
   40067 $at_traceon; }
   40068 
   40069   { set +x
   40070 $as_echo "$at_srcdir/actions.at:161: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   40071 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:161"
   40072 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   40073 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40074 at_status=$? at_failed=false
   40075 $at_check_filter
   40076 echo stderr:; cat "$at_stderr"
   40077 echo stdout:; cat "$at_stdout"
   40078 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:161"
   40079 $at_failed && at_fn_log_failure
   40080 $at_traceon; }
   40081 
   40082     cp xml-tests/test.output expout
   40083   { set +x
   40084 $as_echo "$at_srcdir/actions.at:161: \$XSLTPROC \\
   40085              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   40086              xml-tests/test.xml"
   40087 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:161"
   40088 ( $at_check_trace; $XSLTPROC \
   40089              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   40090              xml-tests/test.xml
   40091 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40092 at_status=$? at_failed=false
   40093 $at_check_filter
   40094 at_fn_diff_devnull "$at_stderr" || at_failed=:
   40095 $at_diff expout "$at_stdout" || at_failed=:
   40096 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:161"
   40097 $at_failed && at_fn_log_failure
   40098 $at_traceon; }
   40099 
   40100   sort xml-tests/test.dot > expout
   40101   { set +x
   40102 $as_echo "$at_srcdir/actions.at:161: \$XSLTPROC \\
   40103              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   40104              xml-tests/test.xml | sort"
   40105 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:161"
   40106 ( $at_check_trace; $XSLTPROC \
   40107              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   40108              xml-tests/test.xml | sort
   40109 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40110 at_status=$? at_failed=false
   40111 $at_check_filter
   40112 at_fn_diff_devnull "$at_stderr" || at_failed=:
   40113 $at_diff expout "$at_stdout" || at_failed=:
   40114 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:161"
   40115 $at_failed && at_fn_log_failure
   40116 $at_traceon; }
   40117 
   40118   rm -rf xml-tests expout
   40119   at_restore_special_files
   40120 fi
   40121 { set +x
   40122 $as_echo "$at_srcdir/actions.at:161: bison -o input.c input.y"
   40123 at_fn_check_prepare_trace "actions.at:161"
   40124 ( $at_check_trace; bison -o input.c input.y
   40125 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40126 at_status=$? at_failed=false
   40127 $at_check_filter
   40128 at_fn_diff_devnull "$at_stderr" || at_failed=:
   40129 at_fn_diff_devnull "$at_stdout" || at_failed=:
   40130 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:161"
   40131 $at_failed && at_fn_log_failure
   40132 $at_traceon; }
   40133 
   40134 
   40135    { set +x
   40136 $as_echo "$at_srcdir/actions.at:161: \$BISON_C_WORKS"
   40137 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:161"
   40138 ( $at_check_trace; $BISON_C_WORKS
   40139 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40140 at_status=$? at_failed=false
   40141 $at_check_filter
   40142 echo stderr:; cat "$at_stderr"
   40143 echo stdout:; cat "$at_stdout"
   40144 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:161"
   40145 $at_failed && at_fn_log_failure
   40146 $at_traceon; }
   40147 
   40148 { set +x
   40149 $as_echo "$at_srcdir/actions.at:161: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   40150 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:161"
   40151 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   40152 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40153 at_status=$? at_failed=false
   40154 $at_check_filter
   40155 echo stderr:; cat "$at_stderr"
   40156 echo stdout:; cat "$at_stdout"
   40157 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:161"
   40158 $at_failed && at_fn_log_failure
   40159 $at_traceon; }
   40160 
   40161 
   40162 { set +x
   40163 $as_echo "$at_srcdir/actions.at:161:  \$PREPARSER ./input"
   40164 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:161"
   40165 ( $at_check_trace;  $PREPARSER ./input
   40166 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40167 at_status=$? at_failed=false
   40168 $at_check_filter
   40169 echo stderr:; tee stderr <"$at_stderr"
   40170 at_fn_diff_devnull "$at_stdout" || at_failed=:
   40171 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:161"
   40172 $at_failed && at_fn_log_failure
   40173 $at_traceon; }
   40174 
   40175 { set +x
   40176 $as_echo "$at_srcdir/actions.at:161: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   40177 at_fn_check_prepare_trace "actions.at:161"
   40178 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   40179 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40180 at_status=$? at_failed=false
   40181 $at_check_filter
   40182 echo >>"$at_stderr"; $as_echo "0
   40183 0: syntax error
   40184 " | \
   40185   $at_diff - "$at_stderr" || at_failed=:
   40186 at_fn_diff_devnull "$at_stdout" || at_failed=:
   40187 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:161"
   40188 $at_failed && at_fn_log_failure
   40189 $at_traceon; }
   40190 
   40191 
   40192 
   40193   set +x
   40194   $at_times_p && times >"$at_times_file"
   40195 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   40196 read at_status <"$at_status_file"
   40197 #AT_STOP_155
   40198 #AT_START_156
   40199 at_fn_group_banner 156 'actions.at:244' \
   40200   "Location print: yacc.c " "                        " 9
   40201 at_xfail=no
   40202 (
   40203   $as_echo "156. $at_setup_line: testing $at_desc ..."
   40204   $at_traceon
   40205 
   40206 
   40207 
   40208 cat >input.y <<'_ATEOF'
   40209 %code top {
   40210 #include <config.h>
   40211 /* We don't need perfect functions for these tests. */
   40212 #undef malloc
   40213 #undef memcmp
   40214 #undef realloc
   40215 }
   40216 
   40217 %defines /* FIXME: Required by lalr1.cc in Bison 2.6. */
   40218 %locations
   40219 %debug
   40220 %skeleton "yacc.c"
   40221 
   40222 
   40223 %code
   40224 {
   40225 # include <stdio.h>
   40226 # include <stdlib.h> /* getenv */
   40227 static void yyerror ( const char *msg);
   40228 static int yylex (void);
   40229 }
   40230 %%
   40231 exp:;
   40232 %%
   40233 #include <stdio.h>
   40234 /* A C error reporting function.  */
   40235 static
   40236 void yyerror ( const char *msg)
   40237 {
   40238   YY_LOCATION_PRINT (stderr, (yylloc));
   40239   fprintf (stderr, ": ");
   40240   fprintf (stderr, "%s\n", msg);
   40241 }
   40242 #include <assert.h>
   40243 static
   40244 int yylex (void)
   40245 {
   40246   static char const input[] = "";
   40247   static size_t toknum = 0;
   40248   int res;
   40249   ;
   40250   assert (toknum < sizeof input / sizeof input[0]);
   40251   res = input[toknum++];
   40252   ;
   40253   (yylloc).first_line = (yylloc).last_line = 1;
   40254   (yylloc).first_column = (yylloc).last_column = toknum;
   40255   return res;
   40256 }
   40257 
   40258 int
   40259 main (void)
   40260 {
   40261 #define TEST(L1, C1, L2, C2)          \
   40262   (yylloc).first_line = L1;           \
   40263   (yylloc).first_column = C1;         \
   40264   (yylloc).last_line = L2;            \
   40265   (yylloc).last_column = C2;          \
   40266   YY_LOCATION_PRINT(stdout, (yylloc));\
   40267   putchar ('\n');
   40268 
   40269   TEST(1, 1, 1, 1);
   40270   TEST(2, 1, 2, 10);
   40271   TEST(3, 1, 4, 1);
   40272   TEST(5, 1, 6, 10);
   40273 
   40274   TEST(7, 2, 0, 2);
   40275   TEST(8, 0, 8, 0);
   40276   return 0;
   40277 }
   40278 _ATEOF
   40279 
   40280 
   40281 
   40282 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   40283   at_save_special_files
   40284   mkdir xml-tests
   40285     # Don't combine these Bison invocations since we want to be sure that
   40286   # --report=all isn't required to get the full XML file.
   40287   { set +x
   40288 $as_echo "$at_srcdir/actions.at:244: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   40289                   --graph=xml-tests/test.dot -o input.c input.y"
   40290 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:244"
   40291 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   40292                   --graph=xml-tests/test.dot -o input.c input.y
   40293 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40294 at_status=$? at_failed=false
   40295 $at_check_filter
   40296 echo stderr:; cat "$at_stderr"
   40297 echo stdout:; cat "$at_stdout"
   40298 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:244"
   40299 $at_failed && at_fn_log_failure
   40300 $at_traceon; }
   40301 
   40302   { set +x
   40303 $as_echo "$at_srcdir/actions.at:244: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   40304 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:244"
   40305 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   40306 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40307 at_status=$? at_failed=false
   40308 $at_check_filter
   40309 echo stderr:; cat "$at_stderr"
   40310 echo stdout:; cat "$at_stdout"
   40311 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:244"
   40312 $at_failed && at_fn_log_failure
   40313 $at_traceon; }
   40314 
   40315     cp xml-tests/test.output expout
   40316   { set +x
   40317 $as_echo "$at_srcdir/actions.at:244: \$XSLTPROC \\
   40318              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   40319              xml-tests/test.xml"
   40320 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:244"
   40321 ( $at_check_trace; $XSLTPROC \
   40322              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   40323              xml-tests/test.xml
   40324 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40325 at_status=$? at_failed=false
   40326 $at_check_filter
   40327 at_fn_diff_devnull "$at_stderr" || at_failed=:
   40328 $at_diff expout "$at_stdout" || at_failed=:
   40329 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:244"
   40330 $at_failed && at_fn_log_failure
   40331 $at_traceon; }
   40332 
   40333   sort xml-tests/test.dot > expout
   40334   { set +x
   40335 $as_echo "$at_srcdir/actions.at:244: \$XSLTPROC \\
   40336              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   40337              xml-tests/test.xml | sort"
   40338 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:244"
   40339 ( $at_check_trace; $XSLTPROC \
   40340              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   40341              xml-tests/test.xml | sort
   40342 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40343 at_status=$? at_failed=false
   40344 $at_check_filter
   40345 at_fn_diff_devnull "$at_stderr" || at_failed=:
   40346 $at_diff expout "$at_stdout" || at_failed=:
   40347 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:244"
   40348 $at_failed && at_fn_log_failure
   40349 $at_traceon; }
   40350 
   40351   rm -rf xml-tests expout
   40352   at_restore_special_files
   40353 fi
   40354 { set +x
   40355 $as_echo "$at_srcdir/actions.at:244: bison -o input.c input.y"
   40356 at_fn_check_prepare_trace "actions.at:244"
   40357 ( $at_check_trace; bison -o input.c input.y
   40358 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40359 at_status=$? at_failed=false
   40360 $at_check_filter
   40361 at_fn_diff_devnull "$at_stderr" || at_failed=:
   40362 at_fn_diff_devnull "$at_stdout" || at_failed=:
   40363 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:244"
   40364 $at_failed && at_fn_log_failure
   40365 $at_traceon; }
   40366 
   40367 
   40368    { set +x
   40369 $as_echo "$at_srcdir/actions.at:244: \$BISON_C_WORKS"
   40370 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:244"
   40371 ( $at_check_trace; $BISON_C_WORKS
   40372 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40373 at_status=$? at_failed=false
   40374 $at_check_filter
   40375 echo stderr:; cat "$at_stderr"
   40376 echo stdout:; cat "$at_stdout"
   40377 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:244"
   40378 $at_failed && at_fn_log_failure
   40379 $at_traceon; }
   40380 
   40381 { set +x
   40382 $as_echo "$at_srcdir/actions.at:244: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   40383 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:244"
   40384 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   40385 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40386 at_status=$? at_failed=false
   40387 $at_check_filter
   40388 echo stderr:; cat "$at_stderr"
   40389 echo stdout:; cat "$at_stdout"
   40390 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:244"
   40391 $at_failed && at_fn_log_failure
   40392 $at_traceon; }
   40393 
   40394 
   40395 { set +x
   40396 $as_echo "$at_srcdir/actions.at:244:  \$PREPARSER ./input"
   40397 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:244"
   40398 ( $at_check_trace;  $PREPARSER ./input
   40399 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40400 at_status=$? at_failed=false
   40401 $at_check_filter
   40402 echo stderr:; tee stderr <"$at_stderr"
   40403 echo >>"$at_stdout"; $as_echo "1.1
   40404 2.1-9
   40405 3.1-4.0
   40406 5.1-6.9
   40407 7.2
   40408 8.0
   40409 " | \
   40410   $at_diff - "$at_stdout" || at_failed=:
   40411 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:244"
   40412 $at_failed && at_fn_log_failure
   40413 $at_traceon; }
   40414 
   40415 { set +x
   40416 $as_echo "$at_srcdir/actions.at:244: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   40417 at_fn_check_prepare_trace "actions.at:244"
   40418 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   40419 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40420 at_status=$? at_failed=false
   40421 $at_check_filter
   40422 at_fn_diff_devnull "$at_stderr" || at_failed=:
   40423 at_fn_diff_devnull "$at_stdout" || at_failed=:
   40424 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:244"
   40425 $at_failed && at_fn_log_failure
   40426 $at_traceon; }
   40427 
   40428 
   40429 
   40430   set +x
   40431   $at_times_p && times >"$at_times_file"
   40432 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   40433 read at_status <"$at_status_file"
   40434 #AT_STOP_156
   40435 #AT_START_157
   40436 at_fn_group_banner 157 'actions.at:245' \
   40437   "Location print: glr.c " "                         " 9
   40438 at_xfail=no
   40439 (
   40440   $as_echo "157. $at_setup_line: testing $at_desc ..."
   40441   $at_traceon
   40442 
   40443 
   40444 
   40445 cat >input.y <<'_ATEOF'
   40446 %code top {
   40447 #include <config.h>
   40448 /* We don't need perfect functions for these tests. */
   40449 #undef malloc
   40450 #undef memcmp
   40451 #undef realloc
   40452 }
   40453 
   40454 %defines /* FIXME: Required by lalr1.cc in Bison 2.6. */
   40455 %locations
   40456 %debug
   40457 %skeleton "glr.c"
   40458 
   40459 
   40460 %code
   40461 {
   40462 # include <stdio.h>
   40463 # include <stdlib.h> /* getenv */
   40464 static void yyerror ( const char *msg);
   40465 static int yylex (void);
   40466 }
   40467 %%
   40468 exp:;
   40469 %%
   40470 #include <stdio.h>
   40471 /* A C error reporting function.  */
   40472 static
   40473 void yyerror ( const char *msg)
   40474 {
   40475   YY_LOCATION_PRINT (stderr, (yylloc));
   40476   fprintf (stderr, ": ");
   40477   fprintf (stderr, "%s\n", msg);
   40478 }
   40479 #include <assert.h>
   40480 static
   40481 int yylex (void)
   40482 {
   40483   static char const input[] = "";
   40484   static size_t toknum = 0;
   40485   int res;
   40486   ;
   40487   assert (toknum < sizeof input / sizeof input[0]);
   40488   res = input[toknum++];
   40489   ;
   40490   (yylloc).first_line = (yylloc).last_line = 1;
   40491   (yylloc).first_column = (yylloc).last_column = toknum;
   40492   return res;
   40493 }
   40494 
   40495 int
   40496 main (void)
   40497 {
   40498 #define TEST(L1, C1, L2, C2)          \
   40499   (yylloc).first_line = L1;           \
   40500   (yylloc).first_column = C1;         \
   40501   (yylloc).last_line = L2;            \
   40502   (yylloc).last_column = C2;          \
   40503   YY_LOCATION_PRINT(stdout, (yylloc));\
   40504   putchar ('\n');
   40505 
   40506   TEST(1, 1, 1, 1);
   40507   TEST(2, 1, 2, 10);
   40508   TEST(3, 1, 4, 1);
   40509   TEST(5, 1, 6, 10);
   40510 
   40511   TEST(7, 2, 0, 2);
   40512   TEST(8, 0, 8, 0);
   40513   return 0;
   40514 }
   40515 _ATEOF
   40516 
   40517 
   40518 
   40519 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   40520   at_save_special_files
   40521   mkdir xml-tests
   40522     # Don't combine these Bison invocations since we want to be sure that
   40523   # --report=all isn't required to get the full XML file.
   40524   { set +x
   40525 $as_echo "$at_srcdir/actions.at:245: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   40526                   --graph=xml-tests/test.dot -o input.c input.y"
   40527 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:245"
   40528 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   40529                   --graph=xml-tests/test.dot -o input.c input.y
   40530 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40531 at_status=$? at_failed=false
   40532 $at_check_filter
   40533 echo stderr:; cat "$at_stderr"
   40534 echo stdout:; cat "$at_stdout"
   40535 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:245"
   40536 $at_failed && at_fn_log_failure
   40537 $at_traceon; }
   40538 
   40539   { set +x
   40540 $as_echo "$at_srcdir/actions.at:245: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   40541 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:245"
   40542 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   40543 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40544 at_status=$? at_failed=false
   40545 $at_check_filter
   40546 echo stderr:; cat "$at_stderr"
   40547 echo stdout:; cat "$at_stdout"
   40548 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:245"
   40549 $at_failed && at_fn_log_failure
   40550 $at_traceon; }
   40551 
   40552     cp xml-tests/test.output expout
   40553   { set +x
   40554 $as_echo "$at_srcdir/actions.at:245: \$XSLTPROC \\
   40555              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   40556              xml-tests/test.xml"
   40557 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:245"
   40558 ( $at_check_trace; $XSLTPROC \
   40559              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   40560              xml-tests/test.xml
   40561 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40562 at_status=$? at_failed=false
   40563 $at_check_filter
   40564 at_fn_diff_devnull "$at_stderr" || at_failed=:
   40565 $at_diff expout "$at_stdout" || at_failed=:
   40566 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:245"
   40567 $at_failed && at_fn_log_failure
   40568 $at_traceon; }
   40569 
   40570   sort xml-tests/test.dot > expout
   40571   { set +x
   40572 $as_echo "$at_srcdir/actions.at:245: \$XSLTPROC \\
   40573              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   40574              xml-tests/test.xml | sort"
   40575 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:245"
   40576 ( $at_check_trace; $XSLTPROC \
   40577              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   40578              xml-tests/test.xml | sort
   40579 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40580 at_status=$? at_failed=false
   40581 $at_check_filter
   40582 at_fn_diff_devnull "$at_stderr" || at_failed=:
   40583 $at_diff expout "$at_stdout" || at_failed=:
   40584 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:245"
   40585 $at_failed && at_fn_log_failure
   40586 $at_traceon; }
   40587 
   40588   rm -rf xml-tests expout
   40589   at_restore_special_files
   40590 fi
   40591 { set +x
   40592 $as_echo "$at_srcdir/actions.at:245: bison -o input.c input.y"
   40593 at_fn_check_prepare_trace "actions.at:245"
   40594 ( $at_check_trace; bison -o input.c input.y
   40595 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40596 at_status=$? at_failed=false
   40597 $at_check_filter
   40598 at_fn_diff_devnull "$at_stderr" || at_failed=:
   40599 at_fn_diff_devnull "$at_stdout" || at_failed=:
   40600 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:245"
   40601 $at_failed && at_fn_log_failure
   40602 $at_traceon; }
   40603 
   40604 
   40605    { set +x
   40606 $as_echo "$at_srcdir/actions.at:245: \$BISON_C_WORKS"
   40607 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:245"
   40608 ( $at_check_trace; $BISON_C_WORKS
   40609 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40610 at_status=$? at_failed=false
   40611 $at_check_filter
   40612 echo stderr:; cat "$at_stderr"
   40613 echo stdout:; cat "$at_stdout"
   40614 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:245"
   40615 $at_failed && at_fn_log_failure
   40616 $at_traceon; }
   40617 
   40618 { set +x
   40619 $as_echo "$at_srcdir/actions.at:245: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   40620 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:245"
   40621 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   40622 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40623 at_status=$? at_failed=false
   40624 $at_check_filter
   40625 echo stderr:; cat "$at_stderr"
   40626 echo stdout:; cat "$at_stdout"
   40627 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:245"
   40628 $at_failed && at_fn_log_failure
   40629 $at_traceon; }
   40630 
   40631 
   40632 { set +x
   40633 $as_echo "$at_srcdir/actions.at:245:  \$PREPARSER ./input"
   40634 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:245"
   40635 ( $at_check_trace;  $PREPARSER ./input
   40636 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40637 at_status=$? at_failed=false
   40638 $at_check_filter
   40639 echo stderr:; tee stderr <"$at_stderr"
   40640 echo >>"$at_stdout"; $as_echo "1.1
   40641 2.1-9
   40642 3.1-4.0
   40643 5.1-6.9
   40644 7.2
   40645 8.0
   40646 " | \
   40647   $at_diff - "$at_stdout" || at_failed=:
   40648 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:245"
   40649 $at_failed && at_fn_log_failure
   40650 $at_traceon; }
   40651 
   40652 { set +x
   40653 $as_echo "$at_srcdir/actions.at:245: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   40654 at_fn_check_prepare_trace "actions.at:245"
   40655 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   40656 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40657 at_status=$? at_failed=false
   40658 $at_check_filter
   40659 at_fn_diff_devnull "$at_stderr" || at_failed=:
   40660 at_fn_diff_devnull "$at_stdout" || at_failed=:
   40661 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:245"
   40662 $at_failed && at_fn_log_failure
   40663 $at_traceon; }
   40664 
   40665 
   40666 
   40667   set +x
   40668   $at_times_p && times >"$at_times_file"
   40669 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   40670 read at_status <"$at_status_file"
   40671 #AT_STOP_157
   40672 #AT_START_158
   40673 at_fn_group_banner 158 'actions.at:257' \
   40674   "Exotic Dollars" "                                 " 9
   40675 at_xfail=no
   40676 (
   40677   $as_echo "158. $at_setup_line: testing $at_desc ..."
   40678   $at_traceon
   40679 
   40680 
   40681 
   40682 cat >input.y <<'_ATEOF'
   40683 %code top {
   40684 #include <config.h>
   40685 /* We don't need perfect functions for these tests. */
   40686 #undef malloc
   40687 #undef memcmp
   40688 #undef realloc
   40689 }
   40690 
   40691 %error-verbose
   40692 %debug
   40693 %{
   40694 static void yyerror ( const char *msg);
   40695 static int yylex (void);
   40696 # define USE(Var)
   40697 %}
   40698 
   40699 %union
   40700 {
   40701   int val;
   40702 };
   40703 
   40704 %type <val> a_1 a_2 a_5
   40705             sum_of_the_five_previous_values
   40706 
   40707 %%
   40708 exp: a_1 a_2 { $<val>$ = 3; } { $<val>$ = $<val>3 + 1; } a_5
   40709      sum_of_the_five_previous_values
   40710     {
   40711        USE (($1, $2, $<foo>3, $<foo>4, $5));
   40712        printf ("%d\n", $6);
   40713     }
   40714 ;
   40715 a_1: { $$ = 1; };
   40716 a_2: { $$ = 2; };
   40717 a_5: { $$ = 5; };
   40718 
   40719 sum_of_the_five_previous_values:
   40720     {
   40721        $$ = $<val>0 + $<val>-1 + $<val>-2 + $<val>-3 + $<val>-4;
   40722     }
   40723 ;
   40724 
   40725 %%
   40726 #include <stdio.h>
   40727 /* A C error reporting function.  */
   40728 static
   40729 void yyerror ( const char *msg)
   40730 {
   40731   fprintf (stderr, "%s\n", msg);
   40732 }
   40733 #include <assert.h>
   40734 static
   40735 int yylex (void)
   40736 {
   40737   static char const input[] = "";
   40738   static size_t toknum = 0;
   40739   int res;
   40740   ;
   40741   assert (toknum < sizeof input / sizeof input[0]);
   40742   res = input[toknum++];
   40743   ;
   40744   return res;
   40745 }
   40746 int
   40747 main (void)
   40748 {
   40749   return yyparse ();
   40750 }
   40751 _ATEOF
   40752 
   40753 
   40754 
   40755 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   40756   at_save_special_files
   40757   mkdir xml-tests
   40758     # Don't combine these Bison invocations since we want to be sure that
   40759   # --report=all isn't required to get the full XML file.
   40760   { set +x
   40761 $as_echo "$at_srcdir/actions.at:305: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   40762                   --graph=xml-tests/test.dot -d -v -o input.c input.y"
   40763 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:305"
   40764 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   40765                   --graph=xml-tests/test.dot -d -v -o input.c input.y
   40766 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40767 at_status=$? at_failed=false
   40768 $at_check_filter
   40769 echo stderr:; cat "$at_stderr"
   40770 echo stdout:; cat "$at_stdout"
   40771 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:305"
   40772 $at_failed && at_fn_log_failure
   40773 $at_traceon; }
   40774 
   40775   { set +x
   40776 $as_echo "$at_srcdir/actions.at:305: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -v -o input.c input.y"
   40777 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -v -o input.c input.y" "actions.at:305"
   40778 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -d -v -o input.c input.y
   40779 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40780 at_status=$? at_failed=false
   40781 $at_check_filter
   40782 echo stderr:; cat "$at_stderr"
   40783 echo stdout:; cat "$at_stdout"
   40784 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:305"
   40785 $at_failed && at_fn_log_failure
   40786 $at_traceon; }
   40787 
   40788     cp xml-tests/test.output expout
   40789   { set +x
   40790 $as_echo "$at_srcdir/actions.at:305: \$XSLTPROC \\
   40791              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   40792              xml-tests/test.xml"
   40793 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:305"
   40794 ( $at_check_trace; $XSLTPROC \
   40795              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   40796              xml-tests/test.xml
   40797 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40798 at_status=$? at_failed=false
   40799 $at_check_filter
   40800 at_fn_diff_devnull "$at_stderr" || at_failed=:
   40801 $at_diff expout "$at_stdout" || at_failed=:
   40802 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:305"
   40803 $at_failed && at_fn_log_failure
   40804 $at_traceon; }
   40805 
   40806   sort xml-tests/test.dot > expout
   40807   { set +x
   40808 $as_echo "$at_srcdir/actions.at:305: \$XSLTPROC \\
   40809              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   40810              xml-tests/test.xml | sort"
   40811 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:305"
   40812 ( $at_check_trace; $XSLTPROC \
   40813              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   40814              xml-tests/test.xml | sort
   40815 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40816 at_status=$? at_failed=false
   40817 $at_check_filter
   40818 at_fn_diff_devnull "$at_stderr" || at_failed=:
   40819 $at_diff expout "$at_stdout" || at_failed=:
   40820 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:305"
   40821 $at_failed && at_fn_log_failure
   40822 $at_traceon; }
   40823 
   40824   rm -rf xml-tests expout
   40825   at_restore_special_files
   40826 fi
   40827 { set +x
   40828 $as_echo "$at_srcdir/actions.at:305: bison -d -v -o input.c input.y"
   40829 at_fn_check_prepare_trace "actions.at:305"
   40830 ( $at_check_trace; bison -d -v -o input.c input.y
   40831 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40832 at_status=$? at_failed=false
   40833 $at_check_filter
   40834 at_fn_diff_devnull "$at_stderr" || at_failed=:
   40835 at_fn_diff_devnull "$at_stdout" || at_failed=:
   40836 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:305"
   40837 $at_failed && at_fn_log_failure
   40838 $at_traceon; }
   40839 
   40840 
   40841 { set +x
   40842 $as_echo "$at_srcdir/actions.at:306: \$BISON_C_WORKS"
   40843 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:306"
   40844 ( $at_check_trace; $BISON_C_WORKS
   40845 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40846 at_status=$? at_failed=false
   40847 $at_check_filter
   40848 echo stderr:; cat "$at_stderr"
   40849 echo stdout:; cat "$at_stdout"
   40850 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:306"
   40851 $at_failed && at_fn_log_failure
   40852 $at_traceon; }
   40853 
   40854 { set +x
   40855 $as_echo "$at_srcdir/actions.at:306: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   40856 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:306"
   40857 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   40858 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40859 at_status=$? at_failed=false
   40860 $at_check_filter
   40861 echo stderr:; cat "$at_stderr"
   40862 echo stdout:; cat "$at_stdout"
   40863 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:306"
   40864 $at_failed && at_fn_log_failure
   40865 $at_traceon; }
   40866 
   40867 { set +x
   40868 $as_echo "$at_srcdir/actions.at:307:  \$PREPARSER ./input"
   40869 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:307"
   40870 ( $at_check_trace;  $PREPARSER ./input
   40871 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40872 at_status=$? at_failed=false
   40873 $at_check_filter
   40874 echo stderr:; tee stderr <"$at_stderr"
   40875 echo >>"$at_stdout"; $as_echo "15
   40876 " | \
   40877   $at_diff - "$at_stdout" || at_failed=:
   40878 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:307"
   40879 $at_failed && at_fn_log_failure
   40880 $at_traceon; }
   40881 
   40882 { set +x
   40883 $as_echo "$at_srcdir/actions.at:307: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   40884 at_fn_check_prepare_trace "actions.at:307"
   40885 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   40886 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40887 at_status=$? at_failed=false
   40888 $at_check_filter
   40889 at_fn_diff_devnull "$at_stderr" || at_failed=:
   40890 at_fn_diff_devnull "$at_stdout" || at_failed=:
   40891 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:307"
   40892 $at_failed && at_fn_log_failure
   40893 $at_traceon; }
   40894 
   40895 
   40896 
   40897 # Make sure that fields after $n or $-n are parsed correctly.  At one
   40898 # point while implementing dashes in symbol names, we were dropping
   40899 # fields after $-n.
   40900 cat >input.y <<'_ATEOF'
   40901 %code top {
   40902 #include <config.h>
   40903 /* We don't need perfect functions for these tests. */
   40904 #undef malloc
   40905 #undef memcmp
   40906 #undef realloc
   40907 }
   40908 
   40909 
   40910 %{
   40911 #include <stdio.h>
   40912 static void yyerror ( const char *msg);
   40913 static int yylex (void);
   40914   typedef struct { int val; } stype;
   40915 # define YYSTYPE stype
   40916 %}
   40917 
   40918 %%
   40919 start: one two { $$.val = $1.val + $2.val; } sum ;
   40920 one: { $$.val = 1; } ;
   40921 two: { $$.val = 2; } ;
   40922 sum: { printf ("%d\n", $0.val + $-1.val + $-2.val); } ;
   40923 
   40924 %%
   40925 #include <stdio.h>
   40926 /* A C error reporting function.  */
   40927 static
   40928 void yyerror ( const char *msg)
   40929 {
   40930   fprintf (stderr, "%s\n", msg);
   40931 }
   40932 #include <assert.h>
   40933 static
   40934 int yylex (void)
   40935 {
   40936   static char const input[] = "";
   40937   static size_t toknum = 0;
   40938   int res;
   40939   ;
   40940   assert (toknum < sizeof input / sizeof input[0]);
   40941   res = input[toknum++];
   40942   ;
   40943   return res;
   40944 }
   40945 int
   40946 main (void)
   40947 {
   40948   return yyparse ();
   40949 }
   40950 _ATEOF
   40951 
   40952 
   40953 
   40954 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   40955   at_save_special_files
   40956   mkdir xml-tests
   40957     # Don't combine these Bison invocations since we want to be sure that
   40958   # --report=all isn't required to get the full XML file.
   40959   { set +x
   40960 $as_echo "$at_srcdir/actions.at:340: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   40961                   --graph=xml-tests/test.dot -o input.c input.y"
   40962 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:340"
   40963 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   40964                   --graph=xml-tests/test.dot -o input.c input.y
   40965 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40966 at_status=$? at_failed=false
   40967 $at_check_filter
   40968 echo stderr:; cat "$at_stderr"
   40969 echo stdout:; cat "$at_stdout"
   40970 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:340"
   40971 $at_failed && at_fn_log_failure
   40972 $at_traceon; }
   40973 
   40974   { set +x
   40975 $as_echo "$at_srcdir/actions.at:340: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   40976 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:340"
   40977 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   40978 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40979 at_status=$? at_failed=false
   40980 $at_check_filter
   40981 echo stderr:; cat "$at_stderr"
   40982 echo stdout:; cat "$at_stdout"
   40983 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:340"
   40984 $at_failed && at_fn_log_failure
   40985 $at_traceon; }
   40986 
   40987     cp xml-tests/test.output expout
   40988   { set +x
   40989 $as_echo "$at_srcdir/actions.at:340: \$XSLTPROC \\
   40990              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   40991              xml-tests/test.xml"
   40992 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:340"
   40993 ( $at_check_trace; $XSLTPROC \
   40994              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   40995              xml-tests/test.xml
   40996 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   40997 at_status=$? at_failed=false
   40998 $at_check_filter
   40999 at_fn_diff_devnull "$at_stderr" || at_failed=:
   41000 $at_diff expout "$at_stdout" || at_failed=:
   41001 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:340"
   41002 $at_failed && at_fn_log_failure
   41003 $at_traceon; }
   41004 
   41005   sort xml-tests/test.dot > expout
   41006   { set +x
   41007 $as_echo "$at_srcdir/actions.at:340: \$XSLTPROC \\
   41008              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   41009              xml-tests/test.xml | sort"
   41010 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:340"
   41011 ( $at_check_trace; $XSLTPROC \
   41012              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   41013              xml-tests/test.xml | sort
   41014 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41015 at_status=$? at_failed=false
   41016 $at_check_filter
   41017 at_fn_diff_devnull "$at_stderr" || at_failed=:
   41018 $at_diff expout "$at_stdout" || at_failed=:
   41019 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:340"
   41020 $at_failed && at_fn_log_failure
   41021 $at_traceon; }
   41022 
   41023   rm -rf xml-tests expout
   41024   at_restore_special_files
   41025 fi
   41026 { set +x
   41027 $as_echo "$at_srcdir/actions.at:340: bison -o input.c input.y"
   41028 at_fn_check_prepare_trace "actions.at:340"
   41029 ( $at_check_trace; bison -o input.c input.y
   41030 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41031 at_status=$? at_failed=false
   41032 $at_check_filter
   41033 at_fn_diff_devnull "$at_stderr" || at_failed=:
   41034 at_fn_diff_devnull "$at_stdout" || at_failed=:
   41035 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:340"
   41036 $at_failed && at_fn_log_failure
   41037 $at_traceon; }
   41038 
   41039 
   41040    { set +x
   41041 $as_echo "$at_srcdir/actions.at:340: \$BISON_C_WORKS"
   41042 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:340"
   41043 ( $at_check_trace; $BISON_C_WORKS
   41044 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41045 at_status=$? at_failed=false
   41046 $at_check_filter
   41047 echo stderr:; cat "$at_stderr"
   41048 echo stdout:; cat "$at_stdout"
   41049 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:340"
   41050 $at_failed && at_fn_log_failure
   41051 $at_traceon; }
   41052 
   41053 { set +x
   41054 $as_echo "$at_srcdir/actions.at:340: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   41055 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:340"
   41056 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   41057 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41058 at_status=$? at_failed=false
   41059 $at_check_filter
   41060 echo stderr:; cat "$at_stderr"
   41061 echo stdout:; cat "$at_stdout"
   41062 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:340"
   41063 $at_failed && at_fn_log_failure
   41064 $at_traceon; }
   41065 
   41066 
   41067 { set +x
   41068 $as_echo "$at_srcdir/actions.at:341:  \$PREPARSER ./input"
   41069 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:341"
   41070 ( $at_check_trace;  $PREPARSER ./input
   41071 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41072 at_status=$? at_failed=false
   41073 $at_check_filter
   41074 echo stderr:; tee stderr <"$at_stderr"
   41075 echo >>"$at_stdout"; $as_echo "6
   41076 " | \
   41077   $at_diff - "$at_stdout" || at_failed=:
   41078 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:341"
   41079 $at_failed && at_fn_log_failure
   41080 $at_traceon; }
   41081 
   41082 { set +x
   41083 $as_echo "$at_srcdir/actions.at:341: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   41084 at_fn_check_prepare_trace "actions.at:341"
   41085 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   41086 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41087 at_status=$? at_failed=false
   41088 $at_check_filter
   41089 at_fn_diff_devnull "$at_stderr" || at_failed=:
   41090 at_fn_diff_devnull "$at_stdout" || at_failed=:
   41091 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:341"
   41092 $at_failed && at_fn_log_failure
   41093 $at_traceon; }
   41094 
   41095 
   41096 
   41097 
   41098   set +x
   41099   $at_times_p && times >"$at_times_file"
   41100 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   41101 read at_status <"$at_status_file"
   41102 #AT_STOP_158
   41103 #AT_START_159
   41104 at_fn_group_banner 159 'actions.at:751' \
   41105   "Printers and Destructors" "                       " 9
   41106 at_xfail=no
   41107 (
   41108   $as_echo "159. $at_setup_line: testing $at_desc ..."
   41109   $at_traceon
   41110 
   41111 
   41112 
   41113 # Make sure complex $n work.
   41114 
   41115 # Be sure to pass all the %directives to this macro to have correct
   41116 # helping macros.  So don't put any directly in the Bison file.
   41117 
   41118 cat >input.y <<'_ATEOF'
   41119 %code top {
   41120 #include <config.h>
   41121 /* We don't need perfect functions for these tests. */
   41122 #undef malloc
   41123 #undef memcmp
   41124 #undef realloc
   41125 }
   41126 
   41127 %code requires {
   41128 #include <stdio.h>
   41129 #include <stdlib.h>
   41130 #include <string.h>
   41131 #include <assert.h>
   41132 
   41133 #define YYINITDEPTH 10
   41134 #define YYMAXDEPTH 10
   41135 #define RANGE(Location) (Location).first_line, (Location).last_line
   41136 
   41137 /* Display the symbol type Symbol.  */
   41138 #define V(Symbol, Value, Location, Sep) \
   41139    fprintf (stderr, #Symbol " (%d@%d-%d)" Sep, Value, RANGE(Location))
   41140 }
   41141 
   41142 %error-verbose
   41143 %debug
   41144 %verbose
   41145 %locations
   41146 
   41147 
   41148 
   41149 %code {
   41150 
   41151 static int yylex (void);
   41152 static void yyerror ( const char *msg);
   41153 }
   41154 
   41155 
   41156 
   41157 /* FIXME: This %printer isn't actually tested.  */
   41158 %printer
   41159   {
   41160     fprintf (yyoutput, "%d", $$);
   41161   }
   41162   input line thing 'x' 'y'
   41163 
   41164 %destructor
   41165   { fprintf (stderr, "Freeing nterm input (%d@%d-%d)\n", $$, RANGE (@$)); }
   41166   input
   41167 
   41168 %destructor
   41169   { fprintf (stderr, "Freeing nterm line (%d@%d-%d)\n", $$, RANGE (@$)); }
   41170   line
   41171 
   41172 %destructor
   41173   { fprintf (stderr, "Freeing nterm thing (%d@%d-%d)\n", $$, RANGE (@$)); }
   41174   thing
   41175 
   41176 %destructor
   41177   { fprintf (stderr, "Freeing token 'x' (%d@%d-%d)\n", $$, RANGE (@$)); }
   41178   'x'
   41179 
   41180 %destructor
   41181   { fprintf (stderr, "Freeing token 'y' (%d@%d-%d)\n", $$, RANGE (@$)); }
   41182   'y'
   41183 
   41184 %token END 0
   41185 %destructor
   41186   { fprintf (stderr, "Freeing token END (%d@%d-%d)\n", $$, RANGE (@$)); }
   41187   END
   41188 
   41189 %%
   41190 /*
   41191    This grammar is made to exercise error recovery.
   41192    "Lines" starting with `(' support error recovery, with
   41193    ')' as synchronizing token.  Lines starting with 'x' can never
   41194    be recovered from if in error.
   41195 */
   41196 
   41197 input:
   41198   /* Nothing. */
   41199     {
   41200       $$ = 0;
   41201       V(input, $$, @$, ": /* Nothing */\n");
   41202     }
   41203 | line input /* Right recursive to load the stack so that popping at
   41204                 END can be exercised.  */
   41205     {
   41206       $$ = 2;
   41207       V(input, $$, @$, ": ");
   41208       V(line,  $1, @1, " ");
   41209       V(input, $2, @2, "\n");
   41210     }
   41211 ;
   41212 
   41213 line:
   41214   thing thing thing ';'
   41215     {
   41216       $$ = $1;
   41217       V(line,  $$, @$, ": ");
   41218       V(thing, $1, @1, " ");
   41219       V(thing, $2, @2, " ");
   41220       V(thing, $3, @3, " ");
   41221       V(;,     $4, @4, "\n");
   41222     }
   41223 | '(' thing thing ')'
   41224     {
   41225       $$ = $1;
   41226       V(line,  $$, @$, ": ");
   41227       V('(',   $1, @1, " ");
   41228       V(thing, $2, @2, " ");
   41229       V(thing, $3, @3, " ");
   41230       V(')',   $4, @4, "\n");
   41231     }
   41232 | '(' thing ')'
   41233     {
   41234       $$ = $1;
   41235       V(line,  $$, @$, ": ");
   41236       V('(',   $1, @1, " ");
   41237       V(thing, $2, @2, " ");
   41238       V(')',   $3, @3, "\n");
   41239     }
   41240 | '(' error ')'
   41241     {
   41242       $$ = -1;
   41243       V(line,  $$, @$, ": ");
   41244       V('(',   $1, @1, " ");
   41245       fprintf (stderr, "error (@%d-%d) ", RANGE (@2));
   41246       V(')',   $3, @3, "\n");
   41247     }
   41248 ;
   41249 
   41250 thing:
   41251   'x'
   41252     {
   41253       $$ = $1;
   41254       V(thing, $$, @$, ": ");
   41255       V('x',   $1, @1, "\n");
   41256     }
   41257 ;
   41258 %%
   41259 /* Alias to ARGV[1]. */
   41260 const char *source = YY_NULL;
   41261 
   41262 #include <stdio.h>
   41263 /* A C error reporting function.  */
   41264 static
   41265 void yyerror ( const char *msg)
   41266 {
   41267   YY_LOCATION_PRINT (stderr, (yylloc));
   41268   fprintf (stderr, ": ");
   41269   fprintf (stderr, "%s\n", msg);
   41270 }
   41271 
   41272 static
   41273 int yylex (void)
   41274 {
   41275   static unsigned int counter = 0;
   41276 
   41277   int c = (yylval) = counter++;
   41278   /* As in BASIC, line numbers go from 10 to 10.  */
   41279   (yylloc).first_line = (yylloc).first_column = 10 * c;
   41280   (yylloc).last_line = (yylloc).last_column = (yylloc).first_line + 9;
   41281   assert (0 <= c && c <= strlen (source));
   41282   if (source[c])
   41283     fprintf (stderr, "sending: '%c'", source[c]);
   41284   else
   41285     fprintf (stderr, "sending: END");
   41286   fprintf (stderr, " (%d@%d-%d)\n", c, RANGE ((yylloc)));
   41287   return source[c];
   41288 }
   41289 
   41290 
   41291 int
   41292 main (int argc, const char *argv[])
   41293 {
   41294   int status;
   41295   yydebug = !!getenv ("YYDEBUG");
   41296   assert (argc == 2);
   41297   source = argv[1];
   41298   status = yyparse ();
   41299   switch (status)
   41300     {
   41301       case 0: fprintf (stderr, "Successful parse.\n"); break;
   41302       case 1: fprintf (stderr, "Parsing FAILED.\n"); break;
   41303       default: fprintf (stderr, "Parsing FAILED (status %d).\n", status); break;
   41304     }
   41305   return status;
   41306 }
   41307 _ATEOF
   41308 
   41309 
   41310 
   41311 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   41312   at_save_special_files
   41313   mkdir xml-tests
   41314     # Don't combine these Bison invocations since we want to be sure that
   41315   # --report=all isn't required to get the full XML file.
   41316   { set +x
   41317 $as_echo "$at_srcdir/actions.at:751: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   41318                   --graph=xml-tests/test.dot -o input.c input.y"
   41319 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:751"
   41320 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   41321                   --graph=xml-tests/test.dot -o input.c input.y
   41322 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41323 at_status=$? at_failed=false
   41324 $at_check_filter
   41325 echo stderr:; cat "$at_stderr"
   41326 echo stdout:; cat "$at_stdout"
   41327 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:751"
   41328 $at_failed && at_fn_log_failure
   41329 $at_traceon; }
   41330 
   41331   { set +x
   41332 $as_echo "$at_srcdir/actions.at:751: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   41333 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:751"
   41334 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   41335 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41336 at_status=$? at_failed=false
   41337 $at_check_filter
   41338 echo stderr:; cat "$at_stderr"
   41339 echo stdout:; cat "$at_stdout"
   41340 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:751"
   41341 $at_failed && at_fn_log_failure
   41342 $at_traceon; }
   41343 
   41344     cp xml-tests/test.output expout
   41345   { set +x
   41346 $as_echo "$at_srcdir/actions.at:751: \$XSLTPROC \\
   41347              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   41348              xml-tests/test.xml"
   41349 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:751"
   41350 ( $at_check_trace; $XSLTPROC \
   41351              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   41352              xml-tests/test.xml
   41353 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41354 at_status=$? at_failed=false
   41355 $at_check_filter
   41356 at_fn_diff_devnull "$at_stderr" || at_failed=:
   41357 $at_diff expout "$at_stdout" || at_failed=:
   41358 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:751"
   41359 $at_failed && at_fn_log_failure
   41360 $at_traceon; }
   41361 
   41362   sort xml-tests/test.dot > expout
   41363   { set +x
   41364 $as_echo "$at_srcdir/actions.at:751: \$XSLTPROC \\
   41365              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   41366              xml-tests/test.xml | sort"
   41367 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:751"
   41368 ( $at_check_trace; $XSLTPROC \
   41369              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   41370              xml-tests/test.xml | sort
   41371 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41372 at_status=$? at_failed=false
   41373 $at_check_filter
   41374 at_fn_diff_devnull "$at_stderr" || at_failed=:
   41375 $at_diff expout "$at_stdout" || at_failed=:
   41376 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:751"
   41377 $at_failed && at_fn_log_failure
   41378 $at_traceon; }
   41379 
   41380   rm -rf xml-tests expout
   41381   at_restore_special_files
   41382 fi
   41383 { set +x
   41384 $as_echo "$at_srcdir/actions.at:751: bison -o input.c input.y"
   41385 at_fn_check_prepare_trace "actions.at:751"
   41386 ( $at_check_trace; bison -o input.c input.y
   41387 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41388 at_status=$? at_failed=false
   41389 $at_check_filter
   41390 at_fn_diff_devnull "$at_stderr" || at_failed=:
   41391 at_fn_diff_devnull "$at_stdout" || at_failed=:
   41392 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:751"
   41393 $at_failed && at_fn_log_failure
   41394 $at_traceon; }
   41395 
   41396 
   41397    { set +x
   41398 $as_echo "$at_srcdir/actions.at:751: \$BISON_C_WORKS"
   41399 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:751"
   41400 ( $at_check_trace; $BISON_C_WORKS
   41401 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41402 at_status=$? at_failed=false
   41403 $at_check_filter
   41404 echo stderr:; cat "$at_stderr"
   41405 echo stdout:; cat "$at_stdout"
   41406 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:751"
   41407 $at_failed && at_fn_log_failure
   41408 $at_traceon; }
   41409 
   41410 { set +x
   41411 $as_echo "$at_srcdir/actions.at:751: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   41412 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:751"
   41413 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   41414 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41415 at_status=$? at_failed=false
   41416 $at_check_filter
   41417 echo stderr:; cat "$at_stderr"
   41418 echo stdout:; cat "$at_stdout"
   41419 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:751"
   41420 $at_failed && at_fn_log_failure
   41421 $at_traceon; }
   41422 
   41423 
   41424 
   41425 
   41426 # Check the location of "empty"
   41427 # -----------------------------
   41428 # I.e., epsilon-reductions, as in "(x)" which ends by reducing
   41429 # an empty "line" nterm.
   41430 # FIXME: This location is not satisfying.  Depend on the lookahead?
   41431 { set +x
   41432 $as_echo "$at_srcdir/actions.at:751:  \$PREPARSER ./input '(x)'"
   41433 at_fn_check_prepare_dynamic " $PREPARSER ./input '(x)'" "actions.at:751"
   41434 ( $at_check_trace;  $PREPARSER ./input '(x)'
   41435 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41436 at_status=$? at_failed=false
   41437 $at_check_filter
   41438 echo stderr:; tee stderr <"$at_stderr"
   41439 at_fn_diff_devnull "$at_stdout" || at_failed=:
   41440 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:751"
   41441 $at_failed && at_fn_log_failure
   41442 $at_traceon; }
   41443 
   41444 { set +x
   41445 $as_echo "$at_srcdir/actions.at:751: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   41446 at_fn_check_prepare_trace "actions.at:751"
   41447 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   41448 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41449 at_status=$? at_failed=false
   41450 $at_check_filter
   41451 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   41452 sending: 'x' (1@10-19)
   41453 thing (1@10-19): 'x' (1@10-19)
   41454 sending: ')' (2@20-29)
   41455 line (0@0-29): '(' (0@0-9) thing (1@10-19) ')' (2@20-29)
   41456 sending: END (3@30-39)
   41457 input (0@29-29): /* Nothing */
   41458 input (2@0-29): line (0@0-29) input (0@29-29)
   41459 Freeing token END (3@30-39)
   41460 Freeing nterm input (2@0-29)
   41461 Successful parse.
   41462 " | \
   41463   $at_diff - "$at_stderr" || at_failed=:
   41464 at_fn_diff_devnull "$at_stdout" || at_failed=:
   41465 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:751"
   41466 $at_failed && at_fn_log_failure
   41467 $at_traceon; }
   41468 
   41469 
   41470 
   41471 
   41472 # Check locations in error recovery
   41473 # ---------------------------------
   41474 # '(y)' is an error, but can be recovered from.  But what's the location
   41475 # of the error itself ('y'), and of the resulting reduction ('(error)').
   41476 { set +x
   41477 $as_echo "$at_srcdir/actions.at:751:  \$PREPARSER ./input '(y)'"
   41478 at_fn_check_prepare_dynamic " $PREPARSER ./input '(y)'" "actions.at:751"
   41479 ( $at_check_trace;  $PREPARSER ./input '(y)'
   41480 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41481 at_status=$? at_failed=false
   41482 $at_check_filter
   41483 echo stderr:; tee stderr <"$at_stderr"
   41484 at_fn_diff_devnull "$at_stdout" || at_failed=:
   41485 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:751"
   41486 $at_failed && at_fn_log_failure
   41487 $at_traceon; }
   41488 
   41489 { set +x
   41490 $as_echo "$at_srcdir/actions.at:751: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   41491 at_fn_check_prepare_trace "actions.at:751"
   41492 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   41493 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41494 at_status=$? at_failed=false
   41495 $at_check_filter
   41496 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   41497 sending: 'y' (1@10-19)
   41498 10.10-19.18: syntax error, unexpected 'y', expecting 'x'
   41499 Freeing token 'y' (1@10-19)
   41500 sending: ')' (2@20-29)
   41501 line (-1@0-29): '(' (0@0-9) error (@10-19) ')' (2@20-29)
   41502 sending: END (3@30-39)
   41503 input (0@29-29): /* Nothing */
   41504 input (2@0-29): line (-1@0-29) input (0@29-29)
   41505 Freeing token END (3@30-39)
   41506 Freeing nterm input (2@0-29)
   41507 Successful parse.
   41508 " | \
   41509   $at_diff - "$at_stderr" || at_failed=:
   41510 at_fn_diff_devnull "$at_stdout" || at_failed=:
   41511 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:751"
   41512 $at_failed && at_fn_log_failure
   41513 $at_traceon; }
   41514 
   41515 
   41516 
   41517 
   41518 # Syntax errors caught by the parser
   41519 # ----------------------------------
   41520 # Exercise the discarding of stack top and input until `error'
   41521 # can be reduced.
   41522 #
   41523 #     '(', 'x', 'x', 'x', 'x', 'x', ')',
   41524 #
   41525 # Load the stack and provoke an error that cannot be caught by the
   41526 # grammar, to check that the stack is cleared.  And make sure the
   41527 # lookahead is freed.
   41528 #
   41529 #     '(', 'x', ')',
   41530 #     '(', 'x', ')',
   41531 #     'y'
   41532 { set +x
   41533 $as_echo "$at_srcdir/actions.at:751:  \$PREPARSER ./input '(xxxxx)(x)(x)y'"
   41534 at_fn_check_prepare_dynamic " $PREPARSER ./input '(xxxxx)(x)(x)y'" "actions.at:751"
   41535 ( $at_check_trace;  $PREPARSER ./input '(xxxxx)(x)(x)y'
   41536 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41537 at_status=$? at_failed=false
   41538 $at_check_filter
   41539 echo stderr:; tee stderr <"$at_stderr"
   41540 at_fn_diff_devnull "$at_stdout" || at_failed=:
   41541 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:751"
   41542 $at_failed && at_fn_log_failure
   41543 $at_traceon; }
   41544 
   41545 { set +x
   41546 $as_echo "$at_srcdir/actions.at:751: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   41547 at_fn_check_prepare_trace "actions.at:751"
   41548 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   41549 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41550 at_status=$? at_failed=false
   41551 $at_check_filter
   41552 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   41553 sending: 'x' (1@10-19)
   41554 thing (1@10-19): 'x' (1@10-19)
   41555 sending: 'x' (2@20-29)
   41556 thing (2@20-29): 'x' (2@20-29)
   41557 sending: 'x' (3@30-39)
   41558 30.30-39.38: syntax error, unexpected 'x', expecting ')'
   41559 Freeing nterm thing (2@20-29)
   41560 Freeing nterm thing (1@10-19)
   41561 Freeing token 'x' (3@30-39)
   41562 sending: 'x' (4@40-49)
   41563 Freeing token 'x' (4@40-49)
   41564 sending: 'x' (5@50-59)
   41565 Freeing token 'x' (5@50-59)
   41566 sending: ')' (6@60-69)
   41567 line (-1@0-69): '(' (0@0-9) error (@10-59) ')' (6@60-69)
   41568 sending: '(' (7@70-79)
   41569 sending: 'x' (8@80-89)
   41570 thing (8@80-89): 'x' (8@80-89)
   41571 sending: ')' (9@90-99)
   41572 line (7@70-99): '(' (7@70-79) thing (8@80-89) ')' (9@90-99)
   41573 sending: '(' (10@100-109)
   41574 sending: 'x' (11@110-119)
   41575 thing (11@110-119): 'x' (11@110-119)
   41576 sending: ')' (12@120-129)
   41577 line (10@100-129): '(' (10@100-109) thing (11@110-119) ')' (12@120-129)
   41578 sending: 'y' (13@130-139)
   41579 input (0@129-129): /* Nothing */
   41580 input (2@100-129): line (10@100-129) input (0@129-129)
   41581 input (2@70-129): line (7@70-99) input (2@100-129)
   41582 input (2@0-129): line (-1@0-69) input (2@70-129)
   41583 130.130-139.138: syntax error, unexpected 'y', expecting END
   41584 Freeing nterm input (2@0-129)
   41585 Freeing token 'y' (13@130-139)
   41586 Parsing FAILED.
   41587 " | \
   41588   $at_diff - "$at_stderr" || at_failed=:
   41589 at_fn_diff_devnull "$at_stdout" || at_failed=:
   41590 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:751"
   41591 $at_failed && at_fn_log_failure
   41592 $at_traceon; }
   41593 
   41594 
   41595 
   41596 
   41597 # Syntax error caught by the parser where lookahead = END
   41598 # --------------------------------------------------------
   41599 # Load the stack and provoke an error that cannot be caught by the
   41600 # grammar, to check that the stack is cleared.  And make sure the
   41601 # lookahead is freed.
   41602 #
   41603 #     '(', 'x', ')',
   41604 #     '(', 'x', ')',
   41605 #     'x'
   41606 { set +x
   41607 $as_echo "$at_srcdir/actions.at:751:  \$PREPARSER ./input '(x)(x)x'"
   41608 at_fn_check_prepare_dynamic " $PREPARSER ./input '(x)(x)x'" "actions.at:751"
   41609 ( $at_check_trace;  $PREPARSER ./input '(x)(x)x'
   41610 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41611 at_status=$? at_failed=false
   41612 $at_check_filter
   41613 echo stderr:; tee stderr <"$at_stderr"
   41614 at_fn_diff_devnull "$at_stdout" || at_failed=:
   41615 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:751"
   41616 $at_failed && at_fn_log_failure
   41617 $at_traceon; }
   41618 
   41619 { set +x
   41620 $as_echo "$at_srcdir/actions.at:751: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   41621 at_fn_check_prepare_trace "actions.at:751"
   41622 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   41623 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41624 at_status=$? at_failed=false
   41625 $at_check_filter
   41626 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   41627 sending: 'x' (1@10-19)
   41628 thing (1@10-19): 'x' (1@10-19)
   41629 sending: ')' (2@20-29)
   41630 line (0@0-29): '(' (0@0-9) thing (1@10-19) ')' (2@20-29)
   41631 sending: '(' (3@30-39)
   41632 sending: 'x' (4@40-49)
   41633 thing (4@40-49): 'x' (4@40-49)
   41634 sending: ')' (5@50-59)
   41635 line (3@30-59): '(' (3@30-39) thing (4@40-49) ')' (5@50-59)
   41636 sending: 'x' (6@60-69)
   41637 thing (6@60-69): 'x' (6@60-69)
   41638 sending: END (7@70-79)
   41639 70.70-79.78: syntax error, unexpected END, expecting 'x'
   41640 Freeing nterm thing (6@60-69)
   41641 Freeing nterm line (3@30-59)
   41642 Freeing nterm line (0@0-29)
   41643 Freeing token END (7@70-79)
   41644 Parsing FAILED.
   41645 " | \
   41646   $at_diff - "$at_stderr" || at_failed=:
   41647 at_fn_diff_devnull "$at_stdout" || at_failed=:
   41648 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:751"
   41649 $at_failed && at_fn_log_failure
   41650 $at_traceon; }
   41651 
   41652 
   41653 
   41654 
   41655 # Check destruction upon stack overflow
   41656 # -------------------------------------
   41657 # Upon stack overflow, all symbols on the stack should be destroyed.
   41658 # Only check for yacc.c.
   41659 
   41660 { set +x
   41661 $as_echo "$at_srcdir/actions.at:751:  \$PREPARSER ./input '(x)(x)(x)(x)(x)(x)(x)'"
   41662 at_fn_check_prepare_dynamic " $PREPARSER ./input '(x)(x)(x)(x)(x)(x)(x)'" "actions.at:751"
   41663 ( $at_check_trace;  $PREPARSER ./input '(x)(x)(x)(x)(x)(x)(x)'
   41664 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41665 at_status=$? at_failed=false
   41666 $at_check_filter
   41667 echo stderr:; tee stderr <"$at_stderr"
   41668 at_fn_diff_devnull "$at_stdout" || at_failed=:
   41669 at_fn_check_status 2 $at_status "$at_srcdir/actions.at:751"
   41670 $at_failed && at_fn_log_failure
   41671 $at_traceon; }
   41672 
   41673 { set +x
   41674 $as_echo "$at_srcdir/actions.at:751: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   41675 at_fn_check_prepare_trace "actions.at:751"
   41676 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   41677 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41678 at_status=$? at_failed=false
   41679 $at_check_filter
   41680 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   41681 sending: 'x' (1@10-19)
   41682 thing (1@10-19): 'x' (1@10-19)
   41683 sending: ')' (2@20-29)
   41684 line (0@0-29): '(' (0@0-9) thing (1@10-19) ')' (2@20-29)
   41685 sending: '(' (3@30-39)
   41686 sending: 'x' (4@40-49)
   41687 thing (4@40-49): 'x' (4@40-49)
   41688 sending: ')' (5@50-59)
   41689 line (3@30-59): '(' (3@30-39) thing (4@40-49) ')' (5@50-59)
   41690 sending: '(' (6@60-69)
   41691 sending: 'x' (7@70-79)
   41692 thing (7@70-79): 'x' (7@70-79)
   41693 sending: ')' (8@80-89)
   41694 line (6@60-89): '(' (6@60-69) thing (7@70-79) ')' (8@80-89)
   41695 sending: '(' (9@90-99)
   41696 sending: 'x' (10@100-109)
   41697 thing (10@100-109): 'x' (10@100-109)
   41698 sending: ')' (11@110-119)
   41699 line (9@90-119): '(' (9@90-99) thing (10@100-109) ')' (11@110-119)
   41700 sending: '(' (12@120-129)
   41701 sending: 'x' (13@130-139)
   41702 thing (13@130-139): 'x' (13@130-139)
   41703 sending: ')' (14@140-149)
   41704 line (12@120-149): '(' (12@120-129) thing (13@130-139) ')' (14@140-149)
   41705 sending: '(' (15@150-159)
   41706 sending: 'x' (16@160-169)
   41707 thing (16@160-169): 'x' (16@160-169)
   41708 sending: ')' (17@170-179)
   41709 line (15@150-179): '(' (15@150-159) thing (16@160-169) ')' (17@170-179)
   41710 sending: '(' (18@180-189)
   41711 sending: 'x' (19@190-199)
   41712 thing (19@190-199): 'x' (19@190-199)
   41713 sending: ')' (20@200-209)
   41714 200.200-209.208: memory exhausted
   41715 Freeing nterm thing (19@190-199)
   41716 Freeing nterm line (15@150-179)
   41717 Freeing nterm line (12@120-149)
   41718 Freeing nterm line (9@90-119)
   41719 Freeing nterm line (6@60-89)
   41720 Freeing nterm line (3@30-59)
   41721 Freeing nterm line (0@0-29)
   41722 Parsing FAILED (status 2).
   41723 " | \
   41724   $at_diff - "$at_stderr" || at_failed=:
   41725 at_fn_diff_devnull "$at_stdout" || at_failed=:
   41726 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:751"
   41727 $at_failed && at_fn_log_failure
   41728 $at_traceon; }
   41729 
   41730 
   41731 
   41732 
   41733 
   41734 
   41735 
   41736   set +x
   41737   $at_times_p && times >"$at_times_file"
   41738 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   41739 read at_status <"$at_status_file"
   41740 #AT_STOP_159
   41741 #AT_START_160
   41742 at_fn_group_banner 160 'actions.at:752' \
   41743   "Printers and Destructors with union" "            " 9
   41744 at_xfail=no
   41745 (
   41746   $as_echo "160. $at_setup_line: testing $at_desc ..."
   41747   $at_traceon
   41748 
   41749 
   41750 
   41751 # Make sure complex $n work.
   41752 
   41753 # Be sure to pass all the %directives to this macro to have correct
   41754 # helping macros.  So don't put any directly in the Bison file.
   41755 
   41756 cat >input.y <<'_ATEOF'
   41757 %code top {
   41758 #include <config.h>
   41759 /* We don't need perfect functions for these tests. */
   41760 #undef malloc
   41761 #undef memcmp
   41762 #undef realloc
   41763 }
   41764 
   41765 %code requires {
   41766 #include <stdio.h>
   41767 #include <stdlib.h>
   41768 #include <string.h>
   41769 #include <assert.h>
   41770 
   41771 #define YYINITDEPTH 10
   41772 #define YYMAXDEPTH 10
   41773 #define RANGE(Location) (Location).first_line, (Location).last_line
   41774 
   41775 /* Display the symbol type Symbol.  */
   41776 #define V(Symbol, Value, Location, Sep) \
   41777    fprintf (stderr, #Symbol " (%d@%d-%d)" Sep, Value, RANGE(Location))
   41778 }
   41779 
   41780 %error-verbose
   41781 %debug
   41782 %verbose
   41783 %locations
   41784 
   41785 %union
   41786 {
   41787   int ival;
   41788 }
   41789 
   41790 %code provides {
   41791 
   41792 static int yylex (void);
   41793 static void yyerror ( const char *msg);
   41794 }
   41795 
   41796 %type <ival> '(' 'x' 'y' ')' ';' thing line input END
   41797 
   41798 /* FIXME: This %printer isn't actually tested.  */
   41799 %printer
   41800   {
   41801     fprintf (yyoutput, "%d", $$);
   41802   }
   41803   input line thing 'x' 'y'
   41804 
   41805 %destructor
   41806   { fprintf (stderr, "Freeing nterm input (%d@%d-%d)\n", $$, RANGE (@$)); }
   41807   input
   41808 
   41809 %destructor
   41810   { fprintf (stderr, "Freeing nterm line (%d@%d-%d)\n", $$, RANGE (@$)); }
   41811   line
   41812 
   41813 %destructor
   41814   { fprintf (stderr, "Freeing nterm thing (%d@%d-%d)\n", $$, RANGE (@$)); }
   41815   thing
   41816 
   41817 %destructor
   41818   { fprintf (stderr, "Freeing token 'x' (%d@%d-%d)\n", $$, RANGE (@$)); }
   41819   'x'
   41820 
   41821 %destructor
   41822   { fprintf (stderr, "Freeing token 'y' (%d@%d-%d)\n", $$, RANGE (@$)); }
   41823   'y'
   41824 
   41825 %token END 0
   41826 %destructor
   41827   { fprintf (stderr, "Freeing token END (%d@%d-%d)\n", $$, RANGE (@$)); }
   41828   END
   41829 
   41830 %%
   41831 /*
   41832    This grammar is made to exercise error recovery.
   41833    "Lines" starting with `(' support error recovery, with
   41834    ')' as synchronizing token.  Lines starting with 'x' can never
   41835    be recovered from if in error.
   41836 */
   41837 
   41838 input:
   41839   /* Nothing. */
   41840     {
   41841       $$ = 0;
   41842       V(input, $$, @$, ": /* Nothing */\n");
   41843     }
   41844 | line input /* Right recursive to load the stack so that popping at
   41845                 END can be exercised.  */
   41846     {
   41847       $$ = 2;
   41848       V(input, $$, @$, ": ");
   41849       V(line,  $1, @1, " ");
   41850       V(input, $2, @2, "\n");
   41851     }
   41852 ;
   41853 
   41854 line:
   41855   thing thing thing ';'
   41856     {
   41857       $$ = $1;
   41858       V(line,  $$, @$, ": ");
   41859       V(thing, $1, @1, " ");
   41860       V(thing, $2, @2, " ");
   41861       V(thing, $3, @3, " ");
   41862       V(;,     $4, @4, "\n");
   41863     }
   41864 | '(' thing thing ')'
   41865     {
   41866       $$ = $1;
   41867       V(line,  $$, @$, ": ");
   41868       V('(',   $1, @1, " ");
   41869       V(thing, $2, @2, " ");
   41870       V(thing, $3, @3, " ");
   41871       V(')',   $4, @4, "\n");
   41872     }
   41873 | '(' thing ')'
   41874     {
   41875       $$ = $1;
   41876       V(line,  $$, @$, ": ");
   41877       V('(',   $1, @1, " ");
   41878       V(thing, $2, @2, " ");
   41879       V(')',   $3, @3, "\n");
   41880     }
   41881 | '(' error ')'
   41882     {
   41883       $$ = -1;
   41884       V(line,  $$, @$, ": ");
   41885       V('(',   $1, @1, " ");
   41886       fprintf (stderr, "error (@%d-%d) ", RANGE (@2));
   41887       V(')',   $3, @3, "\n");
   41888     }
   41889 ;
   41890 
   41891 thing:
   41892   'x'
   41893     {
   41894       $$ = $1;
   41895       V(thing, $$, @$, ": ");
   41896       V('x',   $1, @1, "\n");
   41897     }
   41898 ;
   41899 %%
   41900 /* Alias to ARGV[1]. */
   41901 const char *source = YY_NULL;
   41902 
   41903 #include <stdio.h>
   41904 /* A C error reporting function.  */
   41905 static
   41906 void yyerror ( const char *msg)
   41907 {
   41908   YY_LOCATION_PRINT (stderr, (yylloc));
   41909   fprintf (stderr, ": ");
   41910   fprintf (stderr, "%s\n", msg);
   41911 }
   41912 
   41913 static
   41914 int yylex (void)
   41915 {
   41916   static unsigned int counter = 0;
   41917 
   41918   int c = (yylval).ival = counter++;
   41919   /* As in BASIC, line numbers go from 10 to 10.  */
   41920   (yylloc).first_line = (yylloc).first_column = 10 * c;
   41921   (yylloc).last_line = (yylloc).last_column = (yylloc).first_line + 9;
   41922   assert (0 <= c && c <= strlen (source));
   41923   if (source[c])
   41924     fprintf (stderr, "sending: '%c'", source[c]);
   41925   else
   41926     fprintf (stderr, "sending: END");
   41927   fprintf (stderr, " (%d@%d-%d)\n", c, RANGE ((yylloc)));
   41928   return source[c];
   41929 }
   41930 
   41931 
   41932 int
   41933 main (int argc, const char *argv[])
   41934 {
   41935   int status;
   41936   yydebug = !!getenv ("YYDEBUG");
   41937   assert (argc == 2);
   41938   source = argv[1];
   41939   status = yyparse ();
   41940   switch (status)
   41941     {
   41942       case 0: fprintf (stderr, "Successful parse.\n"); break;
   41943       case 1: fprintf (stderr, "Parsing FAILED.\n"); break;
   41944       default: fprintf (stderr, "Parsing FAILED (status %d).\n", status); break;
   41945     }
   41946   return status;
   41947 }
   41948 _ATEOF
   41949 
   41950 
   41951 
   41952 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   41953   at_save_special_files
   41954   mkdir xml-tests
   41955     # Don't combine these Bison invocations since we want to be sure that
   41956   # --report=all isn't required to get the full XML file.
   41957   { set +x
   41958 $as_echo "$at_srcdir/actions.at:752: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   41959                   --graph=xml-tests/test.dot -o input.c input.y"
   41960 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:752"
   41961 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   41962                   --graph=xml-tests/test.dot -o input.c input.y
   41963 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41964 at_status=$? at_failed=false
   41965 $at_check_filter
   41966 echo stderr:; cat "$at_stderr"
   41967 echo stdout:; cat "$at_stdout"
   41968 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:752"
   41969 $at_failed && at_fn_log_failure
   41970 $at_traceon; }
   41971 
   41972   { set +x
   41973 $as_echo "$at_srcdir/actions.at:752: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   41974 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:752"
   41975 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   41976 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41977 at_status=$? at_failed=false
   41978 $at_check_filter
   41979 echo stderr:; cat "$at_stderr"
   41980 echo stdout:; cat "$at_stdout"
   41981 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:752"
   41982 $at_failed && at_fn_log_failure
   41983 $at_traceon; }
   41984 
   41985     cp xml-tests/test.output expout
   41986   { set +x
   41987 $as_echo "$at_srcdir/actions.at:752: \$XSLTPROC \\
   41988              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   41989              xml-tests/test.xml"
   41990 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:752"
   41991 ( $at_check_trace; $XSLTPROC \
   41992              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   41993              xml-tests/test.xml
   41994 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   41995 at_status=$? at_failed=false
   41996 $at_check_filter
   41997 at_fn_diff_devnull "$at_stderr" || at_failed=:
   41998 $at_diff expout "$at_stdout" || at_failed=:
   41999 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:752"
   42000 $at_failed && at_fn_log_failure
   42001 $at_traceon; }
   42002 
   42003   sort xml-tests/test.dot > expout
   42004   { set +x
   42005 $as_echo "$at_srcdir/actions.at:752: \$XSLTPROC \\
   42006              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   42007              xml-tests/test.xml | sort"
   42008 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:752"
   42009 ( $at_check_trace; $XSLTPROC \
   42010              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   42011              xml-tests/test.xml | sort
   42012 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42013 at_status=$? at_failed=false
   42014 $at_check_filter
   42015 at_fn_diff_devnull "$at_stderr" || at_failed=:
   42016 $at_diff expout "$at_stdout" || at_failed=:
   42017 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:752"
   42018 $at_failed && at_fn_log_failure
   42019 $at_traceon; }
   42020 
   42021   rm -rf xml-tests expout
   42022   at_restore_special_files
   42023 fi
   42024 { set +x
   42025 $as_echo "$at_srcdir/actions.at:752: bison -o input.c input.y"
   42026 at_fn_check_prepare_trace "actions.at:752"
   42027 ( $at_check_trace; bison -o input.c input.y
   42028 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42029 at_status=$? at_failed=false
   42030 $at_check_filter
   42031 at_fn_diff_devnull "$at_stderr" || at_failed=:
   42032 at_fn_diff_devnull "$at_stdout" || at_failed=:
   42033 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:752"
   42034 $at_failed && at_fn_log_failure
   42035 $at_traceon; }
   42036 
   42037 
   42038    { set +x
   42039 $as_echo "$at_srcdir/actions.at:752: \$BISON_C_WORKS"
   42040 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:752"
   42041 ( $at_check_trace; $BISON_C_WORKS
   42042 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42043 at_status=$? at_failed=false
   42044 $at_check_filter
   42045 echo stderr:; cat "$at_stderr"
   42046 echo stdout:; cat "$at_stdout"
   42047 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:752"
   42048 $at_failed && at_fn_log_failure
   42049 $at_traceon; }
   42050 
   42051 { set +x
   42052 $as_echo "$at_srcdir/actions.at:752: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   42053 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:752"
   42054 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   42055 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42056 at_status=$? at_failed=false
   42057 $at_check_filter
   42058 echo stderr:; cat "$at_stderr"
   42059 echo stdout:; cat "$at_stdout"
   42060 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:752"
   42061 $at_failed && at_fn_log_failure
   42062 $at_traceon; }
   42063 
   42064 
   42065 
   42066 
   42067 # Check the location of "empty"
   42068 # -----------------------------
   42069 # I.e., epsilon-reductions, as in "(x)" which ends by reducing
   42070 # an empty "line" nterm.
   42071 # FIXME: This location is not satisfying.  Depend on the lookahead?
   42072 { set +x
   42073 $as_echo "$at_srcdir/actions.at:752:  \$PREPARSER ./input '(x)'"
   42074 at_fn_check_prepare_dynamic " $PREPARSER ./input '(x)'" "actions.at:752"
   42075 ( $at_check_trace;  $PREPARSER ./input '(x)'
   42076 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42077 at_status=$? at_failed=false
   42078 $at_check_filter
   42079 echo stderr:; tee stderr <"$at_stderr"
   42080 at_fn_diff_devnull "$at_stdout" || at_failed=:
   42081 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:752"
   42082 $at_failed && at_fn_log_failure
   42083 $at_traceon; }
   42084 
   42085 { set +x
   42086 $as_echo "$at_srcdir/actions.at:752: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   42087 at_fn_check_prepare_trace "actions.at:752"
   42088 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   42089 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42090 at_status=$? at_failed=false
   42091 $at_check_filter
   42092 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   42093 sending: 'x' (1@10-19)
   42094 thing (1@10-19): 'x' (1@10-19)
   42095 sending: ')' (2@20-29)
   42096 line (0@0-29): '(' (0@0-9) thing (1@10-19) ')' (2@20-29)
   42097 sending: END (3@30-39)
   42098 input (0@29-29): /* Nothing */
   42099 input (2@0-29): line (0@0-29) input (0@29-29)
   42100 Freeing token END (3@30-39)
   42101 Freeing nterm input (2@0-29)
   42102 Successful parse.
   42103 " | \
   42104   $at_diff - "$at_stderr" || at_failed=:
   42105 at_fn_diff_devnull "$at_stdout" || at_failed=:
   42106 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:752"
   42107 $at_failed && at_fn_log_failure
   42108 $at_traceon; }
   42109 
   42110 
   42111 
   42112 
   42113 # Check locations in error recovery
   42114 # ---------------------------------
   42115 # '(y)' is an error, but can be recovered from.  But what's the location
   42116 # of the error itself ('y'), and of the resulting reduction ('(error)').
   42117 { set +x
   42118 $as_echo "$at_srcdir/actions.at:752:  \$PREPARSER ./input '(y)'"
   42119 at_fn_check_prepare_dynamic " $PREPARSER ./input '(y)'" "actions.at:752"
   42120 ( $at_check_trace;  $PREPARSER ./input '(y)'
   42121 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42122 at_status=$? at_failed=false
   42123 $at_check_filter
   42124 echo stderr:; tee stderr <"$at_stderr"
   42125 at_fn_diff_devnull "$at_stdout" || at_failed=:
   42126 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:752"
   42127 $at_failed && at_fn_log_failure
   42128 $at_traceon; }
   42129 
   42130 { set +x
   42131 $as_echo "$at_srcdir/actions.at:752: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   42132 at_fn_check_prepare_trace "actions.at:752"
   42133 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   42134 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42135 at_status=$? at_failed=false
   42136 $at_check_filter
   42137 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   42138 sending: 'y' (1@10-19)
   42139 10.10-19.18: syntax error, unexpected 'y', expecting 'x'
   42140 Freeing token 'y' (1@10-19)
   42141 sending: ')' (2@20-29)
   42142 line (-1@0-29): '(' (0@0-9) error (@10-19) ')' (2@20-29)
   42143 sending: END (3@30-39)
   42144 input (0@29-29): /* Nothing */
   42145 input (2@0-29): line (-1@0-29) input (0@29-29)
   42146 Freeing token END (3@30-39)
   42147 Freeing nterm input (2@0-29)
   42148 Successful parse.
   42149 " | \
   42150   $at_diff - "$at_stderr" || at_failed=:
   42151 at_fn_diff_devnull "$at_stdout" || at_failed=:
   42152 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:752"
   42153 $at_failed && at_fn_log_failure
   42154 $at_traceon; }
   42155 
   42156 
   42157 
   42158 
   42159 # Syntax errors caught by the parser
   42160 # ----------------------------------
   42161 # Exercise the discarding of stack top and input until `error'
   42162 # can be reduced.
   42163 #
   42164 #     '(', 'x', 'x', 'x', 'x', 'x', ')',
   42165 #
   42166 # Load the stack and provoke an error that cannot be caught by the
   42167 # grammar, to check that the stack is cleared.  And make sure the
   42168 # lookahead is freed.
   42169 #
   42170 #     '(', 'x', ')',
   42171 #     '(', 'x', ')',
   42172 #     'y'
   42173 { set +x
   42174 $as_echo "$at_srcdir/actions.at:752:  \$PREPARSER ./input '(xxxxx)(x)(x)y'"
   42175 at_fn_check_prepare_dynamic " $PREPARSER ./input '(xxxxx)(x)(x)y'" "actions.at:752"
   42176 ( $at_check_trace;  $PREPARSER ./input '(xxxxx)(x)(x)y'
   42177 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42178 at_status=$? at_failed=false
   42179 $at_check_filter
   42180 echo stderr:; tee stderr <"$at_stderr"
   42181 at_fn_diff_devnull "$at_stdout" || at_failed=:
   42182 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:752"
   42183 $at_failed && at_fn_log_failure
   42184 $at_traceon; }
   42185 
   42186 { set +x
   42187 $as_echo "$at_srcdir/actions.at:752: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   42188 at_fn_check_prepare_trace "actions.at:752"
   42189 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   42190 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42191 at_status=$? at_failed=false
   42192 $at_check_filter
   42193 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   42194 sending: 'x' (1@10-19)
   42195 thing (1@10-19): 'x' (1@10-19)
   42196 sending: 'x' (2@20-29)
   42197 thing (2@20-29): 'x' (2@20-29)
   42198 sending: 'x' (3@30-39)
   42199 30.30-39.38: syntax error, unexpected 'x', expecting ')'
   42200 Freeing nterm thing (2@20-29)
   42201 Freeing nterm thing (1@10-19)
   42202 Freeing token 'x' (3@30-39)
   42203 sending: 'x' (4@40-49)
   42204 Freeing token 'x' (4@40-49)
   42205 sending: 'x' (5@50-59)
   42206 Freeing token 'x' (5@50-59)
   42207 sending: ')' (6@60-69)
   42208 line (-1@0-69): '(' (0@0-9) error (@10-59) ')' (6@60-69)
   42209 sending: '(' (7@70-79)
   42210 sending: 'x' (8@80-89)
   42211 thing (8@80-89): 'x' (8@80-89)
   42212 sending: ')' (9@90-99)
   42213 line (7@70-99): '(' (7@70-79) thing (8@80-89) ')' (9@90-99)
   42214 sending: '(' (10@100-109)
   42215 sending: 'x' (11@110-119)
   42216 thing (11@110-119): 'x' (11@110-119)
   42217 sending: ')' (12@120-129)
   42218 line (10@100-129): '(' (10@100-109) thing (11@110-119) ')' (12@120-129)
   42219 sending: 'y' (13@130-139)
   42220 input (0@129-129): /* Nothing */
   42221 input (2@100-129): line (10@100-129) input (0@129-129)
   42222 input (2@70-129): line (7@70-99) input (2@100-129)
   42223 input (2@0-129): line (-1@0-69) input (2@70-129)
   42224 130.130-139.138: syntax error, unexpected 'y', expecting END
   42225 Freeing nterm input (2@0-129)
   42226 Freeing token 'y' (13@130-139)
   42227 Parsing FAILED.
   42228 " | \
   42229   $at_diff - "$at_stderr" || at_failed=:
   42230 at_fn_diff_devnull "$at_stdout" || at_failed=:
   42231 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:752"
   42232 $at_failed && at_fn_log_failure
   42233 $at_traceon; }
   42234 
   42235 
   42236 
   42237 
   42238 # Syntax error caught by the parser where lookahead = END
   42239 # --------------------------------------------------------
   42240 # Load the stack and provoke an error that cannot be caught by the
   42241 # grammar, to check that the stack is cleared.  And make sure the
   42242 # lookahead is freed.
   42243 #
   42244 #     '(', 'x', ')',
   42245 #     '(', 'x', ')',
   42246 #     'x'
   42247 { set +x
   42248 $as_echo "$at_srcdir/actions.at:752:  \$PREPARSER ./input '(x)(x)x'"
   42249 at_fn_check_prepare_dynamic " $PREPARSER ./input '(x)(x)x'" "actions.at:752"
   42250 ( $at_check_trace;  $PREPARSER ./input '(x)(x)x'
   42251 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42252 at_status=$? at_failed=false
   42253 $at_check_filter
   42254 echo stderr:; tee stderr <"$at_stderr"
   42255 at_fn_diff_devnull "$at_stdout" || at_failed=:
   42256 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:752"
   42257 $at_failed && at_fn_log_failure
   42258 $at_traceon; }
   42259 
   42260 { set +x
   42261 $as_echo "$at_srcdir/actions.at:752: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   42262 at_fn_check_prepare_trace "actions.at:752"
   42263 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   42264 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42265 at_status=$? at_failed=false
   42266 $at_check_filter
   42267 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   42268 sending: 'x' (1@10-19)
   42269 thing (1@10-19): 'x' (1@10-19)
   42270 sending: ')' (2@20-29)
   42271 line (0@0-29): '(' (0@0-9) thing (1@10-19) ')' (2@20-29)
   42272 sending: '(' (3@30-39)
   42273 sending: 'x' (4@40-49)
   42274 thing (4@40-49): 'x' (4@40-49)
   42275 sending: ')' (5@50-59)
   42276 line (3@30-59): '(' (3@30-39) thing (4@40-49) ')' (5@50-59)
   42277 sending: 'x' (6@60-69)
   42278 thing (6@60-69): 'x' (6@60-69)
   42279 sending: END (7@70-79)
   42280 70.70-79.78: syntax error, unexpected END, expecting 'x'
   42281 Freeing nterm thing (6@60-69)
   42282 Freeing nterm line (3@30-59)
   42283 Freeing nterm line (0@0-29)
   42284 Freeing token END (7@70-79)
   42285 Parsing FAILED.
   42286 " | \
   42287   $at_diff - "$at_stderr" || at_failed=:
   42288 at_fn_diff_devnull "$at_stdout" || at_failed=:
   42289 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:752"
   42290 $at_failed && at_fn_log_failure
   42291 $at_traceon; }
   42292 
   42293 
   42294 
   42295 
   42296 # Check destruction upon stack overflow
   42297 # -------------------------------------
   42298 # Upon stack overflow, all symbols on the stack should be destroyed.
   42299 # Only check for yacc.c.
   42300 
   42301 { set +x
   42302 $as_echo "$at_srcdir/actions.at:752:  \$PREPARSER ./input '(x)(x)(x)(x)(x)(x)(x)'"
   42303 at_fn_check_prepare_dynamic " $PREPARSER ./input '(x)(x)(x)(x)(x)(x)(x)'" "actions.at:752"
   42304 ( $at_check_trace;  $PREPARSER ./input '(x)(x)(x)(x)(x)(x)(x)'
   42305 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42306 at_status=$? at_failed=false
   42307 $at_check_filter
   42308 echo stderr:; tee stderr <"$at_stderr"
   42309 at_fn_diff_devnull "$at_stdout" || at_failed=:
   42310 at_fn_check_status 2 $at_status "$at_srcdir/actions.at:752"
   42311 $at_failed && at_fn_log_failure
   42312 $at_traceon; }
   42313 
   42314 { set +x
   42315 $as_echo "$at_srcdir/actions.at:752: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   42316 at_fn_check_prepare_trace "actions.at:752"
   42317 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   42318 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42319 at_status=$? at_failed=false
   42320 $at_check_filter
   42321 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   42322 sending: 'x' (1@10-19)
   42323 thing (1@10-19): 'x' (1@10-19)
   42324 sending: ')' (2@20-29)
   42325 line (0@0-29): '(' (0@0-9) thing (1@10-19) ')' (2@20-29)
   42326 sending: '(' (3@30-39)
   42327 sending: 'x' (4@40-49)
   42328 thing (4@40-49): 'x' (4@40-49)
   42329 sending: ')' (5@50-59)
   42330 line (3@30-59): '(' (3@30-39) thing (4@40-49) ')' (5@50-59)
   42331 sending: '(' (6@60-69)
   42332 sending: 'x' (7@70-79)
   42333 thing (7@70-79): 'x' (7@70-79)
   42334 sending: ')' (8@80-89)
   42335 line (6@60-89): '(' (6@60-69) thing (7@70-79) ')' (8@80-89)
   42336 sending: '(' (9@90-99)
   42337 sending: 'x' (10@100-109)
   42338 thing (10@100-109): 'x' (10@100-109)
   42339 sending: ')' (11@110-119)
   42340 line (9@90-119): '(' (9@90-99) thing (10@100-109) ')' (11@110-119)
   42341 sending: '(' (12@120-129)
   42342 sending: 'x' (13@130-139)
   42343 thing (13@130-139): 'x' (13@130-139)
   42344 sending: ')' (14@140-149)
   42345 line (12@120-149): '(' (12@120-129) thing (13@130-139) ')' (14@140-149)
   42346 sending: '(' (15@150-159)
   42347 sending: 'x' (16@160-169)
   42348 thing (16@160-169): 'x' (16@160-169)
   42349 sending: ')' (17@170-179)
   42350 line (15@150-179): '(' (15@150-159) thing (16@160-169) ')' (17@170-179)
   42351 sending: '(' (18@180-189)
   42352 sending: 'x' (19@190-199)
   42353 thing (19@190-199): 'x' (19@190-199)
   42354 sending: ')' (20@200-209)
   42355 200.200-209.208: memory exhausted
   42356 Freeing nterm thing (19@190-199)
   42357 Freeing nterm line (15@150-179)
   42358 Freeing nterm line (12@120-149)
   42359 Freeing nterm line (9@90-119)
   42360 Freeing nterm line (6@60-89)
   42361 Freeing nterm line (3@30-59)
   42362 Freeing nterm line (0@0-29)
   42363 Parsing FAILED (status 2).
   42364 " | \
   42365   $at_diff - "$at_stderr" || at_failed=:
   42366 at_fn_diff_devnull "$at_stdout" || at_failed=:
   42367 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:752"
   42368 $at_failed && at_fn_log_failure
   42369 $at_traceon; }
   42370 
   42371 
   42372 
   42373 
   42374 
   42375 
   42376 
   42377   set +x
   42378   $at_times_p && times >"$at_times_file"
   42379 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   42380 read at_status <"$at_status_file"
   42381 #AT_STOP_160
   42382 #AT_START_161
   42383 at_fn_group_banner 161 'actions.at:754' \
   42384   "Printers and Destructors: %defines %skeleton \"lalr1.cc\"" "" 9
   42385 at_xfail=no
   42386 (
   42387   $as_echo "161. $at_setup_line: testing $at_desc ..."
   42388   $at_traceon
   42389 
   42390 
   42391 
   42392 # Make sure complex $n work.
   42393 
   42394 # Be sure to pass all the %directives to this macro to have correct
   42395 # helping macros.  So don't put any directly in the Bison file.
   42396 
   42397 cat >input.y <<'_ATEOF'
   42398 %code top {
   42399 #include <config.h>
   42400 /* We don't need perfect functions for these tests. */
   42401 #undef malloc
   42402 #undef memcmp
   42403 #undef realloc
   42404 }
   42405 
   42406 %code requires {
   42407 #include <stdio.h>
   42408 #include <stdlib.h>
   42409 #include <string.h>
   42410 #include <assert.h>
   42411 
   42412 #define YYINITDEPTH 10
   42413 #define YYMAXDEPTH 10
   42414 #define RANGE(Location) (Location).begin.line, (Location).end.line
   42415 
   42416 /* Display the symbol type Symbol.  */
   42417 #define V(Symbol, Value, Location, Sep) \
   42418    fprintf (stderr, #Symbol " (%d@%d-%d)" Sep, Value, RANGE(Location))
   42419 }
   42420 
   42421 %error-verbose
   42422 %debug
   42423 %verbose
   42424 %locations
   42425 %defines %skeleton "lalr1.cc"
   42426 
   42427 %define global_tokens_and_yystype
   42428 %code {
   42429 typedef yy::location YYLTYPE;
   42430 static int yylex (yy::parser::semantic_type *lvalp, yy::parser::location_type *llocp);
   42431 
   42432 }
   42433 
   42434 
   42435 
   42436 /* FIXME: This %printer isn't actually tested.  */
   42437 %printer
   42438   {
   42439     debug_stream () << $$;;
   42440   }
   42441   input line thing 'x' 'y'
   42442 
   42443 %destructor
   42444   { fprintf (stderr, "Freeing nterm input (%d@%d-%d)\n", $$, RANGE (@$)); }
   42445   input
   42446 
   42447 %destructor
   42448   { fprintf (stderr, "Freeing nterm line (%d@%d-%d)\n", $$, RANGE (@$)); }
   42449   line
   42450 
   42451 %destructor
   42452   { fprintf (stderr, "Freeing nterm thing (%d@%d-%d)\n", $$, RANGE (@$)); }
   42453   thing
   42454 
   42455 %destructor
   42456   { fprintf (stderr, "Freeing token 'x' (%d@%d-%d)\n", $$, RANGE (@$)); }
   42457   'x'
   42458 
   42459 %destructor
   42460   { fprintf (stderr, "Freeing token 'y' (%d@%d-%d)\n", $$, RANGE (@$)); }
   42461   'y'
   42462 
   42463 %token END 0
   42464 %destructor
   42465   { fprintf (stderr, "Freeing token END (%d@%d-%d)\n", $$, RANGE (@$)); }
   42466   END
   42467 
   42468 %%
   42469 /*
   42470    This grammar is made to exercise error recovery.
   42471    "Lines" starting with `(' support error recovery, with
   42472    ')' as synchronizing token.  Lines starting with 'x' can never
   42473    be recovered from if in error.
   42474 */
   42475 
   42476 input:
   42477   /* Nothing. */
   42478     {
   42479       $$ = 0;
   42480       V(input, $$, @$, ": /* Nothing */\n");
   42481     }
   42482 | line input /* Right recursive to load the stack so that popping at
   42483                 END can be exercised.  */
   42484     {
   42485       $$ = 2;
   42486       V(input, $$, @$, ": ");
   42487       V(line,  $1, @1, " ");
   42488       V(input, $2, @2, "\n");
   42489     }
   42490 ;
   42491 
   42492 line:
   42493   thing thing thing ';'
   42494     {
   42495       $$ = $1;
   42496       V(line,  $$, @$, ": ");
   42497       V(thing, $1, @1, " ");
   42498       V(thing, $2, @2, " ");
   42499       V(thing, $3, @3, " ");
   42500       V(;,     $4, @4, "\n");
   42501     }
   42502 | '(' thing thing ')'
   42503     {
   42504       $$ = $1;
   42505       V(line,  $$, @$, ": ");
   42506       V('(',   $1, @1, " ");
   42507       V(thing, $2, @2, " ");
   42508       V(thing, $3, @3, " ");
   42509       V(')',   $4, @4, "\n");
   42510     }
   42511 | '(' thing ')'
   42512     {
   42513       $$ = $1;
   42514       V(line,  $$, @$, ": ");
   42515       V('(',   $1, @1, " ");
   42516       V(thing, $2, @2, " ");
   42517       V(')',   $3, @3, "\n");
   42518     }
   42519 | '(' error ')'
   42520     {
   42521       $$ = -1;
   42522       V(line,  $$, @$, ": ");
   42523       V('(',   $1, @1, " ");
   42524       fprintf (stderr, "error (@%d-%d) ", RANGE (@2));
   42525       V(')',   $3, @3, "\n");
   42526     }
   42527 ;
   42528 
   42529 thing:
   42530   'x'
   42531     {
   42532       $$ = $1;
   42533       V(thing, $$, @$, ": ");
   42534       V('x',   $1, @1, "\n");
   42535     }
   42536 ;
   42537 %%
   42538 /* Alias to ARGV[1]. */
   42539 const char *source = YY_NULL;
   42540 
   42541 /* A C++ error reporting function.  */
   42542 void
   42543 yy::parser::error (const location_type& l, const std::string& m)
   42544 {
   42545   (void) l;
   42546   std::cerr << l << ": " << m << std::endl;
   42547 }
   42548 
   42549 static
   42550 int yylex (yy::parser::semantic_type *lvalp, yy::parser::location_type *llocp)
   42551 {
   42552   static unsigned int counter = 0;
   42553 
   42554   int c = (*lvalp) = counter++;
   42555   /* As in BASIC, line numbers go from 10 to 10.  */
   42556   (*llocp).begin.line = (*llocp).begin.column = 10 * c;
   42557   (*llocp).end.line = (*llocp).end.column = (*llocp).begin.line + 9;
   42558   assert (0 <= c && c <= strlen (source));
   42559   if (source[c])
   42560     fprintf (stderr, "sending: '%c'", source[c]);
   42561   else
   42562     fprintf (stderr, "sending: END");
   42563   fprintf (stderr, " (%d@%d-%d)\n", c, RANGE ((*llocp)));
   42564   return source[c];
   42565 }
   42566 static bool yydebug;
   42567 int
   42568 yyparse ()
   42569 {
   42570   yy::parser parser;
   42571   parser.set_debug_level (yydebug);
   42572   return parser.parse ();
   42573 }
   42574 
   42575 
   42576 int
   42577 main (int argc, const char *argv[])
   42578 {
   42579   int status;
   42580   yydebug = !!getenv ("YYDEBUG");
   42581   assert (argc == 2);
   42582   source = argv[1];
   42583   status = yyparse ();
   42584   switch (status)
   42585     {
   42586       case 0: fprintf (stderr, "Successful parse.\n"); break;
   42587       case 1: fprintf (stderr, "Parsing FAILED.\n"); break;
   42588       default: fprintf (stderr, "Parsing FAILED (status %d).\n", status); break;
   42589     }
   42590   return status;
   42591 }
   42592 _ATEOF
   42593 
   42594 
   42595 
   42596 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   42597   at_save_special_files
   42598   mkdir xml-tests
   42599     # Don't combine these Bison invocations since we want to be sure that
   42600   # --report=all isn't required to get the full XML file.
   42601   { set +x
   42602 $as_echo "$at_srcdir/actions.at:754: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   42603                   --graph=xml-tests/test.dot -o input.cc input.y"
   42604 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:754"
   42605 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   42606                   --graph=xml-tests/test.dot -o input.cc input.y
   42607 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42608 at_status=$? at_failed=false
   42609 $at_check_filter
   42610 echo stderr:; cat "$at_stderr"
   42611 echo stdout:; cat "$at_stdout"
   42612 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:754"
   42613 $at_failed && at_fn_log_failure
   42614 $at_traceon; }
   42615 
   42616   { set +x
   42617 $as_echo "$at_srcdir/actions.at:754: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y"
   42618 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y" "actions.at:754"
   42619 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y
   42620 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42621 at_status=$? at_failed=false
   42622 $at_check_filter
   42623 echo stderr:; cat "$at_stderr"
   42624 echo stdout:; cat "$at_stdout"
   42625 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:754"
   42626 $at_failed && at_fn_log_failure
   42627 $at_traceon; }
   42628 
   42629     cp xml-tests/test.output expout
   42630   { set +x
   42631 $as_echo "$at_srcdir/actions.at:754: \$XSLTPROC \\
   42632              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   42633              xml-tests/test.xml"
   42634 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:754"
   42635 ( $at_check_trace; $XSLTPROC \
   42636              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   42637              xml-tests/test.xml
   42638 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42639 at_status=$? at_failed=false
   42640 $at_check_filter
   42641 at_fn_diff_devnull "$at_stderr" || at_failed=:
   42642 $at_diff expout "$at_stdout" || at_failed=:
   42643 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:754"
   42644 $at_failed && at_fn_log_failure
   42645 $at_traceon; }
   42646 
   42647   sort xml-tests/test.dot > expout
   42648   { set +x
   42649 $as_echo "$at_srcdir/actions.at:754: \$XSLTPROC \\
   42650              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   42651              xml-tests/test.xml | sort"
   42652 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:754"
   42653 ( $at_check_trace; $XSLTPROC \
   42654              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   42655              xml-tests/test.xml | sort
   42656 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42657 at_status=$? at_failed=false
   42658 $at_check_filter
   42659 at_fn_diff_devnull "$at_stderr" || at_failed=:
   42660 $at_diff expout "$at_stdout" || at_failed=:
   42661 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:754"
   42662 $at_failed && at_fn_log_failure
   42663 $at_traceon; }
   42664 
   42665   rm -rf xml-tests expout
   42666   at_restore_special_files
   42667 fi
   42668 { set +x
   42669 $as_echo "$at_srcdir/actions.at:754: bison -o input.cc input.y"
   42670 at_fn_check_prepare_trace "actions.at:754"
   42671 ( $at_check_trace; bison -o input.cc input.y
   42672 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42673 at_status=$? at_failed=false
   42674 $at_check_filter
   42675 at_fn_diff_devnull "$at_stderr" || at_failed=:
   42676 at_fn_diff_devnull "$at_stdout" || at_failed=:
   42677 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:754"
   42678 $at_failed && at_fn_log_failure
   42679 $at_traceon; }
   42680 
   42681 
   42682 
   42683 { set +x
   42684 $as_echo "$at_srcdir/actions.at:754: \$BISON_CXX_WORKS"
   42685 at_fn_check_prepare_dynamic "$BISON_CXX_WORKS" "actions.at:754"
   42686 ( $at_check_trace; $BISON_CXX_WORKS
   42687 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42688 at_status=$? at_failed=false
   42689 $at_check_filter
   42690 echo stderr:; cat "$at_stderr"
   42691 echo stdout:; cat "$at_stdout"
   42692 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:754"
   42693 $at_failed && at_fn_log_failure
   42694 $at_traceon; }
   42695 
   42696 { set +x
   42697 $as_echo "$at_srcdir/actions.at:754: \$CXX \$CXXFLAGS \$CPPFLAGS \$LDFLAGS -o input input.cc \$LIBS"
   42698 at_fn_check_prepare_dynamic "$CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS" "actions.at:754"
   42699 ( $at_check_trace; $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS
   42700 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42701 at_status=$? at_failed=false
   42702 $at_check_filter
   42703 echo stderr:; cat "$at_stderr"
   42704 echo stdout:; cat "$at_stdout"
   42705 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:754"
   42706 $at_failed && at_fn_log_failure
   42707 $at_traceon; }
   42708 
   42709 
   42710 
   42711 
   42712 # Check the location of "empty"
   42713 # -----------------------------
   42714 # I.e., epsilon-reductions, as in "(x)" which ends by reducing
   42715 # an empty "line" nterm.
   42716 # FIXME: This location is not satisfying.  Depend on the lookahead?
   42717 { set +x
   42718 $as_echo "$at_srcdir/actions.at:754:  \$PREPARSER ./input '(x)'"
   42719 at_fn_check_prepare_dynamic " $PREPARSER ./input '(x)'" "actions.at:754"
   42720 ( $at_check_trace;  $PREPARSER ./input '(x)'
   42721 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42722 at_status=$? at_failed=false
   42723 $at_check_filter
   42724 echo stderr:; tee stderr <"$at_stderr"
   42725 at_fn_diff_devnull "$at_stdout" || at_failed=:
   42726 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:754"
   42727 $at_failed && at_fn_log_failure
   42728 $at_traceon; }
   42729 
   42730 { set +x
   42731 $as_echo "$at_srcdir/actions.at:754: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   42732 at_fn_check_prepare_trace "actions.at:754"
   42733 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   42734 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42735 at_status=$? at_failed=false
   42736 $at_check_filter
   42737 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   42738 sending: 'x' (1@10-19)
   42739 thing (1@10-19): 'x' (1@10-19)
   42740 sending: ')' (2@20-29)
   42741 line (0@0-29): '(' (0@0-9) thing (1@10-19) ')' (2@20-29)
   42742 sending: END (3@30-39)
   42743 input (0@29-29): /* Nothing */
   42744 input (2@0-29): line (0@0-29) input (0@29-29)
   42745 Freeing token END (3@30-39)
   42746 Freeing nterm input (2@0-29)
   42747 Successful parse.
   42748 " | \
   42749   $at_diff - "$at_stderr" || at_failed=:
   42750 at_fn_diff_devnull "$at_stdout" || at_failed=:
   42751 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:754"
   42752 $at_failed && at_fn_log_failure
   42753 $at_traceon; }
   42754 
   42755 
   42756 
   42757 
   42758 # Check locations in error recovery
   42759 # ---------------------------------
   42760 # '(y)' is an error, but can be recovered from.  But what's the location
   42761 # of the error itself ('y'), and of the resulting reduction ('(error)').
   42762 { set +x
   42763 $as_echo "$at_srcdir/actions.at:754:  \$PREPARSER ./input '(y)'"
   42764 at_fn_check_prepare_dynamic " $PREPARSER ./input '(y)'" "actions.at:754"
   42765 ( $at_check_trace;  $PREPARSER ./input '(y)'
   42766 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42767 at_status=$? at_failed=false
   42768 $at_check_filter
   42769 echo stderr:; tee stderr <"$at_stderr"
   42770 at_fn_diff_devnull "$at_stdout" || at_failed=:
   42771 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:754"
   42772 $at_failed && at_fn_log_failure
   42773 $at_traceon; }
   42774 
   42775 { set +x
   42776 $as_echo "$at_srcdir/actions.at:754: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   42777 at_fn_check_prepare_trace "actions.at:754"
   42778 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   42779 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42780 at_status=$? at_failed=false
   42781 $at_check_filter
   42782 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   42783 sending: 'y' (1@10-19)
   42784 10.10-19.18: syntax error, unexpected 'y', expecting 'x'
   42785 Freeing token 'y' (1@10-19)
   42786 sending: ')' (2@20-29)
   42787 line (-1@0-29): '(' (0@0-9) error (@10-19) ')' (2@20-29)
   42788 sending: END (3@30-39)
   42789 input (0@29-29): /* Nothing */
   42790 input (2@0-29): line (-1@0-29) input (0@29-29)
   42791 Freeing token END (3@30-39)
   42792 Freeing nterm input (2@0-29)
   42793 Successful parse.
   42794 " | \
   42795   $at_diff - "$at_stderr" || at_failed=:
   42796 at_fn_diff_devnull "$at_stdout" || at_failed=:
   42797 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:754"
   42798 $at_failed && at_fn_log_failure
   42799 $at_traceon; }
   42800 
   42801 
   42802 
   42803 
   42804 # Syntax errors caught by the parser
   42805 # ----------------------------------
   42806 # Exercise the discarding of stack top and input until `error'
   42807 # can be reduced.
   42808 #
   42809 #     '(', 'x', 'x', 'x', 'x', 'x', ')',
   42810 #
   42811 # Load the stack and provoke an error that cannot be caught by the
   42812 # grammar, to check that the stack is cleared.  And make sure the
   42813 # lookahead is freed.
   42814 #
   42815 #     '(', 'x', ')',
   42816 #     '(', 'x', ')',
   42817 #     'y'
   42818 { set +x
   42819 $as_echo "$at_srcdir/actions.at:754:  \$PREPARSER ./input '(xxxxx)(x)(x)y'"
   42820 at_fn_check_prepare_dynamic " $PREPARSER ./input '(xxxxx)(x)(x)y'" "actions.at:754"
   42821 ( $at_check_trace;  $PREPARSER ./input '(xxxxx)(x)(x)y'
   42822 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42823 at_status=$? at_failed=false
   42824 $at_check_filter
   42825 echo stderr:; tee stderr <"$at_stderr"
   42826 at_fn_diff_devnull "$at_stdout" || at_failed=:
   42827 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:754"
   42828 $at_failed && at_fn_log_failure
   42829 $at_traceon; }
   42830 
   42831 { set +x
   42832 $as_echo "$at_srcdir/actions.at:754: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   42833 at_fn_check_prepare_trace "actions.at:754"
   42834 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   42835 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42836 at_status=$? at_failed=false
   42837 $at_check_filter
   42838 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   42839 sending: 'x' (1@10-19)
   42840 thing (1@10-19): 'x' (1@10-19)
   42841 sending: 'x' (2@20-29)
   42842 thing (2@20-29): 'x' (2@20-29)
   42843 sending: 'x' (3@30-39)
   42844 30.30-39.38: syntax error, unexpected 'x', expecting ')'
   42845 Freeing nterm thing (2@20-29)
   42846 Freeing nterm thing (1@10-19)
   42847 Freeing token 'x' (3@30-39)
   42848 sending: 'x' (4@40-49)
   42849 Freeing token 'x' (4@40-49)
   42850 sending: 'x' (5@50-59)
   42851 Freeing token 'x' (5@50-59)
   42852 sending: ')' (6@60-69)
   42853 line (-1@0-69): '(' (0@0-9) error (@10-59) ')' (6@60-69)
   42854 sending: '(' (7@70-79)
   42855 sending: 'x' (8@80-89)
   42856 thing (8@80-89): 'x' (8@80-89)
   42857 sending: ')' (9@90-99)
   42858 line (7@70-99): '(' (7@70-79) thing (8@80-89) ')' (9@90-99)
   42859 sending: '(' (10@100-109)
   42860 sending: 'x' (11@110-119)
   42861 thing (11@110-119): 'x' (11@110-119)
   42862 sending: ')' (12@120-129)
   42863 line (10@100-129): '(' (10@100-109) thing (11@110-119) ')' (12@120-129)
   42864 sending: 'y' (13@130-139)
   42865 input (0@129-129): /* Nothing */
   42866 input (2@100-129): line (10@100-129) input (0@129-129)
   42867 input (2@70-129): line (7@70-99) input (2@100-129)
   42868 input (2@0-129): line (-1@0-69) input (2@70-129)
   42869 130.130-139.138: syntax error, unexpected 'y', expecting END
   42870 Freeing nterm input (2@0-129)
   42871 Freeing token 'y' (13@130-139)
   42872 Parsing FAILED.
   42873 " | \
   42874   $at_diff - "$at_stderr" || at_failed=:
   42875 at_fn_diff_devnull "$at_stdout" || at_failed=:
   42876 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:754"
   42877 $at_failed && at_fn_log_failure
   42878 $at_traceon; }
   42879 
   42880 
   42881 
   42882 
   42883 # Syntax error caught by the parser where lookahead = END
   42884 # --------------------------------------------------------
   42885 # Load the stack and provoke an error that cannot be caught by the
   42886 # grammar, to check that the stack is cleared.  And make sure the
   42887 # lookahead is freed.
   42888 #
   42889 #     '(', 'x', ')',
   42890 #     '(', 'x', ')',
   42891 #     'x'
   42892 { set +x
   42893 $as_echo "$at_srcdir/actions.at:754:  \$PREPARSER ./input '(x)(x)x'"
   42894 at_fn_check_prepare_dynamic " $PREPARSER ./input '(x)(x)x'" "actions.at:754"
   42895 ( $at_check_trace;  $PREPARSER ./input '(x)(x)x'
   42896 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42897 at_status=$? at_failed=false
   42898 $at_check_filter
   42899 echo stderr:; tee stderr <"$at_stderr"
   42900 at_fn_diff_devnull "$at_stdout" || at_failed=:
   42901 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:754"
   42902 $at_failed && at_fn_log_failure
   42903 $at_traceon; }
   42904 
   42905 { set +x
   42906 $as_echo "$at_srcdir/actions.at:754: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   42907 at_fn_check_prepare_trace "actions.at:754"
   42908 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   42909 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   42910 at_status=$? at_failed=false
   42911 $at_check_filter
   42912 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   42913 sending: 'x' (1@10-19)
   42914 thing (1@10-19): 'x' (1@10-19)
   42915 sending: ')' (2@20-29)
   42916 line (0@0-29): '(' (0@0-9) thing (1@10-19) ')' (2@20-29)
   42917 sending: '(' (3@30-39)
   42918 sending: 'x' (4@40-49)
   42919 thing (4@40-49): 'x' (4@40-49)
   42920 sending: ')' (5@50-59)
   42921 line (3@30-59): '(' (3@30-39) thing (4@40-49) ')' (5@50-59)
   42922 sending: 'x' (6@60-69)
   42923 thing (6@60-69): 'x' (6@60-69)
   42924 sending: END (7@70-79)
   42925 70.70-79.78: syntax error, unexpected END, expecting 'x'
   42926 Freeing nterm thing (6@60-69)
   42927 Freeing nterm line (3@30-59)
   42928 Freeing nterm line (0@0-29)
   42929 Freeing token END (7@70-79)
   42930 Parsing FAILED.
   42931 " | \
   42932   $at_diff - "$at_stderr" || at_failed=:
   42933 at_fn_diff_devnull "$at_stdout" || at_failed=:
   42934 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:754"
   42935 $at_failed && at_fn_log_failure
   42936 $at_traceon; }
   42937 
   42938 
   42939 
   42940 
   42941 # Check destruction upon stack overflow
   42942 # -------------------------------------
   42943 # Upon stack overflow, all symbols on the stack should be destroyed.
   42944 # Only check for yacc.c.
   42945 
   42946 
   42947 
   42948 
   42949 
   42950   set +x
   42951   $at_times_p && times >"$at_times_file"
   42952 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   42953 read at_status <"$at_status_file"
   42954 #AT_STOP_161
   42955 #AT_START_162
   42956 at_fn_group_banner 162 'actions.at:755' \
   42957   "Printers and Destructors with union: %defines %skeleton \"lalr1.cc\"" "" 9
   42958 at_xfail=no
   42959 (
   42960   $as_echo "162. $at_setup_line: testing $at_desc ..."
   42961   $at_traceon
   42962 
   42963 
   42964 
   42965 # Make sure complex $n work.
   42966 
   42967 # Be sure to pass all the %directives to this macro to have correct
   42968 # helping macros.  So don't put any directly in the Bison file.
   42969 
   42970 cat >input.y <<'_ATEOF'
   42971 %code top {
   42972 #include <config.h>
   42973 /* We don't need perfect functions for these tests. */
   42974 #undef malloc
   42975 #undef memcmp
   42976 #undef realloc
   42977 }
   42978 
   42979 %code requires {
   42980 #include <stdio.h>
   42981 #include <stdlib.h>
   42982 #include <string.h>
   42983 #include <assert.h>
   42984 
   42985 #define YYINITDEPTH 10
   42986 #define YYMAXDEPTH 10
   42987 #define RANGE(Location) (Location).begin.line, (Location).end.line
   42988 
   42989 /* Display the symbol type Symbol.  */
   42990 #define V(Symbol, Value, Location, Sep) \
   42991    fprintf (stderr, #Symbol " (%d@%d-%d)" Sep, Value, RANGE(Location))
   42992 }
   42993 
   42994 %error-verbose
   42995 %debug
   42996 %verbose
   42997 %locations
   42998 %defines %skeleton "lalr1.cc"
   42999 %union
   43000 {
   43001   int ival;
   43002 }
   43003 %define global_tokens_and_yystype
   43004 %code provides {
   43005 typedef yy::location YYLTYPE;
   43006 static int yylex (yy::parser::semantic_type *lvalp, yy::parser::location_type *llocp);
   43007 
   43008 }
   43009 
   43010 %type <ival> '(' 'x' 'y' ')' ';' thing line input END
   43011 
   43012 /* FIXME: This %printer isn't actually tested.  */
   43013 %printer
   43014   {
   43015     debug_stream () << $$;;
   43016   }
   43017   input line thing 'x' 'y'
   43018 
   43019 %destructor
   43020   { fprintf (stderr, "Freeing nterm input (%d@%d-%d)\n", $$, RANGE (@$)); }
   43021   input
   43022 
   43023 %destructor
   43024   { fprintf (stderr, "Freeing nterm line (%d@%d-%d)\n", $$, RANGE (@$)); }
   43025   line
   43026 
   43027 %destructor
   43028   { fprintf (stderr, "Freeing nterm thing (%d@%d-%d)\n", $$, RANGE (@$)); }
   43029   thing
   43030 
   43031 %destructor
   43032   { fprintf (stderr, "Freeing token 'x' (%d@%d-%d)\n", $$, RANGE (@$)); }
   43033   'x'
   43034 
   43035 %destructor
   43036   { fprintf (stderr, "Freeing token 'y' (%d@%d-%d)\n", $$, RANGE (@$)); }
   43037   'y'
   43038 
   43039 %token END 0
   43040 %destructor
   43041   { fprintf (stderr, "Freeing token END (%d@%d-%d)\n", $$, RANGE (@$)); }
   43042   END
   43043 
   43044 %%
   43045 /*
   43046    This grammar is made to exercise error recovery.
   43047    "Lines" starting with `(' support error recovery, with
   43048    ')' as synchronizing token.  Lines starting with 'x' can never
   43049    be recovered from if in error.
   43050 */
   43051 
   43052 input:
   43053   /* Nothing. */
   43054     {
   43055       $$ = 0;
   43056       V(input, $$, @$, ": /* Nothing */\n");
   43057     }
   43058 | line input /* Right recursive to load the stack so that popping at
   43059                 END can be exercised.  */
   43060     {
   43061       $$ = 2;
   43062       V(input, $$, @$, ": ");
   43063       V(line,  $1, @1, " ");
   43064       V(input, $2, @2, "\n");
   43065     }
   43066 ;
   43067 
   43068 line:
   43069   thing thing thing ';'
   43070     {
   43071       $$ = $1;
   43072       V(line,  $$, @$, ": ");
   43073       V(thing, $1, @1, " ");
   43074       V(thing, $2, @2, " ");
   43075       V(thing, $3, @3, " ");
   43076       V(;,     $4, @4, "\n");
   43077     }
   43078 | '(' thing thing ')'
   43079     {
   43080       $$ = $1;
   43081       V(line,  $$, @$, ": ");
   43082       V('(',   $1, @1, " ");
   43083       V(thing, $2, @2, " ");
   43084       V(thing, $3, @3, " ");
   43085       V(')',   $4, @4, "\n");
   43086     }
   43087 | '(' thing ')'
   43088     {
   43089       $$ = $1;
   43090       V(line,  $$, @$, ": ");
   43091       V('(',   $1, @1, " ");
   43092       V(thing, $2, @2, " ");
   43093       V(')',   $3, @3, "\n");
   43094     }
   43095 | '(' error ')'
   43096     {
   43097       $$ = -1;
   43098       V(line,  $$, @$, ": ");
   43099       V('(',   $1, @1, " ");
   43100       fprintf (stderr, "error (@%d-%d) ", RANGE (@2));
   43101       V(')',   $3, @3, "\n");
   43102     }
   43103 ;
   43104 
   43105 thing:
   43106   'x'
   43107     {
   43108       $$ = $1;
   43109       V(thing, $$, @$, ": ");
   43110       V('x',   $1, @1, "\n");
   43111     }
   43112 ;
   43113 %%
   43114 /* Alias to ARGV[1]. */
   43115 const char *source = YY_NULL;
   43116 
   43117 /* A C++ error reporting function.  */
   43118 void
   43119 yy::parser::error (const location_type& l, const std::string& m)
   43120 {
   43121   (void) l;
   43122   std::cerr << l << ": " << m << std::endl;
   43123 }
   43124 
   43125 static
   43126 int yylex (yy::parser::semantic_type *lvalp, yy::parser::location_type *llocp)
   43127 {
   43128   static unsigned int counter = 0;
   43129 
   43130   int c = (*lvalp).ival = counter++;
   43131   /* As in BASIC, line numbers go from 10 to 10.  */
   43132   (*llocp).begin.line = (*llocp).begin.column = 10 * c;
   43133   (*llocp).end.line = (*llocp).end.column = (*llocp).begin.line + 9;
   43134   assert (0 <= c && c <= strlen (source));
   43135   if (source[c])
   43136     fprintf (stderr, "sending: '%c'", source[c]);
   43137   else
   43138     fprintf (stderr, "sending: END");
   43139   fprintf (stderr, " (%d@%d-%d)\n", c, RANGE ((*llocp)));
   43140   return source[c];
   43141 }
   43142 static bool yydebug;
   43143 int
   43144 yyparse ()
   43145 {
   43146   yy::parser parser;
   43147   parser.set_debug_level (yydebug);
   43148   return parser.parse ();
   43149 }
   43150 
   43151 
   43152 int
   43153 main (int argc, const char *argv[])
   43154 {
   43155   int status;
   43156   yydebug = !!getenv ("YYDEBUG");
   43157   assert (argc == 2);
   43158   source = argv[1];
   43159   status = yyparse ();
   43160   switch (status)
   43161     {
   43162       case 0: fprintf (stderr, "Successful parse.\n"); break;
   43163       case 1: fprintf (stderr, "Parsing FAILED.\n"); break;
   43164       default: fprintf (stderr, "Parsing FAILED (status %d).\n", status); break;
   43165     }
   43166   return status;
   43167 }
   43168 _ATEOF
   43169 
   43170 
   43171 
   43172 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   43173   at_save_special_files
   43174   mkdir xml-tests
   43175     # Don't combine these Bison invocations since we want to be sure that
   43176   # --report=all isn't required to get the full XML file.
   43177   { set +x
   43178 $as_echo "$at_srcdir/actions.at:755: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   43179                   --graph=xml-tests/test.dot -o input.cc input.y"
   43180 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:755"
   43181 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   43182                   --graph=xml-tests/test.dot -o input.cc input.y
   43183 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43184 at_status=$? at_failed=false
   43185 $at_check_filter
   43186 echo stderr:; cat "$at_stderr"
   43187 echo stdout:; cat "$at_stdout"
   43188 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:755"
   43189 $at_failed && at_fn_log_failure
   43190 $at_traceon; }
   43191 
   43192   { set +x
   43193 $as_echo "$at_srcdir/actions.at:755: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y"
   43194 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y" "actions.at:755"
   43195 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y
   43196 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43197 at_status=$? at_failed=false
   43198 $at_check_filter
   43199 echo stderr:; cat "$at_stderr"
   43200 echo stdout:; cat "$at_stdout"
   43201 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:755"
   43202 $at_failed && at_fn_log_failure
   43203 $at_traceon; }
   43204 
   43205     cp xml-tests/test.output expout
   43206   { set +x
   43207 $as_echo "$at_srcdir/actions.at:755: \$XSLTPROC \\
   43208              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   43209              xml-tests/test.xml"
   43210 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:755"
   43211 ( $at_check_trace; $XSLTPROC \
   43212              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   43213              xml-tests/test.xml
   43214 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43215 at_status=$? at_failed=false
   43216 $at_check_filter
   43217 at_fn_diff_devnull "$at_stderr" || at_failed=:
   43218 $at_diff expout "$at_stdout" || at_failed=:
   43219 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:755"
   43220 $at_failed && at_fn_log_failure
   43221 $at_traceon; }
   43222 
   43223   sort xml-tests/test.dot > expout
   43224   { set +x
   43225 $as_echo "$at_srcdir/actions.at:755: \$XSLTPROC \\
   43226              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   43227              xml-tests/test.xml | sort"
   43228 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:755"
   43229 ( $at_check_trace; $XSLTPROC \
   43230              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   43231              xml-tests/test.xml | sort
   43232 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43233 at_status=$? at_failed=false
   43234 $at_check_filter
   43235 at_fn_diff_devnull "$at_stderr" || at_failed=:
   43236 $at_diff expout "$at_stdout" || at_failed=:
   43237 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:755"
   43238 $at_failed && at_fn_log_failure
   43239 $at_traceon; }
   43240 
   43241   rm -rf xml-tests expout
   43242   at_restore_special_files
   43243 fi
   43244 { set +x
   43245 $as_echo "$at_srcdir/actions.at:755: bison -o input.cc input.y"
   43246 at_fn_check_prepare_trace "actions.at:755"
   43247 ( $at_check_trace; bison -o input.cc input.y
   43248 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43249 at_status=$? at_failed=false
   43250 $at_check_filter
   43251 at_fn_diff_devnull "$at_stderr" || at_failed=:
   43252 at_fn_diff_devnull "$at_stdout" || at_failed=:
   43253 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:755"
   43254 $at_failed && at_fn_log_failure
   43255 $at_traceon; }
   43256 
   43257 
   43258 
   43259 { set +x
   43260 $as_echo "$at_srcdir/actions.at:755: \$BISON_CXX_WORKS"
   43261 at_fn_check_prepare_dynamic "$BISON_CXX_WORKS" "actions.at:755"
   43262 ( $at_check_trace; $BISON_CXX_WORKS
   43263 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43264 at_status=$? at_failed=false
   43265 $at_check_filter
   43266 echo stderr:; cat "$at_stderr"
   43267 echo stdout:; cat "$at_stdout"
   43268 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:755"
   43269 $at_failed && at_fn_log_failure
   43270 $at_traceon; }
   43271 
   43272 { set +x
   43273 $as_echo "$at_srcdir/actions.at:755: \$CXX \$CXXFLAGS \$CPPFLAGS \$LDFLAGS -o input input.cc \$LIBS"
   43274 at_fn_check_prepare_dynamic "$CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS" "actions.at:755"
   43275 ( $at_check_trace; $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS
   43276 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43277 at_status=$? at_failed=false
   43278 $at_check_filter
   43279 echo stderr:; cat "$at_stderr"
   43280 echo stdout:; cat "$at_stdout"
   43281 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:755"
   43282 $at_failed && at_fn_log_failure
   43283 $at_traceon; }
   43284 
   43285 
   43286 
   43287 
   43288 # Check the location of "empty"
   43289 # -----------------------------
   43290 # I.e., epsilon-reductions, as in "(x)" which ends by reducing
   43291 # an empty "line" nterm.
   43292 # FIXME: This location is not satisfying.  Depend on the lookahead?
   43293 { set +x
   43294 $as_echo "$at_srcdir/actions.at:755:  \$PREPARSER ./input '(x)'"
   43295 at_fn_check_prepare_dynamic " $PREPARSER ./input '(x)'" "actions.at:755"
   43296 ( $at_check_trace;  $PREPARSER ./input '(x)'
   43297 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43298 at_status=$? at_failed=false
   43299 $at_check_filter
   43300 echo stderr:; tee stderr <"$at_stderr"
   43301 at_fn_diff_devnull "$at_stdout" || at_failed=:
   43302 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:755"
   43303 $at_failed && at_fn_log_failure
   43304 $at_traceon; }
   43305 
   43306 { set +x
   43307 $as_echo "$at_srcdir/actions.at:755: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   43308 at_fn_check_prepare_trace "actions.at:755"
   43309 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   43310 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43311 at_status=$? at_failed=false
   43312 $at_check_filter
   43313 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   43314 sending: 'x' (1@10-19)
   43315 thing (1@10-19): 'x' (1@10-19)
   43316 sending: ')' (2@20-29)
   43317 line (0@0-29): '(' (0@0-9) thing (1@10-19) ')' (2@20-29)
   43318 sending: END (3@30-39)
   43319 input (0@29-29): /* Nothing */
   43320 input (2@0-29): line (0@0-29) input (0@29-29)
   43321 Freeing token END (3@30-39)
   43322 Freeing nterm input (2@0-29)
   43323 Successful parse.
   43324 " | \
   43325   $at_diff - "$at_stderr" || at_failed=:
   43326 at_fn_diff_devnull "$at_stdout" || at_failed=:
   43327 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:755"
   43328 $at_failed && at_fn_log_failure
   43329 $at_traceon; }
   43330 
   43331 
   43332 
   43333 
   43334 # Check locations in error recovery
   43335 # ---------------------------------
   43336 # '(y)' is an error, but can be recovered from.  But what's the location
   43337 # of the error itself ('y'), and of the resulting reduction ('(error)').
   43338 { set +x
   43339 $as_echo "$at_srcdir/actions.at:755:  \$PREPARSER ./input '(y)'"
   43340 at_fn_check_prepare_dynamic " $PREPARSER ./input '(y)'" "actions.at:755"
   43341 ( $at_check_trace;  $PREPARSER ./input '(y)'
   43342 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43343 at_status=$? at_failed=false
   43344 $at_check_filter
   43345 echo stderr:; tee stderr <"$at_stderr"
   43346 at_fn_diff_devnull "$at_stdout" || at_failed=:
   43347 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:755"
   43348 $at_failed && at_fn_log_failure
   43349 $at_traceon; }
   43350 
   43351 { set +x
   43352 $as_echo "$at_srcdir/actions.at:755: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   43353 at_fn_check_prepare_trace "actions.at:755"
   43354 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   43355 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43356 at_status=$? at_failed=false
   43357 $at_check_filter
   43358 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   43359 sending: 'y' (1@10-19)
   43360 10.10-19.18: syntax error, unexpected 'y', expecting 'x'
   43361 Freeing token 'y' (1@10-19)
   43362 sending: ')' (2@20-29)
   43363 line (-1@0-29): '(' (0@0-9) error (@10-19) ')' (2@20-29)
   43364 sending: END (3@30-39)
   43365 input (0@29-29): /* Nothing */
   43366 input (2@0-29): line (-1@0-29) input (0@29-29)
   43367 Freeing token END (3@30-39)
   43368 Freeing nterm input (2@0-29)
   43369 Successful parse.
   43370 " | \
   43371   $at_diff - "$at_stderr" || at_failed=:
   43372 at_fn_diff_devnull "$at_stdout" || at_failed=:
   43373 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:755"
   43374 $at_failed && at_fn_log_failure
   43375 $at_traceon; }
   43376 
   43377 
   43378 
   43379 
   43380 # Syntax errors caught by the parser
   43381 # ----------------------------------
   43382 # Exercise the discarding of stack top and input until `error'
   43383 # can be reduced.
   43384 #
   43385 #     '(', 'x', 'x', 'x', 'x', 'x', ')',
   43386 #
   43387 # Load the stack and provoke an error that cannot be caught by the
   43388 # grammar, to check that the stack is cleared.  And make sure the
   43389 # lookahead is freed.
   43390 #
   43391 #     '(', 'x', ')',
   43392 #     '(', 'x', ')',
   43393 #     'y'
   43394 { set +x
   43395 $as_echo "$at_srcdir/actions.at:755:  \$PREPARSER ./input '(xxxxx)(x)(x)y'"
   43396 at_fn_check_prepare_dynamic " $PREPARSER ./input '(xxxxx)(x)(x)y'" "actions.at:755"
   43397 ( $at_check_trace;  $PREPARSER ./input '(xxxxx)(x)(x)y'
   43398 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43399 at_status=$? at_failed=false
   43400 $at_check_filter
   43401 echo stderr:; tee stderr <"$at_stderr"
   43402 at_fn_diff_devnull "$at_stdout" || at_failed=:
   43403 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:755"
   43404 $at_failed && at_fn_log_failure
   43405 $at_traceon; }
   43406 
   43407 { set +x
   43408 $as_echo "$at_srcdir/actions.at:755: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   43409 at_fn_check_prepare_trace "actions.at:755"
   43410 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   43411 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43412 at_status=$? at_failed=false
   43413 $at_check_filter
   43414 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   43415 sending: 'x' (1@10-19)
   43416 thing (1@10-19): 'x' (1@10-19)
   43417 sending: 'x' (2@20-29)
   43418 thing (2@20-29): 'x' (2@20-29)
   43419 sending: 'x' (3@30-39)
   43420 30.30-39.38: syntax error, unexpected 'x', expecting ')'
   43421 Freeing nterm thing (2@20-29)
   43422 Freeing nterm thing (1@10-19)
   43423 Freeing token 'x' (3@30-39)
   43424 sending: 'x' (4@40-49)
   43425 Freeing token 'x' (4@40-49)
   43426 sending: 'x' (5@50-59)
   43427 Freeing token 'x' (5@50-59)
   43428 sending: ')' (6@60-69)
   43429 line (-1@0-69): '(' (0@0-9) error (@10-59) ')' (6@60-69)
   43430 sending: '(' (7@70-79)
   43431 sending: 'x' (8@80-89)
   43432 thing (8@80-89): 'x' (8@80-89)
   43433 sending: ')' (9@90-99)
   43434 line (7@70-99): '(' (7@70-79) thing (8@80-89) ')' (9@90-99)
   43435 sending: '(' (10@100-109)
   43436 sending: 'x' (11@110-119)
   43437 thing (11@110-119): 'x' (11@110-119)
   43438 sending: ')' (12@120-129)
   43439 line (10@100-129): '(' (10@100-109) thing (11@110-119) ')' (12@120-129)
   43440 sending: 'y' (13@130-139)
   43441 input (0@129-129): /* Nothing */
   43442 input (2@100-129): line (10@100-129) input (0@129-129)
   43443 input (2@70-129): line (7@70-99) input (2@100-129)
   43444 input (2@0-129): line (-1@0-69) input (2@70-129)
   43445 130.130-139.138: syntax error, unexpected 'y', expecting END
   43446 Freeing nterm input (2@0-129)
   43447 Freeing token 'y' (13@130-139)
   43448 Parsing FAILED.
   43449 " | \
   43450   $at_diff - "$at_stderr" || at_failed=:
   43451 at_fn_diff_devnull "$at_stdout" || at_failed=:
   43452 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:755"
   43453 $at_failed && at_fn_log_failure
   43454 $at_traceon; }
   43455 
   43456 
   43457 
   43458 
   43459 # Syntax error caught by the parser where lookahead = END
   43460 # --------------------------------------------------------
   43461 # Load the stack and provoke an error that cannot be caught by the
   43462 # grammar, to check that the stack is cleared.  And make sure the
   43463 # lookahead is freed.
   43464 #
   43465 #     '(', 'x', ')',
   43466 #     '(', 'x', ')',
   43467 #     'x'
   43468 { set +x
   43469 $as_echo "$at_srcdir/actions.at:755:  \$PREPARSER ./input '(x)(x)x'"
   43470 at_fn_check_prepare_dynamic " $PREPARSER ./input '(x)(x)x'" "actions.at:755"
   43471 ( $at_check_trace;  $PREPARSER ./input '(x)(x)x'
   43472 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43473 at_status=$? at_failed=false
   43474 $at_check_filter
   43475 echo stderr:; tee stderr <"$at_stderr"
   43476 at_fn_diff_devnull "$at_stdout" || at_failed=:
   43477 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:755"
   43478 $at_failed && at_fn_log_failure
   43479 $at_traceon; }
   43480 
   43481 { set +x
   43482 $as_echo "$at_srcdir/actions.at:755: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   43483 at_fn_check_prepare_trace "actions.at:755"
   43484 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   43485 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43486 at_status=$? at_failed=false
   43487 $at_check_filter
   43488 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   43489 sending: 'x' (1@10-19)
   43490 thing (1@10-19): 'x' (1@10-19)
   43491 sending: ')' (2@20-29)
   43492 line (0@0-29): '(' (0@0-9) thing (1@10-19) ')' (2@20-29)
   43493 sending: '(' (3@30-39)
   43494 sending: 'x' (4@40-49)
   43495 thing (4@40-49): 'x' (4@40-49)
   43496 sending: ')' (5@50-59)
   43497 line (3@30-59): '(' (3@30-39) thing (4@40-49) ')' (5@50-59)
   43498 sending: 'x' (6@60-69)
   43499 thing (6@60-69): 'x' (6@60-69)
   43500 sending: END (7@70-79)
   43501 70.70-79.78: syntax error, unexpected END, expecting 'x'
   43502 Freeing nterm thing (6@60-69)
   43503 Freeing nterm line (3@30-59)
   43504 Freeing nterm line (0@0-29)
   43505 Freeing token END (7@70-79)
   43506 Parsing FAILED.
   43507 " | \
   43508   $at_diff - "$at_stderr" || at_failed=:
   43509 at_fn_diff_devnull "$at_stdout" || at_failed=:
   43510 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:755"
   43511 $at_failed && at_fn_log_failure
   43512 $at_traceon; }
   43513 
   43514 
   43515 
   43516 
   43517 # Check destruction upon stack overflow
   43518 # -------------------------------------
   43519 # Upon stack overflow, all symbols on the stack should be destroyed.
   43520 # Only check for yacc.c.
   43521 
   43522 
   43523 
   43524 
   43525 
   43526   set +x
   43527   $at_times_p && times >"$at_times_file"
   43528 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   43529 read at_status <"$at_status_file"
   43530 #AT_STOP_162
   43531 #AT_START_163
   43532 at_fn_group_banner 163 'actions.at:757' \
   43533   "Printers and Destructors: %glr-parser" "          " 9
   43534 at_xfail=no
   43535 (
   43536   $as_echo "163. $at_setup_line: testing $at_desc ..."
   43537   $at_traceon
   43538 
   43539 
   43540 
   43541 # Make sure complex $n work.
   43542 
   43543 # Be sure to pass all the %directives to this macro to have correct
   43544 # helping macros.  So don't put any directly in the Bison file.
   43545 
   43546 cat >input.y <<'_ATEOF'
   43547 %code top {
   43548 #include <config.h>
   43549 /* We don't need perfect functions for these tests. */
   43550 #undef malloc
   43551 #undef memcmp
   43552 #undef realloc
   43553 }
   43554 
   43555 %code requires {
   43556 #include <stdio.h>
   43557 #include <stdlib.h>
   43558 #include <string.h>
   43559 #include <assert.h>
   43560 
   43561 #define YYINITDEPTH 10
   43562 #define YYMAXDEPTH 10
   43563 #define RANGE(Location) (Location).first_line, (Location).last_line
   43564 
   43565 /* Display the symbol type Symbol.  */
   43566 #define V(Symbol, Value, Location, Sep) \
   43567    fprintf (stderr, #Symbol " (%d@%d-%d)" Sep, Value, RANGE(Location))
   43568 }
   43569 
   43570 %error-verbose
   43571 %debug
   43572 %verbose
   43573 %locations
   43574 %glr-parser
   43575 
   43576 
   43577 %code {
   43578 
   43579 static int yylex (void);
   43580 static void yyerror ( const char *msg);
   43581 }
   43582 
   43583 
   43584 
   43585 /* FIXME: This %printer isn't actually tested.  */
   43586 %printer
   43587   {
   43588     fprintf (yyoutput, "%d", $$);
   43589   }
   43590   input line thing 'x' 'y'
   43591 
   43592 %destructor
   43593   { fprintf (stderr, "Freeing nterm input (%d@%d-%d)\n", $$, RANGE (@$)); }
   43594   input
   43595 
   43596 %destructor
   43597   { fprintf (stderr, "Freeing nterm line (%d@%d-%d)\n", $$, RANGE (@$)); }
   43598   line
   43599 
   43600 %destructor
   43601   { fprintf (stderr, "Freeing nterm thing (%d@%d-%d)\n", $$, RANGE (@$)); }
   43602   thing
   43603 
   43604 %destructor
   43605   { fprintf (stderr, "Freeing token 'x' (%d@%d-%d)\n", $$, RANGE (@$)); }
   43606   'x'
   43607 
   43608 %destructor
   43609   { fprintf (stderr, "Freeing token 'y' (%d@%d-%d)\n", $$, RANGE (@$)); }
   43610   'y'
   43611 
   43612 %token END 0
   43613 %destructor
   43614   { fprintf (stderr, "Freeing token END (%d@%d-%d)\n", $$, RANGE (@$)); }
   43615   END
   43616 
   43617 %%
   43618 /*
   43619    This grammar is made to exercise error recovery.
   43620    "Lines" starting with `(' support error recovery, with
   43621    ')' as synchronizing token.  Lines starting with 'x' can never
   43622    be recovered from if in error.
   43623 */
   43624 
   43625 input:
   43626   /* Nothing. */
   43627     {
   43628       $$ = 0;
   43629       V(input, $$, @$, ": /* Nothing */\n");
   43630     }
   43631 | line input /* Right recursive to load the stack so that popping at
   43632                 END can be exercised.  */
   43633     {
   43634       $$ = 2;
   43635       V(input, $$, @$, ": ");
   43636       V(line,  $1, @1, " ");
   43637       V(input, $2, @2, "\n");
   43638     }
   43639 ;
   43640 
   43641 line:
   43642   thing thing thing ';'
   43643     {
   43644       $$ = $1;
   43645       V(line,  $$, @$, ": ");
   43646       V(thing, $1, @1, " ");
   43647       V(thing, $2, @2, " ");
   43648       V(thing, $3, @3, " ");
   43649       V(;,     $4, @4, "\n");
   43650     }
   43651 | '(' thing thing ')'
   43652     {
   43653       $$ = $1;
   43654       V(line,  $$, @$, ": ");
   43655       V('(',   $1, @1, " ");
   43656       V(thing, $2, @2, " ");
   43657       V(thing, $3, @3, " ");
   43658       V(')',   $4, @4, "\n");
   43659     }
   43660 | '(' thing ')'
   43661     {
   43662       $$ = $1;
   43663       V(line,  $$, @$, ": ");
   43664       V('(',   $1, @1, " ");
   43665       V(thing, $2, @2, " ");
   43666       V(')',   $3, @3, "\n");
   43667     }
   43668 | '(' error ')'
   43669     {
   43670       $$ = -1;
   43671       V(line,  $$, @$, ": ");
   43672       V('(',   $1, @1, " ");
   43673       fprintf (stderr, "error (@%d-%d) ", RANGE (@2));
   43674       V(')',   $3, @3, "\n");
   43675     }
   43676 ;
   43677 
   43678 thing:
   43679   'x'
   43680     {
   43681       $$ = $1;
   43682       V(thing, $$, @$, ": ");
   43683       V('x',   $1, @1, "\n");
   43684     }
   43685 ;
   43686 %%
   43687 /* Alias to ARGV[1]. */
   43688 const char *source = YY_NULL;
   43689 
   43690 #include <stdio.h>
   43691 /* A C error reporting function.  */
   43692 static
   43693 void yyerror ( const char *msg)
   43694 {
   43695   YY_LOCATION_PRINT (stderr, (yylloc));
   43696   fprintf (stderr, ": ");
   43697   fprintf (stderr, "%s\n", msg);
   43698 }
   43699 
   43700 static
   43701 int yylex (void)
   43702 {
   43703   static unsigned int counter = 0;
   43704 
   43705   int c = (yylval) = counter++;
   43706   /* As in BASIC, line numbers go from 10 to 10.  */
   43707   (yylloc).first_line = (yylloc).first_column = 10 * c;
   43708   (yylloc).last_line = (yylloc).last_column = (yylloc).first_line + 9;
   43709   assert (0 <= c && c <= strlen (source));
   43710   if (source[c])
   43711     fprintf (stderr, "sending: '%c'", source[c]);
   43712   else
   43713     fprintf (stderr, "sending: END");
   43714   fprintf (stderr, " (%d@%d-%d)\n", c, RANGE ((yylloc)));
   43715   return source[c];
   43716 }
   43717 
   43718 
   43719 int
   43720 main (int argc, const char *argv[])
   43721 {
   43722   int status;
   43723   yydebug = !!getenv ("YYDEBUG");
   43724   assert (argc == 2);
   43725   source = argv[1];
   43726   status = yyparse ();
   43727   switch (status)
   43728     {
   43729       case 0: fprintf (stderr, "Successful parse.\n"); break;
   43730       case 1: fprintf (stderr, "Parsing FAILED.\n"); break;
   43731       default: fprintf (stderr, "Parsing FAILED (status %d).\n", status); break;
   43732     }
   43733   return status;
   43734 }
   43735 _ATEOF
   43736 
   43737 
   43738 
   43739 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   43740   at_save_special_files
   43741   mkdir xml-tests
   43742     # Don't combine these Bison invocations since we want to be sure that
   43743   # --report=all isn't required to get the full XML file.
   43744   { set +x
   43745 $as_echo "$at_srcdir/actions.at:757: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   43746                   --graph=xml-tests/test.dot -o input.c input.y"
   43747 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:757"
   43748 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   43749                   --graph=xml-tests/test.dot -o input.c input.y
   43750 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43751 at_status=$? at_failed=false
   43752 $at_check_filter
   43753 echo stderr:; cat "$at_stderr"
   43754 echo stdout:; cat "$at_stdout"
   43755 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:757"
   43756 $at_failed && at_fn_log_failure
   43757 $at_traceon; }
   43758 
   43759   { set +x
   43760 $as_echo "$at_srcdir/actions.at:757: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   43761 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:757"
   43762 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   43763 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43764 at_status=$? at_failed=false
   43765 $at_check_filter
   43766 echo stderr:; cat "$at_stderr"
   43767 echo stdout:; cat "$at_stdout"
   43768 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:757"
   43769 $at_failed && at_fn_log_failure
   43770 $at_traceon; }
   43771 
   43772     cp xml-tests/test.output expout
   43773   { set +x
   43774 $as_echo "$at_srcdir/actions.at:757: \$XSLTPROC \\
   43775              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   43776              xml-tests/test.xml"
   43777 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:757"
   43778 ( $at_check_trace; $XSLTPROC \
   43779              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   43780              xml-tests/test.xml
   43781 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43782 at_status=$? at_failed=false
   43783 $at_check_filter
   43784 at_fn_diff_devnull "$at_stderr" || at_failed=:
   43785 $at_diff expout "$at_stdout" || at_failed=:
   43786 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:757"
   43787 $at_failed && at_fn_log_failure
   43788 $at_traceon; }
   43789 
   43790   sort xml-tests/test.dot > expout
   43791   { set +x
   43792 $as_echo "$at_srcdir/actions.at:757: \$XSLTPROC \\
   43793              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   43794              xml-tests/test.xml | sort"
   43795 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:757"
   43796 ( $at_check_trace; $XSLTPROC \
   43797              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   43798              xml-tests/test.xml | sort
   43799 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43800 at_status=$? at_failed=false
   43801 $at_check_filter
   43802 at_fn_diff_devnull "$at_stderr" || at_failed=:
   43803 $at_diff expout "$at_stdout" || at_failed=:
   43804 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:757"
   43805 $at_failed && at_fn_log_failure
   43806 $at_traceon; }
   43807 
   43808   rm -rf xml-tests expout
   43809   at_restore_special_files
   43810 fi
   43811 { set +x
   43812 $as_echo "$at_srcdir/actions.at:757: bison -o input.c input.y"
   43813 at_fn_check_prepare_trace "actions.at:757"
   43814 ( $at_check_trace; bison -o input.c input.y
   43815 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43816 at_status=$? at_failed=false
   43817 $at_check_filter
   43818 at_fn_diff_devnull "$at_stderr" || at_failed=:
   43819 at_fn_diff_devnull "$at_stdout" || at_failed=:
   43820 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:757"
   43821 $at_failed && at_fn_log_failure
   43822 $at_traceon; }
   43823 
   43824 
   43825    { set +x
   43826 $as_echo "$at_srcdir/actions.at:757: \$BISON_C_WORKS"
   43827 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:757"
   43828 ( $at_check_trace; $BISON_C_WORKS
   43829 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43830 at_status=$? at_failed=false
   43831 $at_check_filter
   43832 echo stderr:; cat "$at_stderr"
   43833 echo stdout:; cat "$at_stdout"
   43834 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:757"
   43835 $at_failed && at_fn_log_failure
   43836 $at_traceon; }
   43837 
   43838 { set +x
   43839 $as_echo "$at_srcdir/actions.at:757: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   43840 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:757"
   43841 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   43842 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43843 at_status=$? at_failed=false
   43844 $at_check_filter
   43845 echo stderr:; cat "$at_stderr"
   43846 echo stdout:; cat "$at_stdout"
   43847 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:757"
   43848 $at_failed && at_fn_log_failure
   43849 $at_traceon; }
   43850 
   43851 
   43852 
   43853 
   43854 # Check the location of "empty"
   43855 # -----------------------------
   43856 # I.e., epsilon-reductions, as in "(x)" which ends by reducing
   43857 # an empty "line" nterm.
   43858 # FIXME: This location is not satisfying.  Depend on the lookahead?
   43859 { set +x
   43860 $as_echo "$at_srcdir/actions.at:757:  \$PREPARSER ./input '(x)'"
   43861 at_fn_check_prepare_dynamic " $PREPARSER ./input '(x)'" "actions.at:757"
   43862 ( $at_check_trace;  $PREPARSER ./input '(x)'
   43863 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43864 at_status=$? at_failed=false
   43865 $at_check_filter
   43866 echo stderr:; tee stderr <"$at_stderr"
   43867 at_fn_diff_devnull "$at_stdout" || at_failed=:
   43868 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:757"
   43869 $at_failed && at_fn_log_failure
   43870 $at_traceon; }
   43871 
   43872 { set +x
   43873 $as_echo "$at_srcdir/actions.at:757: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   43874 at_fn_check_prepare_trace "actions.at:757"
   43875 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   43876 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43877 at_status=$? at_failed=false
   43878 $at_check_filter
   43879 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   43880 sending: 'x' (1@10-19)
   43881 thing (1@10-19): 'x' (1@10-19)
   43882 sending: ')' (2@20-29)
   43883 line (0@0-29): '(' (0@0-9) thing (1@10-19) ')' (2@20-29)
   43884 sending: END (3@30-39)
   43885 input (0@29-29): /* Nothing */
   43886 input (2@0-29): line (0@0-29) input (0@29-29)
   43887 Freeing token END (3@30-39)
   43888 Freeing nterm input (2@0-29)
   43889 Successful parse.
   43890 " | \
   43891   $at_diff - "$at_stderr" || at_failed=:
   43892 at_fn_diff_devnull "$at_stdout" || at_failed=:
   43893 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:757"
   43894 $at_failed && at_fn_log_failure
   43895 $at_traceon; }
   43896 
   43897 
   43898 
   43899 
   43900 # Check locations in error recovery
   43901 # ---------------------------------
   43902 # '(y)' is an error, but can be recovered from.  But what's the location
   43903 # of the error itself ('y'), and of the resulting reduction ('(error)').
   43904 { set +x
   43905 $as_echo "$at_srcdir/actions.at:757:  \$PREPARSER ./input '(y)'"
   43906 at_fn_check_prepare_dynamic " $PREPARSER ./input '(y)'" "actions.at:757"
   43907 ( $at_check_trace;  $PREPARSER ./input '(y)'
   43908 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43909 at_status=$? at_failed=false
   43910 $at_check_filter
   43911 echo stderr:; tee stderr <"$at_stderr"
   43912 at_fn_diff_devnull "$at_stdout" || at_failed=:
   43913 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:757"
   43914 $at_failed && at_fn_log_failure
   43915 $at_traceon; }
   43916 
   43917 { set +x
   43918 $as_echo "$at_srcdir/actions.at:757: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   43919 at_fn_check_prepare_trace "actions.at:757"
   43920 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   43921 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43922 at_status=$? at_failed=false
   43923 $at_check_filter
   43924 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   43925 sending: 'y' (1@10-19)
   43926 10.10-19.18: syntax error, unexpected 'y', expecting 'x'
   43927 Freeing token 'y' (1@10-19)
   43928 sending: ')' (2@20-29)
   43929 line (-1@0-29): '(' (0@0-9) error (@10-19) ')' (2@20-29)
   43930 sending: END (3@30-39)
   43931 input (0@29-29): /* Nothing */
   43932 input (2@0-29): line (-1@0-29) input (0@29-29)
   43933 Freeing token END (3@30-39)
   43934 Freeing nterm input (2@0-29)
   43935 Successful parse.
   43936 " | \
   43937   $at_diff - "$at_stderr" || at_failed=:
   43938 at_fn_diff_devnull "$at_stdout" || at_failed=:
   43939 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:757"
   43940 $at_failed && at_fn_log_failure
   43941 $at_traceon; }
   43942 
   43943 
   43944 
   43945 
   43946 # Syntax errors caught by the parser
   43947 # ----------------------------------
   43948 # Exercise the discarding of stack top and input until `error'
   43949 # can be reduced.
   43950 #
   43951 #     '(', 'x', 'x', 'x', 'x', 'x', ')',
   43952 #
   43953 # Load the stack and provoke an error that cannot be caught by the
   43954 # grammar, to check that the stack is cleared.  And make sure the
   43955 # lookahead is freed.
   43956 #
   43957 #     '(', 'x', ')',
   43958 #     '(', 'x', ')',
   43959 #     'y'
   43960 { set +x
   43961 $as_echo "$at_srcdir/actions.at:757:  \$PREPARSER ./input '(xxxxx)(x)(x)y'"
   43962 at_fn_check_prepare_dynamic " $PREPARSER ./input '(xxxxx)(x)(x)y'" "actions.at:757"
   43963 ( $at_check_trace;  $PREPARSER ./input '(xxxxx)(x)(x)y'
   43964 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43965 at_status=$? at_failed=false
   43966 $at_check_filter
   43967 echo stderr:; tee stderr <"$at_stderr"
   43968 at_fn_diff_devnull "$at_stdout" || at_failed=:
   43969 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:757"
   43970 $at_failed && at_fn_log_failure
   43971 $at_traceon; }
   43972 
   43973 { set +x
   43974 $as_echo "$at_srcdir/actions.at:757: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   43975 at_fn_check_prepare_trace "actions.at:757"
   43976 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   43977 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   43978 at_status=$? at_failed=false
   43979 $at_check_filter
   43980 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   43981 sending: 'x' (1@10-19)
   43982 thing (1@10-19): 'x' (1@10-19)
   43983 sending: 'x' (2@20-29)
   43984 thing (2@20-29): 'x' (2@20-29)
   43985 sending: 'x' (3@30-39)
   43986 30.30-39.38: syntax error, unexpected 'x', expecting ')'
   43987 Freeing nterm thing (2@20-29)
   43988 Freeing nterm thing (1@10-19)
   43989 Freeing token 'x' (3@30-39)
   43990 sending: 'x' (4@40-49)
   43991 Freeing token 'x' (4@40-49)
   43992 sending: 'x' (5@50-59)
   43993 Freeing token 'x' (5@50-59)
   43994 sending: ')' (6@60-69)
   43995 line (-1@0-69): '(' (0@0-9) error (@10-59) ')' (6@60-69)
   43996 sending: '(' (7@70-79)
   43997 sending: 'x' (8@80-89)
   43998 thing (8@80-89): 'x' (8@80-89)
   43999 sending: ')' (9@90-99)
   44000 line (7@70-99): '(' (7@70-79) thing (8@80-89) ')' (9@90-99)
   44001 sending: '(' (10@100-109)
   44002 sending: 'x' (11@110-119)
   44003 thing (11@110-119): 'x' (11@110-119)
   44004 sending: ')' (12@120-129)
   44005 line (10@100-129): '(' (10@100-109) thing (11@110-119) ')' (12@120-129)
   44006 sending: 'y' (13@130-139)
   44007 input (0@129-129): /* Nothing */
   44008 input (2@100-129): line (10@100-129) input (0@129-129)
   44009 input (2@70-129): line (7@70-99) input (2@100-129)
   44010 input (2@0-129): line (-1@0-69) input (2@70-129)
   44011 130.130-139.138: syntax error, unexpected 'y', expecting END
   44012 Freeing nterm input (2@0-129)
   44013 Freeing token 'y' (13@130-139)
   44014 Parsing FAILED.
   44015 " | \
   44016   $at_diff - "$at_stderr" || at_failed=:
   44017 at_fn_diff_devnull "$at_stdout" || at_failed=:
   44018 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:757"
   44019 $at_failed && at_fn_log_failure
   44020 $at_traceon; }
   44021 
   44022 
   44023 
   44024 
   44025 # Syntax error caught by the parser where lookahead = END
   44026 # --------------------------------------------------------
   44027 # Load the stack and provoke an error that cannot be caught by the
   44028 # grammar, to check that the stack is cleared.  And make sure the
   44029 # lookahead is freed.
   44030 #
   44031 #     '(', 'x', ')',
   44032 #     '(', 'x', ')',
   44033 #     'x'
   44034 { set +x
   44035 $as_echo "$at_srcdir/actions.at:757:  \$PREPARSER ./input '(x)(x)x'"
   44036 at_fn_check_prepare_dynamic " $PREPARSER ./input '(x)(x)x'" "actions.at:757"
   44037 ( $at_check_trace;  $PREPARSER ./input '(x)(x)x'
   44038 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44039 at_status=$? at_failed=false
   44040 $at_check_filter
   44041 echo stderr:; tee stderr <"$at_stderr"
   44042 at_fn_diff_devnull "$at_stdout" || at_failed=:
   44043 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:757"
   44044 $at_failed && at_fn_log_failure
   44045 $at_traceon; }
   44046 
   44047 { set +x
   44048 $as_echo "$at_srcdir/actions.at:757: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   44049 at_fn_check_prepare_trace "actions.at:757"
   44050 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   44051 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44052 at_status=$? at_failed=false
   44053 $at_check_filter
   44054 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   44055 sending: 'x' (1@10-19)
   44056 thing (1@10-19): 'x' (1@10-19)
   44057 sending: ')' (2@20-29)
   44058 line (0@0-29): '(' (0@0-9) thing (1@10-19) ')' (2@20-29)
   44059 sending: '(' (3@30-39)
   44060 sending: 'x' (4@40-49)
   44061 thing (4@40-49): 'x' (4@40-49)
   44062 sending: ')' (5@50-59)
   44063 line (3@30-59): '(' (3@30-39) thing (4@40-49) ')' (5@50-59)
   44064 sending: 'x' (6@60-69)
   44065 thing (6@60-69): 'x' (6@60-69)
   44066 sending: END (7@70-79)
   44067 70.70-79.78: syntax error, unexpected END, expecting 'x'
   44068 Freeing nterm thing (6@60-69)
   44069 Freeing nterm line (3@30-59)
   44070 Freeing nterm line (0@0-29)
   44071 Freeing token END (7@70-79)
   44072 Parsing FAILED.
   44073 " | \
   44074   $at_diff - "$at_stderr" || at_failed=:
   44075 at_fn_diff_devnull "$at_stdout" || at_failed=:
   44076 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:757"
   44077 $at_failed && at_fn_log_failure
   44078 $at_traceon; }
   44079 
   44080 
   44081 
   44082 
   44083 # Check destruction upon stack overflow
   44084 # -------------------------------------
   44085 # Upon stack overflow, all symbols on the stack should be destroyed.
   44086 # Only check for yacc.c.
   44087 
   44088 
   44089 
   44090 
   44091 
   44092   set +x
   44093   $at_times_p && times >"$at_times_file"
   44094 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   44095 read at_status <"$at_status_file"
   44096 #AT_STOP_163
   44097 #AT_START_164
   44098 at_fn_group_banner 164 'actions.at:758' \
   44099   "Printers and Destructors with union: %glr-parser" "" 9
   44100 at_xfail=no
   44101 (
   44102   $as_echo "164. $at_setup_line: testing $at_desc ..."
   44103   $at_traceon
   44104 
   44105 
   44106 
   44107 # Make sure complex $n work.
   44108 
   44109 # Be sure to pass all the %directives to this macro to have correct
   44110 # helping macros.  So don't put any directly in the Bison file.
   44111 
   44112 cat >input.y <<'_ATEOF'
   44113 %code top {
   44114 #include <config.h>
   44115 /* We don't need perfect functions for these tests. */
   44116 #undef malloc
   44117 #undef memcmp
   44118 #undef realloc
   44119 }
   44120 
   44121 %code requires {
   44122 #include <stdio.h>
   44123 #include <stdlib.h>
   44124 #include <string.h>
   44125 #include <assert.h>
   44126 
   44127 #define YYINITDEPTH 10
   44128 #define YYMAXDEPTH 10
   44129 #define RANGE(Location) (Location).first_line, (Location).last_line
   44130 
   44131 /* Display the symbol type Symbol.  */
   44132 #define V(Symbol, Value, Location, Sep) \
   44133    fprintf (stderr, #Symbol " (%d@%d-%d)" Sep, Value, RANGE(Location))
   44134 }
   44135 
   44136 %error-verbose
   44137 %debug
   44138 %verbose
   44139 %locations
   44140 %glr-parser
   44141 %union
   44142 {
   44143   int ival;
   44144 }
   44145 
   44146 %code provides {
   44147 
   44148 static int yylex (void);
   44149 static void yyerror ( const char *msg);
   44150 }
   44151 
   44152 %type <ival> '(' 'x' 'y' ')' ';' thing line input END
   44153 
   44154 /* FIXME: This %printer isn't actually tested.  */
   44155 %printer
   44156   {
   44157     fprintf (yyoutput, "%d", $$);
   44158   }
   44159   input line thing 'x' 'y'
   44160 
   44161 %destructor
   44162   { fprintf (stderr, "Freeing nterm input (%d@%d-%d)\n", $$, RANGE (@$)); }
   44163   input
   44164 
   44165 %destructor
   44166   { fprintf (stderr, "Freeing nterm line (%d@%d-%d)\n", $$, RANGE (@$)); }
   44167   line
   44168 
   44169 %destructor
   44170   { fprintf (stderr, "Freeing nterm thing (%d@%d-%d)\n", $$, RANGE (@$)); }
   44171   thing
   44172 
   44173 %destructor
   44174   { fprintf (stderr, "Freeing token 'x' (%d@%d-%d)\n", $$, RANGE (@$)); }
   44175   'x'
   44176 
   44177 %destructor
   44178   { fprintf (stderr, "Freeing token 'y' (%d@%d-%d)\n", $$, RANGE (@$)); }
   44179   'y'
   44180 
   44181 %token END 0
   44182 %destructor
   44183   { fprintf (stderr, "Freeing token END (%d@%d-%d)\n", $$, RANGE (@$)); }
   44184   END
   44185 
   44186 %%
   44187 /*
   44188    This grammar is made to exercise error recovery.
   44189    "Lines" starting with `(' support error recovery, with
   44190    ')' as synchronizing token.  Lines starting with 'x' can never
   44191    be recovered from if in error.
   44192 */
   44193 
   44194 input:
   44195   /* Nothing. */
   44196     {
   44197       $$ = 0;
   44198       V(input, $$, @$, ": /* Nothing */\n");
   44199     }
   44200 | line input /* Right recursive to load the stack so that popping at
   44201                 END can be exercised.  */
   44202     {
   44203       $$ = 2;
   44204       V(input, $$, @$, ": ");
   44205       V(line,  $1, @1, " ");
   44206       V(input, $2, @2, "\n");
   44207     }
   44208 ;
   44209 
   44210 line:
   44211   thing thing thing ';'
   44212     {
   44213       $$ = $1;
   44214       V(line,  $$, @$, ": ");
   44215       V(thing, $1, @1, " ");
   44216       V(thing, $2, @2, " ");
   44217       V(thing, $3, @3, " ");
   44218       V(;,     $4, @4, "\n");
   44219     }
   44220 | '(' thing thing ')'
   44221     {
   44222       $$ = $1;
   44223       V(line,  $$, @$, ": ");
   44224       V('(',   $1, @1, " ");
   44225       V(thing, $2, @2, " ");
   44226       V(thing, $3, @3, " ");
   44227       V(')',   $4, @4, "\n");
   44228     }
   44229 | '(' thing ')'
   44230     {
   44231       $$ = $1;
   44232       V(line,  $$, @$, ": ");
   44233       V('(',   $1, @1, " ");
   44234       V(thing, $2, @2, " ");
   44235       V(')',   $3, @3, "\n");
   44236     }
   44237 | '(' error ')'
   44238     {
   44239       $$ = -1;
   44240       V(line,  $$, @$, ": ");
   44241       V('(',   $1, @1, " ");
   44242       fprintf (stderr, "error (@%d-%d) ", RANGE (@2));
   44243       V(')',   $3, @3, "\n");
   44244     }
   44245 ;
   44246 
   44247 thing:
   44248   'x'
   44249     {
   44250       $$ = $1;
   44251       V(thing, $$, @$, ": ");
   44252       V('x',   $1, @1, "\n");
   44253     }
   44254 ;
   44255 %%
   44256 /* Alias to ARGV[1]. */
   44257 const char *source = YY_NULL;
   44258 
   44259 #include <stdio.h>
   44260 /* A C error reporting function.  */
   44261 static
   44262 void yyerror ( const char *msg)
   44263 {
   44264   YY_LOCATION_PRINT (stderr, (yylloc));
   44265   fprintf (stderr, ": ");
   44266   fprintf (stderr, "%s\n", msg);
   44267 }
   44268 
   44269 static
   44270 int yylex (void)
   44271 {
   44272   static unsigned int counter = 0;
   44273 
   44274   int c = (yylval).ival = counter++;
   44275   /* As in BASIC, line numbers go from 10 to 10.  */
   44276   (yylloc).first_line = (yylloc).first_column = 10 * c;
   44277   (yylloc).last_line = (yylloc).last_column = (yylloc).first_line + 9;
   44278   assert (0 <= c && c <= strlen (source));
   44279   if (source[c])
   44280     fprintf (stderr, "sending: '%c'", source[c]);
   44281   else
   44282     fprintf (stderr, "sending: END");
   44283   fprintf (stderr, " (%d@%d-%d)\n", c, RANGE ((yylloc)));
   44284   return source[c];
   44285 }
   44286 
   44287 
   44288 int
   44289 main (int argc, const char *argv[])
   44290 {
   44291   int status;
   44292   yydebug = !!getenv ("YYDEBUG");
   44293   assert (argc == 2);
   44294   source = argv[1];
   44295   status = yyparse ();
   44296   switch (status)
   44297     {
   44298       case 0: fprintf (stderr, "Successful parse.\n"); break;
   44299       case 1: fprintf (stderr, "Parsing FAILED.\n"); break;
   44300       default: fprintf (stderr, "Parsing FAILED (status %d).\n", status); break;
   44301     }
   44302   return status;
   44303 }
   44304 _ATEOF
   44305 
   44306 
   44307 
   44308 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   44309   at_save_special_files
   44310   mkdir xml-tests
   44311     # Don't combine these Bison invocations since we want to be sure that
   44312   # --report=all isn't required to get the full XML file.
   44313   { set +x
   44314 $as_echo "$at_srcdir/actions.at:758: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   44315                   --graph=xml-tests/test.dot -o input.c input.y"
   44316 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:758"
   44317 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   44318                   --graph=xml-tests/test.dot -o input.c input.y
   44319 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44320 at_status=$? at_failed=false
   44321 $at_check_filter
   44322 echo stderr:; cat "$at_stderr"
   44323 echo stdout:; cat "$at_stdout"
   44324 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:758"
   44325 $at_failed && at_fn_log_failure
   44326 $at_traceon; }
   44327 
   44328   { set +x
   44329 $as_echo "$at_srcdir/actions.at:758: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   44330 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:758"
   44331 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   44332 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44333 at_status=$? at_failed=false
   44334 $at_check_filter
   44335 echo stderr:; cat "$at_stderr"
   44336 echo stdout:; cat "$at_stdout"
   44337 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:758"
   44338 $at_failed && at_fn_log_failure
   44339 $at_traceon; }
   44340 
   44341     cp xml-tests/test.output expout
   44342   { set +x
   44343 $as_echo "$at_srcdir/actions.at:758: \$XSLTPROC \\
   44344              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   44345              xml-tests/test.xml"
   44346 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:758"
   44347 ( $at_check_trace; $XSLTPROC \
   44348              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   44349              xml-tests/test.xml
   44350 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44351 at_status=$? at_failed=false
   44352 $at_check_filter
   44353 at_fn_diff_devnull "$at_stderr" || at_failed=:
   44354 $at_diff expout "$at_stdout" || at_failed=:
   44355 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:758"
   44356 $at_failed && at_fn_log_failure
   44357 $at_traceon; }
   44358 
   44359   sort xml-tests/test.dot > expout
   44360   { set +x
   44361 $as_echo "$at_srcdir/actions.at:758: \$XSLTPROC \\
   44362              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   44363              xml-tests/test.xml | sort"
   44364 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:758"
   44365 ( $at_check_trace; $XSLTPROC \
   44366              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   44367              xml-tests/test.xml | sort
   44368 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44369 at_status=$? at_failed=false
   44370 $at_check_filter
   44371 at_fn_diff_devnull "$at_stderr" || at_failed=:
   44372 $at_diff expout "$at_stdout" || at_failed=:
   44373 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:758"
   44374 $at_failed && at_fn_log_failure
   44375 $at_traceon; }
   44376 
   44377   rm -rf xml-tests expout
   44378   at_restore_special_files
   44379 fi
   44380 { set +x
   44381 $as_echo "$at_srcdir/actions.at:758: bison -o input.c input.y"
   44382 at_fn_check_prepare_trace "actions.at:758"
   44383 ( $at_check_trace; bison -o input.c input.y
   44384 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44385 at_status=$? at_failed=false
   44386 $at_check_filter
   44387 at_fn_diff_devnull "$at_stderr" || at_failed=:
   44388 at_fn_diff_devnull "$at_stdout" || at_failed=:
   44389 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:758"
   44390 $at_failed && at_fn_log_failure
   44391 $at_traceon; }
   44392 
   44393 
   44394    { set +x
   44395 $as_echo "$at_srcdir/actions.at:758: \$BISON_C_WORKS"
   44396 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:758"
   44397 ( $at_check_trace; $BISON_C_WORKS
   44398 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44399 at_status=$? at_failed=false
   44400 $at_check_filter
   44401 echo stderr:; cat "$at_stderr"
   44402 echo stdout:; cat "$at_stdout"
   44403 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:758"
   44404 $at_failed && at_fn_log_failure
   44405 $at_traceon; }
   44406 
   44407 { set +x
   44408 $as_echo "$at_srcdir/actions.at:758: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   44409 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:758"
   44410 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   44411 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44412 at_status=$? at_failed=false
   44413 $at_check_filter
   44414 echo stderr:; cat "$at_stderr"
   44415 echo stdout:; cat "$at_stdout"
   44416 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:758"
   44417 $at_failed && at_fn_log_failure
   44418 $at_traceon; }
   44419 
   44420 
   44421 
   44422 
   44423 # Check the location of "empty"
   44424 # -----------------------------
   44425 # I.e., epsilon-reductions, as in "(x)" which ends by reducing
   44426 # an empty "line" nterm.
   44427 # FIXME: This location is not satisfying.  Depend on the lookahead?
   44428 { set +x
   44429 $as_echo "$at_srcdir/actions.at:758:  \$PREPARSER ./input '(x)'"
   44430 at_fn_check_prepare_dynamic " $PREPARSER ./input '(x)'" "actions.at:758"
   44431 ( $at_check_trace;  $PREPARSER ./input '(x)'
   44432 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44433 at_status=$? at_failed=false
   44434 $at_check_filter
   44435 echo stderr:; tee stderr <"$at_stderr"
   44436 at_fn_diff_devnull "$at_stdout" || at_failed=:
   44437 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:758"
   44438 $at_failed && at_fn_log_failure
   44439 $at_traceon; }
   44440 
   44441 { set +x
   44442 $as_echo "$at_srcdir/actions.at:758: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   44443 at_fn_check_prepare_trace "actions.at:758"
   44444 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   44445 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44446 at_status=$? at_failed=false
   44447 $at_check_filter
   44448 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   44449 sending: 'x' (1@10-19)
   44450 thing (1@10-19): 'x' (1@10-19)
   44451 sending: ')' (2@20-29)
   44452 line (0@0-29): '(' (0@0-9) thing (1@10-19) ')' (2@20-29)
   44453 sending: END (3@30-39)
   44454 input (0@29-29): /* Nothing */
   44455 input (2@0-29): line (0@0-29) input (0@29-29)
   44456 Freeing token END (3@30-39)
   44457 Freeing nterm input (2@0-29)
   44458 Successful parse.
   44459 " | \
   44460   $at_diff - "$at_stderr" || at_failed=:
   44461 at_fn_diff_devnull "$at_stdout" || at_failed=:
   44462 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:758"
   44463 $at_failed && at_fn_log_failure
   44464 $at_traceon; }
   44465 
   44466 
   44467 
   44468 
   44469 # Check locations in error recovery
   44470 # ---------------------------------
   44471 # '(y)' is an error, but can be recovered from.  But what's the location
   44472 # of the error itself ('y'), and of the resulting reduction ('(error)').
   44473 { set +x
   44474 $as_echo "$at_srcdir/actions.at:758:  \$PREPARSER ./input '(y)'"
   44475 at_fn_check_prepare_dynamic " $PREPARSER ./input '(y)'" "actions.at:758"
   44476 ( $at_check_trace;  $PREPARSER ./input '(y)'
   44477 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44478 at_status=$? at_failed=false
   44479 $at_check_filter
   44480 echo stderr:; tee stderr <"$at_stderr"
   44481 at_fn_diff_devnull "$at_stdout" || at_failed=:
   44482 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:758"
   44483 $at_failed && at_fn_log_failure
   44484 $at_traceon; }
   44485 
   44486 { set +x
   44487 $as_echo "$at_srcdir/actions.at:758: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   44488 at_fn_check_prepare_trace "actions.at:758"
   44489 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   44490 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44491 at_status=$? at_failed=false
   44492 $at_check_filter
   44493 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   44494 sending: 'y' (1@10-19)
   44495 10.10-19.18: syntax error, unexpected 'y', expecting 'x'
   44496 Freeing token 'y' (1@10-19)
   44497 sending: ')' (2@20-29)
   44498 line (-1@0-29): '(' (0@0-9) error (@10-19) ')' (2@20-29)
   44499 sending: END (3@30-39)
   44500 input (0@29-29): /* Nothing */
   44501 input (2@0-29): line (-1@0-29) input (0@29-29)
   44502 Freeing token END (3@30-39)
   44503 Freeing nterm input (2@0-29)
   44504 Successful parse.
   44505 " | \
   44506   $at_diff - "$at_stderr" || at_failed=:
   44507 at_fn_diff_devnull "$at_stdout" || at_failed=:
   44508 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:758"
   44509 $at_failed && at_fn_log_failure
   44510 $at_traceon; }
   44511 
   44512 
   44513 
   44514 
   44515 # Syntax errors caught by the parser
   44516 # ----------------------------------
   44517 # Exercise the discarding of stack top and input until `error'
   44518 # can be reduced.
   44519 #
   44520 #     '(', 'x', 'x', 'x', 'x', 'x', ')',
   44521 #
   44522 # Load the stack and provoke an error that cannot be caught by the
   44523 # grammar, to check that the stack is cleared.  And make sure the
   44524 # lookahead is freed.
   44525 #
   44526 #     '(', 'x', ')',
   44527 #     '(', 'x', ')',
   44528 #     'y'
   44529 { set +x
   44530 $as_echo "$at_srcdir/actions.at:758:  \$PREPARSER ./input '(xxxxx)(x)(x)y'"
   44531 at_fn_check_prepare_dynamic " $PREPARSER ./input '(xxxxx)(x)(x)y'" "actions.at:758"
   44532 ( $at_check_trace;  $PREPARSER ./input '(xxxxx)(x)(x)y'
   44533 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44534 at_status=$? at_failed=false
   44535 $at_check_filter
   44536 echo stderr:; tee stderr <"$at_stderr"
   44537 at_fn_diff_devnull "$at_stdout" || at_failed=:
   44538 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:758"
   44539 $at_failed && at_fn_log_failure
   44540 $at_traceon; }
   44541 
   44542 { set +x
   44543 $as_echo "$at_srcdir/actions.at:758: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   44544 at_fn_check_prepare_trace "actions.at:758"
   44545 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   44546 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44547 at_status=$? at_failed=false
   44548 $at_check_filter
   44549 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   44550 sending: 'x' (1@10-19)
   44551 thing (1@10-19): 'x' (1@10-19)
   44552 sending: 'x' (2@20-29)
   44553 thing (2@20-29): 'x' (2@20-29)
   44554 sending: 'x' (3@30-39)
   44555 30.30-39.38: syntax error, unexpected 'x', expecting ')'
   44556 Freeing nterm thing (2@20-29)
   44557 Freeing nterm thing (1@10-19)
   44558 Freeing token 'x' (3@30-39)
   44559 sending: 'x' (4@40-49)
   44560 Freeing token 'x' (4@40-49)
   44561 sending: 'x' (5@50-59)
   44562 Freeing token 'x' (5@50-59)
   44563 sending: ')' (6@60-69)
   44564 line (-1@0-69): '(' (0@0-9) error (@10-59) ')' (6@60-69)
   44565 sending: '(' (7@70-79)
   44566 sending: 'x' (8@80-89)
   44567 thing (8@80-89): 'x' (8@80-89)
   44568 sending: ')' (9@90-99)
   44569 line (7@70-99): '(' (7@70-79) thing (8@80-89) ')' (9@90-99)
   44570 sending: '(' (10@100-109)
   44571 sending: 'x' (11@110-119)
   44572 thing (11@110-119): 'x' (11@110-119)
   44573 sending: ')' (12@120-129)
   44574 line (10@100-129): '(' (10@100-109) thing (11@110-119) ')' (12@120-129)
   44575 sending: 'y' (13@130-139)
   44576 input (0@129-129): /* Nothing */
   44577 input (2@100-129): line (10@100-129) input (0@129-129)
   44578 input (2@70-129): line (7@70-99) input (2@100-129)
   44579 input (2@0-129): line (-1@0-69) input (2@70-129)
   44580 130.130-139.138: syntax error, unexpected 'y', expecting END
   44581 Freeing nterm input (2@0-129)
   44582 Freeing token 'y' (13@130-139)
   44583 Parsing FAILED.
   44584 " | \
   44585   $at_diff - "$at_stderr" || at_failed=:
   44586 at_fn_diff_devnull "$at_stdout" || at_failed=:
   44587 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:758"
   44588 $at_failed && at_fn_log_failure
   44589 $at_traceon; }
   44590 
   44591 
   44592 
   44593 
   44594 # Syntax error caught by the parser where lookahead = END
   44595 # --------------------------------------------------------
   44596 # Load the stack and provoke an error that cannot be caught by the
   44597 # grammar, to check that the stack is cleared.  And make sure the
   44598 # lookahead is freed.
   44599 #
   44600 #     '(', 'x', ')',
   44601 #     '(', 'x', ')',
   44602 #     'x'
   44603 { set +x
   44604 $as_echo "$at_srcdir/actions.at:758:  \$PREPARSER ./input '(x)(x)x'"
   44605 at_fn_check_prepare_dynamic " $PREPARSER ./input '(x)(x)x'" "actions.at:758"
   44606 ( $at_check_trace;  $PREPARSER ./input '(x)(x)x'
   44607 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44608 at_status=$? at_failed=false
   44609 $at_check_filter
   44610 echo stderr:; tee stderr <"$at_stderr"
   44611 at_fn_diff_devnull "$at_stdout" || at_failed=:
   44612 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:758"
   44613 $at_failed && at_fn_log_failure
   44614 $at_traceon; }
   44615 
   44616 { set +x
   44617 $as_echo "$at_srcdir/actions.at:758: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   44618 at_fn_check_prepare_trace "actions.at:758"
   44619 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   44620 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44621 at_status=$? at_failed=false
   44622 $at_check_filter
   44623 echo >>"$at_stderr"; $as_echo "sending: '(' (0@0-9)
   44624 sending: 'x' (1@10-19)
   44625 thing (1@10-19): 'x' (1@10-19)
   44626 sending: ')' (2@20-29)
   44627 line (0@0-29): '(' (0@0-9) thing (1@10-19) ')' (2@20-29)
   44628 sending: '(' (3@30-39)
   44629 sending: 'x' (4@40-49)
   44630 thing (4@40-49): 'x' (4@40-49)
   44631 sending: ')' (5@50-59)
   44632 line (3@30-59): '(' (3@30-39) thing (4@40-49) ')' (5@50-59)
   44633 sending: 'x' (6@60-69)
   44634 thing (6@60-69): 'x' (6@60-69)
   44635 sending: END (7@70-79)
   44636 70.70-79.78: syntax error, unexpected END, expecting 'x'
   44637 Freeing nterm thing (6@60-69)
   44638 Freeing nterm line (3@30-59)
   44639 Freeing nterm line (0@0-29)
   44640 Freeing token END (7@70-79)
   44641 Parsing FAILED.
   44642 " | \
   44643   $at_diff - "$at_stderr" || at_failed=:
   44644 at_fn_diff_devnull "$at_stdout" || at_failed=:
   44645 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:758"
   44646 $at_failed && at_fn_log_failure
   44647 $at_traceon; }
   44648 
   44649 
   44650 
   44651 
   44652 # Check destruction upon stack overflow
   44653 # -------------------------------------
   44654 # Upon stack overflow, all symbols on the stack should be destroyed.
   44655 # Only check for yacc.c.
   44656 
   44657 
   44658 
   44659 
   44660 
   44661   set +x
   44662   $at_times_p && times >"$at_times_file"
   44663 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   44664 read at_status <"$at_status_file"
   44665 #AT_STOP_164
   44666 #AT_START_165
   44667 at_fn_group_banner 165 'actions.at:769' \
   44668   "Default tagless %printer and %destructor" "       " 9
   44669 at_xfail=no
   44670 (
   44671   $as_echo "165. $at_setup_line: testing $at_desc ..."
   44672   $at_traceon
   44673 
   44674 
   44675 cat >input.y <<'_ATEOF'
   44676 %code top {
   44677 #include <config.h>
   44678 /* We don't need perfect functions for these tests. */
   44679 #undef malloc
   44680 #undef memcmp
   44681 #undef realloc
   44682 }
   44683 
   44684 %error-verbose
   44685 %debug
   44686 %locations
   44687 
   44688 %{
   44689 # include <stdio.h>
   44690 # include <stdlib.h>
   44691 static int yylex (void);
   44692 static void yyerror ( const char *msg);
   44693 # define USE(SYM)
   44694 %}
   44695 
   44696 %printer {
   44697   fprintf (yyoutput, "<*> printer should not be called.\n");
   44698 } <*>
   44699 
   44700 %printer {
   44701   fprintf (yyoutput, "<> printer for '%c' @ %d", $$, @$.first_column);
   44702 } <>
   44703 %destructor {
   44704   fprintf (stdout, "<> destructor for '%c' @ %d.\n", $$, @$.first_column);
   44705 } <>
   44706 
   44707 %printer {
   44708   fprintf (yyoutput, "'b'/'c' printer for '%c' @ %d", $$, @$.first_column);
   44709 } 'b' 'c'
   44710 %destructor {
   44711   fprintf (stdout, "'b'/'c' destructor for '%c' @ %d.\n", $$, @$.first_column);
   44712 } 'b' 'c'
   44713 
   44714 %destructor {
   44715   fprintf (yyoutput, "<*> destructor should not be called.\n");
   44716 } <*>
   44717 
   44718 %%
   44719 
   44720 start: 'a' 'b' 'c' 'd' 'e' { $$ = 'S'; USE(($1, $2, $3, $4, $5)); } ;
   44721 
   44722 %%
   44723 #include <stdio.h>
   44724 /* A C error reporting function.  */
   44725 static
   44726 void yyerror ( const char *msg)
   44727 {
   44728   YY_LOCATION_PRINT (stderr, (yylloc));
   44729   fprintf (stderr, ": ");
   44730   fprintf (stderr, "%s\n", msg);
   44731 }
   44732 #include <assert.h>
   44733 static
   44734 int yylex (void)
   44735 {
   44736   static char const input[] = "abcd";
   44737   static size_t toknum = 0;
   44738   int res;
   44739   ;
   44740   assert (toknum < sizeof input / sizeof input[0]);
   44741   res = input[toknum++];
   44742   yylval = res;
   44743   (yylloc).first_line = (yylloc).last_line = 1;
   44744   (yylloc).first_column = (yylloc).last_column = toknum;
   44745   return res;
   44746 }
   44747 
   44748 int
   44749 main (void)
   44750 {
   44751   yydebug = 1;
   44752   return yyparse ();
   44753 }
   44754 _ATEOF
   44755 
   44756 
   44757 
   44758 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   44759   at_save_special_files
   44760   mkdir xml-tests
   44761     # Don't combine these Bison invocations since we want to be sure that
   44762   # --report=all isn't required to get the full XML file.
   44763   { set +x
   44764 $as_echo "$at_srcdir/actions.at:822: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   44765                   --graph=xml-tests/test.dot -o input.c input.y"
   44766 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:822"
   44767 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   44768                   --graph=xml-tests/test.dot -o input.c input.y
   44769 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44770 at_status=$? at_failed=false
   44771 $at_check_filter
   44772 echo stderr:; cat "$at_stderr"
   44773 echo stdout:; cat "$at_stdout"
   44774 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:822"
   44775 $at_failed && at_fn_log_failure
   44776 $at_traceon; }
   44777 
   44778   { set +x
   44779 $as_echo "$at_srcdir/actions.at:822: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   44780 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:822"
   44781 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   44782 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44783 at_status=$? at_failed=false
   44784 $at_check_filter
   44785 echo stderr:; cat "$at_stderr"
   44786 echo stdout:; cat "$at_stdout"
   44787 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:822"
   44788 $at_failed && at_fn_log_failure
   44789 $at_traceon; }
   44790 
   44791     cp xml-tests/test.output expout
   44792   { set +x
   44793 $as_echo "$at_srcdir/actions.at:822: \$XSLTPROC \\
   44794              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   44795              xml-tests/test.xml"
   44796 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:822"
   44797 ( $at_check_trace; $XSLTPROC \
   44798              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   44799              xml-tests/test.xml
   44800 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44801 at_status=$? at_failed=false
   44802 $at_check_filter
   44803 at_fn_diff_devnull "$at_stderr" || at_failed=:
   44804 $at_diff expout "$at_stdout" || at_failed=:
   44805 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:822"
   44806 $at_failed && at_fn_log_failure
   44807 $at_traceon; }
   44808 
   44809   sort xml-tests/test.dot > expout
   44810   { set +x
   44811 $as_echo "$at_srcdir/actions.at:822: \$XSLTPROC \\
   44812              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   44813              xml-tests/test.xml | sort"
   44814 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:822"
   44815 ( $at_check_trace; $XSLTPROC \
   44816              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   44817              xml-tests/test.xml | sort
   44818 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44819 at_status=$? at_failed=false
   44820 $at_check_filter
   44821 at_fn_diff_devnull "$at_stderr" || at_failed=:
   44822 $at_diff expout "$at_stdout" || at_failed=:
   44823 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:822"
   44824 $at_failed && at_fn_log_failure
   44825 $at_traceon; }
   44826 
   44827   rm -rf xml-tests expout
   44828   at_restore_special_files
   44829 fi
   44830 { set +x
   44831 $as_echo "$at_srcdir/actions.at:822: bison -o input.c input.y"
   44832 at_fn_check_prepare_trace "actions.at:822"
   44833 ( $at_check_trace; bison -o input.c input.y
   44834 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44835 at_status=$? at_failed=false
   44836 $at_check_filter
   44837 at_fn_diff_devnull "$at_stderr" || at_failed=:
   44838 at_fn_diff_devnull "$at_stdout" || at_failed=:
   44839 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:822"
   44840 $at_failed && at_fn_log_failure
   44841 $at_traceon; }
   44842 
   44843 
   44844 { set +x
   44845 $as_echo "$at_srcdir/actions.at:823: \$BISON_C_WORKS"
   44846 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:823"
   44847 ( $at_check_trace; $BISON_C_WORKS
   44848 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44849 at_status=$? at_failed=false
   44850 $at_check_filter
   44851 echo stderr:; cat "$at_stderr"
   44852 echo stdout:; cat "$at_stdout"
   44853 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:823"
   44854 $at_failed && at_fn_log_failure
   44855 $at_traceon; }
   44856 
   44857 { set +x
   44858 $as_echo "$at_srcdir/actions.at:823: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   44859 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:823"
   44860 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   44861 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44862 at_status=$? at_failed=false
   44863 $at_check_filter
   44864 echo stderr:; cat "$at_stderr"
   44865 echo stdout:; cat "$at_stdout"
   44866 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:823"
   44867 $at_failed && at_fn_log_failure
   44868 $at_traceon; }
   44869 
   44870 { set +x
   44871 $as_echo "$at_srcdir/actions.at:824:  \$PREPARSER ./input"
   44872 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:824"
   44873 ( $at_check_trace;  $PREPARSER ./input
   44874 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44875 at_status=$? at_failed=false
   44876 $at_check_filter
   44877 echo stderr:; tee stderr <"$at_stderr"
   44878 echo >>"$at_stdout"; $as_echo "<> destructor for 'd' @ 4.
   44879 'b'/'c' destructor for 'c' @ 3.
   44880 'b'/'c' destructor for 'b' @ 2.
   44881 <> destructor for 'a' @ 1.
   44882 " | \
   44883   $at_diff - "$at_stdout" || at_failed=:
   44884 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:824"
   44885 $at_failed && at_fn_log_failure
   44886 $at_traceon; }
   44887 
   44888 { set +x
   44889 $as_echo "$at_srcdir/actions.at:824: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   44890 at_fn_check_prepare_trace "actions.at:824"
   44891 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   44892 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   44893 at_status=$? at_failed=false
   44894 $at_check_filter
   44895 echo >>"$at_stderr"; $as_echo "Starting parse
   44896 Entering state 0
   44897 Reading a token: Next token is token 'a' (1.1: <> printer for 'a' @ 1)
   44898 Shifting token 'a' (1.1: <> printer for 'a' @ 1)
   44899 Entering state 1
   44900 Reading a token: Next token is token 'b' (1.2: 'b'/'c' printer for 'b' @ 2)
   44901 Shifting token 'b' (1.2: 'b'/'c' printer for 'b' @ 2)
   44902 Entering state 3
   44903 Reading a token: Next token is token 'c' (1.3: 'b'/'c' printer for 'c' @ 3)
   44904 Shifting token 'c' (1.3: 'b'/'c' printer for 'c' @ 3)
   44905 Entering state 5
   44906 Reading a token: Next token is token 'd' (1.4: <> printer for 'd' @ 4)
   44907 Shifting token 'd' (1.4: <> printer for 'd' @ 4)
   44908 Entering state 6
   44909 Reading a token: Now at end of input.
   44910 1.5: syntax error, unexpected \$end, expecting 'e'
   44911 Error: popping token 'd' (1.4: <> printer for 'd' @ 4)
   44912 Stack now 0 1 3 5
   44913 Error: popping token 'c' (1.3: 'b'/'c' printer for 'c' @ 3)
   44914 Stack now 0 1 3
   44915 Error: popping token 'b' (1.2: 'b'/'c' printer for 'b' @ 2)
   44916 Stack now 0 1
   44917 Error: popping token 'a' (1.1: <> printer for 'a' @ 1)
   44918 Stack now 0
   44919 Cleanup: discarding lookahead token \$end (1.5: )
   44920 Stack now 0
   44921 " | \
   44922   $at_diff - "$at_stderr" || at_failed=:
   44923 at_fn_diff_devnull "$at_stdout" || at_failed=:
   44924 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:824"
   44925 $at_failed && at_fn_log_failure
   44926 $at_traceon; }
   44927 
   44928 
   44929 
   44930 
   44931   set +x
   44932   $at_times_p && times >"$at_times_file"
   44933 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   44934 read at_status <"$at_status_file"
   44935 #AT_STOP_165
   44936 #AT_START_166
   44937 at_fn_group_banner 166 'actions.at:867' \
   44938   "Default tagged and per-type %printer and %destructor" "" 9
   44939 at_xfail=no
   44940 (
   44941   $as_echo "166. $at_setup_line: testing $at_desc ..."
   44942   $at_traceon
   44943 
   44944 
   44945 cat >input.y <<'_ATEOF'
   44946 %code top {
   44947 #include <config.h>
   44948 /* We don't need perfect functions for these tests. */
   44949 #undef malloc
   44950 #undef memcmp
   44951 #undef realloc
   44952 }
   44953 
   44954 %error-verbose
   44955 %debug
   44956 
   44957 %{
   44958 # include <stdio.h>
   44959 # include <stdlib.h>
   44960 static void yyerror ( const char *msg);
   44961 static int yylex (void);
   44962 # define USE(SYM)
   44963 %}
   44964 
   44965 %printer {
   44966   fprintf (yyoutput, "<> printer should not be called.\n");
   44967 } <>
   44968 
   44969 %union { int field0; int field1; int field2; }
   44970 %type <field0> start 'a' 'g'
   44971 %type <field1> 'e'
   44972 %type <field2> 'f'
   44973 %printer {
   44974   fprintf (yyoutput, "<*>/<field2>/e printer");
   44975 } <*> 'e' <field2>
   44976 %destructor {
   44977   fprintf (stdout, "<*>/<field2>/e destructor.\n");
   44978 } <*> 'e' <field2>
   44979 
   44980 %type <field1> 'b'
   44981 %printer { fprintf (yyoutput, "<field1> printer"); } <field1>
   44982 %destructor { fprintf (stdout, "<field1> destructor.\n"); } <field1>
   44983 
   44984 %type <field0> 'c'
   44985 %printer { fprintf (yyoutput, "'c' printer"); } 'c'
   44986 %destructor { fprintf (stdout, "'c' destructor.\n"); } 'c'
   44987 
   44988 %type <field1> 'd'
   44989 %printer { fprintf (yyoutput, "'d' printer"); } 'd'
   44990 %destructor { fprintf (stdout, "'d' destructor.\n"); } 'd'
   44991 
   44992 %destructor {
   44993   fprintf (yyoutput, "<> destructor should not be called.\n");
   44994 } <>
   44995 
   44996 %%
   44997 
   44998 start:
   44999   'a' 'b' 'c' 'd' 'e' 'f' 'g'
   45000     {
   45001       USE(($1, $2, $3, $4, $5, $6, $7));
   45002       $$ = 'S';
   45003     }
   45004   ;
   45005 
   45006 %%
   45007 #include <stdio.h>
   45008 /* A C error reporting function.  */
   45009 static
   45010 void yyerror ( const char *msg)
   45011 {
   45012   fprintf (stderr, "%s\n", msg);
   45013 }
   45014 #include <assert.h>
   45015 static
   45016 int yylex (void)
   45017 {
   45018   static char const input[] = "abcdef";
   45019   static size_t toknum = 0;
   45020   int res;
   45021   ;
   45022   assert (toknum < sizeof input / sizeof input[0]);
   45023   res = input[toknum++];
   45024   ;
   45025   return res;
   45026 }
   45027 
   45028 int
   45029 main (void)
   45030 {
   45031   yydebug = 1;
   45032   return yyparse ();
   45033 }
   45034 _ATEOF
   45035 
   45036 
   45037 
   45038 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   45039   at_save_special_files
   45040   mkdir xml-tests
   45041     # Don't combine these Bison invocations since we want to be sure that
   45042   # --report=all isn't required to get the full XML file.
   45043   { set +x
   45044 $as_echo "$at_srcdir/actions.at:934: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   45045                   --graph=xml-tests/test.dot -o input.c input.y"
   45046 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:934"
   45047 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   45048                   --graph=xml-tests/test.dot -o input.c input.y
   45049 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45050 at_status=$? at_failed=false
   45051 $at_check_filter
   45052 echo stderr:; cat "$at_stderr"
   45053 echo stdout:; cat "$at_stdout"
   45054 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:934"
   45055 $at_failed && at_fn_log_failure
   45056 $at_traceon; }
   45057 
   45058   { set +x
   45059 $as_echo "$at_srcdir/actions.at:934: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   45060 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:934"
   45061 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   45062 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45063 at_status=$? at_failed=false
   45064 $at_check_filter
   45065 echo stderr:; cat "$at_stderr"
   45066 echo stdout:; cat "$at_stdout"
   45067 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:934"
   45068 $at_failed && at_fn_log_failure
   45069 $at_traceon; }
   45070 
   45071     cp xml-tests/test.output expout
   45072   { set +x
   45073 $as_echo "$at_srcdir/actions.at:934: \$XSLTPROC \\
   45074              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   45075              xml-tests/test.xml"
   45076 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:934"
   45077 ( $at_check_trace; $XSLTPROC \
   45078              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   45079              xml-tests/test.xml
   45080 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45081 at_status=$? at_failed=false
   45082 $at_check_filter
   45083 at_fn_diff_devnull "$at_stderr" || at_failed=:
   45084 $at_diff expout "$at_stdout" || at_failed=:
   45085 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:934"
   45086 $at_failed && at_fn_log_failure
   45087 $at_traceon; }
   45088 
   45089   sort xml-tests/test.dot > expout
   45090   { set +x
   45091 $as_echo "$at_srcdir/actions.at:934: \$XSLTPROC \\
   45092              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   45093              xml-tests/test.xml | sort"
   45094 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:934"
   45095 ( $at_check_trace; $XSLTPROC \
   45096              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   45097              xml-tests/test.xml | sort
   45098 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45099 at_status=$? at_failed=false
   45100 $at_check_filter
   45101 at_fn_diff_devnull "$at_stderr" || at_failed=:
   45102 $at_diff expout "$at_stdout" || at_failed=:
   45103 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:934"
   45104 $at_failed && at_fn_log_failure
   45105 $at_traceon; }
   45106 
   45107   rm -rf xml-tests expout
   45108   at_restore_special_files
   45109 fi
   45110 { set +x
   45111 $as_echo "$at_srcdir/actions.at:934: bison -o input.c input.y"
   45112 at_fn_check_prepare_trace "actions.at:934"
   45113 ( $at_check_trace; bison -o input.c input.y
   45114 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45115 at_status=$? at_failed=false
   45116 $at_check_filter
   45117 at_fn_diff_devnull "$at_stderr" || at_failed=:
   45118 at_fn_diff_devnull "$at_stdout" || at_failed=:
   45119 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:934"
   45120 $at_failed && at_fn_log_failure
   45121 $at_traceon; }
   45122 
   45123 
   45124 { set +x
   45125 $as_echo "$at_srcdir/actions.at:935: \$BISON_C_WORKS"
   45126 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:935"
   45127 ( $at_check_trace; $BISON_C_WORKS
   45128 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45129 at_status=$? at_failed=false
   45130 $at_check_filter
   45131 echo stderr:; cat "$at_stderr"
   45132 echo stdout:; cat "$at_stdout"
   45133 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:935"
   45134 $at_failed && at_fn_log_failure
   45135 $at_traceon; }
   45136 
   45137 { set +x
   45138 $as_echo "$at_srcdir/actions.at:935: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   45139 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:935"
   45140 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   45141 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45142 at_status=$? at_failed=false
   45143 $at_check_filter
   45144 echo stderr:; cat "$at_stderr"
   45145 echo stdout:; cat "$at_stdout"
   45146 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:935"
   45147 $at_failed && at_fn_log_failure
   45148 $at_traceon; }
   45149 
   45150 { set +x
   45151 $as_echo "$at_srcdir/actions.at:936:  \$PREPARSER ./input"
   45152 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:936"
   45153 ( $at_check_trace;  $PREPARSER ./input
   45154 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45155 at_status=$? at_failed=false
   45156 $at_check_filter
   45157 echo stderr:; tee stderr <"$at_stderr"
   45158 echo >>"$at_stdout"; $as_echo "<*>/<field2>/e destructor.
   45159 <*>/<field2>/e destructor.
   45160 'd' destructor.
   45161 'c' destructor.
   45162 <field1> destructor.
   45163 <*>/<field2>/e destructor.
   45164 " | \
   45165   $at_diff - "$at_stdout" || at_failed=:
   45166 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:936"
   45167 $at_failed && at_fn_log_failure
   45168 $at_traceon; }
   45169 
   45170 { set +x
   45171 $as_echo "$at_srcdir/actions.at:936: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   45172 at_fn_check_prepare_trace "actions.at:936"
   45173 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   45174 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45175 at_status=$? at_failed=false
   45176 $at_check_filter
   45177 echo >>"$at_stderr"; $as_echo "Starting parse
   45178 Entering state 0
   45179 Reading a token: Next token is token 'a' (<*>/<field2>/e printer)
   45180 Shifting token 'a' (<*>/<field2>/e printer)
   45181 Entering state 1
   45182 Reading a token: Next token is token 'b' (<field1> printer)
   45183 Shifting token 'b' (<field1> printer)
   45184 Entering state 3
   45185 Reading a token: Next token is token 'c' ('c' printer)
   45186 Shifting token 'c' ('c' printer)
   45187 Entering state 5
   45188 Reading a token: Next token is token 'd' ('d' printer)
   45189 Shifting token 'd' ('d' printer)
   45190 Entering state 6
   45191 Reading a token: Next token is token 'e' (<*>/<field2>/e printer)
   45192 Shifting token 'e' (<*>/<field2>/e printer)
   45193 Entering state 7
   45194 Reading a token: Next token is token 'f' (<*>/<field2>/e printer)
   45195 Shifting token 'f' (<*>/<field2>/e printer)
   45196 Entering state 8
   45197 Reading a token: Now at end of input.
   45198 syntax error, unexpected \$end, expecting 'g'
   45199 Error: popping token 'f' (<*>/<field2>/e printer)
   45200 Stack now 0 1 3 5 6 7
   45201 Error: popping token 'e' (<*>/<field2>/e printer)
   45202 Stack now 0 1 3 5 6
   45203 Error: popping token 'd' ('d' printer)
   45204 Stack now 0 1 3 5
   45205 Error: popping token 'c' ('c' printer)
   45206 Stack now 0 1 3
   45207 Error: popping token 'b' (<field1> printer)
   45208 Stack now 0 1
   45209 Error: popping token 'a' (<*>/<field2>/e printer)
   45210 Stack now 0
   45211 Cleanup: discarding lookahead token \$end ()
   45212 Stack now 0
   45213 " | \
   45214   $at_diff - "$at_stderr" || at_failed=:
   45215 at_fn_diff_devnull "$at_stdout" || at_failed=:
   45216 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:936"
   45217 $at_failed && at_fn_log_failure
   45218 $at_traceon; }
   45219 
   45220 
   45221 
   45222 
   45223   set +x
   45224   $at_times_p && times >"$at_times_file"
   45225 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   45226 read at_status <"$at_status_file"
   45227 #AT_STOP_166
   45228 #AT_START_167
   45229 at_fn_group_banner 167 'actions.at:991' \
   45230   "Default %printer and %destructor for user-defined end token" "" 9
   45231 at_xfail=no
   45232 (
   45233   $as_echo "167. $at_setup_line: testing $at_desc ..."
   45234   $at_traceon
   45235 
   45236 
   45237 # _AT_CHECK_DEFAULT_PRINTER_AND_DESTRUCTOR_FOR_END_TOKEN(TYPED)
   45238 # -------------------------------------------------------------
   45239 
   45240 
   45241 
   45242 
   45243 
   45244 cat >input0.y <<'_ATEOF'
   45245 %code top {
   45246 #include <config.h>
   45247 /* We don't need perfect functions for these tests. */
   45248 #undef malloc
   45249 #undef memcmp
   45250 #undef realloc
   45251 }
   45252 
   45253 %error-verbose
   45254 %debug
   45255 %locations
   45256 
   45257 %{
   45258 # include <stdio.h>
   45259 # include <stdlib.h>
   45260 static void yyerror ( const char *msg);
   45261 static int yylex (void);
   45262 # define USE(SYM)
   45263 %}
   45264 
   45265 %destructor {
   45266   fprintf (yyoutput, "<*> destructor should not be called.\n");
   45267 } <*>
   45268 
   45269 %token END 0
   45270 %printer {
   45271   fprintf (yyoutput, "<> for '%c' @ %d", $$, @$.first_column);
   45272 } <>
   45273 %destructor {
   45274   fprintf (stdout, "<> for '%c' @ %d.\n", $$, @$.first_column);
   45275 } <>
   45276 
   45277 %printer {
   45278   fprintf (yyoutput, "<*> printer should not be called.\n");
   45279 } <*>
   45280 
   45281 
   45282 
   45283 
   45284 %%
   45285 
   45286 start: { $$ = 'S'; } ;
   45287 
   45288 %%
   45289 
   45290 static int
   45291 yylex (void)
   45292 {
   45293   static int called;
   45294   if (called++)
   45295     abort ();
   45296   yylval = 'E';
   45297   yylloc.first_line = yylloc.last_line = 1;
   45298   yylloc.first_column = yylloc.last_column = 1;
   45299   return 0;
   45300 }
   45301 #include <stdio.h>
   45302 /* A C error reporting function.  */
   45303 static
   45304 void yyerror ( const char *msg)
   45305 {
   45306   YY_LOCATION_PRINT (stderr, (yylloc));
   45307   fprintf (stderr, ": ");
   45308   fprintf (stderr, "%s\n", msg);
   45309 }
   45310 
   45311 int
   45312 main (void)
   45313 {
   45314   yydebug = 1;
   45315   return yyparse ();
   45316 }
   45317 _ATEOF
   45318 
   45319 
   45320 
   45321 
   45322 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   45323   at_save_special_files
   45324   mkdir xml-tests
   45325     # Don't combine these Bison invocations since we want to be sure that
   45326   # --report=all isn't required to get the full XML file.
   45327   { set +x
   45328 $as_echo "$at_srcdir/actions.at:1087: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   45329                   --graph=xml-tests/test.dot -o input0.c input0.y"
   45330 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1087"
   45331 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   45332                   --graph=xml-tests/test.dot -o input0.c input0.y
   45333 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45334 at_status=$? at_failed=false
   45335 $at_check_filter
   45336 echo stderr:; cat "$at_stderr"
   45337 echo stdout:; cat "$at_stdout"
   45338 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1087"
   45339 $at_failed && at_fn_log_failure
   45340 $at_traceon; }
   45341 
   45342   { set +x
   45343 $as_echo "$at_srcdir/actions.at:1087: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input0.c input0.y"
   45344 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input0.c input0.y" "actions.at:1087"
   45345 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input0.c input0.y
   45346 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45347 at_status=$? at_failed=false
   45348 $at_check_filter
   45349 echo stderr:; cat "$at_stderr"
   45350 echo stdout:; cat "$at_stdout"
   45351 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1087"
   45352 $at_failed && at_fn_log_failure
   45353 $at_traceon; }
   45354 
   45355     cp xml-tests/test.output expout
   45356   { set +x
   45357 $as_echo "$at_srcdir/actions.at:1087: \$XSLTPROC \\
   45358              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   45359              xml-tests/test.xml"
   45360 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1087"
   45361 ( $at_check_trace; $XSLTPROC \
   45362              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   45363              xml-tests/test.xml
   45364 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45365 at_status=$? at_failed=false
   45366 $at_check_filter
   45367 at_fn_diff_devnull "$at_stderr" || at_failed=:
   45368 $at_diff expout "$at_stdout" || at_failed=:
   45369 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1087"
   45370 $at_failed && at_fn_log_failure
   45371 $at_traceon; }
   45372 
   45373   sort xml-tests/test.dot > expout
   45374   { set +x
   45375 $as_echo "$at_srcdir/actions.at:1087: \$XSLTPROC \\
   45376              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   45377              xml-tests/test.xml | sort"
   45378 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1087"
   45379 ( $at_check_trace; $XSLTPROC \
   45380              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   45381              xml-tests/test.xml | sort
   45382 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45383 at_status=$? at_failed=false
   45384 $at_check_filter
   45385 at_fn_diff_devnull "$at_stderr" || at_failed=:
   45386 $at_diff expout "$at_stdout" || at_failed=:
   45387 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1087"
   45388 $at_failed && at_fn_log_failure
   45389 $at_traceon; }
   45390 
   45391   rm -rf xml-tests expout
   45392   at_restore_special_files
   45393 fi
   45394 { set +x
   45395 $as_echo "$at_srcdir/actions.at:1087: bison -o input0.c input0.y"
   45396 at_fn_check_prepare_trace "actions.at:1087"
   45397 ( $at_check_trace; bison -o input0.c input0.y
   45398 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45399 at_status=$? at_failed=false
   45400 $at_check_filter
   45401 at_fn_diff_devnull "$at_stderr" || at_failed=:
   45402 at_fn_diff_devnull "$at_stdout" || at_failed=:
   45403 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1087"
   45404 $at_failed && at_fn_log_failure
   45405 $at_traceon; }
   45406 
   45407 
   45408 { set +x
   45409 $as_echo "$at_srcdir/actions.at:1087: \$BISON_C_WORKS"
   45410 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:1087"
   45411 ( $at_check_trace; $BISON_C_WORKS
   45412 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45413 at_status=$? at_failed=false
   45414 $at_check_filter
   45415 echo stderr:; cat "$at_stderr"
   45416 echo stdout:; cat "$at_stdout"
   45417 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1087"
   45418 $at_failed && at_fn_log_failure
   45419 $at_traceon; }
   45420 
   45421 { set +x
   45422 $as_echo "$at_srcdir/actions.at:1087: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input0 input0.c \$LIBS"
   45423 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input0 input0.c $LIBS" "actions.at:1087"
   45424 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input0 input0.c $LIBS
   45425 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45426 at_status=$? at_failed=false
   45427 $at_check_filter
   45428 echo stderr:; cat "$at_stderr"
   45429 echo stdout:; cat "$at_stdout"
   45430 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1087"
   45431 $at_failed && at_fn_log_failure
   45432 $at_traceon; }
   45433 
   45434 { set +x
   45435 $as_echo "$at_srcdir/actions.at:1087:  \$PREPARSER ./input0"
   45436 at_fn_check_prepare_dynamic " $PREPARSER ./input0" "actions.at:1087"
   45437 ( $at_check_trace;  $PREPARSER ./input0
   45438 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45439 at_status=$? at_failed=false
   45440 $at_check_filter
   45441 echo stderr:; tee stderr <"$at_stderr"
   45442 echo >>"$at_stdout"; $as_echo "<> for 'E' @ 1.
   45443 <> for 'S' @ 1.
   45444 " | \
   45445   $at_diff - "$at_stdout" || at_failed=:
   45446 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1087"
   45447 $at_failed && at_fn_log_failure
   45448 $at_traceon; }
   45449 
   45450 { set +x
   45451 $as_echo "$at_srcdir/actions.at:1087: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   45452 at_fn_check_prepare_trace "actions.at:1087"
   45453 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   45454 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45455 at_status=$? at_failed=false
   45456 $at_check_filter
   45457 echo >>"$at_stderr"; $as_echo "Starting parse
   45458 Entering state 0
   45459 Reducing stack by rule 1 (line 42):
   45460 -> \$\$ = nterm start (1.1: <> for 'S' @ 1)
   45461 Stack now 0
   45462 Entering state 1
   45463 Reading a token: Now at end of input.
   45464 Shifting token END (1.1: <> for 'E' @ 1)
   45465 Entering state 2
   45466 Stack now 0 1 2
   45467 Cleanup: popping token END (1.1: <> for 'E' @ 1)
   45468 Cleanup: popping nterm start (1.1: <> for 'S' @ 1)
   45469 " | \
   45470   $at_diff - "$at_stderr" || at_failed=:
   45471 at_fn_diff_devnull "$at_stdout" || at_failed=:
   45472 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1087"
   45473 $at_failed && at_fn_log_failure
   45474 $at_traceon; }
   45475 
   45476 
   45477 
   45478 
   45479 
   45480 
   45481 
   45482 
   45483 
   45484 cat >input1.y <<'_ATEOF'
   45485 %code top {
   45486 #include <config.h>
   45487 /* We don't need perfect functions for these tests. */
   45488 #undef malloc
   45489 #undef memcmp
   45490 #undef realloc
   45491 }
   45492 
   45493 %error-verbose
   45494 %debug
   45495 %locations
   45496 
   45497 %{
   45498 # include <stdio.h>
   45499 # include <stdlib.h>
   45500 static void yyerror ( const char *msg);
   45501 static int yylex (void);
   45502 # define USE(SYM)
   45503 %}
   45504 
   45505 %destructor {
   45506   fprintf (yyoutput, "<> destructor should not be called.\n");
   45507 } <>
   45508 
   45509 %token END 0
   45510 %printer {
   45511   fprintf (yyoutput, "<*> for '%c' @ %d", $$, @$.first_column);
   45512 } <*>
   45513 %destructor {
   45514   fprintf (stdout, "<*> for '%c' @ %d.\n", $$, @$.first_column);
   45515 } <*>
   45516 
   45517 %printer {
   45518   fprintf (yyoutput, "<> printer should not be called.\n");
   45519 } <>
   45520 
   45521 %union { char tag; }
   45522 %type <tag> start END
   45523 
   45524 %%
   45525 
   45526 start: { $$ = 'S'; } ;
   45527 
   45528 %%
   45529 
   45530 static int
   45531 yylex (void)
   45532 {
   45533   static int called;
   45534   if (called++)
   45535     abort ();
   45536   yylval.tag = 'E';
   45537   yylloc.first_line = yylloc.last_line = 1;
   45538   yylloc.first_column = yylloc.last_column = 1;
   45539   return 0;
   45540 }
   45541 #include <stdio.h>
   45542 /* A C error reporting function.  */
   45543 static
   45544 void yyerror ( const char *msg)
   45545 {
   45546   YY_LOCATION_PRINT (stderr, (yylloc));
   45547   fprintf (stderr, ": ");
   45548   fprintf (stderr, "%s\n", msg);
   45549 }
   45550 
   45551 int
   45552 main (void)
   45553 {
   45554   yydebug = 1;
   45555   return yyparse ();
   45556 }
   45557 _ATEOF
   45558 
   45559 
   45560 
   45561 
   45562 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   45563   at_save_special_files
   45564   mkdir xml-tests
   45565     # Don't combine these Bison invocations since we want to be sure that
   45566   # --report=all isn't required to get the full XML file.
   45567   { set +x
   45568 $as_echo "$at_srcdir/actions.at:1088: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   45569                   --graph=xml-tests/test.dot -o input1.c input1.y"
   45570 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1088"
   45571 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   45572                   --graph=xml-tests/test.dot -o input1.c input1.y
   45573 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45574 at_status=$? at_failed=false
   45575 $at_check_filter
   45576 echo stderr:; cat "$at_stderr"
   45577 echo stdout:; cat "$at_stdout"
   45578 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1088"
   45579 $at_failed && at_fn_log_failure
   45580 $at_traceon; }
   45581 
   45582   { set +x
   45583 $as_echo "$at_srcdir/actions.at:1088: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input1.c input1.y"
   45584 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input1.c input1.y" "actions.at:1088"
   45585 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input1.c input1.y
   45586 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45587 at_status=$? at_failed=false
   45588 $at_check_filter
   45589 echo stderr:; cat "$at_stderr"
   45590 echo stdout:; cat "$at_stdout"
   45591 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1088"
   45592 $at_failed && at_fn_log_failure
   45593 $at_traceon; }
   45594 
   45595     cp xml-tests/test.output expout
   45596   { set +x
   45597 $as_echo "$at_srcdir/actions.at:1088: \$XSLTPROC \\
   45598              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   45599              xml-tests/test.xml"
   45600 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1088"
   45601 ( $at_check_trace; $XSLTPROC \
   45602              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   45603              xml-tests/test.xml
   45604 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45605 at_status=$? at_failed=false
   45606 $at_check_filter
   45607 at_fn_diff_devnull "$at_stderr" || at_failed=:
   45608 $at_diff expout "$at_stdout" || at_failed=:
   45609 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1088"
   45610 $at_failed && at_fn_log_failure
   45611 $at_traceon; }
   45612 
   45613   sort xml-tests/test.dot > expout
   45614   { set +x
   45615 $as_echo "$at_srcdir/actions.at:1088: \$XSLTPROC \\
   45616              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   45617              xml-tests/test.xml | sort"
   45618 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1088"
   45619 ( $at_check_trace; $XSLTPROC \
   45620              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   45621              xml-tests/test.xml | sort
   45622 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45623 at_status=$? at_failed=false
   45624 $at_check_filter
   45625 at_fn_diff_devnull "$at_stderr" || at_failed=:
   45626 $at_diff expout "$at_stdout" || at_failed=:
   45627 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1088"
   45628 $at_failed && at_fn_log_failure
   45629 $at_traceon; }
   45630 
   45631   rm -rf xml-tests expout
   45632   at_restore_special_files
   45633 fi
   45634 { set +x
   45635 $as_echo "$at_srcdir/actions.at:1088: bison -o input1.c input1.y"
   45636 at_fn_check_prepare_trace "actions.at:1088"
   45637 ( $at_check_trace; bison -o input1.c input1.y
   45638 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45639 at_status=$? at_failed=false
   45640 $at_check_filter
   45641 at_fn_diff_devnull "$at_stderr" || at_failed=:
   45642 at_fn_diff_devnull "$at_stdout" || at_failed=:
   45643 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1088"
   45644 $at_failed && at_fn_log_failure
   45645 $at_traceon; }
   45646 
   45647 
   45648 { set +x
   45649 $as_echo "$at_srcdir/actions.at:1088: \$BISON_C_WORKS"
   45650 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:1088"
   45651 ( $at_check_trace; $BISON_C_WORKS
   45652 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45653 at_status=$? at_failed=false
   45654 $at_check_filter
   45655 echo stderr:; cat "$at_stderr"
   45656 echo stdout:; cat "$at_stdout"
   45657 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1088"
   45658 $at_failed && at_fn_log_failure
   45659 $at_traceon; }
   45660 
   45661 { set +x
   45662 $as_echo "$at_srcdir/actions.at:1088: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input1 input1.c \$LIBS"
   45663 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input1 input1.c $LIBS" "actions.at:1088"
   45664 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input1 input1.c $LIBS
   45665 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45666 at_status=$? at_failed=false
   45667 $at_check_filter
   45668 echo stderr:; cat "$at_stderr"
   45669 echo stdout:; cat "$at_stdout"
   45670 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1088"
   45671 $at_failed && at_fn_log_failure
   45672 $at_traceon; }
   45673 
   45674 { set +x
   45675 $as_echo "$at_srcdir/actions.at:1088:  \$PREPARSER ./input1"
   45676 at_fn_check_prepare_dynamic " $PREPARSER ./input1" "actions.at:1088"
   45677 ( $at_check_trace;  $PREPARSER ./input1
   45678 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45679 at_status=$? at_failed=false
   45680 $at_check_filter
   45681 echo stderr:; tee stderr <"$at_stderr"
   45682 echo >>"$at_stdout"; $as_echo "<*> for 'E' @ 1.
   45683 <*> for 'S' @ 1.
   45684 " | \
   45685   $at_diff - "$at_stdout" || at_failed=:
   45686 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1088"
   45687 $at_failed && at_fn_log_failure
   45688 $at_traceon; }
   45689 
   45690 { set +x
   45691 $as_echo "$at_srcdir/actions.at:1088: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   45692 at_fn_check_prepare_trace "actions.at:1088"
   45693 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   45694 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45695 at_status=$? at_failed=false
   45696 $at_check_filter
   45697 echo >>"$at_stderr"; $as_echo "Starting parse
   45698 Entering state 0
   45699 Reducing stack by rule 1 (line 42):
   45700 -> \$\$ = nterm start (1.1: <*> for 'S' @ 1)
   45701 Stack now 0
   45702 Entering state 1
   45703 Reading a token: Now at end of input.
   45704 Shifting token END (1.1: <*> for 'E' @ 1)
   45705 Entering state 2
   45706 Stack now 0 1 2
   45707 Cleanup: popping token END (1.1: <*> for 'E' @ 1)
   45708 Cleanup: popping nterm start (1.1: <*> for 'S' @ 1)
   45709 " | \
   45710   $at_diff - "$at_stderr" || at_failed=:
   45711 at_fn_diff_devnull "$at_stdout" || at_failed=:
   45712 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1088"
   45713 $at_failed && at_fn_log_failure
   45714 $at_traceon; }
   45715 
   45716 
   45717 
   45718 
   45719 
   45720 
   45721 
   45722   set +x
   45723   $at_times_p && times >"$at_times_file"
   45724 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   45725 read at_status <"$at_status_file"
   45726 #AT_STOP_167
   45727 #AT_START_168
   45728 at_fn_group_banner 168 'actions.at:1098' \
   45729   "Default %printer and %destructor are not for error or \$undefined" "" 9
   45730 at_xfail=no
   45731 (
   45732   $as_echo "168. $at_setup_line: testing $at_desc ..."
   45733   $at_traceon
   45734 
   45735 
   45736 # If Bison were to apply the default %printer and %destructor to the error
   45737 # token or to $undefined:
   45738 #   - For the error token:
   45739 #     - It would generate warnings for unused $n.
   45740 #     - It would invoke the %printer and %destructor on the error token's
   45741 #       semantic value, which would be initialized from the lookahead, which
   45742 #       would be destroyed separately.
   45743 #   - For $undefined, who knows what the semantic value would be.
   45744 
   45745 cat >input.y <<'_ATEOF'
   45746 %code top {
   45747 #include <config.h>
   45748 /* We don't need perfect functions for these tests. */
   45749 #undef malloc
   45750 #undef memcmp
   45751 #undef realloc
   45752 }
   45753 
   45754 %debug
   45755 
   45756 %{
   45757 # include <stdio.h>
   45758 # include <stdlib.h>
   45759 static void yyerror ( const char *msg);
   45760 static int yylex (void);
   45761 # define USE(SYM)
   45762 %}
   45763 
   45764 %printer {
   45765   fprintf (yyoutput, "'%c'", $$);
   45766 } <> <*>
   45767 %destructor {
   45768   fprintf (stderr, "DESTROY '%c'\n", $$);
   45769 } <> <*>
   45770 
   45771 %%
   45772 
   45773 start:
   45774   { $$ = 'S'; }
   45775   /* In order to reveal the problems that this bug caused during parsing, add
   45776    * $2 to USE.  */
   45777   | 'a' error 'b' 'c' { USE(($1, $3, $4)); $$ = 'S'; }
   45778   ;
   45779 
   45780 %%
   45781 #include <stdio.h>
   45782 /* A C error reporting function.  */
   45783 static
   45784 void yyerror ( const char *msg)
   45785 {
   45786   fprintf (stderr, "%s\n", msg);
   45787 }
   45788 #include <assert.h>
   45789 static
   45790 int yylex (void)
   45791 {
   45792   static char const input[] = "abd";
   45793   static size_t toknum = 0;
   45794   int res;
   45795   ;
   45796   assert (toknum < sizeof input / sizeof input[0]);
   45797   res = input[toknum++];
   45798   yylval = res;
   45799   return res;
   45800 }
   45801 int
   45802 main (void)
   45803 {
   45804   yydebug = 1;
   45805   return yyparse ();
   45806 }
   45807 _ATEOF
   45808 
   45809 
   45810 
   45811 
   45812 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   45813   at_save_special_files
   45814   mkdir xml-tests
   45815     # Don't combine these Bison invocations since we want to be sure that
   45816   # --report=all isn't required to get the full XML file.
   45817   { set +x
   45818 $as_echo "$at_srcdir/actions.at:1148: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   45819                   --graph=xml-tests/test.dot -o input.c input.y"
   45820 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1148"
   45821 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   45822                   --graph=xml-tests/test.dot -o input.c input.y
   45823 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45824 at_status=$? at_failed=false
   45825 $at_check_filter
   45826 echo stderr:; cat "$at_stderr"
   45827 echo stdout:; cat "$at_stdout"
   45828 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1148"
   45829 $at_failed && at_fn_log_failure
   45830 $at_traceon; }
   45831 
   45832   { set +x
   45833 $as_echo "$at_srcdir/actions.at:1148: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   45834 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:1148"
   45835 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   45836 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45837 at_status=$? at_failed=false
   45838 $at_check_filter
   45839 echo stderr:; cat "$at_stderr"
   45840 echo stdout:; cat "$at_stdout"
   45841 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1148"
   45842 $at_failed && at_fn_log_failure
   45843 $at_traceon; }
   45844 
   45845     cp xml-tests/test.output expout
   45846   { set +x
   45847 $as_echo "$at_srcdir/actions.at:1148: \$XSLTPROC \\
   45848              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   45849              xml-tests/test.xml"
   45850 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1148"
   45851 ( $at_check_trace; $XSLTPROC \
   45852              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   45853              xml-tests/test.xml
   45854 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45855 at_status=$? at_failed=false
   45856 $at_check_filter
   45857 at_fn_diff_devnull "$at_stderr" || at_failed=:
   45858 $at_diff expout "$at_stdout" || at_failed=:
   45859 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1148"
   45860 $at_failed && at_fn_log_failure
   45861 $at_traceon; }
   45862 
   45863   sort xml-tests/test.dot > expout
   45864   { set +x
   45865 $as_echo "$at_srcdir/actions.at:1148: \$XSLTPROC \\
   45866              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   45867              xml-tests/test.xml | sort"
   45868 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1148"
   45869 ( $at_check_trace; $XSLTPROC \
   45870              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   45871              xml-tests/test.xml | sort
   45872 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45873 at_status=$? at_failed=false
   45874 $at_check_filter
   45875 at_fn_diff_devnull "$at_stderr" || at_failed=:
   45876 $at_diff expout "$at_stdout" || at_failed=:
   45877 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1148"
   45878 $at_failed && at_fn_log_failure
   45879 $at_traceon; }
   45880 
   45881   rm -rf xml-tests expout
   45882   at_restore_special_files
   45883 fi
   45884 { set +x
   45885 $as_echo "$at_srcdir/actions.at:1148: bison -o input.c input.y"
   45886 at_fn_check_prepare_trace "actions.at:1148"
   45887 ( $at_check_trace; bison -o input.c input.y
   45888 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45889 at_status=$? at_failed=false
   45890 $at_check_filter
   45891 at_fn_diff_devnull "$at_stderr" || at_failed=:
   45892 at_fn_diff_devnull "$at_stdout" || at_failed=:
   45893 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1148"
   45894 $at_failed && at_fn_log_failure
   45895 $at_traceon; }
   45896 
   45897 
   45898 { set +x
   45899 $as_echo "$at_srcdir/actions.at:1149: \$BISON_C_WORKS"
   45900 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:1149"
   45901 ( $at_check_trace; $BISON_C_WORKS
   45902 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45903 at_status=$? at_failed=false
   45904 $at_check_filter
   45905 echo stderr:; cat "$at_stderr"
   45906 echo stdout:; cat "$at_stdout"
   45907 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1149"
   45908 $at_failed && at_fn_log_failure
   45909 $at_traceon; }
   45910 
   45911 { set +x
   45912 $as_echo "$at_srcdir/actions.at:1149: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   45913 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:1149"
   45914 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   45915 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45916 at_status=$? at_failed=false
   45917 $at_check_filter
   45918 echo stderr:; cat "$at_stderr"
   45919 echo stdout:; cat "$at_stdout"
   45920 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1149"
   45921 $at_failed && at_fn_log_failure
   45922 $at_traceon; }
   45923 
   45924 { set +x
   45925 $as_echo "$at_srcdir/actions.at:1150:  \$PREPARSER ./input"
   45926 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:1150"
   45927 ( $at_check_trace;  $PREPARSER ./input
   45928 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45929 at_status=$? at_failed=false
   45930 $at_check_filter
   45931 echo stderr:; tee stderr <"$at_stderr"
   45932 at_fn_diff_devnull "$at_stdout" || at_failed=:
   45933 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:1150"
   45934 $at_failed && at_fn_log_failure
   45935 $at_traceon; }
   45936 
   45937 { set +x
   45938 $as_echo "$at_srcdir/actions.at:1150: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   45939 at_fn_check_prepare_trace "actions.at:1150"
   45940 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   45941 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   45942 at_status=$? at_failed=false
   45943 $at_check_filter
   45944 echo >>"$at_stderr"; $as_echo "Starting parse
   45945 Entering state 0
   45946 Reading a token: Next token is token 'a' ('a')
   45947 Shifting token 'a' ('a')
   45948 Entering state 1
   45949 Reading a token: Next token is token 'b' ('b')
   45950 syntax error
   45951 Shifting token error ()
   45952 Entering state 3
   45953 Next token is token 'b' ('b')
   45954 Shifting token 'b' ('b')
   45955 Entering state 5
   45956 Reading a token: Next token is token \$undefined ()
   45957 Error: popping token 'b' ('b')
   45958 DESTROY 'b'
   45959 Stack now 0 1 3
   45960 Error: popping token error ()
   45961 Stack now 0 1
   45962 Shifting token error ()
   45963 Entering state 3
   45964 Next token is token \$undefined ()
   45965 Error: discarding token \$undefined ()
   45966 Error: popping token error ()
   45967 Stack now 0 1
   45968 Shifting token error ()
   45969 Entering state 3
   45970 Reading a token: Now at end of input.
   45971 Cleanup: discarding lookahead token \$end ()
   45972 Stack now 0 1 3
   45973 Cleanup: popping token error ()
   45974 Cleanup: popping token 'a' ('a')
   45975 DESTROY 'a'
   45976 " | \
   45977   $at_diff - "$at_stderr" || at_failed=:
   45978 at_fn_diff_devnull "$at_stdout" || at_failed=:
   45979 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1150"
   45980 $at_failed && at_fn_log_failure
   45981 $at_traceon; }
   45982 
   45983 
   45984 
   45985   set +x
   45986   $at_times_p && times >"$at_times_file"
   45987 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   45988 read at_status <"$at_status_file"
   45989 #AT_STOP_168
   45990 #AT_START_169
   45991 at_fn_group_banner 169 'actions.at:1193' \
   45992   "Default %printer and %destructor are not for \$accept" "" 9
   45993 at_xfail=no
   45994 (
   45995   $as_echo "169. $at_setup_line: testing $at_desc ..."
   45996   $at_traceon
   45997 
   45998 
   45999 # If YYSTYPE is a union and Bison were to apply the default %printer and
   46000 # %destructor to $accept:
   46001 #   - The %printer and %destructor code generated for $accept would always be
   46002 #     dead code because $accept is currently never shifted onto the stack.
   46003 #   - $$ for $accept would always be of type YYSTYPE because it's not possible
   46004 #     to declare `%type <field> $accept'.  (Also true for $undefined.)
   46005 #   - Thus, the compiler might complain that the user code assumes the wrong
   46006 #     type for $$ since the code might assume the type associated with a
   46007 #     specific union field, which is especially reasonable in C++ since that
   46008 #     type may be a base type.  This test case checks for this problem.  (Also
   46009 #     true for $undefined and the error token, so there are three warnings for
   46010 #     %printer and three for %destructor.)
   46011 
   46012 
   46013 cat >input.y <<'_ATEOF'
   46014 %code top {
   46015 #include <config.h>
   46016 /* We don't need perfect functions for these tests. */
   46017 #undef malloc
   46018 #undef memcmp
   46019 #undef realloc
   46020 }
   46021 
   46022 %debug /* So that %printer is actually compiled.  */
   46023 
   46024 %{
   46025 # include <stdio.h>
   46026 # include <stdlib.h>
   46027 static void yyerror ( const char *msg);
   46028 static int yylex (void);
   46029 # define USE(SYM)
   46030 %}
   46031 
   46032 %printer {
   46033   char chr = $$;
   46034   fprintf (yyoutput, "'%c'", chr);
   46035 } <> <*>
   46036 %destructor {
   46037   char chr = $$;
   46038   fprintf (stderr, "DESTROY '%c'\n", chr);
   46039 } <> <*>
   46040 
   46041 %union { char chr; }
   46042 %type <chr> start
   46043 
   46044 %%
   46045 
   46046 start: { USE($$); } ;
   46047 
   46048 %%
   46049 #include <stdio.h>
   46050 /* A C error reporting function.  */
   46051 static
   46052 void yyerror ( const char *msg)
   46053 {
   46054   fprintf (stderr, "%s\n", msg);
   46055 }
   46056 #include <assert.h>
   46057 static
   46058 int yylex (void)
   46059 {
   46060   static char const input[] = "";
   46061   static size_t toknum = 0;
   46062   int res;
   46063   ;
   46064   assert (toknum < sizeof input / sizeof input[0]);
   46065   res = input[toknum++];
   46066   ;
   46067   return res;
   46068 }
   46069 int
   46070 main (void)
   46071 {
   46072   return yyparse ();
   46073 }
   46074 _ATEOF
   46075 
   46076 
   46077 
   46078 
   46079 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   46080   at_save_special_files
   46081   mkdir xml-tests
   46082     # Don't combine these Bison invocations since we want to be sure that
   46083   # --report=all isn't required to get the full XML file.
   46084   { set +x
   46085 $as_echo "$at_srcdir/actions.at:1247: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   46086                   --graph=xml-tests/test.dot -o input.c input.y"
   46087 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1247"
   46088 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   46089                   --graph=xml-tests/test.dot -o input.c input.y
   46090 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46091 at_status=$? at_failed=false
   46092 $at_check_filter
   46093 echo stderr:; cat "$at_stderr"
   46094 echo stdout:; cat "$at_stdout"
   46095 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1247"
   46096 $at_failed && at_fn_log_failure
   46097 $at_traceon; }
   46098 
   46099   { set +x
   46100 $as_echo "$at_srcdir/actions.at:1247: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   46101 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:1247"
   46102 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   46103 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46104 at_status=$? at_failed=false
   46105 $at_check_filter
   46106 echo stderr:; cat "$at_stderr"
   46107 echo stdout:; cat "$at_stdout"
   46108 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1247"
   46109 $at_failed && at_fn_log_failure
   46110 $at_traceon; }
   46111 
   46112     cp xml-tests/test.output expout
   46113   { set +x
   46114 $as_echo "$at_srcdir/actions.at:1247: \$XSLTPROC \\
   46115              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   46116              xml-tests/test.xml"
   46117 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1247"
   46118 ( $at_check_trace; $XSLTPROC \
   46119              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   46120              xml-tests/test.xml
   46121 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46122 at_status=$? at_failed=false
   46123 $at_check_filter
   46124 at_fn_diff_devnull "$at_stderr" || at_failed=:
   46125 $at_diff expout "$at_stdout" || at_failed=:
   46126 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1247"
   46127 $at_failed && at_fn_log_failure
   46128 $at_traceon; }
   46129 
   46130   sort xml-tests/test.dot > expout
   46131   { set +x
   46132 $as_echo "$at_srcdir/actions.at:1247: \$XSLTPROC \\
   46133              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   46134              xml-tests/test.xml | sort"
   46135 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1247"
   46136 ( $at_check_trace; $XSLTPROC \
   46137              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   46138              xml-tests/test.xml | sort
   46139 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46140 at_status=$? at_failed=false
   46141 $at_check_filter
   46142 at_fn_diff_devnull "$at_stderr" || at_failed=:
   46143 $at_diff expout "$at_stdout" || at_failed=:
   46144 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1247"
   46145 $at_failed && at_fn_log_failure
   46146 $at_traceon; }
   46147 
   46148   rm -rf xml-tests expout
   46149   at_restore_special_files
   46150 fi
   46151 { set +x
   46152 $as_echo "$at_srcdir/actions.at:1247: bison -o input.c input.y"
   46153 at_fn_check_prepare_trace "actions.at:1247"
   46154 ( $at_check_trace; bison -o input.c input.y
   46155 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46156 at_status=$? at_failed=false
   46157 $at_check_filter
   46158 at_fn_diff_devnull "$at_stderr" || at_failed=:
   46159 at_fn_diff_devnull "$at_stdout" || at_failed=:
   46160 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1247"
   46161 $at_failed && at_fn_log_failure
   46162 $at_traceon; }
   46163 
   46164 
   46165 { set +x
   46166 $as_echo "$at_srcdir/actions.at:1248: \$BISON_C_WORKS"
   46167 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:1248"
   46168 ( $at_check_trace; $BISON_C_WORKS
   46169 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46170 at_status=$? at_failed=false
   46171 $at_check_filter
   46172 echo stderr:; cat "$at_stderr"
   46173 echo stdout:; cat "$at_stdout"
   46174 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1248"
   46175 $at_failed && at_fn_log_failure
   46176 $at_traceon; }
   46177 
   46178 { set +x
   46179 $as_echo "$at_srcdir/actions.at:1248: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   46180 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:1248"
   46181 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   46182 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46183 at_status=$? at_failed=false
   46184 $at_check_filter
   46185 echo stderr:; cat "$at_stderr"
   46186 echo stdout:; cat "$at_stdout"
   46187 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1248"
   46188 $at_failed && at_fn_log_failure
   46189 $at_traceon; }
   46190 
   46191 
   46192   set +x
   46193   $at_times_p && times >"$at_times_file"
   46194 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   46195 read at_status <"$at_status_file"
   46196 #AT_STOP_169
   46197 #AT_START_170
   46198 at_fn_group_banner 170 'actions.at:1258' \
   46199   "Default %printer and %destructor for mid-rule values" "" 9
   46200 at_xfail=no
   46201 (
   46202   $as_echo "170. $at_setup_line: testing $at_desc ..."
   46203   $at_traceon
   46204 
   46205 
   46206 
   46207 cat >input.y <<'_ATEOF'
   46208 %code top {
   46209 #include <config.h>
   46210 /* We don't need perfect functions for these tests. */
   46211 #undef malloc
   46212 #undef memcmp
   46213 #undef realloc
   46214 }
   46215 
   46216 %debug /* So that %printer is actually compiled.  */
   46217 
   46218 %{
   46219 # include <stdio.h>
   46220 # include <stdlib.h>
   46221 static void yyerror ( const char *msg);
   46222 static int yylex (void);
   46223 # define USE(SYM)
   46224 # define YYLTYPE int
   46225 # define YYLLOC_DEFAULT(Current, Rhs, N) (void)(Rhs)
   46226 # define YY_LOCATION_PRINT(File, Loc)
   46227 %}
   46228 
   46229 %printer { fprintf (yyoutput, "%d", @$); } <>
   46230 %destructor { fprintf (stderr, "DESTROY %d\n", @$); } <>
   46231 %printer { fprintf (yyoutput, "<*> printer should not be called"); } <*>
   46232 %destructor { fprintf (yyoutput, "<*> destructor should not be called"); } <*>
   46233 
   46234 %%
   46235 
   46236 start:
   46237   {           @$ = 1; } // Not set or used.
   46238   { USE ($$); @$ = 2; } // Both set and used.
   46239   { USE ($$); @$ = 3; } // Only set.
   46240   {           @$ = 4; } // Only used.
   46241   'c'
   46242   { USE (($$, $2, $4, $5)); @$ = 0; }
   46243   ;
   46244 
   46245 %%
   46246 #include <stdio.h>
   46247 /* A C error reporting function.  */
   46248 static
   46249 void yyerror ( const char *msg)
   46250 {
   46251   fprintf (stderr, "%s\n", msg);
   46252 }
   46253 #include <assert.h>
   46254 static
   46255 int yylex (void)
   46256 {
   46257   static char const input[] = "";
   46258   static size_t toknum = 0;
   46259   int res;
   46260   ;
   46261   assert (toknum < sizeof input / sizeof input[0]);
   46262   res = input[toknum++];
   46263   ;
   46264   return res;
   46265 }
   46266 int
   46267 main (void)
   46268 {
   46269   yydebug = 1;
   46270   return yyparse ();
   46271 }
   46272 _ATEOF
   46273 
   46274 
   46275 
   46276 
   46277 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   46278   at_save_special_files
   46279   mkdir xml-tests
   46280     # Don't combine these Bison invocations since we want to be sure that
   46281   # --report=all isn't required to get the full XML file.
   46282   { set +x
   46283 $as_echo "$at_srcdir/actions.at:1303: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   46284                   --graph=xml-tests/test.dot -o input.c input.y"
   46285 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1303"
   46286 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   46287                   --graph=xml-tests/test.dot -o input.c input.y
   46288 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46289 at_status=$? at_failed=false
   46290 $at_check_filter
   46291 echo stderr:; cat "$at_stderr"
   46292 echo stdout:; cat "$at_stdout"
   46293 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1303"
   46294 $at_failed && at_fn_log_failure
   46295 $at_traceon; }
   46296 
   46297   { set +x
   46298 $as_echo "$at_srcdir/actions.at:1303: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   46299 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:1303"
   46300 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   46301 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46302 at_status=$? at_failed=false
   46303 $at_check_filter
   46304 echo stderr:; cat "$at_stderr"
   46305 echo stdout:; cat "$at_stdout"
   46306 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1303"
   46307 $at_failed && at_fn_log_failure
   46308 $at_traceon; }
   46309 
   46310     cp xml-tests/test.output expout
   46311   { set +x
   46312 $as_echo "$at_srcdir/actions.at:1303: \$XSLTPROC \\
   46313              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   46314              xml-tests/test.xml"
   46315 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1303"
   46316 ( $at_check_trace; $XSLTPROC \
   46317              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   46318              xml-tests/test.xml
   46319 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46320 at_status=$? at_failed=false
   46321 $at_check_filter
   46322 at_fn_diff_devnull "$at_stderr" || at_failed=:
   46323 $at_diff expout "$at_stdout" || at_failed=:
   46324 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1303"
   46325 $at_failed && at_fn_log_failure
   46326 $at_traceon; }
   46327 
   46328   sort xml-tests/test.dot > expout
   46329   { set +x
   46330 $as_echo "$at_srcdir/actions.at:1303: \$XSLTPROC \\
   46331              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   46332              xml-tests/test.xml | sort"
   46333 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1303"
   46334 ( $at_check_trace; $XSLTPROC \
   46335              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   46336              xml-tests/test.xml | sort
   46337 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46338 at_status=$? at_failed=false
   46339 $at_check_filter
   46340 at_fn_diff_devnull "$at_stderr" || at_failed=:
   46341 $at_diff expout "$at_stdout" || at_failed=:
   46342 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1303"
   46343 $at_failed && at_fn_log_failure
   46344 $at_traceon; }
   46345 
   46346   rm -rf xml-tests expout
   46347   at_restore_special_files
   46348 fi
   46349 { set +x
   46350 $as_echo "$at_srcdir/actions.at:1303: bison -o input.c input.y"
   46351 at_fn_check_prepare_trace "actions.at:1303"
   46352 ( $at_check_trace; bison -o input.c input.y
   46353 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46354 at_status=$? at_failed=false
   46355 $at_check_filter
   46356 echo >>"$at_stderr"; $as_echo "input.y:33.3-23: warning: unset value: \$\$
   46357 input.y:32.3-23: warning: unused value: \$3
   46358 " | \
   46359   $at_diff - "$at_stderr" || at_failed=:
   46360 at_fn_diff_devnull "$at_stdout" || at_failed=:
   46361 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1303"
   46362 $at_failed && at_fn_log_failure
   46363 $at_traceon; }
   46364 
   46365 # Defining POSIXLY_CORRECT causes bison to complain if options are
   46366 # added after the grammar file name, so skip these checks in that
   46367 # case.
   46368 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   46369   at_save_special_files
   46370 
   46371   # To avoid expanding it repeatedly, store specified stdout.
   46372   : >expout
   46373 
   46374   # Run with -Werror.
   46375   { set +x
   46376 $as_echo "$at_srcdir/actions.at:1303: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y -Werror"
   46377 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y -Werror" "actions.at:1303"
   46378 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o input.c input.y -Werror
   46379 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46380 at_status=$? at_failed=false
   46381 $at_check_filter
   46382 echo stderr:; tee stderr <"$at_stderr"
   46383 $at_diff expout "$at_stdout" || at_failed=:
   46384 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:1303"
   46385 $at_failed && at_fn_log_failure
   46386 $at_traceon; }
   46387 
   46388 
   46389   # Build expected stderr up to and including the "warnings being
   46390   # treated as errors" message.
   46391   cat >at-bison-check-warnings <<'_ATEOF'
   46392 input.y:33.3-23: warning: unset value: $$
   46393 input.y:32.3-23: warning: unused value: $3
   46394 _ATEOF
   46395 
   46396   at_bison_check_first=`sed -n \
   46397     '/: warning: /{=;q;}' at-bison-check-warnings`
   46398   : ${at_bison_check_first:=1}
   46399   at_bison_check_first_tmp=`sed -n \
   46400     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   46401   : ${at_bison_check_first_tmp:=1}
   46402   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   46403     at_bison_check_first=$at_bison_check_first_tmp
   46404   fi
   46405   if test $at_bison_check_first -gt 1; then
   46406     sed -n "1,`expr $at_bison_check_first - 1`"p \
   46407       at-bison-check-warnings > experr
   46408   fi
   46409   echo 'bison: warnings being treated as errors' >> experr
   46410 
   46411   # Finish building expected stderr and check.  Unlike warnings,
   46412   # complaints cause bison to exit early.  Thus, with -Werror, bison
   46413   # does not necessarily report all warnings that it does without
   46414   # -Werror, but it at least reports one.
   46415   at_bison_check_last=`sed -n '$=' stderr`
   46416   : ${at_bison_check_last:=1}
   46417   at_bison_check_last=`expr $at_bison_check_last - 1`
   46418   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   46419     at-bison-check-warnings >> experr
   46420   { set +x
   46421 $as_echo "$at_srcdir/actions.at:1303: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   46422               stderr 1>&2"
   46423 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1303"
   46424 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   46425               stderr 1>&2
   46426 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46427 at_status=$? at_failed=false
   46428 $at_check_filter
   46429 $at_diff experr "$at_stderr" || at_failed=:
   46430 at_fn_diff_devnull "$at_stdout" || at_failed=:
   46431 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1303"
   46432 $at_failed && at_fn_log_failure
   46433 $at_traceon; }
   46434 
   46435 
   46436   # Now check --warnings=error.
   46437   cp stderr experr
   46438   { set +x
   46439 $as_echo "$at_srcdir/actions.at:1303: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y --warnings=error"
   46440 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y --warnings=error" "actions.at:1303"
   46441 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o input.c input.y --warnings=error
   46442 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46443 at_status=$? at_failed=false
   46444 $at_check_filter
   46445 $at_diff experr "$at_stderr" || at_failed=:
   46446 $at_diff expout "$at_stdout" || at_failed=:
   46447 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:1303"
   46448 $at_failed && at_fn_log_failure
   46449 $at_traceon; }
   46450 
   46451 
   46452   # Now check -Wnone and --warnings=none by making sure that
   46453   # -Werror doesn't change the exit status when -Wnone or
   46454   # --warnings=none is specified.
   46455   { set +x
   46456 $as_echo "$at_srcdir/actions.at:1303: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y -Wnone -Werror"
   46457 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y -Wnone -Werror" "actions.at:1303"
   46458 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o input.c input.y -Wnone -Werror
   46459 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46460 at_status=$? at_failed=false
   46461 $at_check_filter
   46462 at_fn_diff_devnull "$at_stderr" || at_failed=:
   46463 $at_diff expout "$at_stdout" || at_failed=:
   46464 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1303"
   46465 $at_failed && at_fn_log_failure
   46466 $at_traceon; }
   46467 
   46468   { set +x
   46469 $as_echo "$at_srcdir/actions.at:1303: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y --warnings=none -Werror"
   46470 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y --warnings=none -Werror" "actions.at:1303"
   46471 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o input.c input.y --warnings=none -Werror
   46472 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46473 at_status=$? at_failed=false
   46474 $at_check_filter
   46475 at_fn_diff_devnull "$at_stderr" || at_failed=:
   46476 $at_diff expout "$at_stdout" || at_failed=:
   46477 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1303"
   46478 $at_failed && at_fn_log_failure
   46479 $at_traceon; }
   46480 
   46481 
   46482   at_restore_special_files
   46483 fi
   46484 
   46485 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   46486   at_save_special_files
   46487   mkdir xml-tests
   46488     # Don't combine these Bison invocations since we want to be sure that
   46489   # --report=all isn't required to get the full XML file.
   46490   { set +x
   46491 $as_echo "$at_srcdir/actions.at:1308: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   46492                   --graph=xml-tests/test.dot -fcaret -o input.c input.y"
   46493 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1308"
   46494 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   46495                   --graph=xml-tests/test.dot -fcaret -o input.c input.y
   46496 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46497 at_status=$? at_failed=false
   46498 $at_check_filter
   46499 echo stderr:; cat "$at_stderr"
   46500 echo stdout:; cat "$at_stdout"
   46501 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1308"
   46502 $at_failed && at_fn_log_failure
   46503 $at_traceon; }
   46504 
   46505   { set +x
   46506 $as_echo "$at_srcdir/actions.at:1308: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -fcaret -o input.c input.y"
   46507 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -fcaret -o input.c input.y" "actions.at:1308"
   46508 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -fcaret -o input.c input.y
   46509 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46510 at_status=$? at_failed=false
   46511 $at_check_filter
   46512 echo stderr:; cat "$at_stderr"
   46513 echo stdout:; cat "$at_stdout"
   46514 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1308"
   46515 $at_failed && at_fn_log_failure
   46516 $at_traceon; }
   46517 
   46518     cp xml-tests/test.output expout
   46519   { set +x
   46520 $as_echo "$at_srcdir/actions.at:1308: \$XSLTPROC \\
   46521              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   46522              xml-tests/test.xml"
   46523 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1308"
   46524 ( $at_check_trace; $XSLTPROC \
   46525              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   46526              xml-tests/test.xml
   46527 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46528 at_status=$? at_failed=false
   46529 $at_check_filter
   46530 at_fn_diff_devnull "$at_stderr" || at_failed=:
   46531 $at_diff expout "$at_stdout" || at_failed=:
   46532 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1308"
   46533 $at_failed && at_fn_log_failure
   46534 $at_traceon; }
   46535 
   46536   sort xml-tests/test.dot > expout
   46537   { set +x
   46538 $as_echo "$at_srcdir/actions.at:1308: \$XSLTPROC \\
   46539              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   46540              xml-tests/test.xml | sort"
   46541 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1308"
   46542 ( $at_check_trace; $XSLTPROC \
   46543              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   46544              xml-tests/test.xml | sort
   46545 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46546 at_status=$? at_failed=false
   46547 $at_check_filter
   46548 at_fn_diff_devnull "$at_stderr" || at_failed=:
   46549 $at_diff expout "$at_stdout" || at_failed=:
   46550 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1308"
   46551 $at_failed && at_fn_log_failure
   46552 $at_traceon; }
   46553 
   46554   rm -rf xml-tests expout
   46555   at_restore_special_files
   46556 fi
   46557 { set +x
   46558 $as_echo "$at_srcdir/actions.at:1308: bison -fcaret -o input.c input.y"
   46559 at_fn_check_prepare_trace "actions.at:1308"
   46560 ( $at_check_trace; bison -fcaret -o input.c input.y
   46561 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46562 at_status=$? at_failed=false
   46563 $at_check_filter
   46564 echo >>"$at_stderr"; $as_echo "input.y:33.3-23: warning: unset value: \$\$
   46565    {           @\$ = 4; } // Only used.
   46566    ^^^^^^^^^^^^^^^^^^^^^
   46567 input.y:32.3-23: warning: unused value: \$3
   46568    { USE (\$\$); @\$ = 3; } // Only set.
   46569    ^^^^^^^^^^^^^^^^^^^^^
   46570 " | \
   46571   $at_diff - "$at_stderr" || at_failed=:
   46572 at_fn_diff_devnull "$at_stdout" || at_failed=:
   46573 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1308"
   46574 $at_failed && at_fn_log_failure
   46575 $at_traceon; }
   46576 
   46577 # Defining POSIXLY_CORRECT causes bison to complain if options are
   46578 # added after the grammar file name, so skip these checks in that
   46579 # case.
   46580 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   46581   at_save_special_files
   46582 
   46583   # To avoid expanding it repeatedly, store specified stdout.
   46584   : >expout
   46585 
   46586   # Run with -Werror.
   46587   { set +x
   46588 $as_echo "$at_srcdir/actions.at:1308: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y -Werror"
   46589 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y -Werror" "actions.at:1308"
   46590 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y -Werror
   46591 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46592 at_status=$? at_failed=false
   46593 $at_check_filter
   46594 echo stderr:; tee stderr <"$at_stderr"
   46595 $at_diff expout "$at_stdout" || at_failed=:
   46596 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:1308"
   46597 $at_failed && at_fn_log_failure
   46598 $at_traceon; }
   46599 
   46600 
   46601   # Build expected stderr up to and including the "warnings being
   46602   # treated as errors" message.
   46603   cat >at-bison-check-warnings <<'_ATEOF'
   46604 input.y:33.3-23: warning: unset value: $$
   46605    {           @$ = 4; } // Only used.
   46606    ^^^^^^^^^^^^^^^^^^^^^
   46607 input.y:32.3-23: warning: unused value: $3
   46608    { USE ($$); @$ = 3; } // Only set.
   46609    ^^^^^^^^^^^^^^^^^^^^^
   46610 _ATEOF
   46611 
   46612   at_bison_check_first=`sed -n \
   46613     '/: warning: /{=;q;}' at-bison-check-warnings`
   46614   : ${at_bison_check_first:=1}
   46615   at_bison_check_first_tmp=`sed -n \
   46616     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   46617   : ${at_bison_check_first_tmp:=1}
   46618   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   46619     at_bison_check_first=$at_bison_check_first_tmp
   46620   fi
   46621   if test $at_bison_check_first -gt 1; then
   46622     sed -n "1,`expr $at_bison_check_first - 1`"p \
   46623       at-bison-check-warnings > experr
   46624   fi
   46625   echo 'bison: warnings being treated as errors' >> experr
   46626 
   46627   # Finish building expected stderr and check.  Unlike warnings,
   46628   # complaints cause bison to exit early.  Thus, with -Werror, bison
   46629   # does not necessarily report all warnings that it does without
   46630   # -Werror, but it at least reports one.
   46631   at_bison_check_last=`sed -n '$=' stderr`
   46632   : ${at_bison_check_last:=1}
   46633   at_bison_check_last=`expr $at_bison_check_last - 1`
   46634   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   46635     at-bison-check-warnings >> experr
   46636   { set +x
   46637 $as_echo "$at_srcdir/actions.at:1308: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   46638               stderr 1>&2"
   46639 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1308"
   46640 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   46641               stderr 1>&2
   46642 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46643 at_status=$? at_failed=false
   46644 $at_check_filter
   46645 $at_diff experr "$at_stderr" || at_failed=:
   46646 at_fn_diff_devnull "$at_stdout" || at_failed=:
   46647 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1308"
   46648 $at_failed && at_fn_log_failure
   46649 $at_traceon; }
   46650 
   46651 
   46652   # Now check --warnings=error.
   46653   cp stderr experr
   46654   { set +x
   46655 $as_echo "$at_srcdir/actions.at:1308: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y --warnings=error"
   46656 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y --warnings=error" "actions.at:1308"
   46657 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y --warnings=error
   46658 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46659 at_status=$? at_failed=false
   46660 $at_check_filter
   46661 $at_diff experr "$at_stderr" || at_failed=:
   46662 $at_diff expout "$at_stdout" || at_failed=:
   46663 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:1308"
   46664 $at_failed && at_fn_log_failure
   46665 $at_traceon; }
   46666 
   46667 
   46668   # Now check -Wnone and --warnings=none by making sure that
   46669   # -Werror doesn't change the exit status when -Wnone or
   46670   # --warnings=none is specified.
   46671   { set +x
   46672 $as_echo "$at_srcdir/actions.at:1308: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y -Wnone -Werror"
   46673 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y -Wnone -Werror" "actions.at:1308"
   46674 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y -Wnone -Werror
   46675 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46676 at_status=$? at_failed=false
   46677 $at_check_filter
   46678 at_fn_diff_devnull "$at_stderr" || at_failed=:
   46679 $at_diff expout "$at_stdout" || at_failed=:
   46680 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1308"
   46681 $at_failed && at_fn_log_failure
   46682 $at_traceon; }
   46683 
   46684   { set +x
   46685 $as_echo "$at_srcdir/actions.at:1308: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y --warnings=none -Werror"
   46686 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y --warnings=none -Werror" "actions.at:1308"
   46687 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y --warnings=none -Werror
   46688 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46689 at_status=$? at_failed=false
   46690 $at_check_filter
   46691 at_fn_diff_devnull "$at_stderr" || at_failed=:
   46692 $at_diff expout "$at_stdout" || at_failed=:
   46693 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1308"
   46694 $at_failed && at_fn_log_failure
   46695 $at_traceon; }
   46696 
   46697 
   46698   at_restore_special_files
   46699 fi
   46700 
   46701 { set +x
   46702 $as_echo "$at_srcdir/actions.at:1317: \$BISON_C_WORKS"
   46703 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:1317"
   46704 ( $at_check_trace; $BISON_C_WORKS
   46705 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46706 at_status=$? at_failed=false
   46707 $at_check_filter
   46708 echo stderr:; cat "$at_stderr"
   46709 echo stdout:; cat "$at_stdout"
   46710 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1317"
   46711 $at_failed && at_fn_log_failure
   46712 $at_traceon; }
   46713 
   46714 { set +x
   46715 $as_echo "$at_srcdir/actions.at:1317: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   46716 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:1317"
   46717 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   46718 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46719 at_status=$? at_failed=false
   46720 $at_check_filter
   46721 echo stderr:; cat "$at_stderr"
   46722 echo stdout:; cat "$at_stdout"
   46723 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1317"
   46724 $at_failed && at_fn_log_failure
   46725 $at_traceon; }
   46726 
   46727 { set +x
   46728 $as_echo "$at_srcdir/actions.at:1318:  \$PREPARSER ./input"
   46729 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:1318"
   46730 ( $at_check_trace;  $PREPARSER ./input
   46731 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46732 at_status=$? at_failed=false
   46733 $at_check_filter
   46734 echo stderr:; tee stderr <"$at_stderr"
   46735 at_fn_diff_devnull "$at_stdout" || at_failed=:
   46736 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:1318"
   46737 $at_failed && at_fn_log_failure
   46738 $at_traceon; }
   46739 
   46740 { set +x
   46741 $as_echo "$at_srcdir/actions.at:1318: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   46742 at_fn_check_prepare_trace "actions.at:1318"
   46743 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   46744 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46745 at_status=$? at_failed=false
   46746 $at_check_filter
   46747 echo >>"$at_stderr"; $as_echo "Starting parse
   46748 Entering state 0
   46749 Reducing stack by rule 1 (line 30):
   46750 -> \$\$ = nterm \$@1 (: )
   46751 Stack now 0
   46752 Entering state 2
   46753 Reducing stack by rule 2 (line 31):
   46754 -> \$\$ = nterm @2 (: 2)
   46755 Stack now 0 2
   46756 Entering state 4
   46757 Reducing stack by rule 3 (line 32):
   46758 -> \$\$ = nterm @3 (: 3)
   46759 Stack now 0 2 4
   46760 Entering state 5
   46761 Reducing stack by rule 4 (line 33):
   46762 -> \$\$ = nterm @4 (: 4)
   46763 Stack now 0 2 4 5
   46764 Entering state 6
   46765 Reading a token: Now at end of input.
   46766 syntax error
   46767 Error: popping nterm @4 (: 4)
   46768 DESTROY 4
   46769 Stack now 0 2 4 5
   46770 Error: popping nterm @3 (: 3)
   46771 DESTROY 3
   46772 Stack now 0 2 4
   46773 Error: popping nterm @2 (: 2)
   46774 DESTROY 2
   46775 Stack now 0 2
   46776 Error: popping nterm \$@1 (: )
   46777 Stack now 0
   46778 Cleanup: discarding lookahead token \$end (: )
   46779 Stack now 0
   46780 " | \
   46781   $at_diff - "$at_stderr" || at_failed=:
   46782 at_fn_diff_devnull "$at_stdout" || at_failed=:
   46783 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1318"
   46784 $at_failed && at_fn_log_failure
   46785 $at_traceon; }
   46786 
   46787 
   46788 
   46789   set +x
   46790   $at_times_p && times >"$at_times_file"
   46791 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   46792 read at_status <"$at_status_file"
   46793 #AT_STOP_170
   46794 #AT_START_171
   46795 at_fn_group_banner 171 'actions.at:1406' \
   46796   "@\$ in %initial-action implies %locations" "       " 9
   46797 at_xfail=no
   46798 (
   46799   $as_echo "171. $at_setup_line: testing $at_desc ..."
   46800   $at_traceon
   46801 
   46802 
   46803 cat >input.y <<'_ATEOF'
   46804 %code top {
   46805 #include <config.h>
   46806 /* We don't need perfect functions for these tests. */
   46807 #undef malloc
   46808 #undef memcmp
   46809 #undef realloc
   46810 }
   46811 
   46812 %code {
   46813   #include <stdio.h>
   46814 static void yyerror ( const char *msg);
   46815 static int yylex (void);
   46816 }
   46817 
   46818 %debug
   46819 
   46820 %initial-action {
   46821   fprintf (stderr, "%d\n", @$.first_line);
   46822 }
   46823 
   46824 %%
   46825 
   46826 start:  ;
   46827 
   46828 %%
   46829 
   46830 static int
   46831 yylex (void)
   46832 {
   46833   return 0;
   46834 }
   46835 
   46836 #include <stdio.h>
   46837 /* A C error reporting function.  */
   46838 static
   46839 void yyerror ( const char *msg)
   46840 {
   46841   fprintf (stderr, "%s\n", msg);
   46842 }
   46843 int
   46844 main (void)
   46845 {
   46846   return yyparse ();
   46847 }
   46848 _ATEOF
   46849 
   46850 
   46851 
   46852 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   46853   at_save_special_files
   46854   mkdir xml-tests
   46855     # Don't combine these Bison invocations since we want to be sure that
   46856   # --report=all isn't required to get the full XML file.
   46857   { set +x
   46858 $as_echo "$at_srcdir/actions.at:1406: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   46859                   --graph=xml-tests/test.dot -o input.c input.y"
   46860 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1406"
   46861 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   46862                   --graph=xml-tests/test.dot -o input.c input.y
   46863 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46864 at_status=$? at_failed=false
   46865 $at_check_filter
   46866 echo stderr:; cat "$at_stderr"
   46867 echo stdout:; cat "$at_stdout"
   46868 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1406"
   46869 $at_failed && at_fn_log_failure
   46870 $at_traceon; }
   46871 
   46872   { set +x
   46873 $as_echo "$at_srcdir/actions.at:1406: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   46874 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:1406"
   46875 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   46876 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46877 at_status=$? at_failed=false
   46878 $at_check_filter
   46879 echo stderr:; cat "$at_stderr"
   46880 echo stdout:; cat "$at_stdout"
   46881 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1406"
   46882 $at_failed && at_fn_log_failure
   46883 $at_traceon; }
   46884 
   46885     cp xml-tests/test.output expout
   46886   { set +x
   46887 $as_echo "$at_srcdir/actions.at:1406: \$XSLTPROC \\
   46888              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   46889              xml-tests/test.xml"
   46890 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1406"
   46891 ( $at_check_trace; $XSLTPROC \
   46892              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   46893              xml-tests/test.xml
   46894 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46895 at_status=$? at_failed=false
   46896 $at_check_filter
   46897 at_fn_diff_devnull "$at_stderr" || at_failed=:
   46898 $at_diff expout "$at_stdout" || at_failed=:
   46899 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1406"
   46900 $at_failed && at_fn_log_failure
   46901 $at_traceon; }
   46902 
   46903   sort xml-tests/test.dot > expout
   46904   { set +x
   46905 $as_echo "$at_srcdir/actions.at:1406: \$XSLTPROC \\
   46906              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   46907              xml-tests/test.xml | sort"
   46908 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1406"
   46909 ( $at_check_trace; $XSLTPROC \
   46910              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   46911              xml-tests/test.xml | sort
   46912 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46913 at_status=$? at_failed=false
   46914 $at_check_filter
   46915 at_fn_diff_devnull "$at_stderr" || at_failed=:
   46916 $at_diff expout "$at_stdout" || at_failed=:
   46917 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1406"
   46918 $at_failed && at_fn_log_failure
   46919 $at_traceon; }
   46920 
   46921   rm -rf xml-tests expout
   46922   at_restore_special_files
   46923 fi
   46924 { set +x
   46925 $as_echo "$at_srcdir/actions.at:1406: bison -o input.c input.y"
   46926 at_fn_check_prepare_trace "actions.at:1406"
   46927 ( $at_check_trace; bison -o input.c input.y
   46928 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46929 at_status=$? at_failed=false
   46930 $at_check_filter
   46931 at_fn_diff_devnull "$at_stderr" || at_failed=:
   46932 at_fn_diff_devnull "$at_stdout" || at_failed=:
   46933 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1406"
   46934 $at_failed && at_fn_log_failure
   46935 $at_traceon; }
   46936 
   46937 
   46938 { set +x
   46939 $as_echo "$at_srcdir/actions.at:1406: \$BISON_C_WORKS"
   46940 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:1406"
   46941 ( $at_check_trace; $BISON_C_WORKS
   46942 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46943 at_status=$? at_failed=false
   46944 $at_check_filter
   46945 echo stderr:; cat "$at_stderr"
   46946 echo stdout:; cat "$at_stdout"
   46947 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1406"
   46948 $at_failed && at_fn_log_failure
   46949 $at_traceon; }
   46950 
   46951 { set +x
   46952 $as_echo "$at_srcdir/actions.at:1406: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   46953 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:1406"
   46954 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   46955 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   46956 at_status=$? at_failed=false
   46957 $at_check_filter
   46958 echo stderr:; cat "$at_stderr"
   46959 echo stdout:; cat "$at_stdout"
   46960 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1406"
   46961 $at_failed && at_fn_log_failure
   46962 $at_traceon; }
   46963 
   46964 
   46965   set +x
   46966   $at_times_p && times >"$at_times_file"
   46967 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   46968 read at_status <"$at_status_file"
   46969 #AT_STOP_171
   46970 #AT_START_172
   46971 at_fn_group_banner 172 'actions.at:1407' \
   46972   "@\$ in %destructor implies %locations" "           " 9
   46973 at_xfail=no
   46974 (
   46975   $as_echo "172. $at_setup_line: testing $at_desc ..."
   46976   $at_traceon
   46977 
   46978 
   46979 cat >input.y <<'_ATEOF'
   46980 %code top {
   46981 #include <config.h>
   46982 /* We don't need perfect functions for these tests. */
   46983 #undef malloc
   46984 #undef memcmp
   46985 #undef realloc
   46986 }
   46987 
   46988 %code {
   46989   #include <stdio.h>
   46990 static void yyerror ( const char *msg);
   46991 static int yylex (void);
   46992 }
   46993 
   46994 %debug
   46995 
   46996 %destructor {
   46997   fprintf (stderr, "%d\n", @$.first_line);
   46998 } start
   46999 
   47000 %%
   47001 
   47002 start:  ;
   47003 
   47004 %%
   47005 
   47006 static int
   47007 yylex (void)
   47008 {
   47009   return 0;
   47010 }
   47011 
   47012 #include <stdio.h>
   47013 /* A C error reporting function.  */
   47014 static
   47015 void yyerror ( const char *msg)
   47016 {
   47017   fprintf (stderr, "%s\n", msg);
   47018 }
   47019 int
   47020 main (void)
   47021 {
   47022   return yyparse ();
   47023 }
   47024 _ATEOF
   47025 
   47026 
   47027 
   47028 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   47029   at_save_special_files
   47030   mkdir xml-tests
   47031     # Don't combine these Bison invocations since we want to be sure that
   47032   # --report=all isn't required to get the full XML file.
   47033   { set +x
   47034 $as_echo "$at_srcdir/actions.at:1407: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   47035                   --graph=xml-tests/test.dot -o input.c input.y"
   47036 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1407"
   47037 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   47038                   --graph=xml-tests/test.dot -o input.c input.y
   47039 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47040 at_status=$? at_failed=false
   47041 $at_check_filter
   47042 echo stderr:; cat "$at_stderr"
   47043 echo stdout:; cat "$at_stdout"
   47044 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1407"
   47045 $at_failed && at_fn_log_failure
   47046 $at_traceon; }
   47047 
   47048   { set +x
   47049 $as_echo "$at_srcdir/actions.at:1407: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   47050 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:1407"
   47051 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   47052 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47053 at_status=$? at_failed=false
   47054 $at_check_filter
   47055 echo stderr:; cat "$at_stderr"
   47056 echo stdout:; cat "$at_stdout"
   47057 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1407"
   47058 $at_failed && at_fn_log_failure
   47059 $at_traceon; }
   47060 
   47061     cp xml-tests/test.output expout
   47062   { set +x
   47063 $as_echo "$at_srcdir/actions.at:1407: \$XSLTPROC \\
   47064              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   47065              xml-tests/test.xml"
   47066 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1407"
   47067 ( $at_check_trace; $XSLTPROC \
   47068              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   47069              xml-tests/test.xml
   47070 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47071 at_status=$? at_failed=false
   47072 $at_check_filter
   47073 at_fn_diff_devnull "$at_stderr" || at_failed=:
   47074 $at_diff expout "$at_stdout" || at_failed=:
   47075 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1407"
   47076 $at_failed && at_fn_log_failure
   47077 $at_traceon; }
   47078 
   47079   sort xml-tests/test.dot > expout
   47080   { set +x
   47081 $as_echo "$at_srcdir/actions.at:1407: \$XSLTPROC \\
   47082              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   47083              xml-tests/test.xml | sort"
   47084 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1407"
   47085 ( $at_check_trace; $XSLTPROC \
   47086              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   47087              xml-tests/test.xml | sort
   47088 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47089 at_status=$? at_failed=false
   47090 $at_check_filter
   47091 at_fn_diff_devnull "$at_stderr" || at_failed=:
   47092 $at_diff expout "$at_stdout" || at_failed=:
   47093 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1407"
   47094 $at_failed && at_fn_log_failure
   47095 $at_traceon; }
   47096 
   47097   rm -rf xml-tests expout
   47098   at_restore_special_files
   47099 fi
   47100 { set +x
   47101 $as_echo "$at_srcdir/actions.at:1407: bison -o input.c input.y"
   47102 at_fn_check_prepare_trace "actions.at:1407"
   47103 ( $at_check_trace; bison -o input.c input.y
   47104 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47105 at_status=$? at_failed=false
   47106 $at_check_filter
   47107 at_fn_diff_devnull "$at_stderr" || at_failed=:
   47108 at_fn_diff_devnull "$at_stdout" || at_failed=:
   47109 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1407"
   47110 $at_failed && at_fn_log_failure
   47111 $at_traceon; }
   47112 
   47113 
   47114 { set +x
   47115 $as_echo "$at_srcdir/actions.at:1407: \$BISON_C_WORKS"
   47116 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:1407"
   47117 ( $at_check_trace; $BISON_C_WORKS
   47118 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47119 at_status=$? at_failed=false
   47120 $at_check_filter
   47121 echo stderr:; cat "$at_stderr"
   47122 echo stdout:; cat "$at_stdout"
   47123 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1407"
   47124 $at_failed && at_fn_log_failure
   47125 $at_traceon; }
   47126 
   47127 { set +x
   47128 $as_echo "$at_srcdir/actions.at:1407: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   47129 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:1407"
   47130 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   47131 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47132 at_status=$? at_failed=false
   47133 $at_check_filter
   47134 echo stderr:; cat "$at_stderr"
   47135 echo stdout:; cat "$at_stdout"
   47136 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1407"
   47137 $at_failed && at_fn_log_failure
   47138 $at_traceon; }
   47139 
   47140 
   47141   set +x
   47142   $at_times_p && times >"$at_times_file"
   47143 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   47144 read at_status <"$at_status_file"
   47145 #AT_STOP_172
   47146 #AT_START_173
   47147 at_fn_group_banner 173 'actions.at:1408' \
   47148   "@\$ in %printer implies %locations" "              " 9
   47149 at_xfail=no
   47150 (
   47151   $as_echo "173. $at_setup_line: testing $at_desc ..."
   47152   $at_traceon
   47153 
   47154 
   47155 cat >input.y <<'_ATEOF'
   47156 %code top {
   47157 #include <config.h>
   47158 /* We don't need perfect functions for these tests. */
   47159 #undef malloc
   47160 #undef memcmp
   47161 #undef realloc
   47162 }
   47163 
   47164 %code {
   47165   #include <stdio.h>
   47166 static void yyerror ( const char *msg);
   47167 static int yylex (void);
   47168 }
   47169 
   47170 %debug
   47171 
   47172 %printer {
   47173   fprintf (stderr, "%d\n", @$.first_line);
   47174 } start
   47175 
   47176 %%
   47177 
   47178 start:  ;
   47179 
   47180 %%
   47181 
   47182 static int
   47183 yylex (void)
   47184 {
   47185   return 0;
   47186 }
   47187 
   47188 #include <stdio.h>
   47189 /* A C error reporting function.  */
   47190 static
   47191 void yyerror ( const char *msg)
   47192 {
   47193   fprintf (stderr, "%s\n", msg);
   47194 }
   47195 int
   47196 main (void)
   47197 {
   47198   return yyparse ();
   47199 }
   47200 _ATEOF
   47201 
   47202 
   47203 
   47204 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   47205   at_save_special_files
   47206   mkdir xml-tests
   47207     # Don't combine these Bison invocations since we want to be sure that
   47208   # --report=all isn't required to get the full XML file.
   47209   { set +x
   47210 $as_echo "$at_srcdir/actions.at:1408: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   47211                   --graph=xml-tests/test.dot -o input.c input.y"
   47212 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1408"
   47213 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   47214                   --graph=xml-tests/test.dot -o input.c input.y
   47215 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47216 at_status=$? at_failed=false
   47217 $at_check_filter
   47218 echo stderr:; cat "$at_stderr"
   47219 echo stdout:; cat "$at_stdout"
   47220 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1408"
   47221 $at_failed && at_fn_log_failure
   47222 $at_traceon; }
   47223 
   47224   { set +x
   47225 $as_echo "$at_srcdir/actions.at:1408: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   47226 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:1408"
   47227 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   47228 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47229 at_status=$? at_failed=false
   47230 $at_check_filter
   47231 echo stderr:; cat "$at_stderr"
   47232 echo stdout:; cat "$at_stdout"
   47233 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1408"
   47234 $at_failed && at_fn_log_failure
   47235 $at_traceon; }
   47236 
   47237     cp xml-tests/test.output expout
   47238   { set +x
   47239 $as_echo "$at_srcdir/actions.at:1408: \$XSLTPROC \\
   47240              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   47241              xml-tests/test.xml"
   47242 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1408"
   47243 ( $at_check_trace; $XSLTPROC \
   47244              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   47245              xml-tests/test.xml
   47246 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47247 at_status=$? at_failed=false
   47248 $at_check_filter
   47249 at_fn_diff_devnull "$at_stderr" || at_failed=:
   47250 $at_diff expout "$at_stdout" || at_failed=:
   47251 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1408"
   47252 $at_failed && at_fn_log_failure
   47253 $at_traceon; }
   47254 
   47255   sort xml-tests/test.dot > expout
   47256   { set +x
   47257 $as_echo "$at_srcdir/actions.at:1408: \$XSLTPROC \\
   47258              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   47259              xml-tests/test.xml | sort"
   47260 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1408"
   47261 ( $at_check_trace; $XSLTPROC \
   47262              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   47263              xml-tests/test.xml | sort
   47264 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47265 at_status=$? at_failed=false
   47266 $at_check_filter
   47267 at_fn_diff_devnull "$at_stderr" || at_failed=:
   47268 $at_diff expout "$at_stdout" || at_failed=:
   47269 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1408"
   47270 $at_failed && at_fn_log_failure
   47271 $at_traceon; }
   47272 
   47273   rm -rf xml-tests expout
   47274   at_restore_special_files
   47275 fi
   47276 { set +x
   47277 $as_echo "$at_srcdir/actions.at:1408: bison -o input.c input.y"
   47278 at_fn_check_prepare_trace "actions.at:1408"
   47279 ( $at_check_trace; bison -o input.c input.y
   47280 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47281 at_status=$? at_failed=false
   47282 $at_check_filter
   47283 at_fn_diff_devnull "$at_stderr" || at_failed=:
   47284 at_fn_diff_devnull "$at_stdout" || at_failed=:
   47285 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1408"
   47286 $at_failed && at_fn_log_failure
   47287 $at_traceon; }
   47288 
   47289 
   47290 { set +x
   47291 $as_echo "$at_srcdir/actions.at:1408: \$BISON_C_WORKS"
   47292 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:1408"
   47293 ( $at_check_trace; $BISON_C_WORKS
   47294 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47295 at_status=$? at_failed=false
   47296 $at_check_filter
   47297 echo stderr:; cat "$at_stderr"
   47298 echo stdout:; cat "$at_stdout"
   47299 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1408"
   47300 $at_failed && at_fn_log_failure
   47301 $at_traceon; }
   47302 
   47303 { set +x
   47304 $as_echo "$at_srcdir/actions.at:1408: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   47305 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:1408"
   47306 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   47307 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47308 at_status=$? at_failed=false
   47309 $at_check_filter
   47310 echo stderr:; cat "$at_stderr"
   47311 echo stdout:; cat "$at_stdout"
   47312 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1408"
   47313 $at_failed && at_fn_log_failure
   47314 $at_traceon; }
   47315 
   47316 
   47317   set +x
   47318   $at_times_p && times >"$at_times_file"
   47319 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   47320 read at_status <"$at_status_file"
   47321 #AT_STOP_173
   47322 #AT_START_174
   47323 at_fn_group_banner 174 'actions.at:1529' \
   47324   "Qualified \$\$ in actions: yacc.c" "                " 9
   47325 at_xfail=no
   47326 (
   47327   $as_echo "174. $at_setup_line: testing $at_desc ..."
   47328   $at_traceon
   47329 
   47330 
   47331 
   47332 
   47333 cat >input.y <<'_ATEOF'
   47334 %code top {
   47335 #include <config.h>
   47336 /* We don't need perfect functions for these tests. */
   47337 #undef malloc
   47338 #undef memcmp
   47339 #undef realloc
   47340 }
   47341 
   47342 %skeleton "yacc.c"
   47343 %defines   // FIXME: Mandated by lalr1.cc in Bison 2.6.
   47344 %locations // FIXME: Mandated by lalr1.cc in Bison 2.6.
   47345 %debug
   47346 %code requires
   47347 {
   47348   typedef struct sem_type
   47349   {
   47350     int ival;
   47351     float fval;
   47352   } sem_type;
   47353 
   47354 # define YYSTYPE sem_type
   47355 
   47356 
   47357 # include <stdio.h>
   47358   static void
   47359   report (FILE* yyo, int ival, float fval)
   47360   {
   47361     fprintf (yyo, "ival: %d, fval: %1.1f", ival, fval);
   47362   }
   47363 
   47364 }
   47365 
   47366 %code
   47367 {
   47368   static void yyerror ( const char *msg);
   47369   static int yylex (void);
   47370 }
   47371 
   47372 %token UNTYPED
   47373 %token <ival> INT
   47374 %type <fval> float
   47375 %printer { report (yyo, $$,       $<fval>$); } <ival>;
   47376 %printer { report (yyo, $<ival>$, $$      ); } <fval>;
   47377 %printer { report (yyo, $<ival>$, $<fval>$); } <>;
   47378 
   47379 %initial-action
   47380 {
   47381   $<ival>$ = 42;
   47382   $<fval>$ = 4.2;
   47383 }
   47384 
   47385 %%
   47386 float: UNTYPED INT
   47387 {
   47388   $$       = $<fval>1 + $<fval>2;
   47389   $<ival>$ = $<ival>1 + $2;
   47390 };
   47391 %%
   47392 #include <stdio.h>
   47393 /* A C error reporting function.  */
   47394 static
   47395 void yyerror ( const char *msg)
   47396 {
   47397   YY_LOCATION_PRINT (stderr, (yylloc));
   47398   fprintf (stderr, ": ");
   47399   fprintf (stderr, "%s\n", msg);
   47400 }
   47401 #include <assert.h>
   47402 static
   47403 int yylex (void)
   47404 {
   47405   static int const input[] = {UNTYPED, INT, EOF};
   47406   static size_t toknum = 0;
   47407   int res;
   47408   ;
   47409   assert (toknum < sizeof input / sizeof input[0]);
   47410   res = input[toknum++];
   47411   (yylval).ival = toknum * 10; (yylval).fval = toknum / 10.0;;
   47412   (yylloc).first_line = (yylloc).last_line = 1;
   47413   (yylloc).first_column = (yylloc).last_column = toknum;
   47414   return res;
   47415 }
   47416 int
   47417 main (void)
   47418 {
   47419   yydebug = 1;
   47420   return yyparse ();
   47421 }
   47422 _ATEOF
   47423 
   47424 
   47425 
   47426 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   47427   at_save_special_files
   47428   mkdir xml-tests
   47429     # Don't combine these Bison invocations since we want to be sure that
   47430   # --report=all isn't required to get the full XML file.
   47431   { set +x
   47432 $as_echo "$at_srcdir/actions.at:1529: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   47433                   --graph=xml-tests/test.dot -o input.c input.y"
   47434 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1529"
   47435 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   47436                   --graph=xml-tests/test.dot -o input.c input.y
   47437 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47438 at_status=$? at_failed=false
   47439 $at_check_filter
   47440 echo stderr:; cat "$at_stderr"
   47441 echo stdout:; cat "$at_stdout"
   47442 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1529"
   47443 $at_failed && at_fn_log_failure
   47444 $at_traceon; }
   47445 
   47446   { set +x
   47447 $as_echo "$at_srcdir/actions.at:1529: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   47448 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:1529"
   47449 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   47450 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47451 at_status=$? at_failed=false
   47452 $at_check_filter
   47453 echo stderr:; cat "$at_stderr"
   47454 echo stdout:; cat "$at_stdout"
   47455 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1529"
   47456 $at_failed && at_fn_log_failure
   47457 $at_traceon; }
   47458 
   47459     cp xml-tests/test.output expout
   47460   { set +x
   47461 $as_echo "$at_srcdir/actions.at:1529: \$XSLTPROC \\
   47462              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   47463              xml-tests/test.xml"
   47464 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1529"
   47465 ( $at_check_trace; $XSLTPROC \
   47466              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   47467              xml-tests/test.xml
   47468 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47469 at_status=$? at_failed=false
   47470 $at_check_filter
   47471 at_fn_diff_devnull "$at_stderr" || at_failed=:
   47472 $at_diff expout "$at_stdout" || at_failed=:
   47473 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1529"
   47474 $at_failed && at_fn_log_failure
   47475 $at_traceon; }
   47476 
   47477   sort xml-tests/test.dot > expout
   47478   { set +x
   47479 $as_echo "$at_srcdir/actions.at:1529: \$XSLTPROC \\
   47480              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   47481              xml-tests/test.xml | sort"
   47482 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1529"
   47483 ( $at_check_trace; $XSLTPROC \
   47484              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   47485              xml-tests/test.xml | sort
   47486 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47487 at_status=$? at_failed=false
   47488 $at_check_filter
   47489 at_fn_diff_devnull "$at_stderr" || at_failed=:
   47490 $at_diff expout "$at_stdout" || at_failed=:
   47491 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1529"
   47492 $at_failed && at_fn_log_failure
   47493 $at_traceon; }
   47494 
   47495   rm -rf xml-tests expout
   47496   at_restore_special_files
   47497 fi
   47498 { set +x
   47499 $as_echo "$at_srcdir/actions.at:1529: bison -o input.c input.y"
   47500 at_fn_check_prepare_trace "actions.at:1529"
   47501 ( $at_check_trace; bison -o input.c input.y
   47502 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47503 at_status=$? at_failed=false
   47504 $at_check_filter
   47505 at_fn_diff_devnull "$at_stderr" || at_failed=:
   47506 at_fn_diff_devnull "$at_stdout" || at_failed=:
   47507 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1529"
   47508 $at_failed && at_fn_log_failure
   47509 $at_traceon; }
   47510 
   47511 
   47512    { set +x
   47513 $as_echo "$at_srcdir/actions.at:1529: \$BISON_C_WORKS"
   47514 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:1529"
   47515 ( $at_check_trace; $BISON_C_WORKS
   47516 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47517 at_status=$? at_failed=false
   47518 $at_check_filter
   47519 echo stderr:; cat "$at_stderr"
   47520 echo stdout:; cat "$at_stdout"
   47521 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1529"
   47522 $at_failed && at_fn_log_failure
   47523 $at_traceon; }
   47524 
   47525 { set +x
   47526 $as_echo "$at_srcdir/actions.at:1529: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   47527 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:1529"
   47528 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   47529 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47530 at_status=$? at_failed=false
   47531 $at_check_filter
   47532 echo stderr:; cat "$at_stderr"
   47533 echo stdout:; cat "$at_stdout"
   47534 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1529"
   47535 $at_failed && at_fn_log_failure
   47536 $at_traceon; }
   47537 
   47538 
   47539 { set +x
   47540 $as_echo "$at_srcdir/actions.at:1529:  \$PREPARSER ./input"
   47541 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:1529"
   47542 ( $at_check_trace;  $PREPARSER ./input
   47543 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47544 at_status=$? at_failed=false
   47545 $at_check_filter
   47546 echo stderr:; tee stderr <"$at_stderr"
   47547 at_fn_diff_devnull "$at_stdout" || at_failed=:
   47548 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1529"
   47549 $at_failed && at_fn_log_failure
   47550 $at_traceon; }
   47551 
   47552 { set +x
   47553 $as_echo "$at_srcdir/actions.at:1529: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   47554 at_fn_check_prepare_trace "actions.at:1529"
   47555 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   47556 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47557 at_status=$? at_failed=false
   47558 $at_check_filter
   47559 echo stderr:; tee stderr <"$at_stderr"
   47560 at_fn_diff_devnull "$at_stdout" || at_failed=:
   47561 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1529"
   47562 $at_failed && at_fn_log_failure
   47563 $at_traceon; }
   47564 
   47565 
   47566 # Don't be too picky on the traces, GLR is not exactly the same.  Keep
   47567 # only the lines from the printer.
   47568 #
   47569 # Don't care about locations.  FIXME: remove their removal when Bison
   47570 # supports C++ without locations.
   47571 { set +x
   47572 $as_echo "$at_srcdir/actions.at:1529: sed -ne 's/([-0-9.]*: /(/;/ival:/p' stderr"
   47573 at_fn_check_prepare_trace "actions.at:1529"
   47574 ( $at_check_trace; sed -ne 's/([-0-9.]*: /(/;/ival:/p' stderr
   47575 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47576 at_status=$? at_failed=false
   47577 $at_check_filter
   47578 at_fn_diff_devnull "$at_stderr" || at_failed=:
   47579 echo >>"$at_stdout"; $as_echo "Reading a token: Next token is token UNTYPED (ival: 10, fval: 0.1)
   47580 Shifting token UNTYPED (ival: 10, fval: 0.1)
   47581 Reading a token: Next token is token INT (ival: 20, fval: 0.2)
   47582 Shifting token INT (ival: 20, fval: 0.2)
   47583    \$1 = token UNTYPED (ival: 10, fval: 0.1)
   47584    \$2 = token INT (ival: 20, fval: 0.2)
   47585 -> \$\$ = nterm float (ival: 30, fval: 0.3)
   47586 Cleanup: popping nterm float (ival: 30, fval: 0.3)
   47587 " | \
   47588   $at_diff - "$at_stdout" || at_failed=:
   47589 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1529"
   47590 $at_failed && at_fn_log_failure
   47591 $at_traceon; }
   47592 
   47593 
   47594 
   47595 
   47596   set +x
   47597   $at_times_p && times >"$at_times_file"
   47598 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   47599 read at_status <"$at_status_file"
   47600 #AT_STOP_174
   47601 #AT_START_175
   47602 at_fn_group_banner 175 'actions.at:1530' \
   47603   "Qualified \$\$ in actions: glr.c" "                 " 9
   47604 at_xfail=no
   47605 (
   47606   $as_echo "175. $at_setup_line: testing $at_desc ..."
   47607   $at_traceon
   47608 
   47609 
   47610 
   47611 
   47612 cat >input.y <<'_ATEOF'
   47613 %code top {
   47614 #include <config.h>
   47615 /* We don't need perfect functions for these tests. */
   47616 #undef malloc
   47617 #undef memcmp
   47618 #undef realloc
   47619 }
   47620 
   47621 %skeleton "glr.c"
   47622 %defines   // FIXME: Mandated by lalr1.cc in Bison 2.6.
   47623 %locations // FIXME: Mandated by lalr1.cc in Bison 2.6.
   47624 %debug
   47625 %code requires
   47626 {
   47627   typedef struct sem_type
   47628   {
   47629     int ival;
   47630     float fval;
   47631   } sem_type;
   47632 
   47633 # define YYSTYPE sem_type
   47634 
   47635 
   47636 # include <stdio.h>
   47637   static void
   47638   report (FILE* yyo, int ival, float fval)
   47639   {
   47640     fprintf (yyo, "ival: %d, fval: %1.1f", ival, fval);
   47641   }
   47642 
   47643 }
   47644 
   47645 %code
   47646 {
   47647   static void yyerror ( const char *msg);
   47648   static int yylex (void);
   47649 }
   47650 
   47651 %token UNTYPED
   47652 %token <ival> INT
   47653 %type <fval> float
   47654 %printer { report (yyo, $$,       $<fval>$); } <ival>;
   47655 %printer { report (yyo, $<ival>$, $$      ); } <fval>;
   47656 %printer { report (yyo, $<ival>$, $<fval>$); } <>;
   47657 
   47658 %initial-action
   47659 {
   47660   $<ival>$ = 42;
   47661   $<fval>$ = 4.2;
   47662 }
   47663 
   47664 %%
   47665 float: UNTYPED INT
   47666 {
   47667   $$       = $<fval>1 + $<fval>2;
   47668   $<ival>$ = $<ival>1 + $2;
   47669 };
   47670 %%
   47671 #include <stdio.h>
   47672 /* A C error reporting function.  */
   47673 static
   47674 void yyerror ( const char *msg)
   47675 {
   47676   YY_LOCATION_PRINT (stderr, (yylloc));
   47677   fprintf (stderr, ": ");
   47678   fprintf (stderr, "%s\n", msg);
   47679 }
   47680 #include <assert.h>
   47681 static
   47682 int yylex (void)
   47683 {
   47684   static int const input[] = {UNTYPED, INT, EOF};
   47685   static size_t toknum = 0;
   47686   int res;
   47687   ;
   47688   assert (toknum < sizeof input / sizeof input[0]);
   47689   res = input[toknum++];
   47690   (yylval).ival = toknum * 10; (yylval).fval = toknum / 10.0;;
   47691   (yylloc).first_line = (yylloc).last_line = 1;
   47692   (yylloc).first_column = (yylloc).last_column = toknum;
   47693   return res;
   47694 }
   47695 int
   47696 main (void)
   47697 {
   47698   yydebug = 1;
   47699   return yyparse ();
   47700 }
   47701 _ATEOF
   47702 
   47703 
   47704 
   47705 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   47706   at_save_special_files
   47707   mkdir xml-tests
   47708     # Don't combine these Bison invocations since we want to be sure that
   47709   # --report=all isn't required to get the full XML file.
   47710   { set +x
   47711 $as_echo "$at_srcdir/actions.at:1530: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   47712                   --graph=xml-tests/test.dot -o input.c input.y"
   47713 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1530"
   47714 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   47715                   --graph=xml-tests/test.dot -o input.c input.y
   47716 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47717 at_status=$? at_failed=false
   47718 $at_check_filter
   47719 echo stderr:; cat "$at_stderr"
   47720 echo stdout:; cat "$at_stdout"
   47721 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1530"
   47722 $at_failed && at_fn_log_failure
   47723 $at_traceon; }
   47724 
   47725   { set +x
   47726 $as_echo "$at_srcdir/actions.at:1530: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   47727 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:1530"
   47728 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   47729 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47730 at_status=$? at_failed=false
   47731 $at_check_filter
   47732 echo stderr:; cat "$at_stderr"
   47733 echo stdout:; cat "$at_stdout"
   47734 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1530"
   47735 $at_failed && at_fn_log_failure
   47736 $at_traceon; }
   47737 
   47738     cp xml-tests/test.output expout
   47739   { set +x
   47740 $as_echo "$at_srcdir/actions.at:1530: \$XSLTPROC \\
   47741              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   47742              xml-tests/test.xml"
   47743 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1530"
   47744 ( $at_check_trace; $XSLTPROC \
   47745              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   47746              xml-tests/test.xml
   47747 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47748 at_status=$? at_failed=false
   47749 $at_check_filter
   47750 at_fn_diff_devnull "$at_stderr" || at_failed=:
   47751 $at_diff expout "$at_stdout" || at_failed=:
   47752 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1530"
   47753 $at_failed && at_fn_log_failure
   47754 $at_traceon; }
   47755 
   47756   sort xml-tests/test.dot > expout
   47757   { set +x
   47758 $as_echo "$at_srcdir/actions.at:1530: \$XSLTPROC \\
   47759              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   47760              xml-tests/test.xml | sort"
   47761 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1530"
   47762 ( $at_check_trace; $XSLTPROC \
   47763              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   47764              xml-tests/test.xml | sort
   47765 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47766 at_status=$? at_failed=false
   47767 $at_check_filter
   47768 at_fn_diff_devnull "$at_stderr" || at_failed=:
   47769 $at_diff expout "$at_stdout" || at_failed=:
   47770 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1530"
   47771 $at_failed && at_fn_log_failure
   47772 $at_traceon; }
   47773 
   47774   rm -rf xml-tests expout
   47775   at_restore_special_files
   47776 fi
   47777 { set +x
   47778 $as_echo "$at_srcdir/actions.at:1530: bison -o input.c input.y"
   47779 at_fn_check_prepare_trace "actions.at:1530"
   47780 ( $at_check_trace; bison -o input.c input.y
   47781 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47782 at_status=$? at_failed=false
   47783 $at_check_filter
   47784 at_fn_diff_devnull "$at_stderr" || at_failed=:
   47785 at_fn_diff_devnull "$at_stdout" || at_failed=:
   47786 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1530"
   47787 $at_failed && at_fn_log_failure
   47788 $at_traceon; }
   47789 
   47790 
   47791    { set +x
   47792 $as_echo "$at_srcdir/actions.at:1530: \$BISON_C_WORKS"
   47793 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:1530"
   47794 ( $at_check_trace; $BISON_C_WORKS
   47795 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47796 at_status=$? at_failed=false
   47797 $at_check_filter
   47798 echo stderr:; cat "$at_stderr"
   47799 echo stdout:; cat "$at_stdout"
   47800 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1530"
   47801 $at_failed && at_fn_log_failure
   47802 $at_traceon; }
   47803 
   47804 { set +x
   47805 $as_echo "$at_srcdir/actions.at:1530: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   47806 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:1530"
   47807 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   47808 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47809 at_status=$? at_failed=false
   47810 $at_check_filter
   47811 echo stderr:; cat "$at_stderr"
   47812 echo stdout:; cat "$at_stdout"
   47813 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1530"
   47814 $at_failed && at_fn_log_failure
   47815 $at_traceon; }
   47816 
   47817 
   47818 { set +x
   47819 $as_echo "$at_srcdir/actions.at:1530:  \$PREPARSER ./input"
   47820 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:1530"
   47821 ( $at_check_trace;  $PREPARSER ./input
   47822 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47823 at_status=$? at_failed=false
   47824 $at_check_filter
   47825 echo stderr:; tee stderr <"$at_stderr"
   47826 at_fn_diff_devnull "$at_stdout" || at_failed=:
   47827 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1530"
   47828 $at_failed && at_fn_log_failure
   47829 $at_traceon; }
   47830 
   47831 { set +x
   47832 $as_echo "$at_srcdir/actions.at:1530: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   47833 at_fn_check_prepare_trace "actions.at:1530"
   47834 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   47835 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47836 at_status=$? at_failed=false
   47837 $at_check_filter
   47838 echo stderr:; tee stderr <"$at_stderr"
   47839 at_fn_diff_devnull "$at_stdout" || at_failed=:
   47840 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1530"
   47841 $at_failed && at_fn_log_failure
   47842 $at_traceon; }
   47843 
   47844 
   47845 # Don't be too picky on the traces, GLR is not exactly the same.  Keep
   47846 # only the lines from the printer.
   47847 #
   47848 # Don't care about locations.  FIXME: remove their removal when Bison
   47849 # supports C++ without locations.
   47850 { set +x
   47851 $as_echo "$at_srcdir/actions.at:1530: sed -ne 's/([-0-9.]*: /(/;/ival:/p' stderr"
   47852 at_fn_check_prepare_trace "actions.at:1530"
   47853 ( $at_check_trace; sed -ne 's/([-0-9.]*: /(/;/ival:/p' stderr
   47854 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47855 at_status=$? at_failed=false
   47856 $at_check_filter
   47857 at_fn_diff_devnull "$at_stderr" || at_failed=:
   47858 echo >>"$at_stdout"; $as_echo "Reading a token: Next token is token UNTYPED (ival: 10, fval: 0.1)
   47859 Shifting token UNTYPED (ival: 10, fval: 0.1)
   47860 Reading a token: Next token is token INT (ival: 20, fval: 0.2)
   47861 Shifting token INT (ival: 20, fval: 0.2)
   47862    \$1 = token UNTYPED (ival: 10, fval: 0.1)
   47863    \$2 = token INT (ival: 20, fval: 0.2)
   47864 -> \$\$ = nterm float (ival: 30, fval: 0.3)
   47865 Cleanup: popping nterm float (ival: 30, fval: 0.3)
   47866 " | \
   47867   $at_diff - "$at_stdout" || at_failed=:
   47868 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1530"
   47869 $at_failed && at_fn_log_failure
   47870 $at_traceon; }
   47871 
   47872 
   47873 
   47874 
   47875   set +x
   47876   $at_times_p && times >"$at_times_file"
   47877 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   47878 read at_status <"$at_status_file"
   47879 #AT_STOP_175
   47880 #AT_START_176
   47881 at_fn_group_banner 176 'actions.at:1531' \
   47882   "Qualified \$\$ in actions: lalr1.cc" "              " 9
   47883 at_xfail=no
   47884 (
   47885   $as_echo "176. $at_setup_line: testing $at_desc ..."
   47886   $at_traceon
   47887 
   47888 
   47889 
   47890 
   47891 cat >input.y <<'_ATEOF'
   47892 %code top {
   47893 #include <config.h>
   47894 /* We don't need perfect functions for these tests. */
   47895 #undef malloc
   47896 #undef memcmp
   47897 #undef realloc
   47898 }
   47899 
   47900 %skeleton "lalr1.cc"
   47901 %defines   // FIXME: Mandated by lalr1.cc in Bison 2.6.
   47902 %locations // FIXME: Mandated by lalr1.cc in Bison 2.6.
   47903 %debug
   47904 %code requires
   47905 {
   47906   typedef struct sem_type
   47907   {
   47908     int ival;
   47909     float fval;
   47910   } sem_type;
   47911 
   47912 # define YYSTYPE sem_type
   47913 
   47914 
   47915 # include <iostream>
   47916   static void
   47917   report (std::ostream& yyo, int ival, float fval)
   47918   {
   47919     yyo << "ival: " << ival << ", fval: " <<  fval;
   47920   }
   47921 
   47922 }
   47923 
   47924 %code
   47925 {
   47926 
   47927   static int yylex (yy::parser::semantic_type *lvalp, yy::parser::location_type *llocp);
   47928 }
   47929 
   47930 %token UNTYPED
   47931 %token <ival> INT
   47932 %type <fval> float
   47933 %printer { report (yyo, $$,       $<fval>$); } <ival>;
   47934 %printer { report (yyo, $<ival>$, $$      ); } <fval>;
   47935 %printer { report (yyo, $<ival>$, $<fval>$); } <>;
   47936 
   47937 %initial-action
   47938 {
   47939   $<ival>$ = 42;
   47940   $<fval>$ = 4.2;
   47941 }
   47942 
   47943 %%
   47944 float: UNTYPED INT
   47945 {
   47946   $$       = $<fval>1 + $<fval>2;
   47947   $<ival>$ = $<ival>1 + $2;
   47948 };
   47949 %%
   47950 /* A C++ error reporting function.  */
   47951 void
   47952 yy::parser::error (const location_type& l, const std::string& m)
   47953 {
   47954   (void) l;
   47955   std::cerr << l << ": " << m << std::endl;
   47956 }
   47957 #include <assert.h>
   47958 static
   47959 int yylex (yy::parser::semantic_type *lvalp, yy::parser::location_type *llocp)
   47960 {
   47961   static int const input[] = {yy::parser::token::UNTYPED,
   47962                                  yy::parser::token::INT,
   47963                                   EOF};
   47964   static size_t toknum = 0;
   47965   int res;
   47966   (void) lvalp;(void) llocp;
   47967   assert (toknum < sizeof input / sizeof input[0]);
   47968   res = input[toknum++];
   47969   (*lvalp).ival = toknum * 10; (*lvalp).fval = toknum / 10.0;;
   47970   (*llocp).begin.line = (*llocp).end.line = 1;
   47971   (*llocp).begin.column = (*llocp).end.column = toknum;
   47972   return res;
   47973 }
   47974 int
   47975 main (void)
   47976 {
   47977   yy::parser p;
   47978   p.set_debug_level(1);
   47979   return p.parse ();
   47980 }
   47981 _ATEOF
   47982 
   47983 
   47984 
   47985 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   47986   at_save_special_files
   47987   mkdir xml-tests
   47988     # Don't combine these Bison invocations since we want to be sure that
   47989   # --report=all isn't required to get the full XML file.
   47990   { set +x
   47991 $as_echo "$at_srcdir/actions.at:1531: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   47992                   --graph=xml-tests/test.dot -o input.cc input.y"
   47993 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1531"
   47994 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   47995                   --graph=xml-tests/test.dot -o input.cc input.y
   47996 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   47997 at_status=$? at_failed=false
   47998 $at_check_filter
   47999 echo stderr:; cat "$at_stderr"
   48000 echo stdout:; cat "$at_stdout"
   48001 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1531"
   48002 $at_failed && at_fn_log_failure
   48003 $at_traceon; }
   48004 
   48005   { set +x
   48006 $as_echo "$at_srcdir/actions.at:1531: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y"
   48007 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y" "actions.at:1531"
   48008 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y
   48009 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48010 at_status=$? at_failed=false
   48011 $at_check_filter
   48012 echo stderr:; cat "$at_stderr"
   48013 echo stdout:; cat "$at_stdout"
   48014 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1531"
   48015 $at_failed && at_fn_log_failure
   48016 $at_traceon; }
   48017 
   48018     cp xml-tests/test.output expout
   48019   { set +x
   48020 $as_echo "$at_srcdir/actions.at:1531: \$XSLTPROC \\
   48021              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   48022              xml-tests/test.xml"
   48023 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1531"
   48024 ( $at_check_trace; $XSLTPROC \
   48025              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   48026              xml-tests/test.xml
   48027 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48028 at_status=$? at_failed=false
   48029 $at_check_filter
   48030 at_fn_diff_devnull "$at_stderr" || at_failed=:
   48031 $at_diff expout "$at_stdout" || at_failed=:
   48032 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1531"
   48033 $at_failed && at_fn_log_failure
   48034 $at_traceon; }
   48035 
   48036   sort xml-tests/test.dot > expout
   48037   { set +x
   48038 $as_echo "$at_srcdir/actions.at:1531: \$XSLTPROC \\
   48039              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   48040              xml-tests/test.xml | sort"
   48041 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1531"
   48042 ( $at_check_trace; $XSLTPROC \
   48043              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   48044              xml-tests/test.xml | sort
   48045 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48046 at_status=$? at_failed=false
   48047 $at_check_filter
   48048 at_fn_diff_devnull "$at_stderr" || at_failed=:
   48049 $at_diff expout "$at_stdout" || at_failed=:
   48050 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1531"
   48051 $at_failed && at_fn_log_failure
   48052 $at_traceon; }
   48053 
   48054   rm -rf xml-tests expout
   48055   at_restore_special_files
   48056 fi
   48057 { set +x
   48058 $as_echo "$at_srcdir/actions.at:1531: bison -o input.cc input.y"
   48059 at_fn_check_prepare_trace "actions.at:1531"
   48060 ( $at_check_trace; bison -o input.cc input.y
   48061 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48062 at_status=$? at_failed=false
   48063 $at_check_filter
   48064 at_fn_diff_devnull "$at_stderr" || at_failed=:
   48065 at_fn_diff_devnull "$at_stdout" || at_failed=:
   48066 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1531"
   48067 $at_failed && at_fn_log_failure
   48068 $at_traceon; }
   48069 
   48070 
   48071 
   48072 { set +x
   48073 $as_echo "$at_srcdir/actions.at:1531: \$BISON_CXX_WORKS"
   48074 at_fn_check_prepare_dynamic "$BISON_CXX_WORKS" "actions.at:1531"
   48075 ( $at_check_trace; $BISON_CXX_WORKS
   48076 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48077 at_status=$? at_failed=false
   48078 $at_check_filter
   48079 echo stderr:; cat "$at_stderr"
   48080 echo stdout:; cat "$at_stdout"
   48081 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1531"
   48082 $at_failed && at_fn_log_failure
   48083 $at_traceon; }
   48084 
   48085 { set +x
   48086 $as_echo "$at_srcdir/actions.at:1531: \$CXX \$CXXFLAGS \$CPPFLAGS \$LDFLAGS -o input input.cc \$LIBS"
   48087 at_fn_check_prepare_dynamic "$CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS" "actions.at:1531"
   48088 ( $at_check_trace; $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS
   48089 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48090 at_status=$? at_failed=false
   48091 $at_check_filter
   48092 echo stderr:; cat "$at_stderr"
   48093 echo stdout:; cat "$at_stdout"
   48094 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1531"
   48095 $at_failed && at_fn_log_failure
   48096 $at_traceon; }
   48097 
   48098 
   48099 { set +x
   48100 $as_echo "$at_srcdir/actions.at:1531:  \$PREPARSER ./input"
   48101 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:1531"
   48102 ( $at_check_trace;  $PREPARSER ./input
   48103 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48104 at_status=$? at_failed=false
   48105 $at_check_filter
   48106 echo stderr:; tee stderr <"$at_stderr"
   48107 at_fn_diff_devnull "$at_stdout" || at_failed=:
   48108 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1531"
   48109 $at_failed && at_fn_log_failure
   48110 $at_traceon; }
   48111 
   48112 { set +x
   48113 $as_echo "$at_srcdir/actions.at:1531: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   48114 at_fn_check_prepare_trace "actions.at:1531"
   48115 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   48116 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48117 at_status=$? at_failed=false
   48118 $at_check_filter
   48119 echo stderr:; tee stderr <"$at_stderr"
   48120 at_fn_diff_devnull "$at_stdout" || at_failed=:
   48121 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1531"
   48122 $at_failed && at_fn_log_failure
   48123 $at_traceon; }
   48124 
   48125 
   48126 # Don't be too picky on the traces, GLR is not exactly the same.  Keep
   48127 # only the lines from the printer.
   48128 #
   48129 # Don't care about locations.  FIXME: remove their removal when Bison
   48130 # supports C++ without locations.
   48131 { set +x
   48132 $as_echo "$at_srcdir/actions.at:1531: sed -ne 's/([-0-9.]*: /(/;/ival:/p' stderr"
   48133 at_fn_check_prepare_trace "actions.at:1531"
   48134 ( $at_check_trace; sed -ne 's/([-0-9.]*: /(/;/ival:/p' stderr
   48135 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48136 at_status=$? at_failed=false
   48137 $at_check_filter
   48138 at_fn_diff_devnull "$at_stderr" || at_failed=:
   48139 echo >>"$at_stdout"; $as_echo "Reading a token: Next token is token UNTYPED (ival: 10, fval: 0.1)
   48140 Shifting token UNTYPED (ival: 10, fval: 0.1)
   48141 Reading a token: Next token is token INT (ival: 20, fval: 0.2)
   48142 Shifting token INT (ival: 20, fval: 0.2)
   48143    \$1 = token UNTYPED (ival: 10, fval: 0.1)
   48144    \$2 = token INT (ival: 20, fval: 0.2)
   48145 -> \$\$ = nterm float (ival: 30, fval: 0.3)
   48146 Cleanup: popping nterm float (ival: 30, fval: 0.3)
   48147 " | \
   48148   $at_diff - "$at_stdout" || at_failed=:
   48149 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1531"
   48150 $at_failed && at_fn_log_failure
   48151 $at_traceon; }
   48152 
   48153 
   48154 
   48155 
   48156   set +x
   48157   $at_times_p && times >"$at_times_file"
   48158 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   48159 read at_status <"$at_status_file"
   48160 #AT_STOP_176
   48161 #AT_START_177
   48162 at_fn_group_banner 177 'actions.at:1532' \
   48163   "Qualified \$\$ in actions: glr.cc" "                " 9
   48164 at_xfail=no
   48165 (
   48166   $as_echo "177. $at_setup_line: testing $at_desc ..."
   48167   $at_traceon
   48168 
   48169 
   48170 
   48171 
   48172 cat >input.y <<'_ATEOF'
   48173 %code top {
   48174 #include <config.h>
   48175 /* We don't need perfect functions for these tests. */
   48176 #undef malloc
   48177 #undef memcmp
   48178 #undef realloc
   48179 }
   48180 
   48181 %skeleton "glr.cc"
   48182 %defines   // FIXME: Mandated by lalr1.cc in Bison 2.6.
   48183 %locations // FIXME: Mandated by lalr1.cc in Bison 2.6.
   48184 %debug
   48185 %code requires
   48186 {
   48187   typedef struct sem_type
   48188   {
   48189     int ival;
   48190     float fval;
   48191   } sem_type;
   48192 
   48193 # define YYSTYPE sem_type
   48194 
   48195 
   48196 # include <iostream>
   48197   static void
   48198   report (std::ostream& yyo, int ival, float fval)
   48199   {
   48200     yyo << "ival: " << ival << ", fval: " <<  fval;
   48201   }
   48202 
   48203 }
   48204 
   48205 %code
   48206 {
   48207 
   48208   static int yylex (yy::parser::semantic_type *lvalp, yy::parser::location_type *llocp);
   48209 }
   48210 
   48211 %token UNTYPED
   48212 %token <ival> INT
   48213 %type <fval> float
   48214 %printer { report (yyo, $$,       $<fval>$); } <ival>;
   48215 %printer { report (yyo, $<ival>$, $$      ); } <fval>;
   48216 %printer { report (yyo, $<ival>$, $<fval>$); } <>;
   48217 
   48218 %initial-action
   48219 {
   48220   $<ival>$ = 42;
   48221   $<fval>$ = 4.2;
   48222 }
   48223 
   48224 %%
   48225 float: UNTYPED INT
   48226 {
   48227   $$       = $<fval>1 + $<fval>2;
   48228   $<ival>$ = $<ival>1 + $2;
   48229 };
   48230 %%
   48231 /* A C++ error reporting function.  */
   48232 void
   48233 yy::parser::error (const location_type& l, const std::string& m)
   48234 {
   48235   (void) l;
   48236   std::cerr << l << ": " << m << std::endl;
   48237 }
   48238 #include <assert.h>
   48239 static
   48240 int yylex (yy::parser::semantic_type *lvalp, yy::parser::location_type *llocp)
   48241 {
   48242   static int const input[] = {yy::parser::token::UNTYPED,
   48243                                  yy::parser::token::INT,
   48244                                   EOF};
   48245   static size_t toknum = 0;
   48246   int res;
   48247   (void) lvalp;(void) llocp;
   48248   assert (toknum < sizeof input / sizeof input[0]);
   48249   res = input[toknum++];
   48250   (*lvalp).ival = toknum * 10; (*lvalp).fval = toknum / 10.0;;
   48251   (*llocp).begin.line = (*llocp).end.line = 1;
   48252   (*llocp).begin.column = (*llocp).end.column = toknum;
   48253   return res;
   48254 }
   48255 int
   48256 main (void)
   48257 {
   48258   yy::parser p;
   48259   p.set_debug_level(1);
   48260   return p.parse ();
   48261 }
   48262 _ATEOF
   48263 
   48264 
   48265 
   48266 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   48267   at_save_special_files
   48268   mkdir xml-tests
   48269     # Don't combine these Bison invocations since we want to be sure that
   48270   # --report=all isn't required to get the full XML file.
   48271   { set +x
   48272 $as_echo "$at_srcdir/actions.at:1532: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   48273                   --graph=xml-tests/test.dot -o input.cc input.y"
   48274 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1532"
   48275 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   48276                   --graph=xml-tests/test.dot -o input.cc input.y
   48277 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48278 at_status=$? at_failed=false
   48279 $at_check_filter
   48280 echo stderr:; cat "$at_stderr"
   48281 echo stdout:; cat "$at_stdout"
   48282 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1532"
   48283 $at_failed && at_fn_log_failure
   48284 $at_traceon; }
   48285 
   48286   { set +x
   48287 $as_echo "$at_srcdir/actions.at:1532: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y"
   48288 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y" "actions.at:1532"
   48289 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y
   48290 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48291 at_status=$? at_failed=false
   48292 $at_check_filter
   48293 echo stderr:; cat "$at_stderr"
   48294 echo stdout:; cat "$at_stdout"
   48295 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1532"
   48296 $at_failed && at_fn_log_failure
   48297 $at_traceon; }
   48298 
   48299     cp xml-tests/test.output expout
   48300   { set +x
   48301 $as_echo "$at_srcdir/actions.at:1532: \$XSLTPROC \\
   48302              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   48303              xml-tests/test.xml"
   48304 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1532"
   48305 ( $at_check_trace; $XSLTPROC \
   48306              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   48307              xml-tests/test.xml
   48308 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48309 at_status=$? at_failed=false
   48310 $at_check_filter
   48311 at_fn_diff_devnull "$at_stderr" || at_failed=:
   48312 $at_diff expout "$at_stdout" || at_failed=:
   48313 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1532"
   48314 $at_failed && at_fn_log_failure
   48315 $at_traceon; }
   48316 
   48317   sort xml-tests/test.dot > expout
   48318   { set +x
   48319 $as_echo "$at_srcdir/actions.at:1532: \$XSLTPROC \\
   48320              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   48321              xml-tests/test.xml | sort"
   48322 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1532"
   48323 ( $at_check_trace; $XSLTPROC \
   48324              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   48325              xml-tests/test.xml | sort
   48326 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48327 at_status=$? at_failed=false
   48328 $at_check_filter
   48329 at_fn_diff_devnull "$at_stderr" || at_failed=:
   48330 $at_diff expout "$at_stdout" || at_failed=:
   48331 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1532"
   48332 $at_failed && at_fn_log_failure
   48333 $at_traceon; }
   48334 
   48335   rm -rf xml-tests expout
   48336   at_restore_special_files
   48337 fi
   48338 { set +x
   48339 $as_echo "$at_srcdir/actions.at:1532: bison -o input.cc input.y"
   48340 at_fn_check_prepare_trace "actions.at:1532"
   48341 ( $at_check_trace; bison -o input.cc input.y
   48342 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48343 at_status=$? at_failed=false
   48344 $at_check_filter
   48345 at_fn_diff_devnull "$at_stderr" || at_failed=:
   48346 at_fn_diff_devnull "$at_stdout" || at_failed=:
   48347 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1532"
   48348 $at_failed && at_fn_log_failure
   48349 $at_traceon; }
   48350 
   48351 
   48352 
   48353 { set +x
   48354 $as_echo "$at_srcdir/actions.at:1532: \$BISON_CXX_WORKS"
   48355 at_fn_check_prepare_dynamic "$BISON_CXX_WORKS" "actions.at:1532"
   48356 ( $at_check_trace; $BISON_CXX_WORKS
   48357 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48358 at_status=$? at_failed=false
   48359 $at_check_filter
   48360 echo stderr:; cat "$at_stderr"
   48361 echo stdout:; cat "$at_stdout"
   48362 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1532"
   48363 $at_failed && at_fn_log_failure
   48364 $at_traceon; }
   48365 
   48366 { set +x
   48367 $as_echo "$at_srcdir/actions.at:1532: \$CXX \$CXXFLAGS \$CPPFLAGS \$LDFLAGS -o input input.cc \$LIBS"
   48368 at_fn_check_prepare_dynamic "$CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS" "actions.at:1532"
   48369 ( $at_check_trace; $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS
   48370 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48371 at_status=$? at_failed=false
   48372 $at_check_filter
   48373 echo stderr:; cat "$at_stderr"
   48374 echo stdout:; cat "$at_stdout"
   48375 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1532"
   48376 $at_failed && at_fn_log_failure
   48377 $at_traceon; }
   48378 
   48379 
   48380 { set +x
   48381 $as_echo "$at_srcdir/actions.at:1532:  \$PREPARSER ./input"
   48382 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:1532"
   48383 ( $at_check_trace;  $PREPARSER ./input
   48384 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48385 at_status=$? at_failed=false
   48386 $at_check_filter
   48387 echo stderr:; tee stderr <"$at_stderr"
   48388 at_fn_diff_devnull "$at_stdout" || at_failed=:
   48389 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1532"
   48390 $at_failed && at_fn_log_failure
   48391 $at_traceon; }
   48392 
   48393 { set +x
   48394 $as_echo "$at_srcdir/actions.at:1532: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   48395 at_fn_check_prepare_trace "actions.at:1532"
   48396 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   48397 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48398 at_status=$? at_failed=false
   48399 $at_check_filter
   48400 echo stderr:; tee stderr <"$at_stderr"
   48401 at_fn_diff_devnull "$at_stdout" || at_failed=:
   48402 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1532"
   48403 $at_failed && at_fn_log_failure
   48404 $at_traceon; }
   48405 
   48406 
   48407 # Don't be too picky on the traces, GLR is not exactly the same.  Keep
   48408 # only the lines from the printer.
   48409 #
   48410 # Don't care about locations.  FIXME: remove their removal when Bison
   48411 # supports C++ without locations.
   48412 { set +x
   48413 $as_echo "$at_srcdir/actions.at:1532: sed -ne 's/([-0-9.]*: /(/;/ival:/p' stderr"
   48414 at_fn_check_prepare_trace "actions.at:1532"
   48415 ( $at_check_trace; sed -ne 's/([-0-9.]*: /(/;/ival:/p' stderr
   48416 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48417 at_status=$? at_failed=false
   48418 $at_check_filter
   48419 at_fn_diff_devnull "$at_stderr" || at_failed=:
   48420 echo >>"$at_stdout"; $as_echo "Reading a token: Next token is token UNTYPED (ival: 10, fval: 0.1)
   48421 Shifting token UNTYPED (ival: 10, fval: 0.1)
   48422 Reading a token: Next token is token INT (ival: 20, fval: 0.2)
   48423 Shifting token INT (ival: 20, fval: 0.2)
   48424    \$1 = token UNTYPED (ival: 10, fval: 0.1)
   48425    \$2 = token INT (ival: 20, fval: 0.2)
   48426 -> \$\$ = nterm float (ival: 30, fval: 0.3)
   48427 Cleanup: popping nterm float (ival: 30, fval: 0.3)
   48428 " | \
   48429   $at_diff - "$at_stdout" || at_failed=:
   48430 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1532"
   48431 $at_failed && at_fn_log_failure
   48432 $at_traceon; }
   48433 
   48434 
   48435 
   48436 
   48437   set +x
   48438   $at_times_p && times >"$at_times_file"
   48439 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   48440 read at_status <"$at_status_file"
   48441 #AT_STOP_177
   48442 #AT_START_178
   48443 at_fn_group_banner 178 'actions.at:1540' \
   48444   "Fix user actions without a trailing semicolon" "  " 9
   48445 at_xfail=no
   48446 (
   48447   $as_echo "178. $at_setup_line: testing $at_desc ..."
   48448   $at_traceon
   48449 
   48450 
   48451 # This feature is undocumented, but we accidentally broke it in 2.3a,
   48452 # and there was a complaint at:
   48453 # <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
   48454 
   48455 cat >input.y <<'_ATEOF'
   48456 %%
   48457 start: test2 test1 test0 testc;
   48458 
   48459 test2
   48460 : 'a' { semi;			/* TEST:N:2 */ }
   48461 | 'b' { if (0) {no_semi}	/* TEST:N:2 */ }
   48462 | 'c' { if (0) {semi;}		/* TEST:N:2 */ }
   48463 | 'd' { semi;   no_semi		/* TEST:Y:2 */ }
   48464 | 'e' { semi(); no_semi()	/* TEST:Y:2 */ }
   48465 | 'f' { semi[]; no_semi[]	/* TEST:Y:2 */ }
   48466 | 'g' { semi++; no_semi++	/* TEST:Y:2 */ }
   48467 | 'h' { {no_semi} no_semi	/* TEST:Y:2 */ }
   48468 | 'i' { {semi;}   no_semi	/* TEST:Y:2 */ }
   48469 ;
   48470 test1
   48471   : 'a' { semi;			// TEST:N:1 ;
   48472 } | 'b' { if (0) {no_semi}	// TEST:N:1 ;
   48473 } | 'c' { if (0) {semi;}	// TEST:N:1 ;
   48474 } | 'd' { semi;   no_semi	// TEST:Y:1 ;
   48475 } | 'e' { semi(); no_semi()	// TEST:Y:1 ;
   48476 } | 'f' { semi[]; no_semi[]	// TEST:Y:1 ;
   48477 } | 'g' { semi++; no_semi++	// TEST:Y:1 ;
   48478 } | 'h' { {no_semi} no_semi	// TEST:Y:1 ;
   48479 } | 'i' { {semi;}   no_semi	// TEST:Y:1 ;
   48480 } ;
   48481 test0
   48482   : 'a' { semi;			// TEST:N:1 {}
   48483 } | 'b' { if (0) {no_semi}	// TEST:N:1 {}
   48484 } | 'c' { if (0) {semi;}	// TEST:N:1 {}
   48485 } | 'd' { semi;   no_semi	// TEST:Y:1 {}
   48486 } | 'e' { semi(); no_semi()	// TEST:Y:1 {}
   48487 } | 'f' { semi[]; no_semi[]	// TEST:Y:1 {}
   48488 } | 'g' { semi++; no_semi++	// TEST:Y:1 {}
   48489 } | 'h' { {no_semi} no_semi	// TEST:Y:1 {}
   48490 } | 'i' { {semi;}   no_semi	// TEST:Y:1 {}
   48491 } ;
   48492 
   48493 testc
   48494 : 'a' {
   48495 #define TEST_MACRO_N \
   48496 []"broken\" $ @ $$ @$ [];\
   48497 string;"}
   48498 | 'b' {
   48499 no_semi
   48500 #define TEST_MACRO_N \
   48501 []"broken\" $ @ $$ @$ [];\
   48502 string;"}
   48503 _ATEOF
   48504 
   48505 
   48506 
   48507 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   48508   at_save_special_files
   48509   mkdir xml-tests
   48510     # Don't combine these Bison invocations since we want to be sure that
   48511   # --report=all isn't required to get the full XML file.
   48512   { set +x
   48513 $as_echo "$at_srcdir/actions.at:1597: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   48514                   --graph=xml-tests/test.dot -o input.c input.y"
   48515 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1597"
   48516 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   48517                   --graph=xml-tests/test.dot -o input.c input.y
   48518 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48519 at_status=$? at_failed=false
   48520 $at_check_filter
   48521 echo stderr:; cat "$at_stderr"
   48522 echo stdout:; cat "$at_stdout"
   48523 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1597"
   48524 $at_failed && at_fn_log_failure
   48525 $at_traceon; }
   48526 
   48527   { set +x
   48528 $as_echo "$at_srcdir/actions.at:1597: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   48529 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:1597"
   48530 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   48531 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48532 at_status=$? at_failed=false
   48533 $at_check_filter
   48534 echo stderr:; cat "$at_stderr"
   48535 echo stdout:; cat "$at_stdout"
   48536 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1597"
   48537 $at_failed && at_fn_log_failure
   48538 $at_traceon; }
   48539 
   48540     cp xml-tests/test.output expout
   48541   { set +x
   48542 $as_echo "$at_srcdir/actions.at:1597: \$XSLTPROC \\
   48543              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   48544              xml-tests/test.xml"
   48545 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1597"
   48546 ( $at_check_trace; $XSLTPROC \
   48547              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   48548              xml-tests/test.xml
   48549 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48550 at_status=$? at_failed=false
   48551 $at_check_filter
   48552 at_fn_diff_devnull "$at_stderr" || at_failed=:
   48553 $at_diff expout "$at_stdout" || at_failed=:
   48554 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1597"
   48555 $at_failed && at_fn_log_failure
   48556 $at_traceon; }
   48557 
   48558   sort xml-tests/test.dot > expout
   48559   { set +x
   48560 $as_echo "$at_srcdir/actions.at:1597: \$XSLTPROC \\
   48561              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   48562              xml-tests/test.xml | sort"
   48563 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1597"
   48564 ( $at_check_trace; $XSLTPROC \
   48565              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   48566              xml-tests/test.xml | sort
   48567 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48568 at_status=$? at_failed=false
   48569 $at_check_filter
   48570 at_fn_diff_devnull "$at_stderr" || at_failed=:
   48571 $at_diff expout "$at_stdout" || at_failed=:
   48572 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1597"
   48573 $at_failed && at_fn_log_failure
   48574 $at_traceon; }
   48575 
   48576   rm -rf xml-tests expout
   48577   at_restore_special_files
   48578 fi
   48579 { set +x
   48580 $as_echo "$at_srcdir/actions.at:1597: bison -o input.c input.y"
   48581 at_fn_check_prepare_trace "actions.at:1597"
   48582 ( $at_check_trace; bison -o input.c input.y
   48583 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48584 at_status=$? at_failed=false
   48585 $at_check_filter
   48586 echo >>"$at_stderr"; $as_echo "input.y:8.48: warning: a ';' might be needed at the end of action code
   48587 input.y:8.48:     future versions of Bison will not add the ';'
   48588 input.y:9.48: warning: a ';' might be needed at the end of action code
   48589 input.y:9.48:     future versions of Bison will not add the ';'
   48590 input.y:10.48: warning: a ';' might be needed at the end of action code
   48591 input.y:10.48:     future versions of Bison will not add the ';'
   48592 input.y:11.48: warning: a ';' might be needed at the end of action code
   48593 input.y:11.48:     future versions of Bison will not add the ';'
   48594 input.y:12.48: warning: a ';' might be needed at the end of action code
   48595 input.y:12.48:     future versions of Bison will not add the ';'
   48596 input.y:13.48: warning: a ';' might be needed at the end of action code
   48597 input.y:13.48:     future versions of Bison will not add the ';'
   48598 input.y:20.1: warning: a ';' might be needed at the end of action code
   48599 input.y:20.1:     future versions of Bison will not add the ';'
   48600 input.y:21.1: warning: a ';' might be needed at the end of action code
   48601 input.y:21.1:     future versions of Bison will not add the ';'
   48602 input.y:22.1: warning: a ';' might be needed at the end of action code
   48603 input.y:22.1:     future versions of Bison will not add the ';'
   48604 input.y:23.1: warning: a ';' might be needed at the end of action code
   48605 input.y:23.1:     future versions of Bison will not add the ';'
   48606 input.y:24.1: warning: a ';' might be needed at the end of action code
   48607 input.y:24.1:     future versions of Bison will not add the ';'
   48608 input.y:25.1: warning: a ';' might be needed at the end of action code
   48609 input.y:25.1:     future versions of Bison will not add the ';'
   48610 input.y:31.1: warning: a ';' might be needed at the end of action code
   48611 input.y:31.1:     future versions of Bison will not add the ';'
   48612 input.y:32.1: warning: a ';' might be needed at the end of action code
   48613 input.y:32.1:     future versions of Bison will not add the ';'
   48614 input.y:33.1: warning: a ';' might be needed at the end of action code
   48615 input.y:33.1:     future versions of Bison will not add the ';'
   48616 input.y:34.1: warning: a ';' might be needed at the end of action code
   48617 input.y:34.1:     future versions of Bison will not add the ';'
   48618 input.y:35.1: warning: a ';' might be needed at the end of action code
   48619 input.y:35.1:     future versions of Bison will not add the ';'
   48620 input.y:36.1: warning: a ';' might be needed at the end of action code
   48621 input.y:36.1:     future versions of Bison will not add the ';'
   48622 " | \
   48623   $at_diff - "$at_stderr" || at_failed=:
   48624 at_fn_diff_devnull "$at_stdout" || at_failed=:
   48625 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1597"
   48626 $at_failed && at_fn_log_failure
   48627 $at_traceon; }
   48628 
   48629 # Defining POSIXLY_CORRECT causes bison to complain if options are
   48630 # added after the grammar file name, so skip these checks in that
   48631 # case.
   48632 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   48633   at_save_special_files
   48634 
   48635   # To avoid expanding it repeatedly, store specified stdout.
   48636   : >expout
   48637 
   48638   # Run with -Werror.
   48639   { set +x
   48640 $as_echo "$at_srcdir/actions.at:1597: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y -Werror"
   48641 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y -Werror" "actions.at:1597"
   48642 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o input.c input.y -Werror
   48643 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48644 at_status=$? at_failed=false
   48645 $at_check_filter
   48646 echo stderr:; tee stderr <"$at_stderr"
   48647 $at_diff expout "$at_stdout" || at_failed=:
   48648 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:1597"
   48649 $at_failed && at_fn_log_failure
   48650 $at_traceon; }
   48651 
   48652 
   48653   # Build expected stderr up to and including the "warnings being
   48654   # treated as errors" message.
   48655   cat >at-bison-check-warnings <<'_ATEOF'
   48656 input.y:8.48: warning: a ';' might be needed at the end of action code
   48657 input.y:8.48:     future versions of Bison will not add the ';'
   48658 input.y:9.48: warning: a ';' might be needed at the end of action code
   48659 input.y:9.48:     future versions of Bison will not add the ';'
   48660 input.y:10.48: warning: a ';' might be needed at the end of action code
   48661 input.y:10.48:     future versions of Bison will not add the ';'
   48662 input.y:11.48: warning: a ';' might be needed at the end of action code
   48663 input.y:11.48:     future versions of Bison will not add the ';'
   48664 input.y:12.48: warning: a ';' might be needed at the end of action code
   48665 input.y:12.48:     future versions of Bison will not add the ';'
   48666 input.y:13.48: warning: a ';' might be needed at the end of action code
   48667 input.y:13.48:     future versions of Bison will not add the ';'
   48668 input.y:20.1: warning: a ';' might be needed at the end of action code
   48669 input.y:20.1:     future versions of Bison will not add the ';'
   48670 input.y:21.1: warning: a ';' might be needed at the end of action code
   48671 input.y:21.1:     future versions of Bison will not add the ';'
   48672 input.y:22.1: warning: a ';' might be needed at the end of action code
   48673 input.y:22.1:     future versions of Bison will not add the ';'
   48674 input.y:23.1: warning: a ';' might be needed at the end of action code
   48675 input.y:23.1:     future versions of Bison will not add the ';'
   48676 input.y:24.1: warning: a ';' might be needed at the end of action code
   48677 input.y:24.1:     future versions of Bison will not add the ';'
   48678 input.y:25.1: warning: a ';' might be needed at the end of action code
   48679 input.y:25.1:     future versions of Bison will not add the ';'
   48680 input.y:31.1: warning: a ';' might be needed at the end of action code
   48681 input.y:31.1:     future versions of Bison will not add the ';'
   48682 input.y:32.1: warning: a ';' might be needed at the end of action code
   48683 input.y:32.1:     future versions of Bison will not add the ';'
   48684 input.y:33.1: warning: a ';' might be needed at the end of action code
   48685 input.y:33.1:     future versions of Bison will not add the ';'
   48686 input.y:34.1: warning: a ';' might be needed at the end of action code
   48687 input.y:34.1:     future versions of Bison will not add the ';'
   48688 input.y:35.1: warning: a ';' might be needed at the end of action code
   48689 input.y:35.1:     future versions of Bison will not add the ';'
   48690 input.y:36.1: warning: a ';' might be needed at the end of action code
   48691 input.y:36.1:     future versions of Bison will not add the ';'
   48692 _ATEOF
   48693 
   48694   at_bison_check_first=`sed -n \
   48695     '/: warning: /{=;q;}' at-bison-check-warnings`
   48696   : ${at_bison_check_first:=1}
   48697   at_bison_check_first_tmp=`sed -n \
   48698     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   48699   : ${at_bison_check_first_tmp:=1}
   48700   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   48701     at_bison_check_first=$at_bison_check_first_tmp
   48702   fi
   48703   if test $at_bison_check_first -gt 1; then
   48704     sed -n "1,`expr $at_bison_check_first - 1`"p \
   48705       at-bison-check-warnings > experr
   48706   fi
   48707   echo 'bison: warnings being treated as errors' >> experr
   48708 
   48709   # Finish building expected stderr and check.  Unlike warnings,
   48710   # complaints cause bison to exit early.  Thus, with -Werror, bison
   48711   # does not necessarily report all warnings that it does without
   48712   # -Werror, but it at least reports one.
   48713   at_bison_check_last=`sed -n '$=' stderr`
   48714   : ${at_bison_check_last:=1}
   48715   at_bison_check_last=`expr $at_bison_check_last - 1`
   48716   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   48717     at-bison-check-warnings >> experr
   48718   { set +x
   48719 $as_echo "$at_srcdir/actions.at:1597: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   48720               stderr 1>&2"
   48721 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1597"
   48722 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   48723               stderr 1>&2
   48724 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48725 at_status=$? at_failed=false
   48726 $at_check_filter
   48727 $at_diff experr "$at_stderr" || at_failed=:
   48728 at_fn_diff_devnull "$at_stdout" || at_failed=:
   48729 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1597"
   48730 $at_failed && at_fn_log_failure
   48731 $at_traceon; }
   48732 
   48733 
   48734   # Now check --warnings=error.
   48735   cp stderr experr
   48736   { set +x
   48737 $as_echo "$at_srcdir/actions.at:1597: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y --warnings=error"
   48738 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y --warnings=error" "actions.at:1597"
   48739 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o input.c input.y --warnings=error
   48740 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48741 at_status=$? at_failed=false
   48742 $at_check_filter
   48743 $at_diff experr "$at_stderr" || at_failed=:
   48744 $at_diff expout "$at_stdout" || at_failed=:
   48745 at_fn_check_status 1 $at_status "$at_srcdir/actions.at:1597"
   48746 $at_failed && at_fn_log_failure
   48747 $at_traceon; }
   48748 
   48749 
   48750   # Now check -Wnone and --warnings=none by making sure that
   48751   # -Werror doesn't change the exit status when -Wnone or
   48752   # --warnings=none is specified.
   48753   { set +x
   48754 $as_echo "$at_srcdir/actions.at:1597: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y -Wnone -Werror"
   48755 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y -Wnone -Werror" "actions.at:1597"
   48756 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o input.c input.y -Wnone -Werror
   48757 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48758 at_status=$? at_failed=false
   48759 $at_check_filter
   48760 at_fn_diff_devnull "$at_stderr" || at_failed=:
   48761 $at_diff expout "$at_stdout" || at_failed=:
   48762 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1597"
   48763 $at_failed && at_fn_log_failure
   48764 $at_traceon; }
   48765 
   48766   { set +x
   48767 $as_echo "$at_srcdir/actions.at:1597: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y --warnings=none -Werror"
   48768 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y --warnings=none -Werror" "actions.at:1597"
   48769 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o input.c input.y --warnings=none -Werror
   48770 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48771 at_status=$? at_failed=false
   48772 $at_check_filter
   48773 at_fn_diff_devnull "$at_stderr" || at_failed=:
   48774 $at_diff expout "$at_stdout" || at_failed=:
   48775 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1597"
   48776 $at_failed && at_fn_log_failure
   48777 $at_traceon; }
   48778 
   48779 
   48780   at_restore_special_files
   48781 fi
   48782 
   48783 { set +x
   48784 $as_echo "$at_srcdir/actions.at:1636: \$PERL -0777 -ne '
   48785 my \$count = 0;
   48786 s{/\\* TEST:N:2 \\*/ \\}\$}{ ++\$count; \"\" }gem;
   48787 printf \"\$count\\n\";' input.c"
   48788 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1636"
   48789 ( $at_check_trace; $PERL -0777 -ne '
   48790 my $count = 0;
   48791 s{/\* TEST:N:2 \*/ \}$}{ ++$count; "" }gem;
   48792 printf "$count\n";' input.c
   48793 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48794 at_status=$? at_failed=false
   48795 $at_check_filter
   48796 at_fn_diff_devnull "$at_stderr" || at_failed=:
   48797 echo >>"$at_stdout"; $as_echo "3
   48798 " | \
   48799   $at_diff - "$at_stdout" || at_failed=:
   48800 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1636"
   48801 $at_failed && at_fn_log_failure
   48802 $at_traceon; }
   48803 
   48804 { set +x
   48805 $as_echo "$at_srcdir/actions.at:1637: \$PERL -0777 -ne '
   48806 my \$count = 0;
   48807 s{/\\* TEST:Y:2 \\*/ ;\\}\$}{ ++\$count; \"\" }gem;
   48808 printf \"\$count\\n\";' input.c"
   48809 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1637"
   48810 ( $at_check_trace; $PERL -0777 -ne '
   48811 my $count = 0;
   48812 s{/\* TEST:Y:2 \*/ ;\}$}{ ++$count; "" }gem;
   48813 printf "$count\n";' input.c
   48814 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48815 at_status=$? at_failed=false
   48816 $at_check_filter
   48817 at_fn_diff_devnull "$at_stderr" || at_failed=:
   48818 echo >>"$at_stdout"; $as_echo "6
   48819 " | \
   48820   $at_diff - "$at_stdout" || at_failed=:
   48821 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1637"
   48822 $at_failed && at_fn_log_failure
   48823 $at_traceon; }
   48824 
   48825 { set +x
   48826 $as_echo "$at_srcdir/actions.at:1638: \$PERL -0777 -ne '
   48827 my \$count = 0;
   48828 s{// TEST:N:1 [;{}]*\\n\\}\$}{ ++\$count; \"\" }gem;
   48829 printf \"\$count\\n\";' input.c"
   48830 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1638"
   48831 ( $at_check_trace; $PERL -0777 -ne '
   48832 my $count = 0;
   48833 s{// TEST:N:1 [;{}]*\n\}$}{ ++$count; "" }gem;
   48834 printf "$count\n";' input.c
   48835 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48836 at_status=$? at_failed=false
   48837 $at_check_filter
   48838 at_fn_diff_devnull "$at_stderr" || at_failed=:
   48839 echo >>"$at_stdout"; $as_echo "6
   48840 " | \
   48841   $at_diff - "$at_stdout" || at_failed=:
   48842 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1638"
   48843 $at_failed && at_fn_log_failure
   48844 $at_traceon; }
   48845 
   48846 { set +x
   48847 $as_echo "$at_srcdir/actions.at:1639: \$PERL -0777 -ne '
   48848 my \$count = 0;
   48849 s{// TEST:Y:1 [;{}]*\\n;\\}\$}{ ++\$count; \"\" }gem;
   48850 printf \"\$count\\n\";' input.c"
   48851 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1639"
   48852 ( $at_check_trace; $PERL -0777 -ne '
   48853 my $count = 0;
   48854 s{// TEST:Y:1 [;{}]*\n;\}$}{ ++$count; "" }gem;
   48855 printf "$count\n";' input.c
   48856 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48857 at_status=$? at_failed=false
   48858 $at_check_filter
   48859 at_fn_diff_devnull "$at_stderr" || at_failed=:
   48860 echo >>"$at_stdout"; $as_echo "12
   48861 " | \
   48862   $at_diff - "$at_stdout" || at_failed=:
   48863 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1639"
   48864 $at_failed && at_fn_log_failure
   48865 $at_traceon; }
   48866 
   48867 { set +x
   48868 $as_echo "$at_srcdir/actions.at:1640: \$PERL -0777 -ne '
   48869 my \$count = 0;
   48870 s{#define TEST_MACRO_N \\\\\\n\\[\\]\"broken\\\\\" \\\$ \\@ \\\$\\\$ \\@\\\$ \\[\\];\\\\\\nstring;\"\\}}{ ++\$count; \"\" }gem;
   48871 printf \"\$count\\n\";' input.c"
   48872 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1640"
   48873 ( $at_check_trace; $PERL -0777 -ne '
   48874 my $count = 0;
   48875 s{#define TEST_MACRO_N \\\n\[\]"broken\\" \$ \@ \$\$ \@\$ \[\];\\\nstring;"\}}{ ++$count; "" }gem;
   48876 printf "$count\n";' input.c
   48877 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48878 at_status=$? at_failed=false
   48879 $at_check_filter
   48880 at_fn_diff_devnull "$at_stderr" || at_failed=:
   48881 echo >>"$at_stdout"; $as_echo "2
   48882 " | \
   48883   $at_diff - "$at_stdout" || at_failed=:
   48884 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1640"
   48885 $at_failed && at_fn_log_failure
   48886 $at_traceon; }
   48887 
   48888 
   48889   set +x
   48890   $at_times_p && times >"$at_times_file"
   48891 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   48892 read at_status <"$at_status_file"
   48893 #AT_STOP_178
   48894 #AT_START_179
   48895 at_fn_group_banner 179 'actions.at:1649' \
   48896   "Destroying lookahead assigned by semantic action" "" 9
   48897 at_xfail=no
   48898 (
   48899   $as_echo "179. $at_setup_line: testing $at_desc ..."
   48900   $at_traceon
   48901 
   48902 
   48903 
   48904 cat >input.y <<'_ATEOF'
   48905 %code top {
   48906 #include <config.h>
   48907 /* We don't need perfect functions for these tests. */
   48908 #undef malloc
   48909 #undef memcmp
   48910 #undef realloc
   48911 }
   48912 
   48913 
   48914 %code {
   48915   #include <assert.h>
   48916   #include <stdio.h>
   48917 static void yyerror ( const char *msg);
   48918 static int yylex (void);
   48919   #define USE(Var)
   48920 }
   48921 
   48922 %destructor { fprintf (stderr, "'a' destructor\n"); } 'a'
   48923 %destructor { fprintf (stderr, "'b' destructor\n"); } 'b'
   48924 
   48925 %%
   48926 
   48927 // In a previous version of Bison, yychar assigned by the semantic
   48928 // action below was not translated into yytoken before the lookahead was
   48929 // discarded and thus before its destructor (selected according to
   48930 // yytoken) was called in order to return from yyparse.  This would
   48931 // happen even if YYACCEPT was performed in a later semantic action as
   48932 // long as only consistent states with default reductions were visited
   48933 // in between.  However, we leave YYACCEPT in the same semantic action
   48934 // for this test in order to show that skeletons cannot simply translate
   48935 // immediately after every semantic action because a semantic action
   48936 // that has set yychar might not always return normally.  Instead,
   48937 // skeletons must translate before every use of yytoken.
   48938 start: 'a' accept { USE($1); } ;
   48939 accept: /*empty*/ {
   48940   assert (yychar == YYEMPTY);
   48941   yychar = 'b';
   48942   YYACCEPT;
   48943 } ;
   48944 
   48945 %%
   48946 #include <stdio.h>
   48947 /* A C error reporting function.  */
   48948 static
   48949 void yyerror ( const char *msg)
   48950 {
   48951   fprintf (stderr, "%s\n", msg);
   48952 }
   48953 #include <assert.h>
   48954 static
   48955 int yylex (void)
   48956 {
   48957   static char const input[] = "a";
   48958   static size_t toknum = 0;
   48959   int res;
   48960   ;
   48961   assert (toknum < sizeof input / sizeof input[0]);
   48962   res = input[toknum++];
   48963   ;
   48964   return res;
   48965 }
   48966 int
   48967 main (void)
   48968 {
   48969   return yyparse ();
   48970 }
   48971 _ATEOF
   48972 
   48973 
   48974 
   48975 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   48976   at_save_special_files
   48977   mkdir xml-tests
   48978     # Don't combine these Bison invocations since we want to be sure that
   48979   # --report=all isn't required to get the full XML file.
   48980   { set +x
   48981 $as_echo "$at_srcdir/actions.at:1695: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   48982                   --graph=xml-tests/test.dot -o input.c input.y"
   48983 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1695"
   48984 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   48985                   --graph=xml-tests/test.dot -o input.c input.y
   48986 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   48987 at_status=$? at_failed=false
   48988 $at_check_filter
   48989 echo stderr:; cat "$at_stderr"
   48990 echo stdout:; cat "$at_stdout"
   48991 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1695"
   48992 $at_failed && at_fn_log_failure
   48993 $at_traceon; }
   48994 
   48995   { set +x
   48996 $as_echo "$at_srcdir/actions.at:1695: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   48997 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:1695"
   48998 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   48999 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49000 at_status=$? at_failed=false
   49001 $at_check_filter
   49002 echo stderr:; cat "$at_stderr"
   49003 echo stdout:; cat "$at_stdout"
   49004 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1695"
   49005 $at_failed && at_fn_log_failure
   49006 $at_traceon; }
   49007 
   49008     cp xml-tests/test.output expout
   49009   { set +x
   49010 $as_echo "$at_srcdir/actions.at:1695: \$XSLTPROC \\
   49011              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   49012              xml-tests/test.xml"
   49013 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1695"
   49014 ( $at_check_trace; $XSLTPROC \
   49015              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   49016              xml-tests/test.xml
   49017 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49018 at_status=$? at_failed=false
   49019 $at_check_filter
   49020 at_fn_diff_devnull "$at_stderr" || at_failed=:
   49021 $at_diff expout "$at_stdout" || at_failed=:
   49022 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1695"
   49023 $at_failed && at_fn_log_failure
   49024 $at_traceon; }
   49025 
   49026   sort xml-tests/test.dot > expout
   49027   { set +x
   49028 $as_echo "$at_srcdir/actions.at:1695: \$XSLTPROC \\
   49029              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   49030              xml-tests/test.xml | sort"
   49031 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1695"
   49032 ( $at_check_trace; $XSLTPROC \
   49033              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   49034              xml-tests/test.xml | sort
   49035 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49036 at_status=$? at_failed=false
   49037 $at_check_filter
   49038 at_fn_diff_devnull "$at_stderr" || at_failed=:
   49039 $at_diff expout "$at_stdout" || at_failed=:
   49040 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1695"
   49041 $at_failed && at_fn_log_failure
   49042 $at_traceon; }
   49043 
   49044   rm -rf xml-tests expout
   49045   at_restore_special_files
   49046 fi
   49047 { set +x
   49048 $as_echo "$at_srcdir/actions.at:1695: bison -o input.c input.y"
   49049 at_fn_check_prepare_trace "actions.at:1695"
   49050 ( $at_check_trace; bison -o input.c input.y
   49051 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49052 at_status=$? at_failed=false
   49053 $at_check_filter
   49054 at_fn_diff_devnull "$at_stderr" || at_failed=:
   49055 at_fn_diff_devnull "$at_stdout" || at_failed=:
   49056 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1695"
   49057 $at_failed && at_fn_log_failure
   49058 $at_traceon; }
   49059 
   49060 
   49061 { set +x
   49062 $as_echo "$at_srcdir/actions.at:1696: \$BISON_C_WORKS"
   49063 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:1696"
   49064 ( $at_check_trace; $BISON_C_WORKS
   49065 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49066 at_status=$? at_failed=false
   49067 $at_check_filter
   49068 echo stderr:; cat "$at_stderr"
   49069 echo stdout:; cat "$at_stdout"
   49070 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1696"
   49071 $at_failed && at_fn_log_failure
   49072 $at_traceon; }
   49073 
   49074 { set +x
   49075 $as_echo "$at_srcdir/actions.at:1696: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   49076 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:1696"
   49077 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   49078 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49079 at_status=$? at_failed=false
   49080 $at_check_filter
   49081 echo stderr:; cat "$at_stderr"
   49082 echo stdout:; cat "$at_stdout"
   49083 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1696"
   49084 $at_failed && at_fn_log_failure
   49085 $at_traceon; }
   49086 
   49087 { set +x
   49088 $as_echo "$at_srcdir/actions.at:1697:  \$PREPARSER ./input"
   49089 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:1697"
   49090 ( $at_check_trace;  $PREPARSER ./input
   49091 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49092 at_status=$? at_failed=false
   49093 $at_check_filter
   49094 echo stderr:; tee stderr <"$at_stderr"
   49095 at_fn_diff_devnull "$at_stdout" || at_failed=:
   49096 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1697"
   49097 $at_failed && at_fn_log_failure
   49098 $at_traceon; }
   49099 
   49100 { set +x
   49101 $as_echo "$at_srcdir/actions.at:1697: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   49102 at_fn_check_prepare_trace "actions.at:1697"
   49103 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   49104 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49105 at_status=$? at_failed=false
   49106 $at_check_filter
   49107 echo >>"$at_stderr"; $as_echo "'b' destructor
   49108 'a' destructor
   49109 " | \
   49110   $at_diff - "$at_stderr" || at_failed=:
   49111 at_fn_diff_devnull "$at_stdout" || at_failed=:
   49112 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1697"
   49113 $at_failed && at_fn_log_failure
   49114 $at_traceon; }
   49115 
   49116 
   49117 
   49118   set +x
   49119   $at_times_p && times >"$at_times_file"
   49120 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   49121 read at_status <"$at_status_file"
   49122 #AT_STOP_179
   49123 #AT_START_180
   49124 at_fn_group_banner 180 'actions.at:1708' \
   49125   "YYBACKUP" "                                       " 9
   49126 at_xfail=no
   49127 (
   49128   $as_echo "180. $at_setup_line: testing $at_desc ..."
   49129   $at_traceon
   49130 
   49131 
   49132 
   49133 
   49134 cat >input.y <<'_ATEOF'
   49135 %code top {
   49136 #include <config.h>
   49137 /* We don't need perfect functions for these tests. */
   49138 #undef malloc
   49139 #undef memcmp
   49140 #undef realloc
   49141 }
   49142 
   49143 
   49144 %error-verbose
   49145 %debug
   49146 %pure-parser
   49147 %code {
   49148 # include <stdio.h>
   49149 # include <stdlib.h>
   49150 # include <assert.h>
   49151 
   49152   static void yyerror ( const char *msg);
   49153   static int yylex (YYSTYPE *lvalp);
   49154 }
   49155 %%
   49156 input:
   49157   exp exp {}
   49158 ;
   49159 
   49160 exp:
   49161   'a'     { printf ("a: %d\n", $1); }
   49162 | 'b'     { YYBACKUP('a', 123); }
   49163 | 'c' 'd' { YYBACKUP('a', 456); }
   49164 ;
   49165 
   49166 %%
   49167 #include <stdio.h>
   49168 /* A C error reporting function.  */
   49169 static
   49170 void yyerror ( const char *msg)
   49171 {
   49172   fprintf (stderr, "%s\n", msg);
   49173 }
   49174 #include <assert.h>
   49175 static
   49176 int yylex (YYSTYPE *lvalp)
   49177 {
   49178   static char const input[] = "bcd";
   49179   static size_t toknum = 0;
   49180   int res;
   49181   (void) lvalp;;
   49182   assert (toknum < sizeof input / sizeof input[0]);
   49183   res = input[toknum++];
   49184   *lvalp = (toknum + 1) * 10;
   49185   return res;
   49186 }
   49187 
   49188 int
   49189 main (void)
   49190 {
   49191   yydebug = !!getenv("YYDEBUG");
   49192   return yyparse ();
   49193 }
   49194 _ATEOF
   49195 
   49196 
   49197 
   49198 
   49199 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   49200   at_save_special_files
   49201   mkdir xml-tests
   49202     # Don't combine these Bison invocations since we want to be sure that
   49203   # --report=all isn't required to get the full XML file.
   49204   { set +x
   49205 $as_echo "$at_srcdir/actions.at:1749: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   49206                   --graph=xml-tests/test.dot -o input.c input.y"
   49207 at_fn_check_prepare_notrace 'an embedded newline' "actions.at:1749"
   49208 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   49209                   --graph=xml-tests/test.dot -o input.c input.y
   49210 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49211 at_status=$? at_failed=false
   49212 $at_check_filter
   49213 echo stderr:; cat "$at_stderr"
   49214 echo stdout:; cat "$at_stdout"
   49215 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1749"
   49216 $at_failed && at_fn_log_failure
   49217 $at_traceon; }
   49218 
   49219   { set +x
   49220 $as_echo "$at_srcdir/actions.at:1749: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   49221 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "actions.at:1749"
   49222 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   49223 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49224 at_status=$? at_failed=false
   49225 $at_check_filter
   49226 echo stderr:; cat "$at_stderr"
   49227 echo stdout:; cat "$at_stdout"
   49228 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1749"
   49229 $at_failed && at_fn_log_failure
   49230 $at_traceon; }
   49231 
   49232     cp xml-tests/test.output expout
   49233   { set +x
   49234 $as_echo "$at_srcdir/actions.at:1749: \$XSLTPROC \\
   49235              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   49236              xml-tests/test.xml"
   49237 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1749"
   49238 ( $at_check_trace; $XSLTPROC \
   49239              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   49240              xml-tests/test.xml
   49241 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49242 at_status=$? at_failed=false
   49243 $at_check_filter
   49244 at_fn_diff_devnull "$at_stderr" || at_failed=:
   49245 $at_diff expout "$at_stdout" || at_failed=:
   49246 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1749"
   49247 $at_failed && at_fn_log_failure
   49248 $at_traceon; }
   49249 
   49250   sort xml-tests/test.dot > expout
   49251   { set +x
   49252 $as_echo "$at_srcdir/actions.at:1749: \$XSLTPROC \\
   49253              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   49254              xml-tests/test.xml | sort"
   49255 at_fn_check_prepare_notrace 'a `...` command substitution' "actions.at:1749"
   49256 ( $at_check_trace; $XSLTPROC \
   49257              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   49258              xml-tests/test.xml | sort
   49259 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49260 at_status=$? at_failed=false
   49261 $at_check_filter
   49262 at_fn_diff_devnull "$at_stderr" || at_failed=:
   49263 $at_diff expout "$at_stdout" || at_failed=:
   49264 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1749"
   49265 $at_failed && at_fn_log_failure
   49266 $at_traceon; }
   49267 
   49268   rm -rf xml-tests expout
   49269   at_restore_special_files
   49270 fi
   49271 { set +x
   49272 $as_echo "$at_srcdir/actions.at:1749: bison -o input.c input.y"
   49273 at_fn_check_prepare_trace "actions.at:1749"
   49274 ( $at_check_trace; bison -o input.c input.y
   49275 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49276 at_status=$? at_failed=false
   49277 $at_check_filter
   49278 at_fn_diff_devnull "$at_stderr" || at_failed=:
   49279 at_fn_diff_devnull "$at_stdout" || at_failed=:
   49280 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1749"
   49281 $at_failed && at_fn_log_failure
   49282 $at_traceon; }
   49283 
   49284 
   49285 { set +x
   49286 $as_echo "$at_srcdir/actions.at:1750: \$BISON_C_WORKS"
   49287 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "actions.at:1750"
   49288 ( $at_check_trace; $BISON_C_WORKS
   49289 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49290 at_status=$? at_failed=false
   49291 $at_check_filter
   49292 echo stderr:; cat "$at_stderr"
   49293 echo stdout:; cat "$at_stdout"
   49294 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1750"
   49295 $at_failed && at_fn_log_failure
   49296 $at_traceon; }
   49297 
   49298 { set +x
   49299 $as_echo "$at_srcdir/actions.at:1750: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   49300 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "actions.at:1750"
   49301 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   49302 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49303 at_status=$? at_failed=false
   49304 $at_check_filter
   49305 echo stderr:; cat "$at_stderr"
   49306 echo stdout:; cat "$at_stdout"
   49307 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1750"
   49308 $at_failed && at_fn_log_failure
   49309 $at_traceon; }
   49310 
   49311 { set +x
   49312 $as_echo "$at_srcdir/actions.at:1751:  \$PREPARSER ./input"
   49313 at_fn_check_prepare_dynamic " $PREPARSER ./input" "actions.at:1751"
   49314 ( $at_check_trace;  $PREPARSER ./input
   49315 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49316 at_status=$? at_failed=false
   49317 $at_check_filter
   49318 echo stderr:; tee stderr <"$at_stderr"
   49319 echo >>"$at_stdout"; $as_echo "a: 123
   49320 a: 456
   49321 " | \
   49322   $at_diff - "$at_stdout" || at_failed=:
   49323 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1751"
   49324 $at_failed && at_fn_log_failure
   49325 $at_traceon; }
   49326 
   49327 { set +x
   49328 $as_echo "$at_srcdir/actions.at:1751: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   49329 at_fn_check_prepare_trace "actions.at:1751"
   49330 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   49331 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49332 at_status=$? at_failed=false
   49333 $at_check_filter
   49334 at_fn_diff_devnull "$at_stderr" || at_failed=:
   49335 at_fn_diff_devnull "$at_stdout" || at_failed=:
   49336 at_fn_check_status 0 $at_status "$at_srcdir/actions.at:1751"
   49337 $at_failed && at_fn_log_failure
   49338 $at_traceon; }
   49339 
   49340 
   49341 
   49342   set +x
   49343   $at_times_p && times >"$at_times_file"
   49344 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   49345 read at_status <"$at_status_file"
   49346 #AT_STOP_180
   49347 #AT_START_181
   49348 at_fn_group_banner 181 'conflicts.at:31' \
   49349   "S/R in initial" "                                 " 10
   49350 at_xfail=no
   49351 (
   49352   $as_echo "181. $at_setup_line: testing $at_desc ..."
   49353   $at_traceon
   49354 
   49355 
   49356 cat >input.y <<'_ATEOF'
   49357 %expect 1
   49358 %%
   49359 exp: e 'e';
   49360 e: 'e' | /* Nothing. */;
   49361 _ATEOF
   49362 
   49363 
   49364 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   49365   at_save_special_files
   49366   mkdir xml-tests
   49367     # Don't combine these Bison invocations since we want to be sure that
   49368   # --report=all isn't required to get the full XML file.
   49369   { set +x
   49370 $as_echo "$at_srcdir/conflicts.at:40: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   49371                   --graph=xml-tests/test.dot -o input.c input.y"
   49372 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:40"
   49373 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   49374                   --graph=xml-tests/test.dot -o input.c input.y
   49375 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49376 at_status=$? at_failed=false
   49377 $at_check_filter
   49378 echo stderr:; cat "$at_stderr"
   49379 echo stdout:; cat "$at_stdout"
   49380 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:40"
   49381 $at_failed && at_fn_log_failure
   49382 $at_traceon; }
   49383 
   49384   { set +x
   49385 $as_echo "$at_srcdir/conflicts.at:40: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   49386 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "conflicts.at:40"
   49387 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   49388 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49389 at_status=$? at_failed=false
   49390 $at_check_filter
   49391 echo stderr:; cat "$at_stderr"
   49392 echo stdout:; cat "$at_stdout"
   49393 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:40"
   49394 $at_failed && at_fn_log_failure
   49395 $at_traceon; }
   49396 
   49397     cp xml-tests/test.output expout
   49398   { set +x
   49399 $as_echo "$at_srcdir/conflicts.at:40: \$XSLTPROC \\
   49400              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   49401              xml-tests/test.xml"
   49402 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:40"
   49403 ( $at_check_trace; $XSLTPROC \
   49404              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   49405              xml-tests/test.xml
   49406 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49407 at_status=$? at_failed=false
   49408 $at_check_filter
   49409 at_fn_diff_devnull "$at_stderr" || at_failed=:
   49410 $at_diff expout "$at_stdout" || at_failed=:
   49411 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:40"
   49412 $at_failed && at_fn_log_failure
   49413 $at_traceon; }
   49414 
   49415   sort xml-tests/test.dot > expout
   49416   { set +x
   49417 $as_echo "$at_srcdir/conflicts.at:40: \$XSLTPROC \\
   49418              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   49419              xml-tests/test.xml | sort"
   49420 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:40"
   49421 ( $at_check_trace; $XSLTPROC \
   49422              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   49423              xml-tests/test.xml | sort
   49424 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49425 at_status=$? at_failed=false
   49426 $at_check_filter
   49427 at_fn_diff_devnull "$at_stderr" || at_failed=:
   49428 $at_diff expout "$at_stdout" || at_failed=:
   49429 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:40"
   49430 $at_failed && at_fn_log_failure
   49431 $at_traceon; }
   49432 
   49433   rm -rf xml-tests expout
   49434   at_restore_special_files
   49435 fi
   49436 { set +x
   49437 $as_echo "$at_srcdir/conflicts.at:40: bison -o input.c input.y"
   49438 at_fn_check_prepare_trace "conflicts.at:40"
   49439 ( $at_check_trace; bison -o input.c input.y
   49440 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49441 at_status=$? at_failed=false
   49442 $at_check_filter
   49443 echo >>"$at_stderr"; $as_echo "input.y:4.9: warning: rule useless in parser due to conflicts: e: /* empty */
   49444 " | \
   49445   $at_diff - "$at_stderr" || at_failed=:
   49446 at_fn_diff_devnull "$at_stdout" || at_failed=:
   49447 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:40"
   49448 $at_failed && at_fn_log_failure
   49449 $at_traceon; }
   49450 
   49451 # Defining POSIXLY_CORRECT causes bison to complain if options are
   49452 # added after the grammar file name, so skip these checks in that
   49453 # case.
   49454 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   49455   at_save_special_files
   49456 
   49457   # To avoid expanding it repeatedly, store specified stdout.
   49458   : >expout
   49459 
   49460   # Run with -Werror.
   49461   { set +x
   49462 $as_echo "$at_srcdir/conflicts.at:40: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y -Werror"
   49463 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y -Werror" "conflicts.at:40"
   49464 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o input.c input.y -Werror
   49465 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49466 at_status=$? at_failed=false
   49467 $at_check_filter
   49468 echo stderr:; tee stderr <"$at_stderr"
   49469 $at_diff expout "$at_stdout" || at_failed=:
   49470 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:40"
   49471 $at_failed && at_fn_log_failure
   49472 $at_traceon; }
   49473 
   49474 
   49475   # Build expected stderr up to and including the "warnings being
   49476   # treated as errors" message.
   49477   cat >at-bison-check-warnings <<'_ATEOF'
   49478 input.y:4.9: warning: rule useless in parser due to conflicts: e: /* empty */
   49479 _ATEOF
   49480 
   49481   at_bison_check_first=`sed -n \
   49482     '/: warning: /{=;q;}' at-bison-check-warnings`
   49483   : ${at_bison_check_first:=1}
   49484   at_bison_check_first_tmp=`sed -n \
   49485     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   49486   : ${at_bison_check_first_tmp:=1}
   49487   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   49488     at_bison_check_first=$at_bison_check_first_tmp
   49489   fi
   49490   if test $at_bison_check_first -gt 1; then
   49491     sed -n "1,`expr $at_bison_check_first - 1`"p \
   49492       at-bison-check-warnings > experr
   49493   fi
   49494   echo 'bison: warnings being treated as errors' >> experr
   49495 
   49496   # Finish building expected stderr and check.  Unlike warnings,
   49497   # complaints cause bison to exit early.  Thus, with -Werror, bison
   49498   # does not necessarily report all warnings that it does without
   49499   # -Werror, but it at least reports one.
   49500   at_bison_check_last=`sed -n '$=' stderr`
   49501   : ${at_bison_check_last:=1}
   49502   at_bison_check_last=`expr $at_bison_check_last - 1`
   49503   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   49504     at-bison-check-warnings >> experr
   49505   { set +x
   49506 $as_echo "$at_srcdir/conflicts.at:40: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   49507               stderr 1>&2"
   49508 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:40"
   49509 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   49510               stderr 1>&2
   49511 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49512 at_status=$? at_failed=false
   49513 $at_check_filter
   49514 $at_diff experr "$at_stderr" || at_failed=:
   49515 at_fn_diff_devnull "$at_stdout" || at_failed=:
   49516 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:40"
   49517 $at_failed && at_fn_log_failure
   49518 $at_traceon; }
   49519 
   49520 
   49521   # Now check --warnings=error.
   49522   cp stderr experr
   49523   { set +x
   49524 $as_echo "$at_srcdir/conflicts.at:40: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y --warnings=error"
   49525 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y --warnings=error" "conflicts.at:40"
   49526 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o input.c input.y --warnings=error
   49527 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49528 at_status=$? at_failed=false
   49529 $at_check_filter
   49530 $at_diff experr "$at_stderr" || at_failed=:
   49531 $at_diff expout "$at_stdout" || at_failed=:
   49532 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:40"
   49533 $at_failed && at_fn_log_failure
   49534 $at_traceon; }
   49535 
   49536 
   49537   # Now check -Wnone and --warnings=none by making sure that
   49538   # -Werror doesn't change the exit status when -Wnone or
   49539   # --warnings=none is specified.
   49540   { set +x
   49541 $as_echo "$at_srcdir/conflicts.at:40: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y -Wnone -Werror"
   49542 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y -Wnone -Werror" "conflicts.at:40"
   49543 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o input.c input.y -Wnone -Werror
   49544 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49545 at_status=$? at_failed=false
   49546 $at_check_filter
   49547 at_fn_diff_devnull "$at_stderr" || at_failed=:
   49548 $at_diff expout "$at_stdout" || at_failed=:
   49549 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:40"
   49550 $at_failed && at_fn_log_failure
   49551 $at_traceon; }
   49552 
   49553   { set +x
   49554 $as_echo "$at_srcdir/conflicts.at:40: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y --warnings=none -Werror"
   49555 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y --warnings=none -Werror" "conflicts.at:40"
   49556 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o input.c input.y --warnings=none -Werror
   49557 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49558 at_status=$? at_failed=false
   49559 $at_check_filter
   49560 at_fn_diff_devnull "$at_stderr" || at_failed=:
   49561 $at_diff expout "$at_stdout" || at_failed=:
   49562 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:40"
   49563 $at_failed && at_fn_log_failure
   49564 $at_traceon; }
   49565 
   49566 
   49567   at_restore_special_files
   49568 fi
   49569 
   49570 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   49571   at_save_special_files
   49572   mkdir xml-tests
   49573     # Don't combine these Bison invocations since we want to be sure that
   49574   # --report=all isn't required to get the full XML file.
   49575   { set +x
   49576 $as_echo "$at_srcdir/conflicts.at:44: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   49577                   --graph=xml-tests/test.dot -fcaret -o input.c input.y"
   49578 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:44"
   49579 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   49580                   --graph=xml-tests/test.dot -fcaret -o input.c input.y
   49581 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49582 at_status=$? at_failed=false
   49583 $at_check_filter
   49584 echo stderr:; cat "$at_stderr"
   49585 echo stdout:; cat "$at_stdout"
   49586 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:44"
   49587 $at_failed && at_fn_log_failure
   49588 $at_traceon; }
   49589 
   49590   { set +x
   49591 $as_echo "$at_srcdir/conflicts.at:44: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -fcaret -o input.c input.y"
   49592 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -fcaret -o input.c input.y" "conflicts.at:44"
   49593 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -fcaret -o input.c input.y
   49594 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49595 at_status=$? at_failed=false
   49596 $at_check_filter
   49597 echo stderr:; cat "$at_stderr"
   49598 echo stdout:; cat "$at_stdout"
   49599 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:44"
   49600 $at_failed && at_fn_log_failure
   49601 $at_traceon; }
   49602 
   49603     cp xml-tests/test.output expout
   49604   { set +x
   49605 $as_echo "$at_srcdir/conflicts.at:44: \$XSLTPROC \\
   49606              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   49607              xml-tests/test.xml"
   49608 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:44"
   49609 ( $at_check_trace; $XSLTPROC \
   49610              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   49611              xml-tests/test.xml
   49612 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49613 at_status=$? at_failed=false
   49614 $at_check_filter
   49615 at_fn_diff_devnull "$at_stderr" || at_failed=:
   49616 $at_diff expout "$at_stdout" || at_failed=:
   49617 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:44"
   49618 $at_failed && at_fn_log_failure
   49619 $at_traceon; }
   49620 
   49621   sort xml-tests/test.dot > expout
   49622   { set +x
   49623 $as_echo "$at_srcdir/conflicts.at:44: \$XSLTPROC \\
   49624              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   49625              xml-tests/test.xml | sort"
   49626 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:44"
   49627 ( $at_check_trace; $XSLTPROC \
   49628              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   49629              xml-tests/test.xml | sort
   49630 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49631 at_status=$? at_failed=false
   49632 $at_check_filter
   49633 at_fn_diff_devnull "$at_stderr" || at_failed=:
   49634 $at_diff expout "$at_stdout" || at_failed=:
   49635 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:44"
   49636 $at_failed && at_fn_log_failure
   49637 $at_traceon; }
   49638 
   49639   rm -rf xml-tests expout
   49640   at_restore_special_files
   49641 fi
   49642 { set +x
   49643 $as_echo "$at_srcdir/conflicts.at:44: bison -fcaret -o input.c input.y"
   49644 at_fn_check_prepare_trace "conflicts.at:44"
   49645 ( $at_check_trace; bison -fcaret -o input.c input.y
   49646 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49647 at_status=$? at_failed=false
   49648 $at_check_filter
   49649 echo >>"$at_stderr"; $as_echo "input.y:4.9: warning: rule useless in parser due to conflicts
   49650  e: 'e' | /* Nothing. */;
   49651          ^
   49652 " | \
   49653   $at_diff - "$at_stderr" || at_failed=:
   49654 at_fn_diff_devnull "$at_stdout" || at_failed=:
   49655 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:44"
   49656 $at_failed && at_fn_log_failure
   49657 $at_traceon; }
   49658 
   49659 # Defining POSIXLY_CORRECT causes bison to complain if options are
   49660 # added after the grammar file name, so skip these checks in that
   49661 # case.
   49662 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   49663   at_save_special_files
   49664 
   49665   # To avoid expanding it repeatedly, store specified stdout.
   49666   : >expout
   49667 
   49668   # Run with -Werror.
   49669   { set +x
   49670 $as_echo "$at_srcdir/conflicts.at:44: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y -Werror"
   49671 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y -Werror" "conflicts.at:44"
   49672 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y -Werror
   49673 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49674 at_status=$? at_failed=false
   49675 $at_check_filter
   49676 echo stderr:; tee stderr <"$at_stderr"
   49677 $at_diff expout "$at_stdout" || at_failed=:
   49678 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:44"
   49679 $at_failed && at_fn_log_failure
   49680 $at_traceon; }
   49681 
   49682 
   49683   # Build expected stderr up to and including the "warnings being
   49684   # treated as errors" message.
   49685   cat >at-bison-check-warnings <<'_ATEOF'
   49686 input.y:4.9: warning: rule useless in parser due to conflicts
   49687  e: 'e' | /* Nothing. */;
   49688          ^
   49689 _ATEOF
   49690 
   49691   at_bison_check_first=`sed -n \
   49692     '/: warning: /{=;q;}' at-bison-check-warnings`
   49693   : ${at_bison_check_first:=1}
   49694   at_bison_check_first_tmp=`sed -n \
   49695     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   49696   : ${at_bison_check_first_tmp:=1}
   49697   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   49698     at_bison_check_first=$at_bison_check_first_tmp
   49699   fi
   49700   if test $at_bison_check_first -gt 1; then
   49701     sed -n "1,`expr $at_bison_check_first - 1`"p \
   49702       at-bison-check-warnings > experr
   49703   fi
   49704   echo 'bison: warnings being treated as errors' >> experr
   49705 
   49706   # Finish building expected stderr and check.  Unlike warnings,
   49707   # complaints cause bison to exit early.  Thus, with -Werror, bison
   49708   # does not necessarily report all warnings that it does without
   49709   # -Werror, but it at least reports one.
   49710   at_bison_check_last=`sed -n '$=' stderr`
   49711   : ${at_bison_check_last:=1}
   49712   at_bison_check_last=`expr $at_bison_check_last - 1`
   49713   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   49714     at-bison-check-warnings >> experr
   49715   { set +x
   49716 $as_echo "$at_srcdir/conflicts.at:44: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   49717               stderr 1>&2"
   49718 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:44"
   49719 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   49720               stderr 1>&2
   49721 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49722 at_status=$? at_failed=false
   49723 $at_check_filter
   49724 $at_diff experr "$at_stderr" || at_failed=:
   49725 at_fn_diff_devnull "$at_stdout" || at_failed=:
   49726 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:44"
   49727 $at_failed && at_fn_log_failure
   49728 $at_traceon; }
   49729 
   49730 
   49731   # Now check --warnings=error.
   49732   cp stderr experr
   49733   { set +x
   49734 $as_echo "$at_srcdir/conflicts.at:44: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y --warnings=error"
   49735 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y --warnings=error" "conflicts.at:44"
   49736 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y --warnings=error
   49737 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49738 at_status=$? at_failed=false
   49739 $at_check_filter
   49740 $at_diff experr "$at_stderr" || at_failed=:
   49741 $at_diff expout "$at_stdout" || at_failed=:
   49742 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:44"
   49743 $at_failed && at_fn_log_failure
   49744 $at_traceon; }
   49745 
   49746 
   49747   # Now check -Wnone and --warnings=none by making sure that
   49748   # -Werror doesn't change the exit status when -Wnone or
   49749   # --warnings=none is specified.
   49750   { set +x
   49751 $as_echo "$at_srcdir/conflicts.at:44: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y -Wnone -Werror"
   49752 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y -Wnone -Werror" "conflicts.at:44"
   49753 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y -Wnone -Werror
   49754 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49755 at_status=$? at_failed=false
   49756 $at_check_filter
   49757 at_fn_diff_devnull "$at_stderr" || at_failed=:
   49758 $at_diff expout "$at_stdout" || at_failed=:
   49759 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:44"
   49760 $at_failed && at_fn_log_failure
   49761 $at_traceon; }
   49762 
   49763   { set +x
   49764 $as_echo "$at_srcdir/conflicts.at:44: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y --warnings=none -Werror"
   49765 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y --warnings=none -Werror" "conflicts.at:44"
   49766 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -fcaret -o input.c input.y --warnings=none -Werror
   49767 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49768 at_status=$? at_failed=false
   49769 $at_check_filter
   49770 at_fn_diff_devnull "$at_stderr" || at_failed=:
   49771 $at_diff expout "$at_stdout" || at_failed=:
   49772 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:44"
   49773 $at_failed && at_fn_log_failure
   49774 $at_traceon; }
   49775 
   49776 
   49777   at_restore_special_files
   49778 fi
   49779 
   49780   set +x
   49781   $at_times_p && times >"$at_times_file"
   49782 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   49783 read at_status <"$at_status_file"
   49784 #AT_STOP_181
   49785 #AT_START_182
   49786 at_fn_group_banner 182 'conflicts.at:57' \
   49787   "%nonassoc and eof" "                              " 10
   49788 at_xfail=no
   49789 (
   49790   $as_echo "182. $at_setup_line: testing $at_desc ..."
   49791   $at_traceon
   49792 
   49793 
   49794 
   49795 cat >input.y <<'_ATEOF'
   49796 %code top {
   49797 #include <config.h>
   49798 /* We don't need perfect functions for these tests. */
   49799 #undef malloc
   49800 #undef memcmp
   49801 #undef realloc
   49802 }
   49803 
   49804 
   49805 %{
   49806 #include <stdio.h>
   49807 #include <stdlib.h>
   49808 #include <string.h>
   49809 #include <assert.h>
   49810 
   49811 #define YYERROR_VERBOSE 1
   49812 #include <stdio.h>
   49813 /* A C error reporting function.  */
   49814 static
   49815 void yyerror ( const char *msg)
   49816 {
   49817   fprintf (stderr, "%s\n", msg);
   49818 }
   49819 /* The current argument. */
   49820 static const char *input;
   49821 
   49822 static int
   49823 yylex (void)
   49824 {
   49825   static size_t toknum;
   49826   assert (toknum <= strlen (input));
   49827   return input[toknum++];
   49828 }
   49829 
   49830 %}
   49831 
   49832 %nonassoc '<' '>'
   49833 
   49834 %%
   49835 expr: expr '<' expr
   49836     | expr '>' expr
   49837     | '0'
   49838     ;
   49839 %%
   49840 int
   49841 main (int argc, const char *argv[])
   49842 {
   49843   input = argc <= 1 ? "" : argv[1];
   49844   return yyparse ();
   49845 }
   49846 _ATEOF
   49847 
   49848 
   49849 
   49850 
   49851 
   49852 
   49853 # Expected token list is missing.
   49854 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   49855   at_save_special_files
   49856   mkdir xml-tests
   49857     # Don't combine these Bison invocations since we want to be sure that
   49858   # --report=all isn't required to get the full XML file.
   49859   { set +x
   49860 $as_echo "$at_srcdir/conflicts.at:123: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   49861                   --graph=xml-tests/test.dot  -o input.c input.y"
   49862 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:123"
   49863 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   49864                   --graph=xml-tests/test.dot  -o input.c input.y
   49865 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49866 at_status=$? at_failed=false
   49867 $at_check_filter
   49868 echo stderr:; cat "$at_stderr"
   49869 echo stdout:; cat "$at_stdout"
   49870 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:123"
   49871 $at_failed && at_fn_log_failure
   49872 $at_traceon; }
   49873 
   49874   { set +x
   49875 $as_echo "$at_srcdir/conflicts.at:123: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  -o input.c input.y"
   49876 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  -o input.c input.y" "conflicts.at:123"
   49877 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml  -o input.c input.y
   49878 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49879 at_status=$? at_failed=false
   49880 $at_check_filter
   49881 echo stderr:; cat "$at_stderr"
   49882 echo stdout:; cat "$at_stdout"
   49883 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:123"
   49884 $at_failed && at_fn_log_failure
   49885 $at_traceon; }
   49886 
   49887     cp xml-tests/test.output expout
   49888   { set +x
   49889 $as_echo "$at_srcdir/conflicts.at:123: \$XSLTPROC \\
   49890              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   49891              xml-tests/test.xml"
   49892 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:123"
   49893 ( $at_check_trace; $XSLTPROC \
   49894              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   49895              xml-tests/test.xml
   49896 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49897 at_status=$? at_failed=false
   49898 $at_check_filter
   49899 at_fn_diff_devnull "$at_stderr" || at_failed=:
   49900 $at_diff expout "$at_stdout" || at_failed=:
   49901 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:123"
   49902 $at_failed && at_fn_log_failure
   49903 $at_traceon; }
   49904 
   49905   sort xml-tests/test.dot > expout
   49906   { set +x
   49907 $as_echo "$at_srcdir/conflicts.at:123: \$XSLTPROC \\
   49908              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   49909              xml-tests/test.xml | sort"
   49910 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:123"
   49911 ( $at_check_trace; $XSLTPROC \
   49912              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   49913              xml-tests/test.xml | sort
   49914 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49915 at_status=$? at_failed=false
   49916 $at_check_filter
   49917 at_fn_diff_devnull "$at_stderr" || at_failed=:
   49918 $at_diff expout "$at_stdout" || at_failed=:
   49919 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:123"
   49920 $at_failed && at_fn_log_failure
   49921 $at_traceon; }
   49922 
   49923   rm -rf xml-tests expout
   49924   at_restore_special_files
   49925 fi
   49926 { set +x
   49927 $as_echo "$at_srcdir/conflicts.at:123: bison  -o input.c input.y"
   49928 at_fn_check_prepare_trace "conflicts.at:123"
   49929 ( $at_check_trace; bison  -o input.c input.y
   49930 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49931 at_status=$? at_failed=false
   49932 $at_check_filter
   49933 at_fn_diff_devnull "$at_stderr" || at_failed=:
   49934 at_fn_diff_devnull "$at_stdout" || at_failed=:
   49935 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:123"
   49936 $at_failed && at_fn_log_failure
   49937 $at_traceon; }
   49938 
   49939 
   49940 { set +x
   49941 $as_echo "$at_srcdir/conflicts.at:123: \$BISON_C_WORKS"
   49942 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "conflicts.at:123"
   49943 ( $at_check_trace; $BISON_C_WORKS
   49944 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49945 at_status=$? at_failed=false
   49946 $at_check_filter
   49947 echo stderr:; cat "$at_stderr"
   49948 echo stdout:; cat "$at_stdout"
   49949 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:123"
   49950 $at_failed && at_fn_log_failure
   49951 $at_traceon; }
   49952 
   49953 { set +x
   49954 $as_echo "$at_srcdir/conflicts.at:123: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   49955 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "conflicts.at:123"
   49956 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   49957 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49958 at_status=$? at_failed=false
   49959 $at_check_filter
   49960 echo stderr:; cat "$at_stderr"
   49961 echo stdout:; cat "$at_stdout"
   49962 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:123"
   49963 $at_failed && at_fn_log_failure
   49964 $at_traceon; }
   49965 
   49966 
   49967 
   49968 
   49969 { set +x
   49970 $as_echo "$at_srcdir/conflicts.at:123:  \$PREPARSER ./input '0<0'"
   49971 at_fn_check_prepare_dynamic " $PREPARSER ./input '0<0'" "conflicts.at:123"
   49972 ( $at_check_trace;  $PREPARSER ./input '0<0'
   49973 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49974 at_status=$? at_failed=false
   49975 $at_check_filter
   49976 echo stderr:; tee stderr <"$at_stderr"
   49977 at_fn_diff_devnull "$at_stdout" || at_failed=:
   49978 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:123"
   49979 $at_failed && at_fn_log_failure
   49980 $at_traceon; }
   49981 
   49982 { set +x
   49983 $as_echo "$at_srcdir/conflicts.at:123: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   49984 at_fn_check_prepare_trace "conflicts.at:123"
   49985 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   49986 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   49987 at_status=$? at_failed=false
   49988 $at_check_filter
   49989 at_fn_diff_devnull "$at_stderr" || at_failed=:
   49990 at_fn_diff_devnull "$at_stdout" || at_failed=:
   49991 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:123"
   49992 $at_failed && at_fn_log_failure
   49993 $at_traceon; }
   49994 
   49995 
   49996 { set +x
   49997 $as_echo "$at_srcdir/conflicts.at:123:  \$PREPARSER ./input '0<0<0'"
   49998 at_fn_check_prepare_dynamic " $PREPARSER ./input '0<0<0'" "conflicts.at:123"
   49999 ( $at_check_trace;  $PREPARSER ./input '0<0<0'
   50000 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50001 at_status=$? at_failed=false
   50002 $at_check_filter
   50003 echo stderr:; tee stderr <"$at_stderr"
   50004 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50005 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:123"
   50006 $at_failed && at_fn_log_failure
   50007 $at_traceon; }
   50008 
   50009 { set +x
   50010 $as_echo "$at_srcdir/conflicts.at:123: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   50011 at_fn_check_prepare_trace "conflicts.at:123"
   50012 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   50013 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50014 at_status=$? at_failed=false
   50015 $at_check_filter
   50016 echo >>"$at_stderr"; $as_echo "syntax error, unexpected '<'
   50017 " | \
   50018   $at_diff - "$at_stderr" || at_failed=:
   50019 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50020 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:123"
   50021 $at_failed && at_fn_log_failure
   50022 $at_traceon; }
   50023 
   50024 
   50025 
   50026 { set +x
   50027 $as_echo "$at_srcdir/conflicts.at:123:  \$PREPARSER ./input '0>0'"
   50028 at_fn_check_prepare_dynamic " $PREPARSER ./input '0>0'" "conflicts.at:123"
   50029 ( $at_check_trace;  $PREPARSER ./input '0>0'
   50030 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50031 at_status=$? at_failed=false
   50032 $at_check_filter
   50033 echo stderr:; tee stderr <"$at_stderr"
   50034 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50035 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:123"
   50036 $at_failed && at_fn_log_failure
   50037 $at_traceon; }
   50038 
   50039 { set +x
   50040 $as_echo "$at_srcdir/conflicts.at:123: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   50041 at_fn_check_prepare_trace "conflicts.at:123"
   50042 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   50043 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50044 at_status=$? at_failed=false
   50045 $at_check_filter
   50046 at_fn_diff_devnull "$at_stderr" || at_failed=:
   50047 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50048 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:123"
   50049 $at_failed && at_fn_log_failure
   50050 $at_traceon; }
   50051 
   50052 
   50053 { set +x
   50054 $as_echo "$at_srcdir/conflicts.at:123:  \$PREPARSER ./input '0>0>0'"
   50055 at_fn_check_prepare_dynamic " $PREPARSER ./input '0>0>0'" "conflicts.at:123"
   50056 ( $at_check_trace;  $PREPARSER ./input '0>0>0'
   50057 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50058 at_status=$? at_failed=false
   50059 $at_check_filter
   50060 echo stderr:; tee stderr <"$at_stderr"
   50061 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50062 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:123"
   50063 $at_failed && at_fn_log_failure
   50064 $at_traceon; }
   50065 
   50066 { set +x
   50067 $as_echo "$at_srcdir/conflicts.at:123: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   50068 at_fn_check_prepare_trace "conflicts.at:123"
   50069 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   50070 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50071 at_status=$? at_failed=false
   50072 $at_check_filter
   50073 echo >>"$at_stderr"; $as_echo "syntax error, unexpected '>'
   50074 " | \
   50075   $at_diff - "$at_stderr" || at_failed=:
   50076 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50077 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:123"
   50078 $at_failed && at_fn_log_failure
   50079 $at_traceon; }
   50080 
   50081 
   50082 
   50083 { set +x
   50084 $as_echo "$at_srcdir/conflicts.at:123:  \$PREPARSER ./input '0<0>0'"
   50085 at_fn_check_prepare_dynamic " $PREPARSER ./input '0<0>0'" "conflicts.at:123"
   50086 ( $at_check_trace;  $PREPARSER ./input '0<0>0'
   50087 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50088 at_status=$? at_failed=false
   50089 $at_check_filter
   50090 echo stderr:; tee stderr <"$at_stderr"
   50091 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50092 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:123"
   50093 $at_failed && at_fn_log_failure
   50094 $at_traceon; }
   50095 
   50096 { set +x
   50097 $as_echo "$at_srcdir/conflicts.at:123: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   50098 at_fn_check_prepare_trace "conflicts.at:123"
   50099 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   50100 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50101 at_status=$? at_failed=false
   50102 $at_check_filter
   50103 echo >>"$at_stderr"; $as_echo "syntax error, unexpected '>'
   50104 " | \
   50105   $at_diff - "$at_stderr" || at_failed=:
   50106 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50107 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:123"
   50108 $at_failed && at_fn_log_failure
   50109 $at_traceon; }
   50110 
   50111 
   50112 
   50113 
   50114 
   50115 # We must disable default reductions in inconsistent states in order to
   50116 # have an explicit list of all expected tokens.
   50117 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   50118   at_save_special_files
   50119   mkdir xml-tests
   50120     # Don't combine these Bison invocations since we want to be sure that
   50121   # --report=all isn't required to get the full XML file.
   50122   { set +x
   50123 $as_echo "$at_srcdir/conflicts.at:127: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   50124                   --graph=xml-tests/test.dot -Dlr.default-reductions=consistent -o input.c input.y"
   50125 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:127"
   50126 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   50127                   --graph=xml-tests/test.dot -Dlr.default-reductions=consistent -o input.c input.y
   50128 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50129 at_status=$? at_failed=false
   50130 $at_check_filter
   50131 echo stderr:; cat "$at_stderr"
   50132 echo stdout:; cat "$at_stdout"
   50133 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:127"
   50134 $at_failed && at_fn_log_failure
   50135 $at_traceon; }
   50136 
   50137   { set +x
   50138 $as_echo "$at_srcdir/conflicts.at:127: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Dlr.default-reductions=consistent -o input.c input.y"
   50139 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Dlr.default-reductions=consistent -o input.c input.y" "conflicts.at:127"
   50140 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Dlr.default-reductions=consistent -o input.c input.y
   50141 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50142 at_status=$? at_failed=false
   50143 $at_check_filter
   50144 echo stderr:; cat "$at_stderr"
   50145 echo stdout:; cat "$at_stdout"
   50146 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:127"
   50147 $at_failed && at_fn_log_failure
   50148 $at_traceon; }
   50149 
   50150     cp xml-tests/test.output expout
   50151   { set +x
   50152 $as_echo "$at_srcdir/conflicts.at:127: \$XSLTPROC \\
   50153              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   50154              xml-tests/test.xml"
   50155 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:127"
   50156 ( $at_check_trace; $XSLTPROC \
   50157              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   50158              xml-tests/test.xml
   50159 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50160 at_status=$? at_failed=false
   50161 $at_check_filter
   50162 at_fn_diff_devnull "$at_stderr" || at_failed=:
   50163 $at_diff expout "$at_stdout" || at_failed=:
   50164 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:127"
   50165 $at_failed && at_fn_log_failure
   50166 $at_traceon; }
   50167 
   50168   sort xml-tests/test.dot > expout
   50169   { set +x
   50170 $as_echo "$at_srcdir/conflicts.at:127: \$XSLTPROC \\
   50171              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   50172              xml-tests/test.xml | sort"
   50173 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:127"
   50174 ( $at_check_trace; $XSLTPROC \
   50175              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   50176              xml-tests/test.xml | sort
   50177 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50178 at_status=$? at_failed=false
   50179 $at_check_filter
   50180 at_fn_diff_devnull "$at_stderr" || at_failed=:
   50181 $at_diff expout "$at_stdout" || at_failed=:
   50182 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:127"
   50183 $at_failed && at_fn_log_failure
   50184 $at_traceon; }
   50185 
   50186   rm -rf xml-tests expout
   50187   at_restore_special_files
   50188 fi
   50189 { set +x
   50190 $as_echo "$at_srcdir/conflicts.at:127: bison -Dlr.default-reductions=consistent -o input.c input.y"
   50191 at_fn_check_prepare_trace "conflicts.at:127"
   50192 ( $at_check_trace; bison -Dlr.default-reductions=consistent -o input.c input.y
   50193 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50194 at_status=$? at_failed=false
   50195 $at_check_filter
   50196 at_fn_diff_devnull "$at_stderr" || at_failed=:
   50197 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50198 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:127"
   50199 $at_failed && at_fn_log_failure
   50200 $at_traceon; }
   50201 
   50202 
   50203 { set +x
   50204 $as_echo "$at_srcdir/conflicts.at:127: \$BISON_C_WORKS"
   50205 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "conflicts.at:127"
   50206 ( $at_check_trace; $BISON_C_WORKS
   50207 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50208 at_status=$? at_failed=false
   50209 $at_check_filter
   50210 echo stderr:; cat "$at_stderr"
   50211 echo stdout:; cat "$at_stdout"
   50212 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:127"
   50213 $at_failed && at_fn_log_failure
   50214 $at_traceon; }
   50215 
   50216 { set +x
   50217 $as_echo "$at_srcdir/conflicts.at:127: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   50218 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "conflicts.at:127"
   50219 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   50220 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50221 at_status=$? at_failed=false
   50222 $at_check_filter
   50223 echo stderr:; cat "$at_stderr"
   50224 echo stdout:; cat "$at_stdout"
   50225 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:127"
   50226 $at_failed && at_fn_log_failure
   50227 $at_traceon; }
   50228 
   50229 
   50230 
   50231 
   50232 { set +x
   50233 $as_echo "$at_srcdir/conflicts.at:127:  \$PREPARSER ./input '0<0'"
   50234 at_fn_check_prepare_dynamic " $PREPARSER ./input '0<0'" "conflicts.at:127"
   50235 ( $at_check_trace;  $PREPARSER ./input '0<0'
   50236 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50237 at_status=$? at_failed=false
   50238 $at_check_filter
   50239 echo stderr:; tee stderr <"$at_stderr"
   50240 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50241 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:127"
   50242 $at_failed && at_fn_log_failure
   50243 $at_traceon; }
   50244 
   50245 { set +x
   50246 $as_echo "$at_srcdir/conflicts.at:127: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   50247 at_fn_check_prepare_trace "conflicts.at:127"
   50248 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   50249 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50250 at_status=$? at_failed=false
   50251 $at_check_filter
   50252 at_fn_diff_devnull "$at_stderr" || at_failed=:
   50253 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50254 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:127"
   50255 $at_failed && at_fn_log_failure
   50256 $at_traceon; }
   50257 
   50258 
   50259 { set +x
   50260 $as_echo "$at_srcdir/conflicts.at:127:  \$PREPARSER ./input '0<0<0'"
   50261 at_fn_check_prepare_dynamic " $PREPARSER ./input '0<0<0'" "conflicts.at:127"
   50262 ( $at_check_trace;  $PREPARSER ./input '0<0<0'
   50263 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50264 at_status=$? at_failed=false
   50265 $at_check_filter
   50266 echo stderr:; tee stderr <"$at_stderr"
   50267 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50268 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:127"
   50269 $at_failed && at_fn_log_failure
   50270 $at_traceon; }
   50271 
   50272 { set +x
   50273 $as_echo "$at_srcdir/conflicts.at:127: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   50274 at_fn_check_prepare_trace "conflicts.at:127"
   50275 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   50276 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50277 at_status=$? at_failed=false
   50278 $at_check_filter
   50279 echo >>"$at_stderr"; $as_echo "syntax error, unexpected '<', expecting \$end
   50280 " | \
   50281   $at_diff - "$at_stderr" || at_failed=:
   50282 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50283 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:127"
   50284 $at_failed && at_fn_log_failure
   50285 $at_traceon; }
   50286 
   50287 
   50288 
   50289 { set +x
   50290 $as_echo "$at_srcdir/conflicts.at:127:  \$PREPARSER ./input '0>0'"
   50291 at_fn_check_prepare_dynamic " $PREPARSER ./input '0>0'" "conflicts.at:127"
   50292 ( $at_check_trace;  $PREPARSER ./input '0>0'
   50293 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50294 at_status=$? at_failed=false
   50295 $at_check_filter
   50296 echo stderr:; tee stderr <"$at_stderr"
   50297 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50298 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:127"
   50299 $at_failed && at_fn_log_failure
   50300 $at_traceon; }
   50301 
   50302 { set +x
   50303 $as_echo "$at_srcdir/conflicts.at:127: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   50304 at_fn_check_prepare_trace "conflicts.at:127"
   50305 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   50306 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50307 at_status=$? at_failed=false
   50308 $at_check_filter
   50309 at_fn_diff_devnull "$at_stderr" || at_failed=:
   50310 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50311 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:127"
   50312 $at_failed && at_fn_log_failure
   50313 $at_traceon; }
   50314 
   50315 
   50316 { set +x
   50317 $as_echo "$at_srcdir/conflicts.at:127:  \$PREPARSER ./input '0>0>0'"
   50318 at_fn_check_prepare_dynamic " $PREPARSER ./input '0>0>0'" "conflicts.at:127"
   50319 ( $at_check_trace;  $PREPARSER ./input '0>0>0'
   50320 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50321 at_status=$? at_failed=false
   50322 $at_check_filter
   50323 echo stderr:; tee stderr <"$at_stderr"
   50324 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50325 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:127"
   50326 $at_failed && at_fn_log_failure
   50327 $at_traceon; }
   50328 
   50329 { set +x
   50330 $as_echo "$at_srcdir/conflicts.at:127: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   50331 at_fn_check_prepare_trace "conflicts.at:127"
   50332 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   50333 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50334 at_status=$? at_failed=false
   50335 $at_check_filter
   50336 echo >>"$at_stderr"; $as_echo "syntax error, unexpected '>', expecting \$end
   50337 " | \
   50338   $at_diff - "$at_stderr" || at_failed=:
   50339 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50340 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:127"
   50341 $at_failed && at_fn_log_failure
   50342 $at_traceon; }
   50343 
   50344 
   50345 
   50346 { set +x
   50347 $as_echo "$at_srcdir/conflicts.at:127:  \$PREPARSER ./input '0<0>0'"
   50348 at_fn_check_prepare_dynamic " $PREPARSER ./input '0<0>0'" "conflicts.at:127"
   50349 ( $at_check_trace;  $PREPARSER ./input '0<0>0'
   50350 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50351 at_status=$? at_failed=false
   50352 $at_check_filter
   50353 echo stderr:; tee stderr <"$at_stderr"
   50354 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50355 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:127"
   50356 $at_failed && at_fn_log_failure
   50357 $at_traceon; }
   50358 
   50359 { set +x
   50360 $as_echo "$at_srcdir/conflicts.at:127: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   50361 at_fn_check_prepare_trace "conflicts.at:127"
   50362 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   50363 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50364 at_status=$? at_failed=false
   50365 $at_check_filter
   50366 echo >>"$at_stderr"; $as_echo "syntax error, unexpected '>', expecting \$end
   50367 " | \
   50368   $at_diff - "$at_stderr" || at_failed=:
   50369 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50370 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:127"
   50371 $at_failed && at_fn_log_failure
   50372 $at_traceon; }
   50373 
   50374 
   50375 
   50376 
   50377 
   50378 # lr.default-reductions=consistent happens to work for this test case.
   50379 # However, for other grammars, lookahead sets can be merged for
   50380 # different left contexts, so it is still possible to have an incorrect
   50381 # expected list.  Canonical LR is almost a general solution (that is, it
   50382 # can fail only when %nonassoc is used), so make sure it gives the same
   50383 # result as above.
   50384 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   50385   at_save_special_files
   50386   mkdir xml-tests
   50387     # Don't combine these Bison invocations since we want to be sure that
   50388   # --report=all isn't required to get the full XML file.
   50389   { set +x
   50390 $as_echo "$at_srcdir/conflicts.at:136: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   50391                   --graph=xml-tests/test.dot -Dlr.type=canonical-lr -o input.c input.y"
   50392 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:136"
   50393 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   50394                   --graph=xml-tests/test.dot -Dlr.type=canonical-lr -o input.c input.y
   50395 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50396 at_status=$? at_failed=false
   50397 $at_check_filter
   50398 echo stderr:; cat "$at_stderr"
   50399 echo stdout:; cat "$at_stdout"
   50400 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:136"
   50401 $at_failed && at_fn_log_failure
   50402 $at_traceon; }
   50403 
   50404   { set +x
   50405 $as_echo "$at_srcdir/conflicts.at:136: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Dlr.type=canonical-lr -o input.c input.y"
   50406 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Dlr.type=canonical-lr -o input.c input.y" "conflicts.at:136"
   50407 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Dlr.type=canonical-lr -o input.c input.y
   50408 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50409 at_status=$? at_failed=false
   50410 $at_check_filter
   50411 echo stderr:; cat "$at_stderr"
   50412 echo stdout:; cat "$at_stdout"
   50413 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:136"
   50414 $at_failed && at_fn_log_failure
   50415 $at_traceon; }
   50416 
   50417     cp xml-tests/test.output expout
   50418   { set +x
   50419 $as_echo "$at_srcdir/conflicts.at:136: \$XSLTPROC \\
   50420              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   50421              xml-tests/test.xml"
   50422 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:136"
   50423 ( $at_check_trace; $XSLTPROC \
   50424              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   50425              xml-tests/test.xml
   50426 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50427 at_status=$? at_failed=false
   50428 $at_check_filter
   50429 at_fn_diff_devnull "$at_stderr" || at_failed=:
   50430 $at_diff expout "$at_stdout" || at_failed=:
   50431 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:136"
   50432 $at_failed && at_fn_log_failure
   50433 $at_traceon; }
   50434 
   50435   sort xml-tests/test.dot > expout
   50436   { set +x
   50437 $as_echo "$at_srcdir/conflicts.at:136: \$XSLTPROC \\
   50438              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   50439              xml-tests/test.xml | sort"
   50440 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:136"
   50441 ( $at_check_trace; $XSLTPROC \
   50442              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   50443              xml-tests/test.xml | sort
   50444 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50445 at_status=$? at_failed=false
   50446 $at_check_filter
   50447 at_fn_diff_devnull "$at_stderr" || at_failed=:
   50448 $at_diff expout "$at_stdout" || at_failed=:
   50449 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:136"
   50450 $at_failed && at_fn_log_failure
   50451 $at_traceon; }
   50452 
   50453   rm -rf xml-tests expout
   50454   at_restore_special_files
   50455 fi
   50456 { set +x
   50457 $as_echo "$at_srcdir/conflicts.at:136: bison -Dlr.type=canonical-lr -o input.c input.y"
   50458 at_fn_check_prepare_trace "conflicts.at:136"
   50459 ( $at_check_trace; bison -Dlr.type=canonical-lr -o input.c input.y
   50460 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50461 at_status=$? at_failed=false
   50462 $at_check_filter
   50463 at_fn_diff_devnull "$at_stderr" || at_failed=:
   50464 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50465 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:136"
   50466 $at_failed && at_fn_log_failure
   50467 $at_traceon; }
   50468 
   50469 
   50470 { set +x
   50471 $as_echo "$at_srcdir/conflicts.at:136: \$BISON_C_WORKS"
   50472 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "conflicts.at:136"
   50473 ( $at_check_trace; $BISON_C_WORKS
   50474 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50475 at_status=$? at_failed=false
   50476 $at_check_filter
   50477 echo stderr:; cat "$at_stderr"
   50478 echo stdout:; cat "$at_stdout"
   50479 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:136"
   50480 $at_failed && at_fn_log_failure
   50481 $at_traceon; }
   50482 
   50483 { set +x
   50484 $as_echo "$at_srcdir/conflicts.at:136: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   50485 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "conflicts.at:136"
   50486 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   50487 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50488 at_status=$? at_failed=false
   50489 $at_check_filter
   50490 echo stderr:; cat "$at_stderr"
   50491 echo stdout:; cat "$at_stdout"
   50492 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:136"
   50493 $at_failed && at_fn_log_failure
   50494 $at_traceon; }
   50495 
   50496 
   50497 
   50498 
   50499 { set +x
   50500 $as_echo "$at_srcdir/conflicts.at:136:  \$PREPARSER ./input '0<0'"
   50501 at_fn_check_prepare_dynamic " $PREPARSER ./input '0<0'" "conflicts.at:136"
   50502 ( $at_check_trace;  $PREPARSER ./input '0<0'
   50503 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50504 at_status=$? at_failed=false
   50505 $at_check_filter
   50506 echo stderr:; tee stderr <"$at_stderr"
   50507 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50508 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:136"
   50509 $at_failed && at_fn_log_failure
   50510 $at_traceon; }
   50511 
   50512 { set +x
   50513 $as_echo "$at_srcdir/conflicts.at:136: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   50514 at_fn_check_prepare_trace "conflicts.at:136"
   50515 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   50516 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50517 at_status=$? at_failed=false
   50518 $at_check_filter
   50519 at_fn_diff_devnull "$at_stderr" || at_failed=:
   50520 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50521 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:136"
   50522 $at_failed && at_fn_log_failure
   50523 $at_traceon; }
   50524 
   50525 
   50526 { set +x
   50527 $as_echo "$at_srcdir/conflicts.at:136:  \$PREPARSER ./input '0<0<0'"
   50528 at_fn_check_prepare_dynamic " $PREPARSER ./input '0<0<0'" "conflicts.at:136"
   50529 ( $at_check_trace;  $PREPARSER ./input '0<0<0'
   50530 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50531 at_status=$? at_failed=false
   50532 $at_check_filter
   50533 echo stderr:; tee stderr <"$at_stderr"
   50534 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50535 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:136"
   50536 $at_failed && at_fn_log_failure
   50537 $at_traceon; }
   50538 
   50539 { set +x
   50540 $as_echo "$at_srcdir/conflicts.at:136: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   50541 at_fn_check_prepare_trace "conflicts.at:136"
   50542 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   50543 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50544 at_status=$? at_failed=false
   50545 $at_check_filter
   50546 echo >>"$at_stderr"; $as_echo "syntax error, unexpected '<', expecting \$end
   50547 " | \
   50548   $at_diff - "$at_stderr" || at_failed=:
   50549 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50550 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:136"
   50551 $at_failed && at_fn_log_failure
   50552 $at_traceon; }
   50553 
   50554 
   50555 
   50556 { set +x
   50557 $as_echo "$at_srcdir/conflicts.at:136:  \$PREPARSER ./input '0>0'"
   50558 at_fn_check_prepare_dynamic " $PREPARSER ./input '0>0'" "conflicts.at:136"
   50559 ( $at_check_trace;  $PREPARSER ./input '0>0'
   50560 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50561 at_status=$? at_failed=false
   50562 $at_check_filter
   50563 echo stderr:; tee stderr <"$at_stderr"
   50564 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50565 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:136"
   50566 $at_failed && at_fn_log_failure
   50567 $at_traceon; }
   50568 
   50569 { set +x
   50570 $as_echo "$at_srcdir/conflicts.at:136: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   50571 at_fn_check_prepare_trace "conflicts.at:136"
   50572 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   50573 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50574 at_status=$? at_failed=false
   50575 $at_check_filter
   50576 at_fn_diff_devnull "$at_stderr" || at_failed=:
   50577 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50578 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:136"
   50579 $at_failed && at_fn_log_failure
   50580 $at_traceon; }
   50581 
   50582 
   50583 { set +x
   50584 $as_echo "$at_srcdir/conflicts.at:136:  \$PREPARSER ./input '0>0>0'"
   50585 at_fn_check_prepare_dynamic " $PREPARSER ./input '0>0>0'" "conflicts.at:136"
   50586 ( $at_check_trace;  $PREPARSER ./input '0>0>0'
   50587 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50588 at_status=$? at_failed=false
   50589 $at_check_filter
   50590 echo stderr:; tee stderr <"$at_stderr"
   50591 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50592 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:136"
   50593 $at_failed && at_fn_log_failure
   50594 $at_traceon; }
   50595 
   50596 { set +x
   50597 $as_echo "$at_srcdir/conflicts.at:136: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   50598 at_fn_check_prepare_trace "conflicts.at:136"
   50599 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   50600 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50601 at_status=$? at_failed=false
   50602 $at_check_filter
   50603 echo >>"$at_stderr"; $as_echo "syntax error, unexpected '>', expecting \$end
   50604 " | \
   50605   $at_diff - "$at_stderr" || at_failed=:
   50606 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50607 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:136"
   50608 $at_failed && at_fn_log_failure
   50609 $at_traceon; }
   50610 
   50611 
   50612 
   50613 { set +x
   50614 $as_echo "$at_srcdir/conflicts.at:136:  \$PREPARSER ./input '0<0>0'"
   50615 at_fn_check_prepare_dynamic " $PREPARSER ./input '0<0>0'" "conflicts.at:136"
   50616 ( $at_check_trace;  $PREPARSER ./input '0<0>0'
   50617 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50618 at_status=$? at_failed=false
   50619 $at_check_filter
   50620 echo stderr:; tee stderr <"$at_stderr"
   50621 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50622 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:136"
   50623 $at_failed && at_fn_log_failure
   50624 $at_traceon; }
   50625 
   50626 { set +x
   50627 $as_echo "$at_srcdir/conflicts.at:136: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   50628 at_fn_check_prepare_trace "conflicts.at:136"
   50629 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   50630 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50631 at_status=$? at_failed=false
   50632 $at_check_filter
   50633 echo >>"$at_stderr"; $as_echo "syntax error, unexpected '>', expecting \$end
   50634 " | \
   50635   $at_diff - "$at_stderr" || at_failed=:
   50636 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50637 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:136"
   50638 $at_failed && at_fn_log_failure
   50639 $at_traceon; }
   50640 
   50641 
   50642 
   50643 
   50644 
   50645 # parse.lac=full is a completely general solution that does not require
   50646 # any of the above sacrifices.  Of course, it does not extend the
   50647 # language-recognition power of LALR to (IE)LR, but it does ensure that
   50648 # the reported list of expected tokens matches what the given parser
   50649 # would have accepted in place of the unexpected token.
   50650 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   50651   at_save_special_files
   50652   mkdir xml-tests
   50653     # Don't combine these Bison invocations since we want to be sure that
   50654   # --report=all isn't required to get the full XML file.
   50655   { set +x
   50656 $as_echo "$at_srcdir/conflicts.at:143: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   50657                   --graph=xml-tests/test.dot -Dparse.lac=full -o input.c input.y"
   50658 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:143"
   50659 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   50660                   --graph=xml-tests/test.dot -Dparse.lac=full -o input.c input.y
   50661 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50662 at_status=$? at_failed=false
   50663 $at_check_filter
   50664 echo stderr:; cat "$at_stderr"
   50665 echo stdout:; cat "$at_stdout"
   50666 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:143"
   50667 $at_failed && at_fn_log_failure
   50668 $at_traceon; }
   50669 
   50670   { set +x
   50671 $as_echo "$at_srcdir/conflicts.at:143: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Dparse.lac=full -o input.c input.y"
   50672 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Dparse.lac=full -o input.c input.y" "conflicts.at:143"
   50673 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Dparse.lac=full -o input.c input.y
   50674 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50675 at_status=$? at_failed=false
   50676 $at_check_filter
   50677 echo stderr:; cat "$at_stderr"
   50678 echo stdout:; cat "$at_stdout"
   50679 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:143"
   50680 $at_failed && at_fn_log_failure
   50681 $at_traceon; }
   50682 
   50683     cp xml-tests/test.output expout
   50684   { set +x
   50685 $as_echo "$at_srcdir/conflicts.at:143: \$XSLTPROC \\
   50686              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   50687              xml-tests/test.xml"
   50688 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:143"
   50689 ( $at_check_trace; $XSLTPROC \
   50690              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   50691              xml-tests/test.xml
   50692 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50693 at_status=$? at_failed=false
   50694 $at_check_filter
   50695 at_fn_diff_devnull "$at_stderr" || at_failed=:
   50696 $at_diff expout "$at_stdout" || at_failed=:
   50697 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:143"
   50698 $at_failed && at_fn_log_failure
   50699 $at_traceon; }
   50700 
   50701   sort xml-tests/test.dot > expout
   50702   { set +x
   50703 $as_echo "$at_srcdir/conflicts.at:143: \$XSLTPROC \\
   50704              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   50705              xml-tests/test.xml | sort"
   50706 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:143"
   50707 ( $at_check_trace; $XSLTPROC \
   50708              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   50709              xml-tests/test.xml | sort
   50710 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50711 at_status=$? at_failed=false
   50712 $at_check_filter
   50713 at_fn_diff_devnull "$at_stderr" || at_failed=:
   50714 $at_diff expout "$at_stdout" || at_failed=:
   50715 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:143"
   50716 $at_failed && at_fn_log_failure
   50717 $at_traceon; }
   50718 
   50719   rm -rf xml-tests expout
   50720   at_restore_special_files
   50721 fi
   50722 { set +x
   50723 $as_echo "$at_srcdir/conflicts.at:143: bison -Dparse.lac=full -o input.c input.y"
   50724 at_fn_check_prepare_trace "conflicts.at:143"
   50725 ( $at_check_trace; bison -Dparse.lac=full -o input.c input.y
   50726 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50727 at_status=$? at_failed=false
   50728 $at_check_filter
   50729 at_fn_diff_devnull "$at_stderr" || at_failed=:
   50730 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50731 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:143"
   50732 $at_failed && at_fn_log_failure
   50733 $at_traceon; }
   50734 
   50735 
   50736 { set +x
   50737 $as_echo "$at_srcdir/conflicts.at:143: \$BISON_C_WORKS"
   50738 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "conflicts.at:143"
   50739 ( $at_check_trace; $BISON_C_WORKS
   50740 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50741 at_status=$? at_failed=false
   50742 $at_check_filter
   50743 echo stderr:; cat "$at_stderr"
   50744 echo stdout:; cat "$at_stdout"
   50745 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:143"
   50746 $at_failed && at_fn_log_failure
   50747 $at_traceon; }
   50748 
   50749 { set +x
   50750 $as_echo "$at_srcdir/conflicts.at:143: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   50751 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "conflicts.at:143"
   50752 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   50753 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50754 at_status=$? at_failed=false
   50755 $at_check_filter
   50756 echo stderr:; cat "$at_stderr"
   50757 echo stdout:; cat "$at_stdout"
   50758 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:143"
   50759 $at_failed && at_fn_log_failure
   50760 $at_traceon; }
   50761 
   50762 
   50763 
   50764 
   50765 { set +x
   50766 $as_echo "$at_srcdir/conflicts.at:143:  \$PREPARSER ./input '0<0'"
   50767 at_fn_check_prepare_dynamic " $PREPARSER ./input '0<0'" "conflicts.at:143"
   50768 ( $at_check_trace;  $PREPARSER ./input '0<0'
   50769 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50770 at_status=$? at_failed=false
   50771 $at_check_filter
   50772 echo stderr:; tee stderr <"$at_stderr"
   50773 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50774 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:143"
   50775 $at_failed && at_fn_log_failure
   50776 $at_traceon; }
   50777 
   50778 { set +x
   50779 $as_echo "$at_srcdir/conflicts.at:143: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   50780 at_fn_check_prepare_trace "conflicts.at:143"
   50781 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   50782 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50783 at_status=$? at_failed=false
   50784 $at_check_filter
   50785 at_fn_diff_devnull "$at_stderr" || at_failed=:
   50786 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50787 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:143"
   50788 $at_failed && at_fn_log_failure
   50789 $at_traceon; }
   50790 
   50791 
   50792 { set +x
   50793 $as_echo "$at_srcdir/conflicts.at:143:  \$PREPARSER ./input '0<0<0'"
   50794 at_fn_check_prepare_dynamic " $PREPARSER ./input '0<0<0'" "conflicts.at:143"
   50795 ( $at_check_trace;  $PREPARSER ./input '0<0<0'
   50796 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50797 at_status=$? at_failed=false
   50798 $at_check_filter
   50799 echo stderr:; tee stderr <"$at_stderr"
   50800 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50801 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:143"
   50802 $at_failed && at_fn_log_failure
   50803 $at_traceon; }
   50804 
   50805 { set +x
   50806 $as_echo "$at_srcdir/conflicts.at:143: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   50807 at_fn_check_prepare_trace "conflicts.at:143"
   50808 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   50809 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50810 at_status=$? at_failed=false
   50811 $at_check_filter
   50812 echo >>"$at_stderr"; $as_echo "syntax error, unexpected '<', expecting \$end
   50813 " | \
   50814   $at_diff - "$at_stderr" || at_failed=:
   50815 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50816 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:143"
   50817 $at_failed && at_fn_log_failure
   50818 $at_traceon; }
   50819 
   50820 
   50821 
   50822 { set +x
   50823 $as_echo "$at_srcdir/conflicts.at:143:  \$PREPARSER ./input '0>0'"
   50824 at_fn_check_prepare_dynamic " $PREPARSER ./input '0>0'" "conflicts.at:143"
   50825 ( $at_check_trace;  $PREPARSER ./input '0>0'
   50826 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50827 at_status=$? at_failed=false
   50828 $at_check_filter
   50829 echo stderr:; tee stderr <"$at_stderr"
   50830 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50831 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:143"
   50832 $at_failed && at_fn_log_failure
   50833 $at_traceon; }
   50834 
   50835 { set +x
   50836 $as_echo "$at_srcdir/conflicts.at:143: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   50837 at_fn_check_prepare_trace "conflicts.at:143"
   50838 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   50839 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50840 at_status=$? at_failed=false
   50841 $at_check_filter
   50842 at_fn_diff_devnull "$at_stderr" || at_failed=:
   50843 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50844 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:143"
   50845 $at_failed && at_fn_log_failure
   50846 $at_traceon; }
   50847 
   50848 
   50849 { set +x
   50850 $as_echo "$at_srcdir/conflicts.at:143:  \$PREPARSER ./input '0>0>0'"
   50851 at_fn_check_prepare_dynamic " $PREPARSER ./input '0>0>0'" "conflicts.at:143"
   50852 ( $at_check_trace;  $PREPARSER ./input '0>0>0'
   50853 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50854 at_status=$? at_failed=false
   50855 $at_check_filter
   50856 echo stderr:; tee stderr <"$at_stderr"
   50857 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50858 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:143"
   50859 $at_failed && at_fn_log_failure
   50860 $at_traceon; }
   50861 
   50862 { set +x
   50863 $as_echo "$at_srcdir/conflicts.at:143: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   50864 at_fn_check_prepare_trace "conflicts.at:143"
   50865 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   50866 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50867 at_status=$? at_failed=false
   50868 $at_check_filter
   50869 echo >>"$at_stderr"; $as_echo "syntax error, unexpected '>', expecting \$end
   50870 " | \
   50871   $at_diff - "$at_stderr" || at_failed=:
   50872 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50873 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:143"
   50874 $at_failed && at_fn_log_failure
   50875 $at_traceon; }
   50876 
   50877 
   50878 
   50879 { set +x
   50880 $as_echo "$at_srcdir/conflicts.at:143:  \$PREPARSER ./input '0<0>0'"
   50881 at_fn_check_prepare_dynamic " $PREPARSER ./input '0<0>0'" "conflicts.at:143"
   50882 ( $at_check_trace;  $PREPARSER ./input '0<0>0'
   50883 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50884 at_status=$? at_failed=false
   50885 $at_check_filter
   50886 echo stderr:; tee stderr <"$at_stderr"
   50887 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50888 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:143"
   50889 $at_failed && at_fn_log_failure
   50890 $at_traceon; }
   50891 
   50892 { set +x
   50893 $as_echo "$at_srcdir/conflicts.at:143: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   50894 at_fn_check_prepare_trace "conflicts.at:143"
   50895 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   50896 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   50897 at_status=$? at_failed=false
   50898 $at_check_filter
   50899 echo >>"$at_stderr"; $as_echo "syntax error, unexpected '>', expecting \$end
   50900 " | \
   50901   $at_diff - "$at_stderr" || at_failed=:
   50902 at_fn_diff_devnull "$at_stdout" || at_failed=:
   50903 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:143"
   50904 $at_failed && at_fn_log_failure
   50905 $at_traceon; }
   50906 
   50907 
   50908 
   50909 
   50910 
   50911 
   50912 
   50913   set +x
   50914   $at_times_p && times >"$at_times_file"
   50915 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   50916 read at_status <"$at_status_file"
   50917 #AT_STOP_182
   50918 #AT_START_183
   50919 at_fn_group_banner 183 'conflicts.at:155' \
   50920   "%error-verbose and consistent errors" "           " 10
   50921 at_xfail=no
   50922 (
   50923   $as_echo "183. $at_setup_line: testing $at_desc ..."
   50924   $at_traceon
   50925 
   50926 
   50927 
   50928 
   50929 
   50930 
   50931 
   50932 
   50933 # Unfortunately, no expected tokens are reported even though 'b' can be
   50934 # accepted.  Nevertheless, the main point of this test is to make sure
   50935 # that at least the unexpected token is reported.  In a previous version
   50936 # of Bison, it wasn't reported because the error is detected in a
   50937 # consistent state with an error action, and that case always triggered
   50938 # the simple "syntax error" message.
   50939 #
   50940 # The point isn't to test IELR here, but state merging happens to
   50941 # complicate this example.
   50942 
   50943 
   50944 
   50945 
   50946 
   50947 
   50948 cat >input.y <<'_ATEOF'
   50949 %code top {
   50950 #include <config.h>
   50951 /* We don't need perfect functions for these tests. */
   50952 #undef malloc
   50953 #undef memcmp
   50954 #undef realloc
   50955 }
   50956 
   50957 
   50958 
   50959 %code {
   50960   #include <assert.h>
   50961   #include <stdio.h>
   50962   static void yyerror ( const char *msg);
   50963   int yylex (YYSTYPE *lvalp);
   50964   #define USE(Var)
   50965 }
   50966 
   50967 %define api.pure
   50968 
   50969 %define lr.type ielr
   50970 
   50971 %error-verbose
   50972 
   50973 %%
   50974 
   50975 %nonassoc 'a';
   50976 
   50977 start: consistent-error-on-a-a 'a' ;
   50978 
   50979 consistent-error-on-a-a:
   50980     'a' default-reduction
   50981   | 'a' default-reduction 'a'
   50982   | 'a' shift
   50983   ;
   50984 
   50985 default-reduction: /*empty*/ ;
   50986 shift: 'b' ;
   50987 
   50988 // Provide another context in which all rules are useful so that this
   50989 // test case looks a little more realistic.
   50990 start: 'b' consistent-error-on-a-a 'c' ;
   50991 
   50992 
   50993 %%
   50994 
   50995 /*--------.
   50996 | yylex.  |
   50997 `--------*/
   50998 
   50999 int yylex (YYSTYPE *lvalp)
   51000 {
   51001   static char const *input = "a";
   51002   *lvalp = 1;
   51003   return *input++;
   51004 }
   51005 #include <stdio.h>
   51006 /* A C error reporting function.  */
   51007 static
   51008 void yyerror ( const char *msg)
   51009 {
   51010   fprintf (stderr, "%s\n", msg);
   51011 }
   51012 
   51013 
   51014 /*-------.
   51015 | main.  |
   51016 `-------*/
   51017 
   51018 int
   51019 main (void)
   51020 {
   51021   return yyparse ();
   51022 }
   51023 _ATEOF
   51024 
   51025 
   51026 
   51027 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   51028   at_save_special_files
   51029   mkdir xml-tests
   51030     # Don't combine these Bison invocations since we want to be sure that
   51031   # --report=all isn't required to get the full XML file.
   51032   { set +x
   51033 $as_echo "$at_srcdir/conflicts.at:299: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   51034                   --graph=xml-tests/test.dot -o input.c input.y"
   51035 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:299"
   51036 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   51037                   --graph=xml-tests/test.dot -o input.c input.y
   51038 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51039 at_status=$? at_failed=false
   51040 $at_check_filter
   51041 echo stderr:; cat "$at_stderr"
   51042 echo stdout:; cat "$at_stdout"
   51043 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:299"
   51044 $at_failed && at_fn_log_failure
   51045 $at_traceon; }
   51046 
   51047   { set +x
   51048 $as_echo "$at_srcdir/conflicts.at:299: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   51049 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "conflicts.at:299"
   51050 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   51051 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51052 at_status=$? at_failed=false
   51053 $at_check_filter
   51054 echo stderr:; cat "$at_stderr"
   51055 echo stdout:; cat "$at_stdout"
   51056 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:299"
   51057 $at_failed && at_fn_log_failure
   51058 $at_traceon; }
   51059 
   51060     cp xml-tests/test.output expout
   51061   { set +x
   51062 $as_echo "$at_srcdir/conflicts.at:299: \$XSLTPROC \\
   51063              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   51064              xml-tests/test.xml"
   51065 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:299"
   51066 ( $at_check_trace; $XSLTPROC \
   51067              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   51068              xml-tests/test.xml
   51069 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51070 at_status=$? at_failed=false
   51071 $at_check_filter
   51072 at_fn_diff_devnull "$at_stderr" || at_failed=:
   51073 $at_diff expout "$at_stdout" || at_failed=:
   51074 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:299"
   51075 $at_failed && at_fn_log_failure
   51076 $at_traceon; }
   51077 
   51078   sort xml-tests/test.dot > expout
   51079   { set +x
   51080 $as_echo "$at_srcdir/conflicts.at:299: \$XSLTPROC \\
   51081              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   51082              xml-tests/test.xml | sort"
   51083 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:299"
   51084 ( $at_check_trace; $XSLTPROC \
   51085              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   51086              xml-tests/test.xml | sort
   51087 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51088 at_status=$? at_failed=false
   51089 $at_check_filter
   51090 at_fn_diff_devnull "$at_stderr" || at_failed=:
   51091 $at_diff expout "$at_stdout" || at_failed=:
   51092 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:299"
   51093 $at_failed && at_fn_log_failure
   51094 $at_traceon; }
   51095 
   51096   rm -rf xml-tests expout
   51097   at_restore_special_files
   51098 fi
   51099 { set +x
   51100 $as_echo "$at_srcdir/conflicts.at:299: bison -o input.c input.y"
   51101 at_fn_check_prepare_trace "conflicts.at:299"
   51102 ( $at_check_trace; bison -o input.c input.y
   51103 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51104 at_status=$? at_failed=false
   51105 $at_check_filter
   51106 at_fn_diff_devnull "$at_stderr" || at_failed=:
   51107 at_fn_diff_devnull "$at_stdout" || at_failed=:
   51108 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:299"
   51109 $at_failed && at_fn_log_failure
   51110 $at_traceon; }
   51111 
   51112 
   51113    { set +x
   51114 $as_echo "$at_srcdir/conflicts.at:299: \$BISON_C_WORKS"
   51115 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "conflicts.at:299"
   51116 ( $at_check_trace; $BISON_C_WORKS
   51117 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51118 at_status=$? at_failed=false
   51119 $at_check_filter
   51120 echo stderr:; cat "$at_stderr"
   51121 echo stdout:; cat "$at_stdout"
   51122 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:299"
   51123 $at_failed && at_fn_log_failure
   51124 $at_traceon; }
   51125 
   51126 { set +x
   51127 $as_echo "$at_srcdir/conflicts.at:299: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   51128 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "conflicts.at:299"
   51129 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   51130 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51131 at_status=$? at_failed=false
   51132 $at_check_filter
   51133 echo stderr:; cat "$at_stderr"
   51134 echo stdout:; cat "$at_stdout"
   51135 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:299"
   51136 $at_failed && at_fn_log_failure
   51137 $at_traceon; }
   51138 
   51139 
   51140 
   51141 
   51142 
   51143 { set +x
   51144 $as_echo "$at_srcdir/conflicts.at:299:  \$PREPARSER ./input"
   51145 at_fn_check_prepare_dynamic " $PREPARSER ./input" "conflicts.at:299"
   51146 ( $at_check_trace;  $PREPARSER ./input
   51147 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51148 at_status=$? at_failed=false
   51149 $at_check_filter
   51150 echo stderr:; tee stderr <"$at_stderr"
   51151 at_fn_diff_devnull "$at_stdout" || at_failed=:
   51152 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:299"
   51153 $at_failed && at_fn_log_failure
   51154 $at_traceon; }
   51155 
   51156 { set +x
   51157 $as_echo "$at_srcdir/conflicts.at:299: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   51158 at_fn_check_prepare_trace "conflicts.at:299"
   51159 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   51160 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51161 at_status=$? at_failed=false
   51162 $at_check_filter
   51163 echo >>"$at_stderr"; $as_echo "syntax error, unexpected \$end
   51164 " | \
   51165   $at_diff - "$at_stderr" || at_failed=:
   51166 at_fn_diff_devnull "$at_stdout" || at_failed=:
   51167 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:299"
   51168 $at_failed && at_fn_log_failure
   51169 $at_traceon; }
   51170 
   51171 
   51172 
   51173 
   51174 
   51175 
   51176 
   51177 
   51178 
   51179 
   51180 
   51181 
   51182 
   51183 
   51184 cat >input.y <<'_ATEOF'
   51185 %code top {
   51186 #include <config.h>
   51187 /* We don't need perfect functions for these tests. */
   51188 #undef malloc
   51189 #undef memcmp
   51190 #undef realloc
   51191 }
   51192 
   51193 
   51194 
   51195 %code {
   51196   #include <assert.h>
   51197   #include <stdio.h>
   51198   static void yyerror ( const char *msg);
   51199   int yylex (YYSTYPE *lvalp);
   51200   #define USE(Var)
   51201 }
   51202 
   51203 %define api.pure
   51204 
   51205 %define lr.type ielr
   51206                              %glr-parser
   51207 
   51208 %error-verbose
   51209 
   51210 %%
   51211 
   51212 %nonassoc 'a';
   51213 
   51214 start: consistent-error-on-a-a 'a' ;
   51215 
   51216 consistent-error-on-a-a:
   51217     'a' default-reduction
   51218   | 'a' default-reduction 'a'
   51219   | 'a' shift
   51220   ;
   51221 
   51222 default-reduction: /*empty*/ ;
   51223 shift: 'b' ;
   51224 
   51225 // Provide another context in which all rules are useful so that this
   51226 // test case looks a little more realistic.
   51227 start: 'b' consistent-error-on-a-a 'c' ;
   51228 
   51229 
   51230 %%
   51231 
   51232 /*--------.
   51233 | yylex.  |
   51234 `--------*/
   51235 
   51236 int yylex (YYSTYPE *lvalp)
   51237 {
   51238   static char const *input = "a";
   51239   *lvalp = 1;
   51240   return *input++;
   51241 }
   51242 #include <stdio.h>
   51243 /* A C error reporting function.  */
   51244 static
   51245 void yyerror ( const char *msg)
   51246 {
   51247   fprintf (stderr, "%s\n", msg);
   51248 }
   51249 
   51250 
   51251 /*-------.
   51252 | main.  |
   51253 `-------*/
   51254 
   51255 int
   51256 main (void)
   51257 {
   51258   return yyparse ();
   51259 }
   51260 _ATEOF
   51261 
   51262 
   51263 
   51264 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   51265   at_save_special_files
   51266   mkdir xml-tests
   51267     # Don't combine these Bison invocations since we want to be sure that
   51268   # --report=all isn't required to get the full XML file.
   51269   { set +x
   51270 $as_echo "$at_srcdir/conflicts.at:303: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   51271                   --graph=xml-tests/test.dot -o input.c input.y"
   51272 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:303"
   51273 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   51274                   --graph=xml-tests/test.dot -o input.c input.y
   51275 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51276 at_status=$? at_failed=false
   51277 $at_check_filter
   51278 echo stderr:; cat "$at_stderr"
   51279 echo stdout:; cat "$at_stdout"
   51280 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:303"
   51281 $at_failed && at_fn_log_failure
   51282 $at_traceon; }
   51283 
   51284   { set +x
   51285 $as_echo "$at_srcdir/conflicts.at:303: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   51286 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "conflicts.at:303"
   51287 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   51288 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51289 at_status=$? at_failed=false
   51290 $at_check_filter
   51291 echo stderr:; cat "$at_stderr"
   51292 echo stdout:; cat "$at_stdout"
   51293 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:303"
   51294 $at_failed && at_fn_log_failure
   51295 $at_traceon; }
   51296 
   51297     cp xml-tests/test.output expout
   51298   { set +x
   51299 $as_echo "$at_srcdir/conflicts.at:303: \$XSLTPROC \\
   51300              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   51301              xml-tests/test.xml"
   51302 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:303"
   51303 ( $at_check_trace; $XSLTPROC \
   51304              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   51305              xml-tests/test.xml
   51306 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51307 at_status=$? at_failed=false
   51308 $at_check_filter
   51309 at_fn_diff_devnull "$at_stderr" || at_failed=:
   51310 $at_diff expout "$at_stdout" || at_failed=:
   51311 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:303"
   51312 $at_failed && at_fn_log_failure
   51313 $at_traceon; }
   51314 
   51315   sort xml-tests/test.dot > expout
   51316   { set +x
   51317 $as_echo "$at_srcdir/conflicts.at:303: \$XSLTPROC \\
   51318              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   51319              xml-tests/test.xml | sort"
   51320 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:303"
   51321 ( $at_check_trace; $XSLTPROC \
   51322              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   51323              xml-tests/test.xml | sort
   51324 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51325 at_status=$? at_failed=false
   51326 $at_check_filter
   51327 at_fn_diff_devnull "$at_stderr" || at_failed=:
   51328 $at_diff expout "$at_stdout" || at_failed=:
   51329 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:303"
   51330 $at_failed && at_fn_log_failure
   51331 $at_traceon; }
   51332 
   51333   rm -rf xml-tests expout
   51334   at_restore_special_files
   51335 fi
   51336 { set +x
   51337 $as_echo "$at_srcdir/conflicts.at:303: bison -o input.c input.y"
   51338 at_fn_check_prepare_trace "conflicts.at:303"
   51339 ( $at_check_trace; bison -o input.c input.y
   51340 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51341 at_status=$? at_failed=false
   51342 $at_check_filter
   51343 at_fn_diff_devnull "$at_stderr" || at_failed=:
   51344 at_fn_diff_devnull "$at_stdout" || at_failed=:
   51345 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:303"
   51346 $at_failed && at_fn_log_failure
   51347 $at_traceon; }
   51348 
   51349 
   51350    { set +x
   51351 $as_echo "$at_srcdir/conflicts.at:303: \$BISON_C_WORKS"
   51352 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "conflicts.at:303"
   51353 ( $at_check_trace; $BISON_C_WORKS
   51354 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51355 at_status=$? at_failed=false
   51356 $at_check_filter
   51357 echo stderr:; cat "$at_stderr"
   51358 echo stdout:; cat "$at_stdout"
   51359 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:303"
   51360 $at_failed && at_fn_log_failure
   51361 $at_traceon; }
   51362 
   51363 { set +x
   51364 $as_echo "$at_srcdir/conflicts.at:303: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   51365 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "conflicts.at:303"
   51366 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   51367 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51368 at_status=$? at_failed=false
   51369 $at_check_filter
   51370 echo stderr:; cat "$at_stderr"
   51371 echo stdout:; cat "$at_stdout"
   51372 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:303"
   51373 $at_failed && at_fn_log_failure
   51374 $at_traceon; }
   51375 
   51376 
   51377 
   51378 
   51379 
   51380 { set +x
   51381 $as_echo "$at_srcdir/conflicts.at:303:  \$PREPARSER ./input"
   51382 at_fn_check_prepare_dynamic " $PREPARSER ./input" "conflicts.at:303"
   51383 ( $at_check_trace;  $PREPARSER ./input
   51384 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51385 at_status=$? at_failed=false
   51386 $at_check_filter
   51387 echo stderr:; tee stderr <"$at_stderr"
   51388 at_fn_diff_devnull "$at_stdout" || at_failed=:
   51389 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:303"
   51390 $at_failed && at_fn_log_failure
   51391 $at_traceon; }
   51392 
   51393 { set +x
   51394 $as_echo "$at_srcdir/conflicts.at:303: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   51395 at_fn_check_prepare_trace "conflicts.at:303"
   51396 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   51397 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51398 at_status=$? at_failed=false
   51399 $at_check_filter
   51400 echo >>"$at_stderr"; $as_echo "syntax error, unexpected \$end
   51401 " | \
   51402   $at_diff - "$at_stderr" || at_failed=:
   51403 at_fn_diff_devnull "$at_stdout" || at_failed=:
   51404 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:303"
   51405 $at_failed && at_fn_log_failure
   51406 $at_traceon; }
   51407 
   51408 
   51409 
   51410 
   51411 
   51412 
   51413 
   51414 
   51415 
   51416 
   51417 
   51418 
   51419 
   51420 
   51421 cat >input.y <<'_ATEOF'
   51422 %code top {
   51423 #include <config.h>
   51424 /* We don't need perfect functions for these tests. */
   51425 #undef malloc
   51426 #undef memcmp
   51427 #undef realloc
   51428 }
   51429 
   51430 
   51431 
   51432 %code {
   51433   #include <cassert>
   51434   #include <string>
   51435   int yylex (yy::parser::semantic_type *lvalp);
   51436   #define USE(Var)
   51437 }
   51438 
   51439 %defines
   51440 
   51441 %define lr.type ielr
   51442                              %language "c++"
   51443 
   51444 %error-verbose
   51445 
   51446 %%
   51447 
   51448 %nonassoc 'a';
   51449 
   51450 start: consistent-error-on-a-a 'a' ;
   51451 
   51452 consistent-error-on-a-a:
   51453     'a' default-reduction
   51454   | 'a' default-reduction 'a'
   51455   | 'a' shift
   51456   ;
   51457 
   51458 default-reduction: /*empty*/ ;
   51459 shift: 'b' ;
   51460 
   51461 // Provide another context in which all rules are useful so that this
   51462 // test case looks a little more realistic.
   51463 start: 'b' consistent-error-on-a-a 'c' ;
   51464 
   51465 
   51466 %%
   51467 
   51468 /*--------.
   51469 | yylex.  |
   51470 `--------*/
   51471 
   51472 int yylex (yy::parser::semantic_type *lvalp)
   51473 {
   51474   static char const *input = "a";
   51475   *lvalp = 1;
   51476   return *input++;
   51477 }
   51478 /* A C++ error reporting function.  */
   51479 void
   51480 yy::parser::error (const location_type& l, const std::string& m)
   51481 {
   51482   (void) l;
   51483   std::cerr << m << std::endl;
   51484 }
   51485 
   51486 
   51487 /*-------.
   51488 | main.  |
   51489 `-------*/
   51490 
   51491 int
   51492 main (void)
   51493 {
   51494   yy::parser parser;
   51495   return parser.parse ();
   51496 }
   51497 _ATEOF
   51498 
   51499 
   51500 
   51501 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   51502   at_save_special_files
   51503   mkdir xml-tests
   51504     # Don't combine these Bison invocations since we want to be sure that
   51505   # --report=all isn't required to get the full XML file.
   51506   { set +x
   51507 $as_echo "$at_srcdir/conflicts.at:308: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   51508                   --graph=xml-tests/test.dot -o input.cc input.y"
   51509 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:308"
   51510 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   51511                   --graph=xml-tests/test.dot -o input.cc input.y
   51512 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51513 at_status=$? at_failed=false
   51514 $at_check_filter
   51515 echo stderr:; cat "$at_stderr"
   51516 echo stdout:; cat "$at_stdout"
   51517 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:308"
   51518 $at_failed && at_fn_log_failure
   51519 $at_traceon; }
   51520 
   51521   { set +x
   51522 $as_echo "$at_srcdir/conflicts.at:308: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y"
   51523 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y" "conflicts.at:308"
   51524 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y
   51525 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51526 at_status=$? at_failed=false
   51527 $at_check_filter
   51528 echo stderr:; cat "$at_stderr"
   51529 echo stdout:; cat "$at_stdout"
   51530 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:308"
   51531 $at_failed && at_fn_log_failure
   51532 $at_traceon; }
   51533 
   51534     cp xml-tests/test.output expout
   51535   { set +x
   51536 $as_echo "$at_srcdir/conflicts.at:308: \$XSLTPROC \\
   51537              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   51538              xml-tests/test.xml"
   51539 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:308"
   51540 ( $at_check_trace; $XSLTPROC \
   51541              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   51542              xml-tests/test.xml
   51543 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51544 at_status=$? at_failed=false
   51545 $at_check_filter
   51546 at_fn_diff_devnull "$at_stderr" || at_failed=:
   51547 $at_diff expout "$at_stdout" || at_failed=:
   51548 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:308"
   51549 $at_failed && at_fn_log_failure
   51550 $at_traceon; }
   51551 
   51552   sort xml-tests/test.dot > expout
   51553   { set +x
   51554 $as_echo "$at_srcdir/conflicts.at:308: \$XSLTPROC \\
   51555              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   51556              xml-tests/test.xml | sort"
   51557 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:308"
   51558 ( $at_check_trace; $XSLTPROC \
   51559              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   51560              xml-tests/test.xml | sort
   51561 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51562 at_status=$? at_failed=false
   51563 $at_check_filter
   51564 at_fn_diff_devnull "$at_stderr" || at_failed=:
   51565 $at_diff expout "$at_stdout" || at_failed=:
   51566 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:308"
   51567 $at_failed && at_fn_log_failure
   51568 $at_traceon; }
   51569 
   51570   rm -rf xml-tests expout
   51571   at_restore_special_files
   51572 fi
   51573 { set +x
   51574 $as_echo "$at_srcdir/conflicts.at:308: bison -o input.cc input.y"
   51575 at_fn_check_prepare_trace "conflicts.at:308"
   51576 ( $at_check_trace; bison -o input.cc input.y
   51577 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51578 at_status=$? at_failed=false
   51579 $at_check_filter
   51580 at_fn_diff_devnull "$at_stderr" || at_failed=:
   51581 at_fn_diff_devnull "$at_stdout" || at_failed=:
   51582 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:308"
   51583 $at_failed && at_fn_log_failure
   51584 $at_traceon; }
   51585 
   51586 
   51587 
   51588 { set +x
   51589 $as_echo "$at_srcdir/conflicts.at:308: \$BISON_CXX_WORKS"
   51590 at_fn_check_prepare_dynamic "$BISON_CXX_WORKS" "conflicts.at:308"
   51591 ( $at_check_trace; $BISON_CXX_WORKS
   51592 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51593 at_status=$? at_failed=false
   51594 $at_check_filter
   51595 echo stderr:; cat "$at_stderr"
   51596 echo stdout:; cat "$at_stdout"
   51597 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:308"
   51598 $at_failed && at_fn_log_failure
   51599 $at_traceon; }
   51600 
   51601 { set +x
   51602 $as_echo "$at_srcdir/conflicts.at:308: \$CXX \$CXXFLAGS \$CPPFLAGS \$LDFLAGS -o input input.cc \$LIBS"
   51603 at_fn_check_prepare_dynamic "$CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS" "conflicts.at:308"
   51604 ( $at_check_trace; $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS
   51605 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51606 at_status=$? at_failed=false
   51607 $at_check_filter
   51608 echo stderr:; cat "$at_stderr"
   51609 echo stdout:; cat "$at_stdout"
   51610 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:308"
   51611 $at_failed && at_fn_log_failure
   51612 $at_traceon; }
   51613 
   51614 
   51615 
   51616 
   51617 
   51618 { set +x
   51619 $as_echo "$at_srcdir/conflicts.at:308:  \$PREPARSER ./input"
   51620 at_fn_check_prepare_dynamic " $PREPARSER ./input" "conflicts.at:308"
   51621 ( $at_check_trace;  $PREPARSER ./input
   51622 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51623 at_status=$? at_failed=false
   51624 $at_check_filter
   51625 echo stderr:; tee stderr <"$at_stderr"
   51626 at_fn_diff_devnull "$at_stdout" || at_failed=:
   51627 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:308"
   51628 $at_failed && at_fn_log_failure
   51629 $at_traceon; }
   51630 
   51631 { set +x
   51632 $as_echo "$at_srcdir/conflicts.at:308: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   51633 at_fn_check_prepare_trace "conflicts.at:308"
   51634 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   51635 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51636 at_status=$? at_failed=false
   51637 $at_check_filter
   51638 echo >>"$at_stderr"; $as_echo "syntax error, unexpected \$end
   51639 " | \
   51640   $at_diff - "$at_stderr" || at_failed=:
   51641 at_fn_diff_devnull "$at_stdout" || at_failed=:
   51642 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:308"
   51643 $at_failed && at_fn_log_failure
   51644 $at_traceon; }
   51645 
   51646 
   51647 
   51648 
   51649 
   51650 
   51651 
   51652 
   51653 
   51654 
   51655 
   51656 
   51657 
   51658 
   51659 cat >input.y <<'_ATEOF'
   51660 
   51661 
   51662 %code imports {
   51663   import java.io.IOException;
   51664 }
   51665 
   51666 %define lr.type ielr
   51667                              %language "java"
   51668 
   51669 %error-verbose
   51670 
   51671 %%
   51672 
   51673 %nonassoc 'a';
   51674 
   51675 start: consistent-error-on-a-a 'a' ;
   51676 
   51677 consistent-error-on-a-a:
   51678     'a' default-reduction
   51679   | 'a' default-reduction 'a'
   51680   | 'a' shift
   51681   ;
   51682 
   51683 default-reduction: /*empty*/ ;
   51684 shift: 'b' ;
   51685 
   51686 // Provide another context in which all rules are useful so that this
   51687 // test case looks a little more realistic.
   51688 start: 'b' consistent-error-on-a-a 'c' ;
   51689 
   51690 
   51691 %code lexer {
   51692 
   51693 /*--------.
   51694 | yylex.  |
   51695 `--------*/
   51696 
   51697 public String input = "a";
   51698 public int index = 0;
   51699 public int yylex ()
   51700 {
   51701   if (index < input.length ())
   51702     return input.charAt (index++);
   51703   else
   51704     return 0;
   51705 }
   51706 public Object getLVal ()
   51707 {
   51708   return new Integer(1);
   51709 }
   51710 
   51711   public void yyerror (String s)
   51712   {
   51713     System.err.println (s);
   51714   }
   51715 
   51716 };
   51717 
   51718 %%
   51719 
   51720 /*-------.
   51721 | main.  |
   51722 `-------*/
   51723 
   51724 class input
   51725 {
   51726   public static void main (String args[]) throws IOException
   51727   {
   51728     YYParser p = new YYParser ();
   51729     p.parse ();
   51730   }
   51731 }
   51732 _ATEOF
   51733 
   51734 
   51735 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   51736   at_save_special_files
   51737   mkdir xml-tests
   51738     # Don't combine these Bison invocations since we want to be sure that
   51739   # --report=all isn't required to get the full XML file.
   51740   { set +x
   51741 $as_echo "$at_srcdir/conflicts.at:313: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   51742                   --graph=xml-tests/test.dot -o input.java input.y"
   51743 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:313"
   51744 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   51745                   --graph=xml-tests/test.dot -o input.java input.y
   51746 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51747 at_status=$? at_failed=false
   51748 $at_check_filter
   51749 echo stderr:; cat "$at_stderr"
   51750 echo stdout:; cat "$at_stdout"
   51751 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:313"
   51752 $at_failed && at_fn_log_failure
   51753 $at_traceon; }
   51754 
   51755   { set +x
   51756 $as_echo "$at_srcdir/conflicts.at:313: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.java input.y"
   51757 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.java input.y" "conflicts.at:313"
   51758 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.java input.y
   51759 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51760 at_status=$? at_failed=false
   51761 $at_check_filter
   51762 echo stderr:; cat "$at_stderr"
   51763 echo stdout:; cat "$at_stdout"
   51764 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:313"
   51765 $at_failed && at_fn_log_failure
   51766 $at_traceon; }
   51767 
   51768     cp xml-tests/test.output expout
   51769   { set +x
   51770 $as_echo "$at_srcdir/conflicts.at:313: \$XSLTPROC \\
   51771              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   51772              xml-tests/test.xml"
   51773 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:313"
   51774 ( $at_check_trace; $XSLTPROC \
   51775              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   51776              xml-tests/test.xml
   51777 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51778 at_status=$? at_failed=false
   51779 $at_check_filter
   51780 at_fn_diff_devnull "$at_stderr" || at_failed=:
   51781 $at_diff expout "$at_stdout" || at_failed=:
   51782 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:313"
   51783 $at_failed && at_fn_log_failure
   51784 $at_traceon; }
   51785 
   51786   sort xml-tests/test.dot > expout
   51787   { set +x
   51788 $as_echo "$at_srcdir/conflicts.at:313: \$XSLTPROC \\
   51789              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   51790              xml-tests/test.xml | sort"
   51791 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:313"
   51792 ( $at_check_trace; $XSLTPROC \
   51793              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   51794              xml-tests/test.xml | sort
   51795 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51796 at_status=$? at_failed=false
   51797 $at_check_filter
   51798 at_fn_diff_devnull "$at_stderr" || at_failed=:
   51799 $at_diff expout "$at_stdout" || at_failed=:
   51800 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:313"
   51801 $at_failed && at_fn_log_failure
   51802 $at_traceon; }
   51803 
   51804   rm -rf xml-tests expout
   51805   at_restore_special_files
   51806 fi
   51807 { set +x
   51808 $as_echo "$at_srcdir/conflicts.at:313: bison -o input.java input.y"
   51809 at_fn_check_prepare_trace "conflicts.at:313"
   51810 ( $at_check_trace; bison -o input.java input.y
   51811 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51812 at_status=$? at_failed=false
   51813 $at_check_filter
   51814 at_fn_diff_devnull "$at_stderr" || at_failed=:
   51815 at_fn_diff_devnull "$at_stdout" || at_failed=:
   51816 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:313"
   51817 $at_failed && at_fn_log_failure
   51818 $at_traceon; }
   51819 
   51820 
   51821 
   51822 $as_echo "conflicts.at:313" >"$at_check_line_file"
   51823 (test -z "$CONF_JAVAC") \
   51824   && at_fn_check_skip 77 "$at_srcdir/conflicts.at:313"
   51825 $as_echo "conflicts.at:313" >"$at_check_line_file"
   51826 (test -z "$CONF_JAVA") \
   51827   && at_fn_check_skip 77 "$at_srcdir/conflicts.at:313"
   51828 { set +x
   51829 $as_echo "$at_srcdir/conflicts.at:313: \$SHELL ../../../javacomp.sh input.java"
   51830 at_fn_check_prepare_dynamic "$SHELL ../../../javacomp.sh input.java" "conflicts.at:313"
   51831 ( $at_check_trace; $SHELL ../../../javacomp.sh input.java
   51832 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51833 at_status=$? at_failed=false
   51834 $at_check_filter
   51835 echo stderr:; cat "$at_stderr"
   51836 echo stdout:; cat "$at_stdout"
   51837 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:313"
   51838 $at_failed && at_fn_log_failure
   51839 $at_traceon; }
   51840 
   51841 
   51842 
   51843 
   51844 
   51845 { set +x
   51846 $as_echo "$at_srcdir/conflicts.at:313:  \$SHELL ../../../javaexec.sh input"
   51847 at_fn_check_prepare_dynamic " $SHELL ../../../javaexec.sh input" "conflicts.at:313"
   51848 ( $at_check_trace;  $SHELL ../../../javaexec.sh input
   51849 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51850 at_status=$? at_failed=false
   51851 $at_check_filter
   51852 echo >>"$at_stderr"; $as_echo "syntax error, unexpected end of input
   51853 " | \
   51854   $at_diff - "$at_stderr" || at_failed=:
   51855 at_fn_diff_devnull "$at_stdout" || at_failed=:
   51856 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:313"
   51857 $at_failed && at_fn_log_failure
   51858 $at_traceon; }
   51859 
   51860 
   51861 
   51862 
   51863 
   51864 
   51865 
   51866 
   51867 # Even canonical LR doesn't foresee the error for 'a'!
   51868 
   51869 
   51870 
   51871 
   51872 
   51873 
   51874 cat >input.y <<'_ATEOF'
   51875 %code top {
   51876 #include <config.h>
   51877 /* We don't need perfect functions for these tests. */
   51878 #undef malloc
   51879 #undef memcmp
   51880 #undef realloc
   51881 }
   51882 
   51883 
   51884 
   51885 %code {
   51886   #include <assert.h>
   51887   #include <stdio.h>
   51888   static void yyerror ( const char *msg);
   51889   int yylex (YYSTYPE *lvalp);
   51890   #define USE(Var)
   51891 }
   51892 
   51893 %define api.pure
   51894 
   51895 %define lr.type ielr
   51896                              %define lr.default-reductions consistent
   51897 
   51898 %error-verbose
   51899 
   51900 %%
   51901 
   51902 %nonassoc 'a';
   51903 
   51904 start: consistent-error-on-a-a 'a' ;
   51905 
   51906 consistent-error-on-a-a:
   51907     'a' default-reduction
   51908   | 'a' default-reduction 'a'
   51909   | 'a' shift
   51910   ;
   51911 
   51912 default-reduction: /*empty*/ ;
   51913 shift: 'b' ;
   51914 
   51915 // Provide another context in which all rules are useful so that this
   51916 // test case looks a little more realistic.
   51917 start: 'b' consistent-error-on-a-a 'c' ;
   51918 
   51919 
   51920 %%
   51921 
   51922 /*--------.
   51923 | yylex.  |
   51924 `--------*/
   51925 
   51926 int yylex (YYSTYPE *lvalp)
   51927 {
   51928   static char const *input = "a";
   51929   *lvalp = 1;
   51930   return *input++;
   51931 }
   51932 #include <stdio.h>
   51933 /* A C error reporting function.  */
   51934 static
   51935 void yyerror ( const char *msg)
   51936 {
   51937   fprintf (stderr, "%s\n", msg);
   51938 }
   51939 
   51940 
   51941 /*-------.
   51942 | main.  |
   51943 `-------*/
   51944 
   51945 int
   51946 main (void)
   51947 {
   51948   return yyparse ();
   51949 }
   51950 _ATEOF
   51951 
   51952 
   51953 
   51954 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   51955   at_save_special_files
   51956   mkdir xml-tests
   51957     # Don't combine these Bison invocations since we want to be sure that
   51958   # --report=all isn't required to get the full XML file.
   51959   { set +x
   51960 $as_echo "$at_srcdir/conflicts.at:320: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   51961                   --graph=xml-tests/test.dot -o input.c input.y"
   51962 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:320"
   51963 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   51964                   --graph=xml-tests/test.dot -o input.c input.y
   51965 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51966 at_status=$? at_failed=false
   51967 $at_check_filter
   51968 echo stderr:; cat "$at_stderr"
   51969 echo stdout:; cat "$at_stdout"
   51970 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:320"
   51971 $at_failed && at_fn_log_failure
   51972 $at_traceon; }
   51973 
   51974   { set +x
   51975 $as_echo "$at_srcdir/conflicts.at:320: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   51976 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "conflicts.at:320"
   51977 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   51978 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51979 at_status=$? at_failed=false
   51980 $at_check_filter
   51981 echo stderr:; cat "$at_stderr"
   51982 echo stdout:; cat "$at_stdout"
   51983 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:320"
   51984 $at_failed && at_fn_log_failure
   51985 $at_traceon; }
   51986 
   51987     cp xml-tests/test.output expout
   51988   { set +x
   51989 $as_echo "$at_srcdir/conflicts.at:320: \$XSLTPROC \\
   51990              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   51991              xml-tests/test.xml"
   51992 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:320"
   51993 ( $at_check_trace; $XSLTPROC \
   51994              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   51995              xml-tests/test.xml
   51996 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   51997 at_status=$? at_failed=false
   51998 $at_check_filter
   51999 at_fn_diff_devnull "$at_stderr" || at_failed=:
   52000 $at_diff expout "$at_stdout" || at_failed=:
   52001 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:320"
   52002 $at_failed && at_fn_log_failure
   52003 $at_traceon; }
   52004 
   52005   sort xml-tests/test.dot > expout
   52006   { set +x
   52007 $as_echo "$at_srcdir/conflicts.at:320: \$XSLTPROC \\
   52008              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   52009              xml-tests/test.xml | sort"
   52010 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:320"
   52011 ( $at_check_trace; $XSLTPROC \
   52012              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   52013              xml-tests/test.xml | sort
   52014 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52015 at_status=$? at_failed=false
   52016 $at_check_filter
   52017 at_fn_diff_devnull "$at_stderr" || at_failed=:
   52018 $at_diff expout "$at_stdout" || at_failed=:
   52019 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:320"
   52020 $at_failed && at_fn_log_failure
   52021 $at_traceon; }
   52022 
   52023   rm -rf xml-tests expout
   52024   at_restore_special_files
   52025 fi
   52026 { set +x
   52027 $as_echo "$at_srcdir/conflicts.at:320: bison -o input.c input.y"
   52028 at_fn_check_prepare_trace "conflicts.at:320"
   52029 ( $at_check_trace; bison -o input.c input.y
   52030 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52031 at_status=$? at_failed=false
   52032 $at_check_filter
   52033 at_fn_diff_devnull "$at_stderr" || at_failed=:
   52034 at_fn_diff_devnull "$at_stdout" || at_failed=:
   52035 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:320"
   52036 $at_failed && at_fn_log_failure
   52037 $at_traceon; }
   52038 
   52039 
   52040    { set +x
   52041 $as_echo "$at_srcdir/conflicts.at:320: \$BISON_C_WORKS"
   52042 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "conflicts.at:320"
   52043 ( $at_check_trace; $BISON_C_WORKS
   52044 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52045 at_status=$? at_failed=false
   52046 $at_check_filter
   52047 echo stderr:; cat "$at_stderr"
   52048 echo stdout:; cat "$at_stdout"
   52049 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:320"
   52050 $at_failed && at_fn_log_failure
   52051 $at_traceon; }
   52052 
   52053 { set +x
   52054 $as_echo "$at_srcdir/conflicts.at:320: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   52055 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "conflicts.at:320"
   52056 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   52057 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52058 at_status=$? at_failed=false
   52059 $at_check_filter
   52060 echo stderr:; cat "$at_stderr"
   52061 echo stdout:; cat "$at_stdout"
   52062 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:320"
   52063 $at_failed && at_fn_log_failure
   52064 $at_traceon; }
   52065 
   52066 
   52067 
   52068 
   52069 
   52070 { set +x
   52071 $as_echo "$at_srcdir/conflicts.at:320:  \$PREPARSER ./input"
   52072 at_fn_check_prepare_dynamic " $PREPARSER ./input" "conflicts.at:320"
   52073 ( $at_check_trace;  $PREPARSER ./input
   52074 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52075 at_status=$? at_failed=false
   52076 $at_check_filter
   52077 echo stderr:; tee stderr <"$at_stderr"
   52078 at_fn_diff_devnull "$at_stdout" || at_failed=:
   52079 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:320"
   52080 $at_failed && at_fn_log_failure
   52081 $at_traceon; }
   52082 
   52083 { set +x
   52084 $as_echo "$at_srcdir/conflicts.at:320: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   52085 at_fn_check_prepare_trace "conflicts.at:320"
   52086 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   52087 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52088 at_status=$? at_failed=false
   52089 $at_check_filter
   52090 echo >>"$at_stderr"; $as_echo "syntax error, unexpected \$end, expecting 'a' or 'b'
   52091 " | \
   52092   $at_diff - "$at_stderr" || at_failed=:
   52093 at_fn_diff_devnull "$at_stdout" || at_failed=:
   52094 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:320"
   52095 $at_failed && at_fn_log_failure
   52096 $at_traceon; }
   52097 
   52098 
   52099 
   52100 
   52101 
   52102 
   52103 
   52104 
   52105 
   52106 
   52107 
   52108 
   52109 
   52110 
   52111 cat >input.y <<'_ATEOF'
   52112 %code top {
   52113 #include <config.h>
   52114 /* We don't need perfect functions for these tests. */
   52115 #undef malloc
   52116 #undef memcmp
   52117 #undef realloc
   52118 }
   52119 
   52120 
   52121 
   52122 %code {
   52123   #include <assert.h>
   52124   #include <stdio.h>
   52125   static void yyerror ( const char *msg);
   52126   int yylex (YYSTYPE *lvalp);
   52127   #define USE(Var)
   52128 }
   52129 
   52130 %define api.pure
   52131 
   52132 %define lr.type ielr
   52133                              %define lr.default-reductions accepting
   52134 
   52135 %error-verbose
   52136 
   52137 %%
   52138 
   52139 %nonassoc 'a';
   52140 
   52141 start: consistent-error-on-a-a 'a' ;
   52142 
   52143 consistent-error-on-a-a:
   52144     'a' default-reduction
   52145   | 'a' default-reduction 'a'
   52146   | 'a' shift
   52147   ;
   52148 
   52149 default-reduction: /*empty*/ ;
   52150 shift: 'b' ;
   52151 
   52152 // Provide another context in which all rules are useful so that this
   52153 // test case looks a little more realistic.
   52154 start: 'b' consistent-error-on-a-a 'c' ;
   52155 
   52156 
   52157 %%
   52158 
   52159 /*--------.
   52160 | yylex.  |
   52161 `--------*/
   52162 
   52163 int yylex (YYSTYPE *lvalp)
   52164 {
   52165   static char const *input = "a";
   52166   *lvalp = 1;
   52167   return *input++;
   52168 }
   52169 #include <stdio.h>
   52170 /* A C error reporting function.  */
   52171 static
   52172 void yyerror ( const char *msg)
   52173 {
   52174   fprintf (stderr, "%s\n", msg);
   52175 }
   52176 
   52177 
   52178 /*-------.
   52179 | main.  |
   52180 `-------*/
   52181 
   52182 int
   52183 main (void)
   52184 {
   52185   return yyparse ();
   52186 }
   52187 _ATEOF
   52188 
   52189 
   52190 
   52191 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   52192   at_save_special_files
   52193   mkdir xml-tests
   52194     # Don't combine these Bison invocations since we want to be sure that
   52195   # --report=all isn't required to get the full XML file.
   52196   { set +x
   52197 $as_echo "$at_srcdir/conflicts.at:325: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   52198                   --graph=xml-tests/test.dot -o input.c input.y"
   52199 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:325"
   52200 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   52201                   --graph=xml-tests/test.dot -o input.c input.y
   52202 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52203 at_status=$? at_failed=false
   52204 $at_check_filter
   52205 echo stderr:; cat "$at_stderr"
   52206 echo stdout:; cat "$at_stdout"
   52207 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:325"
   52208 $at_failed && at_fn_log_failure
   52209 $at_traceon; }
   52210 
   52211   { set +x
   52212 $as_echo "$at_srcdir/conflicts.at:325: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   52213 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "conflicts.at:325"
   52214 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   52215 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52216 at_status=$? at_failed=false
   52217 $at_check_filter
   52218 echo stderr:; cat "$at_stderr"
   52219 echo stdout:; cat "$at_stdout"
   52220 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:325"
   52221 $at_failed && at_fn_log_failure
   52222 $at_traceon; }
   52223 
   52224     cp xml-tests/test.output expout
   52225   { set +x
   52226 $as_echo "$at_srcdir/conflicts.at:325: \$XSLTPROC \\
   52227              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   52228              xml-tests/test.xml"
   52229 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:325"
   52230 ( $at_check_trace; $XSLTPROC \
   52231              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   52232              xml-tests/test.xml
   52233 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52234 at_status=$? at_failed=false
   52235 $at_check_filter
   52236 at_fn_diff_devnull "$at_stderr" || at_failed=:
   52237 $at_diff expout "$at_stdout" || at_failed=:
   52238 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:325"
   52239 $at_failed && at_fn_log_failure
   52240 $at_traceon; }
   52241 
   52242   sort xml-tests/test.dot > expout
   52243   { set +x
   52244 $as_echo "$at_srcdir/conflicts.at:325: \$XSLTPROC \\
   52245              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   52246              xml-tests/test.xml | sort"
   52247 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:325"
   52248 ( $at_check_trace; $XSLTPROC \
   52249              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   52250              xml-tests/test.xml | sort
   52251 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52252 at_status=$? at_failed=false
   52253 $at_check_filter
   52254 at_fn_diff_devnull "$at_stderr" || at_failed=:
   52255 $at_diff expout "$at_stdout" || at_failed=:
   52256 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:325"
   52257 $at_failed && at_fn_log_failure
   52258 $at_traceon; }
   52259 
   52260   rm -rf xml-tests expout
   52261   at_restore_special_files
   52262 fi
   52263 { set +x
   52264 $as_echo "$at_srcdir/conflicts.at:325: bison -o input.c input.y"
   52265 at_fn_check_prepare_trace "conflicts.at:325"
   52266 ( $at_check_trace; bison -o input.c input.y
   52267 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52268 at_status=$? at_failed=false
   52269 $at_check_filter
   52270 at_fn_diff_devnull "$at_stderr" || at_failed=:
   52271 at_fn_diff_devnull "$at_stdout" || at_failed=:
   52272 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:325"
   52273 $at_failed && at_fn_log_failure
   52274 $at_traceon; }
   52275 
   52276 
   52277    { set +x
   52278 $as_echo "$at_srcdir/conflicts.at:325: \$BISON_C_WORKS"
   52279 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "conflicts.at:325"
   52280 ( $at_check_trace; $BISON_C_WORKS
   52281 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52282 at_status=$? at_failed=false
   52283 $at_check_filter
   52284 echo stderr:; cat "$at_stderr"
   52285 echo stdout:; cat "$at_stdout"
   52286 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:325"
   52287 $at_failed && at_fn_log_failure
   52288 $at_traceon; }
   52289 
   52290 { set +x
   52291 $as_echo "$at_srcdir/conflicts.at:325: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   52292 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "conflicts.at:325"
   52293 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   52294 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52295 at_status=$? at_failed=false
   52296 $at_check_filter
   52297 echo stderr:; cat "$at_stderr"
   52298 echo stdout:; cat "$at_stdout"
   52299 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:325"
   52300 $at_failed && at_fn_log_failure
   52301 $at_traceon; }
   52302 
   52303 
   52304 
   52305 
   52306 
   52307 { set +x
   52308 $as_echo "$at_srcdir/conflicts.at:325:  \$PREPARSER ./input"
   52309 at_fn_check_prepare_dynamic " $PREPARSER ./input" "conflicts.at:325"
   52310 ( $at_check_trace;  $PREPARSER ./input
   52311 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52312 at_status=$? at_failed=false
   52313 $at_check_filter
   52314 echo stderr:; tee stderr <"$at_stderr"
   52315 at_fn_diff_devnull "$at_stdout" || at_failed=:
   52316 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:325"
   52317 $at_failed && at_fn_log_failure
   52318 $at_traceon; }
   52319 
   52320 { set +x
   52321 $as_echo "$at_srcdir/conflicts.at:325: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   52322 at_fn_check_prepare_trace "conflicts.at:325"
   52323 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   52324 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52325 at_status=$? at_failed=false
   52326 $at_check_filter
   52327 echo >>"$at_stderr"; $as_echo "syntax error, unexpected \$end, expecting 'a' or 'b'
   52328 " | \
   52329   $at_diff - "$at_stderr" || at_failed=:
   52330 at_fn_diff_devnull "$at_stdout" || at_failed=:
   52331 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:325"
   52332 $at_failed && at_fn_log_failure
   52333 $at_traceon; }
   52334 
   52335 
   52336 
   52337 
   52338 
   52339 
   52340 
   52341 
   52342 
   52343 
   52344 
   52345 
   52346 
   52347 
   52348 cat >input.y <<'_ATEOF'
   52349 %code top {
   52350 #include <config.h>
   52351 /* We don't need perfect functions for these tests. */
   52352 #undef malloc
   52353 #undef memcmp
   52354 #undef realloc
   52355 }
   52356 
   52357 
   52358 
   52359 %code {
   52360   #include <assert.h>
   52361   #include <stdio.h>
   52362   static void yyerror ( const char *msg);
   52363   int yylex (YYSTYPE *lvalp);
   52364   #define USE(Var)
   52365 }
   52366 
   52367 %define api.pure
   52368 
   52369 %define lr.type canonical-lr
   52370 
   52371 %error-verbose
   52372 
   52373 %%
   52374 
   52375 %nonassoc 'a';
   52376 
   52377 start: consistent-error-on-a-a 'a' ;
   52378 
   52379 consistent-error-on-a-a:
   52380     'a' default-reduction
   52381   | 'a' default-reduction 'a'
   52382   | 'a' shift
   52383   ;
   52384 
   52385 default-reduction: /*empty*/ ;
   52386 shift: 'b' ;
   52387 
   52388 // Provide another context in which all rules are useful so that this
   52389 // test case looks a little more realistic.
   52390 start: 'b' consistent-error-on-a-a 'c' ;
   52391 
   52392 
   52393 %%
   52394 
   52395 /*--------.
   52396 | yylex.  |
   52397 `--------*/
   52398 
   52399 int yylex (YYSTYPE *lvalp)
   52400 {
   52401   static char const *input = "a";
   52402   *lvalp = 1;
   52403   return *input++;
   52404 }
   52405 #include <stdio.h>
   52406 /* A C error reporting function.  */
   52407 static
   52408 void yyerror ( const char *msg)
   52409 {
   52410   fprintf (stderr, "%s\n", msg);
   52411 }
   52412 
   52413 
   52414 /*-------.
   52415 | main.  |
   52416 `-------*/
   52417 
   52418 int
   52419 main (void)
   52420 {
   52421   return yyparse ();
   52422 }
   52423 _ATEOF
   52424 
   52425 
   52426 
   52427 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   52428   at_save_special_files
   52429   mkdir xml-tests
   52430     # Don't combine these Bison invocations since we want to be sure that
   52431   # --report=all isn't required to get the full XML file.
   52432   { set +x
   52433 $as_echo "$at_srcdir/conflicts.at:330: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   52434                   --graph=xml-tests/test.dot -o input.c input.y"
   52435 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:330"
   52436 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   52437                   --graph=xml-tests/test.dot -o input.c input.y
   52438 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52439 at_status=$? at_failed=false
   52440 $at_check_filter
   52441 echo stderr:; cat "$at_stderr"
   52442 echo stdout:; cat "$at_stdout"
   52443 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:330"
   52444 $at_failed && at_fn_log_failure
   52445 $at_traceon; }
   52446 
   52447   { set +x
   52448 $as_echo "$at_srcdir/conflicts.at:330: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   52449 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "conflicts.at:330"
   52450 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   52451 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52452 at_status=$? at_failed=false
   52453 $at_check_filter
   52454 echo stderr:; cat "$at_stderr"
   52455 echo stdout:; cat "$at_stdout"
   52456 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:330"
   52457 $at_failed && at_fn_log_failure
   52458 $at_traceon; }
   52459 
   52460     cp xml-tests/test.output expout
   52461   { set +x
   52462 $as_echo "$at_srcdir/conflicts.at:330: \$XSLTPROC \\
   52463              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   52464              xml-tests/test.xml"
   52465 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:330"
   52466 ( $at_check_trace; $XSLTPROC \
   52467              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   52468              xml-tests/test.xml
   52469 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52470 at_status=$? at_failed=false
   52471 $at_check_filter
   52472 at_fn_diff_devnull "$at_stderr" || at_failed=:
   52473 $at_diff expout "$at_stdout" || at_failed=:
   52474 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:330"
   52475 $at_failed && at_fn_log_failure
   52476 $at_traceon; }
   52477 
   52478   sort xml-tests/test.dot > expout
   52479   { set +x
   52480 $as_echo "$at_srcdir/conflicts.at:330: \$XSLTPROC \\
   52481              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   52482              xml-tests/test.xml | sort"
   52483 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:330"
   52484 ( $at_check_trace; $XSLTPROC \
   52485              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   52486              xml-tests/test.xml | sort
   52487 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52488 at_status=$? at_failed=false
   52489 $at_check_filter
   52490 at_fn_diff_devnull "$at_stderr" || at_failed=:
   52491 $at_diff expout "$at_stdout" || at_failed=:
   52492 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:330"
   52493 $at_failed && at_fn_log_failure
   52494 $at_traceon; }
   52495 
   52496   rm -rf xml-tests expout
   52497   at_restore_special_files
   52498 fi
   52499 { set +x
   52500 $as_echo "$at_srcdir/conflicts.at:330: bison -o input.c input.y"
   52501 at_fn_check_prepare_trace "conflicts.at:330"
   52502 ( $at_check_trace; bison -o input.c input.y
   52503 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52504 at_status=$? at_failed=false
   52505 $at_check_filter
   52506 at_fn_diff_devnull "$at_stderr" || at_failed=:
   52507 at_fn_diff_devnull "$at_stdout" || at_failed=:
   52508 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:330"
   52509 $at_failed && at_fn_log_failure
   52510 $at_traceon; }
   52511 
   52512 
   52513    { set +x
   52514 $as_echo "$at_srcdir/conflicts.at:330: \$BISON_C_WORKS"
   52515 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "conflicts.at:330"
   52516 ( $at_check_trace; $BISON_C_WORKS
   52517 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52518 at_status=$? at_failed=false
   52519 $at_check_filter
   52520 echo stderr:; cat "$at_stderr"
   52521 echo stdout:; cat "$at_stdout"
   52522 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:330"
   52523 $at_failed && at_fn_log_failure
   52524 $at_traceon; }
   52525 
   52526 { set +x
   52527 $as_echo "$at_srcdir/conflicts.at:330: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   52528 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "conflicts.at:330"
   52529 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   52530 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52531 at_status=$? at_failed=false
   52532 $at_check_filter
   52533 echo stderr:; cat "$at_stderr"
   52534 echo stdout:; cat "$at_stdout"
   52535 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:330"
   52536 $at_failed && at_fn_log_failure
   52537 $at_traceon; }
   52538 
   52539 
   52540 
   52541 
   52542 
   52543 { set +x
   52544 $as_echo "$at_srcdir/conflicts.at:330:  \$PREPARSER ./input"
   52545 at_fn_check_prepare_dynamic " $PREPARSER ./input" "conflicts.at:330"
   52546 ( $at_check_trace;  $PREPARSER ./input
   52547 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52548 at_status=$? at_failed=false
   52549 $at_check_filter
   52550 echo stderr:; tee stderr <"$at_stderr"
   52551 at_fn_diff_devnull "$at_stdout" || at_failed=:
   52552 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:330"
   52553 $at_failed && at_fn_log_failure
   52554 $at_traceon; }
   52555 
   52556 { set +x
   52557 $as_echo "$at_srcdir/conflicts.at:330: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   52558 at_fn_check_prepare_trace "conflicts.at:330"
   52559 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   52560 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52561 at_status=$? at_failed=false
   52562 $at_check_filter
   52563 echo >>"$at_stderr"; $as_echo "syntax error, unexpected \$end, expecting 'a' or 'b'
   52564 " | \
   52565   $at_diff - "$at_stderr" || at_failed=:
   52566 at_fn_diff_devnull "$at_stdout" || at_failed=:
   52567 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:330"
   52568 $at_failed && at_fn_log_failure
   52569 $at_traceon; }
   52570 
   52571 
   52572 
   52573 
   52574 
   52575 
   52576 
   52577 
   52578 
   52579 # Only LAC gets it right.
   52580 
   52581 
   52582 
   52583 
   52584 
   52585 
   52586 cat >input.y <<'_ATEOF'
   52587 %code top {
   52588 #include <config.h>
   52589 /* We don't need perfect functions for these tests. */
   52590 #undef malloc
   52591 #undef memcmp
   52592 #undef realloc
   52593 }
   52594 
   52595 
   52596 
   52597 %code {
   52598   #include <assert.h>
   52599   #include <stdio.h>
   52600   static void yyerror ( const char *msg);
   52601   int yylex (YYSTYPE *lvalp);
   52602   #define USE(Var)
   52603 }
   52604 
   52605 %define api.pure
   52606 
   52607 %define lr.type canonical-lr
   52608                              %define parse.lac full
   52609 
   52610 %error-verbose
   52611 
   52612 %%
   52613 
   52614 %nonassoc 'a';
   52615 
   52616 start: consistent-error-on-a-a 'a' ;
   52617 
   52618 consistent-error-on-a-a:
   52619     'a' default-reduction
   52620   | 'a' default-reduction 'a'
   52621   | 'a' shift
   52622   ;
   52623 
   52624 default-reduction: /*empty*/ ;
   52625 shift: 'b' ;
   52626 
   52627 // Provide another context in which all rules are useful so that this
   52628 // test case looks a little more realistic.
   52629 start: 'b' consistent-error-on-a-a 'c' ;
   52630 
   52631 
   52632 %%
   52633 
   52634 /*--------.
   52635 | yylex.  |
   52636 `--------*/
   52637 
   52638 int yylex (YYSTYPE *lvalp)
   52639 {
   52640   static char const *input = "a";
   52641   *lvalp = 1;
   52642   return *input++;
   52643 }
   52644 #include <stdio.h>
   52645 /* A C error reporting function.  */
   52646 static
   52647 void yyerror ( const char *msg)
   52648 {
   52649   fprintf (stderr, "%s\n", msg);
   52650 }
   52651 
   52652 
   52653 /*-------.
   52654 | main.  |
   52655 `-------*/
   52656 
   52657 int
   52658 main (void)
   52659 {
   52660   return yyparse ();
   52661 }
   52662 _ATEOF
   52663 
   52664 
   52665 
   52666 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   52667   at_save_special_files
   52668   mkdir xml-tests
   52669     # Don't combine these Bison invocations since we want to be sure that
   52670   # --report=all isn't required to get the full XML file.
   52671   { set +x
   52672 $as_echo "$at_srcdir/conflicts.at:336: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   52673                   --graph=xml-tests/test.dot -o input.c input.y"
   52674 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:336"
   52675 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   52676                   --graph=xml-tests/test.dot -o input.c input.y
   52677 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52678 at_status=$? at_failed=false
   52679 $at_check_filter
   52680 echo stderr:; cat "$at_stderr"
   52681 echo stdout:; cat "$at_stdout"
   52682 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:336"
   52683 $at_failed && at_fn_log_failure
   52684 $at_traceon; }
   52685 
   52686   { set +x
   52687 $as_echo "$at_srcdir/conflicts.at:336: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   52688 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "conflicts.at:336"
   52689 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   52690 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52691 at_status=$? at_failed=false
   52692 $at_check_filter
   52693 echo stderr:; cat "$at_stderr"
   52694 echo stdout:; cat "$at_stdout"
   52695 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:336"
   52696 $at_failed && at_fn_log_failure
   52697 $at_traceon; }
   52698 
   52699     cp xml-tests/test.output expout
   52700   { set +x
   52701 $as_echo "$at_srcdir/conflicts.at:336: \$XSLTPROC \\
   52702              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   52703              xml-tests/test.xml"
   52704 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:336"
   52705 ( $at_check_trace; $XSLTPROC \
   52706              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   52707              xml-tests/test.xml
   52708 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52709 at_status=$? at_failed=false
   52710 $at_check_filter
   52711 at_fn_diff_devnull "$at_stderr" || at_failed=:
   52712 $at_diff expout "$at_stdout" || at_failed=:
   52713 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:336"
   52714 $at_failed && at_fn_log_failure
   52715 $at_traceon; }
   52716 
   52717   sort xml-tests/test.dot > expout
   52718   { set +x
   52719 $as_echo "$at_srcdir/conflicts.at:336: \$XSLTPROC \\
   52720              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   52721              xml-tests/test.xml | sort"
   52722 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:336"
   52723 ( $at_check_trace; $XSLTPROC \
   52724              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   52725              xml-tests/test.xml | sort
   52726 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52727 at_status=$? at_failed=false
   52728 $at_check_filter
   52729 at_fn_diff_devnull "$at_stderr" || at_failed=:
   52730 $at_diff expout "$at_stdout" || at_failed=:
   52731 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:336"
   52732 $at_failed && at_fn_log_failure
   52733 $at_traceon; }
   52734 
   52735   rm -rf xml-tests expout
   52736   at_restore_special_files
   52737 fi
   52738 { set +x
   52739 $as_echo "$at_srcdir/conflicts.at:336: bison -o input.c input.y"
   52740 at_fn_check_prepare_trace "conflicts.at:336"
   52741 ( $at_check_trace; bison -o input.c input.y
   52742 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52743 at_status=$? at_failed=false
   52744 $at_check_filter
   52745 at_fn_diff_devnull "$at_stderr" || at_failed=:
   52746 at_fn_diff_devnull "$at_stdout" || at_failed=:
   52747 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:336"
   52748 $at_failed && at_fn_log_failure
   52749 $at_traceon; }
   52750 
   52751 
   52752    { set +x
   52753 $as_echo "$at_srcdir/conflicts.at:336: \$BISON_C_WORKS"
   52754 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "conflicts.at:336"
   52755 ( $at_check_trace; $BISON_C_WORKS
   52756 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52757 at_status=$? at_failed=false
   52758 $at_check_filter
   52759 echo stderr:; cat "$at_stderr"
   52760 echo stdout:; cat "$at_stdout"
   52761 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:336"
   52762 $at_failed && at_fn_log_failure
   52763 $at_traceon; }
   52764 
   52765 { set +x
   52766 $as_echo "$at_srcdir/conflicts.at:336: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   52767 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "conflicts.at:336"
   52768 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   52769 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52770 at_status=$? at_failed=false
   52771 $at_check_filter
   52772 echo stderr:; cat "$at_stderr"
   52773 echo stdout:; cat "$at_stdout"
   52774 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:336"
   52775 $at_failed && at_fn_log_failure
   52776 $at_traceon; }
   52777 
   52778 
   52779 
   52780 
   52781 
   52782 { set +x
   52783 $as_echo "$at_srcdir/conflicts.at:336:  \$PREPARSER ./input"
   52784 at_fn_check_prepare_dynamic " $PREPARSER ./input" "conflicts.at:336"
   52785 ( $at_check_trace;  $PREPARSER ./input
   52786 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52787 at_status=$? at_failed=false
   52788 $at_check_filter
   52789 echo stderr:; tee stderr <"$at_stderr"
   52790 at_fn_diff_devnull "$at_stdout" || at_failed=:
   52791 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:336"
   52792 $at_failed && at_fn_log_failure
   52793 $at_traceon; }
   52794 
   52795 { set +x
   52796 $as_echo "$at_srcdir/conflicts.at:336: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   52797 at_fn_check_prepare_trace "conflicts.at:336"
   52798 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   52799 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52800 at_status=$? at_failed=false
   52801 $at_check_filter
   52802 echo >>"$at_stderr"; $as_echo "syntax error, unexpected \$end, expecting 'b'
   52803 " | \
   52804   $at_diff - "$at_stderr" || at_failed=:
   52805 at_fn_diff_devnull "$at_stdout" || at_failed=:
   52806 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:336"
   52807 $at_failed && at_fn_log_failure
   52808 $at_traceon; }
   52809 
   52810 
   52811 
   52812 
   52813 
   52814 
   52815 
   52816 
   52817 
   52818 
   52819 
   52820 
   52821 
   52822 
   52823 cat >input.y <<'_ATEOF'
   52824 %code top {
   52825 #include <config.h>
   52826 /* We don't need perfect functions for these tests. */
   52827 #undef malloc
   52828 #undef memcmp
   52829 #undef realloc
   52830 }
   52831 
   52832 
   52833 
   52834 %code {
   52835   #include <assert.h>
   52836   #include <stdio.h>
   52837   static void yyerror ( const char *msg);
   52838   int yylex (YYSTYPE *lvalp);
   52839   #define USE(Var)
   52840 }
   52841 
   52842 %define api.pure
   52843 
   52844 %define lr.type ielr
   52845                              %define parse.lac full
   52846 
   52847 %error-verbose
   52848 
   52849 %%
   52850 
   52851 %nonassoc 'a';
   52852 
   52853 start: consistent-error-on-a-a 'a' ;
   52854 
   52855 consistent-error-on-a-a:
   52856     'a' default-reduction
   52857   | 'a' default-reduction 'a'
   52858   | 'a' shift
   52859   ;
   52860 
   52861 default-reduction: /*empty*/ ;
   52862 shift: 'b' ;
   52863 
   52864 // Provide another context in which all rules are useful so that this
   52865 // test case looks a little more realistic.
   52866 start: 'b' consistent-error-on-a-a 'c' ;
   52867 
   52868 
   52869 %%
   52870 
   52871 /*--------.
   52872 | yylex.  |
   52873 `--------*/
   52874 
   52875 int yylex (YYSTYPE *lvalp)
   52876 {
   52877   static char const *input = "a";
   52878   *lvalp = 1;
   52879   return *input++;
   52880 }
   52881 #include <stdio.h>
   52882 /* A C error reporting function.  */
   52883 static
   52884 void yyerror ( const char *msg)
   52885 {
   52886   fprintf (stderr, "%s\n", msg);
   52887 }
   52888 
   52889 
   52890 /*-------.
   52891 | main.  |
   52892 `-------*/
   52893 
   52894 int
   52895 main (void)
   52896 {
   52897   return yyparse ();
   52898 }
   52899 _ATEOF
   52900 
   52901 
   52902 
   52903 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   52904   at_save_special_files
   52905   mkdir xml-tests
   52906     # Don't combine these Bison invocations since we want to be sure that
   52907   # --report=all isn't required to get the full XML file.
   52908   { set +x
   52909 $as_echo "$at_srcdir/conflicts.at:341: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   52910                   --graph=xml-tests/test.dot -o input.c input.y"
   52911 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:341"
   52912 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   52913                   --graph=xml-tests/test.dot -o input.c input.y
   52914 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52915 at_status=$? at_failed=false
   52916 $at_check_filter
   52917 echo stderr:; cat "$at_stderr"
   52918 echo stdout:; cat "$at_stdout"
   52919 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:341"
   52920 $at_failed && at_fn_log_failure
   52921 $at_traceon; }
   52922 
   52923   { set +x
   52924 $as_echo "$at_srcdir/conflicts.at:341: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   52925 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "conflicts.at:341"
   52926 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   52927 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52928 at_status=$? at_failed=false
   52929 $at_check_filter
   52930 echo stderr:; cat "$at_stderr"
   52931 echo stdout:; cat "$at_stdout"
   52932 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:341"
   52933 $at_failed && at_fn_log_failure
   52934 $at_traceon; }
   52935 
   52936     cp xml-tests/test.output expout
   52937   { set +x
   52938 $as_echo "$at_srcdir/conflicts.at:341: \$XSLTPROC \\
   52939              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   52940              xml-tests/test.xml"
   52941 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:341"
   52942 ( $at_check_trace; $XSLTPROC \
   52943              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   52944              xml-tests/test.xml
   52945 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52946 at_status=$? at_failed=false
   52947 $at_check_filter
   52948 at_fn_diff_devnull "$at_stderr" || at_failed=:
   52949 $at_diff expout "$at_stdout" || at_failed=:
   52950 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:341"
   52951 $at_failed && at_fn_log_failure
   52952 $at_traceon; }
   52953 
   52954   sort xml-tests/test.dot > expout
   52955   { set +x
   52956 $as_echo "$at_srcdir/conflicts.at:341: \$XSLTPROC \\
   52957              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   52958              xml-tests/test.xml | sort"
   52959 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:341"
   52960 ( $at_check_trace; $XSLTPROC \
   52961              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   52962              xml-tests/test.xml | sort
   52963 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52964 at_status=$? at_failed=false
   52965 $at_check_filter
   52966 at_fn_diff_devnull "$at_stderr" || at_failed=:
   52967 $at_diff expout "$at_stdout" || at_failed=:
   52968 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:341"
   52969 $at_failed && at_fn_log_failure
   52970 $at_traceon; }
   52971 
   52972   rm -rf xml-tests expout
   52973   at_restore_special_files
   52974 fi
   52975 { set +x
   52976 $as_echo "$at_srcdir/conflicts.at:341: bison -o input.c input.y"
   52977 at_fn_check_prepare_trace "conflicts.at:341"
   52978 ( $at_check_trace; bison -o input.c input.y
   52979 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52980 at_status=$? at_failed=false
   52981 $at_check_filter
   52982 at_fn_diff_devnull "$at_stderr" || at_failed=:
   52983 at_fn_diff_devnull "$at_stdout" || at_failed=:
   52984 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:341"
   52985 $at_failed && at_fn_log_failure
   52986 $at_traceon; }
   52987 
   52988 
   52989    { set +x
   52990 $as_echo "$at_srcdir/conflicts.at:341: \$BISON_C_WORKS"
   52991 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "conflicts.at:341"
   52992 ( $at_check_trace; $BISON_C_WORKS
   52993 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   52994 at_status=$? at_failed=false
   52995 $at_check_filter
   52996 echo stderr:; cat "$at_stderr"
   52997 echo stdout:; cat "$at_stdout"
   52998 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:341"
   52999 $at_failed && at_fn_log_failure
   53000 $at_traceon; }
   53001 
   53002 { set +x
   53003 $as_echo "$at_srcdir/conflicts.at:341: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   53004 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "conflicts.at:341"
   53005 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   53006 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53007 at_status=$? at_failed=false
   53008 $at_check_filter
   53009 echo stderr:; cat "$at_stderr"
   53010 echo stdout:; cat "$at_stdout"
   53011 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:341"
   53012 $at_failed && at_fn_log_failure
   53013 $at_traceon; }
   53014 
   53015 
   53016 
   53017 
   53018 
   53019 { set +x
   53020 $as_echo "$at_srcdir/conflicts.at:341:  \$PREPARSER ./input"
   53021 at_fn_check_prepare_dynamic " $PREPARSER ./input" "conflicts.at:341"
   53022 ( $at_check_trace;  $PREPARSER ./input
   53023 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53024 at_status=$? at_failed=false
   53025 $at_check_filter
   53026 echo stderr:; tee stderr <"$at_stderr"
   53027 at_fn_diff_devnull "$at_stdout" || at_failed=:
   53028 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:341"
   53029 $at_failed && at_fn_log_failure
   53030 $at_traceon; }
   53031 
   53032 { set +x
   53033 $as_echo "$at_srcdir/conflicts.at:341: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   53034 at_fn_check_prepare_trace "conflicts.at:341"
   53035 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   53036 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53037 at_status=$? at_failed=false
   53038 $at_check_filter
   53039 echo >>"$at_stderr"; $as_echo "syntax error, unexpected \$end, expecting 'b'
   53040 " | \
   53041   $at_diff - "$at_stderr" || at_failed=:
   53042 at_fn_diff_devnull "$at_stdout" || at_failed=:
   53043 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:341"
   53044 $at_failed && at_fn_log_failure
   53045 $at_traceon; }
   53046 
   53047 
   53048 
   53049 
   53050 
   53051 
   53052 
   53053 
   53054 
   53055 
   53056 
   53057 
   53058 
   53059 
   53060 
   53061 
   53062 
   53063 
   53064 
   53065 
   53066 
   53067 cat >input.y <<'_ATEOF'
   53068 %code top {
   53069 #include <config.h>
   53070 /* We don't need perfect functions for these tests. */
   53071 #undef malloc
   53072 #undef memcmp
   53073 #undef realloc
   53074 }
   53075 
   53076 
   53077 
   53078 %code {
   53079   #include <assert.h>
   53080   #include <stdio.h>
   53081   static void yyerror ( const char *msg);
   53082   int yylex (YYSTYPE *lvalp);
   53083   #define USE(Var)
   53084 }
   53085 
   53086 %define api.pure
   53087 
   53088 
   53089 
   53090 %error-verbose
   53091 
   53092 %%
   53093 
   53094 %nonassoc 'a';
   53095 
   53096 // If $$ = 0 here, then we know that the 'a' destructor is being invoked
   53097 // incorrectly for the 'b' set in the semantic action below.  All 'a'
   53098 // tokens are returned by yylex, which sets $$ = 1.
   53099 %destructor {
   53100   if (!$$)
   53101     fprintf (stderr, "Wrong destructor.\n");
   53102 } 'a';
   53103 
   53104 // Rather than depend on an inconsistent state to induce reading a
   53105 // lookahead as in the previous grammar, just assign the lookahead in a
   53106 // semantic action.  That lookahead isn't needed before either error
   53107 // action is encountered.  In a previous version of Bison, this was a
   53108 // problem as it meant yychar was not translated into yytoken before
   53109 // either error action.  The second error action thus invoked a
   53110 // destructor that it selected according to the incorrect yytoken.  The
   53111 // first error action would have reported an incorrect unexpected token
   53112 // except that, due to the bug described in the previous grammar, the
   53113 // unexpected token was not reported at all.
   53114 start: error-reduce consistent-error 'a' { USE ($3); } ;
   53115 
   53116 error-reduce:
   53117   'a' 'a' consistent-reduction consistent-error 'a'
   53118   { USE (($1, $2, $5)); }
   53119 | 'a' error
   53120   { USE ($1); }
   53121 ;
   53122 
   53123 consistent-reduction: /*empty*/ {
   53124   assert (yychar == YYEMPTY);
   53125   yylval = 0;
   53126   yychar = 'b';
   53127 } ;
   53128 
   53129 consistent-error:
   53130   'a' { USE ($1); }
   53131 | /*empty*/ %prec 'a'
   53132 ;
   53133 
   53134 // Provide another context in which all rules are useful so that this
   53135 // test case looks a little more realistic.
   53136 start: 'b' consistent-error 'b' ;
   53137 
   53138 
   53139 %%
   53140 
   53141 /*--------.
   53142 | yylex.  |
   53143 `--------*/
   53144 
   53145 int yylex (YYSTYPE *lvalp)
   53146 {
   53147   static char const *input = "aa";
   53148   *lvalp = 1;
   53149   return *input++;
   53150 }
   53151 #include <stdio.h>
   53152 /* A C error reporting function.  */
   53153 static
   53154 void yyerror ( const char *msg)
   53155 {
   53156   fprintf (stderr, "%s\n", msg);
   53157 }
   53158 
   53159 
   53160 /*-------.
   53161 | main.  |
   53162 `-------*/
   53163 
   53164 int
   53165 main (void)
   53166 {
   53167   return yyparse ();
   53168 }
   53169 _ATEOF
   53170 
   53171 
   53172 
   53173 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   53174   at_save_special_files
   53175   mkdir xml-tests
   53176     # Don't combine these Bison invocations since we want to be sure that
   53177   # --report=all isn't required to get the full XML file.
   53178   { set +x
   53179 $as_echo "$at_srcdir/conflicts.at:397: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   53180                   --graph=xml-tests/test.dot -o input.c input.y"
   53181 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:397"
   53182 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   53183                   --graph=xml-tests/test.dot -o input.c input.y
   53184 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53185 at_status=$? at_failed=false
   53186 $at_check_filter
   53187 echo stderr:; cat "$at_stderr"
   53188 echo stdout:; cat "$at_stdout"
   53189 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:397"
   53190 $at_failed && at_fn_log_failure
   53191 $at_traceon; }
   53192 
   53193   { set +x
   53194 $as_echo "$at_srcdir/conflicts.at:397: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   53195 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "conflicts.at:397"
   53196 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   53197 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53198 at_status=$? at_failed=false
   53199 $at_check_filter
   53200 echo stderr:; cat "$at_stderr"
   53201 echo stdout:; cat "$at_stdout"
   53202 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:397"
   53203 $at_failed && at_fn_log_failure
   53204 $at_traceon; }
   53205 
   53206     cp xml-tests/test.output expout
   53207   { set +x
   53208 $as_echo "$at_srcdir/conflicts.at:397: \$XSLTPROC \\
   53209              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   53210              xml-tests/test.xml"
   53211 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:397"
   53212 ( $at_check_trace; $XSLTPROC \
   53213              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   53214              xml-tests/test.xml
   53215 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53216 at_status=$? at_failed=false
   53217 $at_check_filter
   53218 at_fn_diff_devnull "$at_stderr" || at_failed=:
   53219 $at_diff expout "$at_stdout" || at_failed=:
   53220 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:397"
   53221 $at_failed && at_fn_log_failure
   53222 $at_traceon; }
   53223 
   53224   sort xml-tests/test.dot > expout
   53225   { set +x
   53226 $as_echo "$at_srcdir/conflicts.at:397: \$XSLTPROC \\
   53227              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   53228              xml-tests/test.xml | sort"
   53229 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:397"
   53230 ( $at_check_trace; $XSLTPROC \
   53231              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   53232              xml-tests/test.xml | sort
   53233 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53234 at_status=$? at_failed=false
   53235 $at_check_filter
   53236 at_fn_diff_devnull "$at_stderr" || at_failed=:
   53237 $at_diff expout "$at_stdout" || at_failed=:
   53238 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:397"
   53239 $at_failed && at_fn_log_failure
   53240 $at_traceon; }
   53241 
   53242   rm -rf xml-tests expout
   53243   at_restore_special_files
   53244 fi
   53245 { set +x
   53246 $as_echo "$at_srcdir/conflicts.at:397: bison -o input.c input.y"
   53247 at_fn_check_prepare_trace "conflicts.at:397"
   53248 ( $at_check_trace; bison -o input.c input.y
   53249 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53250 at_status=$? at_failed=false
   53251 $at_check_filter
   53252 at_fn_diff_devnull "$at_stderr" || at_failed=:
   53253 at_fn_diff_devnull "$at_stdout" || at_failed=:
   53254 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:397"
   53255 $at_failed && at_fn_log_failure
   53256 $at_traceon; }
   53257 
   53258 
   53259    { set +x
   53260 $as_echo "$at_srcdir/conflicts.at:397: \$BISON_C_WORKS"
   53261 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "conflicts.at:397"
   53262 ( $at_check_trace; $BISON_C_WORKS
   53263 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53264 at_status=$? at_failed=false
   53265 $at_check_filter
   53266 echo stderr:; cat "$at_stderr"
   53267 echo stdout:; cat "$at_stdout"
   53268 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:397"
   53269 $at_failed && at_fn_log_failure
   53270 $at_traceon; }
   53271 
   53272 { set +x
   53273 $as_echo "$at_srcdir/conflicts.at:397: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   53274 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "conflicts.at:397"
   53275 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   53276 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53277 at_status=$? at_failed=false
   53278 $at_check_filter
   53279 echo stderr:; cat "$at_stderr"
   53280 echo stdout:; cat "$at_stdout"
   53281 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:397"
   53282 $at_failed && at_fn_log_failure
   53283 $at_traceon; }
   53284 
   53285 
   53286 
   53287 
   53288 
   53289 { set +x
   53290 $as_echo "$at_srcdir/conflicts.at:397:  \$PREPARSER ./input"
   53291 at_fn_check_prepare_dynamic " $PREPARSER ./input" "conflicts.at:397"
   53292 ( $at_check_trace;  $PREPARSER ./input
   53293 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53294 at_status=$? at_failed=false
   53295 $at_check_filter
   53296 echo stderr:; tee stderr <"$at_stderr"
   53297 at_fn_diff_devnull "$at_stdout" || at_failed=:
   53298 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:397"
   53299 $at_failed && at_fn_log_failure
   53300 $at_traceon; }
   53301 
   53302 { set +x
   53303 $as_echo "$at_srcdir/conflicts.at:397: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   53304 at_fn_check_prepare_trace "conflicts.at:397"
   53305 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   53306 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53307 at_status=$? at_failed=false
   53308 $at_check_filter
   53309 echo >>"$at_stderr"; $as_echo "syntax error, unexpected 'b'
   53310 " | \
   53311   $at_diff - "$at_stderr" || at_failed=:
   53312 at_fn_diff_devnull "$at_stdout" || at_failed=:
   53313 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:397"
   53314 $at_failed && at_fn_log_failure
   53315 $at_traceon; }
   53316 
   53317 
   53318 
   53319 
   53320 
   53321 
   53322 
   53323 
   53324 
   53325 
   53326 
   53327 
   53328 
   53329 
   53330 cat >input.y <<'_ATEOF'
   53331 %code top {
   53332 #include <config.h>
   53333 /* We don't need perfect functions for these tests. */
   53334 #undef malloc
   53335 #undef memcmp
   53336 #undef realloc
   53337 }
   53338 
   53339 
   53340 
   53341 %code {
   53342   #include <assert.h>
   53343   #include <stdio.h>
   53344   static void yyerror ( const char *msg);
   53345   int yylex (YYSTYPE *lvalp);
   53346   #define USE(Var)
   53347 }
   53348 
   53349 %define api.pure
   53350 
   53351 %glr-parser
   53352 
   53353 %error-verbose
   53354 
   53355 %%
   53356 
   53357 %nonassoc 'a';
   53358 
   53359 // If $$ = 0 here, then we know that the 'a' destructor is being invoked
   53360 // incorrectly for the 'b' set in the semantic action below.  All 'a'
   53361 // tokens are returned by yylex, which sets $$ = 1.
   53362 %destructor {
   53363   if (!$$)
   53364     fprintf (stderr, "Wrong destructor.\n");
   53365 } 'a';
   53366 
   53367 // Rather than depend on an inconsistent state to induce reading a
   53368 // lookahead as in the previous grammar, just assign the lookahead in a
   53369 // semantic action.  That lookahead isn't needed before either error
   53370 // action is encountered.  In a previous version of Bison, this was a
   53371 // problem as it meant yychar was not translated into yytoken before
   53372 // either error action.  The second error action thus invoked a
   53373 // destructor that it selected according to the incorrect yytoken.  The
   53374 // first error action would have reported an incorrect unexpected token
   53375 // except that, due to the bug described in the previous grammar, the
   53376 // unexpected token was not reported at all.
   53377 start: error-reduce consistent-error 'a' { USE ($3); } ;
   53378 
   53379 error-reduce:
   53380   'a' 'a' consistent-reduction consistent-error 'a'
   53381   { USE (($1, $2, $5)); }
   53382 | 'a' error
   53383   { USE ($1); }
   53384 ;
   53385 
   53386 consistent-reduction: /*empty*/ {
   53387   assert (yychar == YYEMPTY);
   53388   yylval = 0;
   53389   yychar = 'b';
   53390 } ;
   53391 
   53392 consistent-error:
   53393   'a' { USE ($1); }
   53394 | /*empty*/ %prec 'a'
   53395 ;
   53396 
   53397 // Provide another context in which all rules are useful so that this
   53398 // test case looks a little more realistic.
   53399 start: 'b' consistent-error 'b' ;
   53400 
   53401 
   53402 %%
   53403 
   53404 /*--------.
   53405 | yylex.  |
   53406 `--------*/
   53407 
   53408 int yylex (YYSTYPE *lvalp)
   53409 {
   53410   static char const *input = "aa";
   53411   *lvalp = 1;
   53412   return *input++;
   53413 }
   53414 #include <stdio.h>
   53415 /* A C error reporting function.  */
   53416 static
   53417 void yyerror ( const char *msg)
   53418 {
   53419   fprintf (stderr, "%s\n", msg);
   53420 }
   53421 
   53422 
   53423 /*-------.
   53424 | main.  |
   53425 `-------*/
   53426 
   53427 int
   53428 main (void)
   53429 {
   53430   return yyparse ();
   53431 }
   53432 _ATEOF
   53433 
   53434 
   53435 
   53436 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   53437   at_save_special_files
   53438   mkdir xml-tests
   53439     # Don't combine these Bison invocations since we want to be sure that
   53440   # --report=all isn't required to get the full XML file.
   53441   { set +x
   53442 $as_echo "$at_srcdir/conflicts.at:401: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   53443                   --graph=xml-tests/test.dot -o input.c input.y"
   53444 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:401"
   53445 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   53446                   --graph=xml-tests/test.dot -o input.c input.y
   53447 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53448 at_status=$? at_failed=false
   53449 $at_check_filter
   53450 echo stderr:; cat "$at_stderr"
   53451 echo stdout:; cat "$at_stdout"
   53452 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:401"
   53453 $at_failed && at_fn_log_failure
   53454 $at_traceon; }
   53455 
   53456   { set +x
   53457 $as_echo "$at_srcdir/conflicts.at:401: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   53458 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "conflicts.at:401"
   53459 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   53460 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53461 at_status=$? at_failed=false
   53462 $at_check_filter
   53463 echo stderr:; cat "$at_stderr"
   53464 echo stdout:; cat "$at_stdout"
   53465 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:401"
   53466 $at_failed && at_fn_log_failure
   53467 $at_traceon; }
   53468 
   53469     cp xml-tests/test.output expout
   53470   { set +x
   53471 $as_echo "$at_srcdir/conflicts.at:401: \$XSLTPROC \\
   53472              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   53473              xml-tests/test.xml"
   53474 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:401"
   53475 ( $at_check_trace; $XSLTPROC \
   53476              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   53477              xml-tests/test.xml
   53478 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53479 at_status=$? at_failed=false
   53480 $at_check_filter
   53481 at_fn_diff_devnull "$at_stderr" || at_failed=:
   53482 $at_diff expout "$at_stdout" || at_failed=:
   53483 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:401"
   53484 $at_failed && at_fn_log_failure
   53485 $at_traceon; }
   53486 
   53487   sort xml-tests/test.dot > expout
   53488   { set +x
   53489 $as_echo "$at_srcdir/conflicts.at:401: \$XSLTPROC \\
   53490              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   53491              xml-tests/test.xml | sort"
   53492 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:401"
   53493 ( $at_check_trace; $XSLTPROC \
   53494              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   53495              xml-tests/test.xml | sort
   53496 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53497 at_status=$? at_failed=false
   53498 $at_check_filter
   53499 at_fn_diff_devnull "$at_stderr" || at_failed=:
   53500 $at_diff expout "$at_stdout" || at_failed=:
   53501 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:401"
   53502 $at_failed && at_fn_log_failure
   53503 $at_traceon; }
   53504 
   53505   rm -rf xml-tests expout
   53506   at_restore_special_files
   53507 fi
   53508 { set +x
   53509 $as_echo "$at_srcdir/conflicts.at:401: bison -o input.c input.y"
   53510 at_fn_check_prepare_trace "conflicts.at:401"
   53511 ( $at_check_trace; bison -o input.c input.y
   53512 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53513 at_status=$? at_failed=false
   53514 $at_check_filter
   53515 at_fn_diff_devnull "$at_stderr" || at_failed=:
   53516 at_fn_diff_devnull "$at_stdout" || at_failed=:
   53517 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:401"
   53518 $at_failed && at_fn_log_failure
   53519 $at_traceon; }
   53520 
   53521 
   53522    { set +x
   53523 $as_echo "$at_srcdir/conflicts.at:401: \$BISON_C_WORKS"
   53524 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "conflicts.at:401"
   53525 ( $at_check_trace; $BISON_C_WORKS
   53526 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53527 at_status=$? at_failed=false
   53528 $at_check_filter
   53529 echo stderr:; cat "$at_stderr"
   53530 echo stdout:; cat "$at_stdout"
   53531 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:401"
   53532 $at_failed && at_fn_log_failure
   53533 $at_traceon; }
   53534 
   53535 { set +x
   53536 $as_echo "$at_srcdir/conflicts.at:401: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   53537 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "conflicts.at:401"
   53538 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   53539 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53540 at_status=$? at_failed=false
   53541 $at_check_filter
   53542 echo stderr:; cat "$at_stderr"
   53543 echo stdout:; cat "$at_stdout"
   53544 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:401"
   53545 $at_failed && at_fn_log_failure
   53546 $at_traceon; }
   53547 
   53548 
   53549 
   53550 
   53551 
   53552 { set +x
   53553 $as_echo "$at_srcdir/conflicts.at:401:  \$PREPARSER ./input"
   53554 at_fn_check_prepare_dynamic " $PREPARSER ./input" "conflicts.at:401"
   53555 ( $at_check_trace;  $PREPARSER ./input
   53556 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53557 at_status=$? at_failed=false
   53558 $at_check_filter
   53559 echo stderr:; tee stderr <"$at_stderr"
   53560 at_fn_diff_devnull "$at_stdout" || at_failed=:
   53561 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:401"
   53562 $at_failed && at_fn_log_failure
   53563 $at_traceon; }
   53564 
   53565 { set +x
   53566 $as_echo "$at_srcdir/conflicts.at:401: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   53567 at_fn_check_prepare_trace "conflicts.at:401"
   53568 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   53569 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53570 at_status=$? at_failed=false
   53571 $at_check_filter
   53572 echo >>"$at_stderr"; $as_echo "syntax error, unexpected 'b'
   53573 " | \
   53574   $at_diff - "$at_stderr" || at_failed=:
   53575 at_fn_diff_devnull "$at_stdout" || at_failed=:
   53576 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:401"
   53577 $at_failed && at_fn_log_failure
   53578 $at_traceon; }
   53579 
   53580 
   53581 
   53582 
   53583 
   53584 
   53585 
   53586 
   53587 
   53588 
   53589 
   53590 
   53591 
   53592 
   53593 cat >input.y <<'_ATEOF'
   53594 %code top {
   53595 #include <config.h>
   53596 /* We don't need perfect functions for these tests. */
   53597 #undef malloc
   53598 #undef memcmp
   53599 #undef realloc
   53600 }
   53601 
   53602 
   53603 
   53604 %code {
   53605   #include <cassert>
   53606   #include <string>
   53607   int yylex (yy::parser::semantic_type *lvalp);
   53608   #define USE(Var)
   53609 }
   53610 
   53611 %defines
   53612 
   53613 %language "c++"
   53614 
   53615 %error-verbose
   53616 
   53617 %%
   53618 
   53619 %nonassoc 'a';
   53620 
   53621 // If $$ = 0 here, then we know that the 'a' destructor is being invoked
   53622 // incorrectly for the 'b' set in the semantic action below.  All 'a'
   53623 // tokens are returned by yylex, which sets $$ = 1.
   53624 %destructor {
   53625   if (!$$)
   53626     fprintf (stderr, "Wrong destructor.\n");
   53627 } 'a';
   53628 
   53629 // Rather than depend on an inconsistent state to induce reading a
   53630 // lookahead as in the previous grammar, just assign the lookahead in a
   53631 // semantic action.  That lookahead isn't needed before either error
   53632 // action is encountered.  In a previous version of Bison, this was a
   53633 // problem as it meant yychar was not translated into yytoken before
   53634 // either error action.  The second error action thus invoked a
   53635 // destructor that it selected according to the incorrect yytoken.  The
   53636 // first error action would have reported an incorrect unexpected token
   53637 // except that, due to the bug described in the previous grammar, the
   53638 // unexpected token was not reported at all.
   53639 start: error-reduce consistent-error 'a' { USE ($3); } ;
   53640 
   53641 error-reduce:
   53642   'a' 'a' consistent-reduction consistent-error 'a'
   53643   { USE (($1, $2, $5)); }
   53644 | 'a' error
   53645   { USE ($1); }
   53646 ;
   53647 
   53648 consistent-reduction: /*empty*/ {
   53649   assert (yychar == yyempty_);
   53650   yylval = 0;
   53651   yychar = 'b';
   53652 } ;
   53653 
   53654 consistent-error:
   53655   'a' { USE ($1); }
   53656 | /*empty*/ %prec 'a'
   53657 ;
   53658 
   53659 // Provide another context in which all rules are useful so that this
   53660 // test case looks a little more realistic.
   53661 start: 'b' consistent-error 'b' ;
   53662 
   53663 
   53664 %%
   53665 
   53666 /*--------.
   53667 | yylex.  |
   53668 `--------*/
   53669 
   53670 int yylex (yy::parser::semantic_type *lvalp)
   53671 {
   53672   static char const *input = "aa";
   53673   *lvalp = 1;
   53674   return *input++;
   53675 }
   53676 /* A C++ error reporting function.  */
   53677 void
   53678 yy::parser::error (const location_type& l, const std::string& m)
   53679 {
   53680   (void) l;
   53681   std::cerr << m << std::endl;
   53682 }
   53683 
   53684 
   53685 /*-------.
   53686 | main.  |
   53687 `-------*/
   53688 
   53689 int
   53690 main (void)
   53691 {
   53692   yy::parser parser;
   53693   return parser.parse ();
   53694 }
   53695 _ATEOF
   53696 
   53697 
   53698 
   53699 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   53700   at_save_special_files
   53701   mkdir xml-tests
   53702     # Don't combine these Bison invocations since we want to be sure that
   53703   # --report=all isn't required to get the full XML file.
   53704   { set +x
   53705 $as_echo "$at_srcdir/conflicts.at:405: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   53706                   --graph=xml-tests/test.dot -o input.cc input.y"
   53707 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:405"
   53708 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   53709                   --graph=xml-tests/test.dot -o input.cc input.y
   53710 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53711 at_status=$? at_failed=false
   53712 $at_check_filter
   53713 echo stderr:; cat "$at_stderr"
   53714 echo stdout:; cat "$at_stdout"
   53715 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:405"
   53716 $at_failed && at_fn_log_failure
   53717 $at_traceon; }
   53718 
   53719   { set +x
   53720 $as_echo "$at_srcdir/conflicts.at:405: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y"
   53721 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y" "conflicts.at:405"
   53722 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.cc input.y
   53723 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53724 at_status=$? at_failed=false
   53725 $at_check_filter
   53726 echo stderr:; cat "$at_stderr"
   53727 echo stdout:; cat "$at_stdout"
   53728 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:405"
   53729 $at_failed && at_fn_log_failure
   53730 $at_traceon; }
   53731 
   53732     cp xml-tests/test.output expout
   53733   { set +x
   53734 $as_echo "$at_srcdir/conflicts.at:405: \$XSLTPROC \\
   53735              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   53736              xml-tests/test.xml"
   53737 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:405"
   53738 ( $at_check_trace; $XSLTPROC \
   53739              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   53740              xml-tests/test.xml
   53741 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53742 at_status=$? at_failed=false
   53743 $at_check_filter
   53744 at_fn_diff_devnull "$at_stderr" || at_failed=:
   53745 $at_diff expout "$at_stdout" || at_failed=:
   53746 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:405"
   53747 $at_failed && at_fn_log_failure
   53748 $at_traceon; }
   53749 
   53750   sort xml-tests/test.dot > expout
   53751   { set +x
   53752 $as_echo "$at_srcdir/conflicts.at:405: \$XSLTPROC \\
   53753              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   53754              xml-tests/test.xml | sort"
   53755 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:405"
   53756 ( $at_check_trace; $XSLTPROC \
   53757              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   53758              xml-tests/test.xml | sort
   53759 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53760 at_status=$? at_failed=false
   53761 $at_check_filter
   53762 at_fn_diff_devnull "$at_stderr" || at_failed=:
   53763 $at_diff expout "$at_stdout" || at_failed=:
   53764 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:405"
   53765 $at_failed && at_fn_log_failure
   53766 $at_traceon; }
   53767 
   53768   rm -rf xml-tests expout
   53769   at_restore_special_files
   53770 fi
   53771 { set +x
   53772 $as_echo "$at_srcdir/conflicts.at:405: bison -o input.cc input.y"
   53773 at_fn_check_prepare_trace "conflicts.at:405"
   53774 ( $at_check_trace; bison -o input.cc input.y
   53775 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53776 at_status=$? at_failed=false
   53777 $at_check_filter
   53778 at_fn_diff_devnull "$at_stderr" || at_failed=:
   53779 at_fn_diff_devnull "$at_stdout" || at_failed=:
   53780 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:405"
   53781 $at_failed && at_fn_log_failure
   53782 $at_traceon; }
   53783 
   53784 
   53785 
   53786 { set +x
   53787 $as_echo "$at_srcdir/conflicts.at:405: \$BISON_CXX_WORKS"
   53788 at_fn_check_prepare_dynamic "$BISON_CXX_WORKS" "conflicts.at:405"
   53789 ( $at_check_trace; $BISON_CXX_WORKS
   53790 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53791 at_status=$? at_failed=false
   53792 $at_check_filter
   53793 echo stderr:; cat "$at_stderr"
   53794 echo stdout:; cat "$at_stdout"
   53795 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:405"
   53796 $at_failed && at_fn_log_failure
   53797 $at_traceon; }
   53798 
   53799 { set +x
   53800 $as_echo "$at_srcdir/conflicts.at:405: \$CXX \$CXXFLAGS \$CPPFLAGS \$LDFLAGS -o input input.cc \$LIBS"
   53801 at_fn_check_prepare_dynamic "$CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS" "conflicts.at:405"
   53802 ( $at_check_trace; $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS
   53803 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53804 at_status=$? at_failed=false
   53805 $at_check_filter
   53806 echo stderr:; cat "$at_stderr"
   53807 echo stdout:; cat "$at_stdout"
   53808 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:405"
   53809 $at_failed && at_fn_log_failure
   53810 $at_traceon; }
   53811 
   53812 
   53813 
   53814 
   53815 
   53816 { set +x
   53817 $as_echo "$at_srcdir/conflicts.at:405:  \$PREPARSER ./input"
   53818 at_fn_check_prepare_dynamic " $PREPARSER ./input" "conflicts.at:405"
   53819 ( $at_check_trace;  $PREPARSER ./input
   53820 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53821 at_status=$? at_failed=false
   53822 $at_check_filter
   53823 echo stderr:; tee stderr <"$at_stderr"
   53824 at_fn_diff_devnull "$at_stdout" || at_failed=:
   53825 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:405"
   53826 $at_failed && at_fn_log_failure
   53827 $at_traceon; }
   53828 
   53829 { set +x
   53830 $as_echo "$at_srcdir/conflicts.at:405: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   53831 at_fn_check_prepare_trace "conflicts.at:405"
   53832 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   53833 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53834 at_status=$? at_failed=false
   53835 $at_check_filter
   53836 echo >>"$at_stderr"; $as_echo "syntax error, unexpected 'b'
   53837 " | \
   53838   $at_diff - "$at_stderr" || at_failed=:
   53839 at_fn_diff_devnull "$at_stdout" || at_failed=:
   53840 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:405"
   53841 $at_failed && at_fn_log_failure
   53842 $at_traceon; }
   53843 
   53844 
   53845 
   53846 
   53847 
   53848 
   53849 
   53850 
   53851 # No Java test because yychar cannot be manipulated by users.
   53852 
   53853 
   53854 
   53855 
   53856 
   53857 
   53858 
   53859 cat >input.y <<'_ATEOF'
   53860 %code top {
   53861 #include <config.h>
   53862 /* We don't need perfect functions for these tests. */
   53863 #undef malloc
   53864 #undef memcmp
   53865 #undef realloc
   53866 }
   53867 
   53868 
   53869 
   53870 %code {
   53871   #include <assert.h>
   53872   #include <stdio.h>
   53873   static void yyerror ( const char *msg);
   53874   int yylex (YYSTYPE *lvalp);
   53875   #define USE(Var)
   53876 }
   53877 
   53878 %define api.pure
   53879 
   53880 %define lr.default-reductions consistent
   53881 
   53882 %error-verbose
   53883 
   53884 %%
   53885 
   53886 %nonassoc 'a';
   53887 
   53888 // If $$ = 0 here, then we know that the 'a' destructor is being invoked
   53889 // incorrectly for the 'b' set in the semantic action below.  All 'a'
   53890 // tokens are returned by yylex, which sets $$ = 1.
   53891 %destructor {
   53892   if (!$$)
   53893     fprintf (stderr, "Wrong destructor.\n");
   53894 } 'a';
   53895 
   53896 // Rather than depend on an inconsistent state to induce reading a
   53897 // lookahead as in the previous grammar, just assign the lookahead in a
   53898 // semantic action.  That lookahead isn't needed before either error
   53899 // action is encountered.  In a previous version of Bison, this was a
   53900 // problem as it meant yychar was not translated into yytoken before
   53901 // either error action.  The second error action thus invoked a
   53902 // destructor that it selected according to the incorrect yytoken.  The
   53903 // first error action would have reported an incorrect unexpected token
   53904 // except that, due to the bug described in the previous grammar, the
   53905 // unexpected token was not reported at all.
   53906 start: error-reduce consistent-error 'a' { USE ($3); } ;
   53907 
   53908 error-reduce:
   53909   'a' 'a' consistent-reduction consistent-error 'a'
   53910   { USE (($1, $2, $5)); }
   53911 | 'a' error
   53912   { USE ($1); }
   53913 ;
   53914 
   53915 consistent-reduction: /*empty*/ {
   53916   assert (yychar == YYEMPTY);
   53917   yylval = 0;
   53918   yychar = 'b';
   53919 } ;
   53920 
   53921 consistent-error:
   53922   'a' { USE ($1); }
   53923 | /*empty*/ %prec 'a'
   53924 ;
   53925 
   53926 // Provide another context in which all rules are useful so that this
   53927 // test case looks a little more realistic.
   53928 start: 'b' consistent-error 'b' ;
   53929 
   53930 
   53931 %%
   53932 
   53933 /*--------.
   53934 | yylex.  |
   53935 `--------*/
   53936 
   53937 int yylex (YYSTYPE *lvalp)
   53938 {
   53939   static char const *input = "aa";
   53940   *lvalp = 1;
   53941   return *input++;
   53942 }
   53943 #include <stdio.h>
   53944 /* A C error reporting function.  */
   53945 static
   53946 void yyerror ( const char *msg)
   53947 {
   53948   fprintf (stderr, "%s\n", msg);
   53949 }
   53950 
   53951 
   53952 /*-------.
   53953 | main.  |
   53954 `-------*/
   53955 
   53956 int
   53957 main (void)
   53958 {
   53959   return yyparse ();
   53960 }
   53961 _ATEOF
   53962 
   53963 
   53964 
   53965 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   53966   at_save_special_files
   53967   mkdir xml-tests
   53968     # Don't combine these Bison invocations since we want to be sure that
   53969   # --report=all isn't required to get the full XML file.
   53970   { set +x
   53971 $as_echo "$at_srcdir/conflicts.at:411: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   53972                   --graph=xml-tests/test.dot -o input.c input.y"
   53973 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:411"
   53974 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   53975                   --graph=xml-tests/test.dot -o input.c input.y
   53976 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53977 at_status=$? at_failed=false
   53978 $at_check_filter
   53979 echo stderr:; cat "$at_stderr"
   53980 echo stdout:; cat "$at_stdout"
   53981 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:411"
   53982 $at_failed && at_fn_log_failure
   53983 $at_traceon; }
   53984 
   53985   { set +x
   53986 $as_echo "$at_srcdir/conflicts.at:411: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   53987 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "conflicts.at:411"
   53988 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   53989 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   53990 at_status=$? at_failed=false
   53991 $at_check_filter
   53992 echo stderr:; cat "$at_stderr"
   53993 echo stdout:; cat "$at_stdout"
   53994 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:411"
   53995 $at_failed && at_fn_log_failure
   53996 $at_traceon; }
   53997 
   53998     cp xml-tests/test.output expout
   53999   { set +x
   54000 $as_echo "$at_srcdir/conflicts.at:411: \$XSLTPROC \\
   54001              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   54002              xml-tests/test.xml"
   54003 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:411"
   54004 ( $at_check_trace; $XSLTPROC \
   54005              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   54006              xml-tests/test.xml
   54007 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54008 at_status=$? at_failed=false
   54009 $at_check_filter
   54010 at_fn_diff_devnull "$at_stderr" || at_failed=:
   54011 $at_diff expout "$at_stdout" || at_failed=:
   54012 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:411"
   54013 $at_failed && at_fn_log_failure
   54014 $at_traceon; }
   54015 
   54016   sort xml-tests/test.dot > expout
   54017   { set +x
   54018 $as_echo "$at_srcdir/conflicts.at:411: \$XSLTPROC \\
   54019              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   54020              xml-tests/test.xml | sort"
   54021 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:411"
   54022 ( $at_check_trace; $XSLTPROC \
   54023              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   54024              xml-tests/test.xml | sort
   54025 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54026 at_status=$? at_failed=false
   54027 $at_check_filter
   54028 at_fn_diff_devnull "$at_stderr" || at_failed=:
   54029 $at_diff expout "$at_stdout" || at_failed=:
   54030 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:411"
   54031 $at_failed && at_fn_log_failure
   54032 $at_traceon; }
   54033 
   54034   rm -rf xml-tests expout
   54035   at_restore_special_files
   54036 fi
   54037 { set +x
   54038 $as_echo "$at_srcdir/conflicts.at:411: bison -o input.c input.y"
   54039 at_fn_check_prepare_trace "conflicts.at:411"
   54040 ( $at_check_trace; bison -o input.c input.y
   54041 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54042 at_status=$? at_failed=false
   54043 $at_check_filter
   54044 at_fn_diff_devnull "$at_stderr" || at_failed=:
   54045 at_fn_diff_devnull "$at_stdout" || at_failed=:
   54046 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:411"
   54047 $at_failed && at_fn_log_failure
   54048 $at_traceon; }
   54049 
   54050 
   54051    { set +x
   54052 $as_echo "$at_srcdir/conflicts.at:411: \$BISON_C_WORKS"
   54053 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "conflicts.at:411"
   54054 ( $at_check_trace; $BISON_C_WORKS
   54055 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54056 at_status=$? at_failed=false
   54057 $at_check_filter
   54058 echo stderr:; cat "$at_stderr"
   54059 echo stdout:; cat "$at_stdout"
   54060 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:411"
   54061 $at_failed && at_fn_log_failure
   54062 $at_traceon; }
   54063 
   54064 { set +x
   54065 $as_echo "$at_srcdir/conflicts.at:411: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   54066 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "conflicts.at:411"
   54067 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   54068 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54069 at_status=$? at_failed=false
   54070 $at_check_filter
   54071 echo stderr:; cat "$at_stderr"
   54072 echo stdout:; cat "$at_stdout"
   54073 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:411"
   54074 $at_failed && at_fn_log_failure
   54075 $at_traceon; }
   54076 
   54077 
   54078 
   54079 
   54080 
   54081 { set +x
   54082 $as_echo "$at_srcdir/conflicts.at:411:  \$PREPARSER ./input"
   54083 at_fn_check_prepare_dynamic " $PREPARSER ./input" "conflicts.at:411"
   54084 ( $at_check_trace;  $PREPARSER ./input
   54085 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54086 at_status=$? at_failed=false
   54087 $at_check_filter
   54088 echo stderr:; tee stderr <"$at_stderr"
   54089 at_fn_diff_devnull "$at_stdout" || at_failed=:
   54090 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:411"
   54091 $at_failed && at_fn_log_failure
   54092 $at_traceon; }
   54093 
   54094 { set +x
   54095 $as_echo "$at_srcdir/conflicts.at:411: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   54096 at_fn_check_prepare_trace "conflicts.at:411"
   54097 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   54098 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54099 at_status=$? at_failed=false
   54100 $at_check_filter
   54101 echo >>"$at_stderr"; $as_echo "syntax error, unexpected 'b'
   54102 " | \
   54103   $at_diff - "$at_stderr" || at_failed=:
   54104 at_fn_diff_devnull "$at_stdout" || at_failed=:
   54105 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:411"
   54106 $at_failed && at_fn_log_failure
   54107 $at_traceon; }
   54108 
   54109 
   54110 
   54111 
   54112 
   54113 
   54114 
   54115 
   54116 
   54117 # Canonical LR doesn't foresee the error for 'a'!
   54118 
   54119 
   54120 
   54121 
   54122 
   54123 
   54124 cat >input.y <<'_ATEOF'
   54125 %code top {
   54126 #include <config.h>
   54127 /* We don't need perfect functions for these tests. */
   54128 #undef malloc
   54129 #undef memcmp
   54130 #undef realloc
   54131 }
   54132 
   54133 
   54134 
   54135 %code {
   54136   #include <assert.h>
   54137   #include <stdio.h>
   54138   static void yyerror ( const char *msg);
   54139   int yylex (YYSTYPE *lvalp);
   54140   #define USE(Var)
   54141 }
   54142 
   54143 %define api.pure
   54144 
   54145 %define lr.default-reductions accepting
   54146 
   54147 %error-verbose
   54148 
   54149 %%
   54150 
   54151 %nonassoc 'a';
   54152 
   54153 // If $$ = 0 here, then we know that the 'a' destructor is being invoked
   54154 // incorrectly for the 'b' set in the semantic action below.  All 'a'
   54155 // tokens are returned by yylex, which sets $$ = 1.
   54156 %destructor {
   54157   if (!$$)
   54158     fprintf (stderr, "Wrong destructor.\n");
   54159 } 'a';
   54160 
   54161 // Rather than depend on an inconsistent state to induce reading a
   54162 // lookahead as in the previous grammar, just assign the lookahead in a
   54163 // semantic action.  That lookahead isn't needed before either error
   54164 // action is encountered.  In a previous version of Bison, this was a
   54165 // problem as it meant yychar was not translated into yytoken before
   54166 // either error action.  The second error action thus invoked a
   54167 // destructor that it selected according to the incorrect yytoken.  The
   54168 // first error action would have reported an incorrect unexpected token
   54169 // except that, due to the bug described in the previous grammar, the
   54170 // unexpected token was not reported at all.
   54171 start: error-reduce consistent-error 'a' { USE ($3); } ;
   54172 
   54173 error-reduce:
   54174   'a' 'a' consistent-reduction consistent-error 'a'
   54175   { USE (($1, $2, $5)); }
   54176 | 'a' error
   54177   { USE ($1); }
   54178 ;
   54179 
   54180 consistent-reduction: /*empty*/ {
   54181   assert (yychar == YYEMPTY);
   54182   yylval = 0;
   54183   yychar = 'b';
   54184 } ;
   54185 
   54186 consistent-error:
   54187   'a' { USE ($1); }
   54188 | /*empty*/ %prec 'a'
   54189 ;
   54190 
   54191 // Provide another context in which all rules are useful so that this
   54192 // test case looks a little more realistic.
   54193 start: 'b' consistent-error 'b' ;
   54194 
   54195 
   54196 %%
   54197 
   54198 /*--------.
   54199 | yylex.  |
   54200 `--------*/
   54201 
   54202 int yylex (YYSTYPE *lvalp)
   54203 {
   54204   static char const *input = "aa";
   54205   *lvalp = 1;
   54206   return *input++;
   54207 }
   54208 #include <stdio.h>
   54209 /* A C error reporting function.  */
   54210 static
   54211 void yyerror ( const char *msg)
   54212 {
   54213   fprintf (stderr, "%s\n", msg);
   54214 }
   54215 
   54216 
   54217 /*-------.
   54218 | main.  |
   54219 `-------*/
   54220 
   54221 int
   54222 main (void)
   54223 {
   54224   return yyparse ();
   54225 }
   54226 _ATEOF
   54227 
   54228 
   54229 
   54230 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   54231   at_save_special_files
   54232   mkdir xml-tests
   54233     # Don't combine these Bison invocations since we want to be sure that
   54234   # --report=all isn't required to get the full XML file.
   54235   { set +x
   54236 $as_echo "$at_srcdir/conflicts.at:417: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   54237                   --graph=xml-tests/test.dot -o input.c input.y"
   54238 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:417"
   54239 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   54240                   --graph=xml-tests/test.dot -o input.c input.y
   54241 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54242 at_status=$? at_failed=false
   54243 $at_check_filter
   54244 echo stderr:; cat "$at_stderr"
   54245 echo stdout:; cat "$at_stdout"
   54246 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:417"
   54247 $at_failed && at_fn_log_failure
   54248 $at_traceon; }
   54249 
   54250   { set +x
   54251 $as_echo "$at_srcdir/conflicts.at:417: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   54252 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "conflicts.at:417"
   54253 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   54254 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54255 at_status=$? at_failed=false
   54256 $at_check_filter
   54257 echo stderr:; cat "$at_stderr"
   54258 echo stdout:; cat "$at_stdout"
   54259 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:417"
   54260 $at_failed && at_fn_log_failure
   54261 $at_traceon; }
   54262 
   54263     cp xml-tests/test.output expout
   54264   { set +x
   54265 $as_echo "$at_srcdir/conflicts.at:417: \$XSLTPROC \\
   54266              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   54267              xml-tests/test.xml"
   54268 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:417"
   54269 ( $at_check_trace; $XSLTPROC \
   54270              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   54271              xml-tests/test.xml
   54272 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54273 at_status=$? at_failed=false
   54274 $at_check_filter
   54275 at_fn_diff_devnull "$at_stderr" || at_failed=:
   54276 $at_diff expout "$at_stdout" || at_failed=:
   54277 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:417"
   54278 $at_failed && at_fn_log_failure
   54279 $at_traceon; }
   54280 
   54281   sort xml-tests/test.dot > expout
   54282   { set +x
   54283 $as_echo "$at_srcdir/conflicts.at:417: \$XSLTPROC \\
   54284              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   54285              xml-tests/test.xml | sort"
   54286 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:417"
   54287 ( $at_check_trace; $XSLTPROC \
   54288              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   54289              xml-tests/test.xml | sort
   54290 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54291 at_status=$? at_failed=false
   54292 $at_check_filter
   54293 at_fn_diff_devnull "$at_stderr" || at_failed=:
   54294 $at_diff expout "$at_stdout" || at_failed=:
   54295 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:417"
   54296 $at_failed && at_fn_log_failure
   54297 $at_traceon; }
   54298 
   54299   rm -rf xml-tests expout
   54300   at_restore_special_files
   54301 fi
   54302 { set +x
   54303 $as_echo "$at_srcdir/conflicts.at:417: bison -o input.c input.y"
   54304 at_fn_check_prepare_trace "conflicts.at:417"
   54305 ( $at_check_trace; bison -o input.c input.y
   54306 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54307 at_status=$? at_failed=false
   54308 $at_check_filter
   54309 at_fn_diff_devnull "$at_stderr" || at_failed=:
   54310 at_fn_diff_devnull "$at_stdout" || at_failed=:
   54311 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:417"
   54312 $at_failed && at_fn_log_failure
   54313 $at_traceon; }
   54314 
   54315 
   54316    { set +x
   54317 $as_echo "$at_srcdir/conflicts.at:417: \$BISON_C_WORKS"
   54318 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "conflicts.at:417"
   54319 ( $at_check_trace; $BISON_C_WORKS
   54320 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54321 at_status=$? at_failed=false
   54322 $at_check_filter
   54323 echo stderr:; cat "$at_stderr"
   54324 echo stdout:; cat "$at_stdout"
   54325 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:417"
   54326 $at_failed && at_fn_log_failure
   54327 $at_traceon; }
   54328 
   54329 { set +x
   54330 $as_echo "$at_srcdir/conflicts.at:417: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   54331 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "conflicts.at:417"
   54332 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   54333 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54334 at_status=$? at_failed=false
   54335 $at_check_filter
   54336 echo stderr:; cat "$at_stderr"
   54337 echo stdout:; cat "$at_stdout"
   54338 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:417"
   54339 $at_failed && at_fn_log_failure
   54340 $at_traceon; }
   54341 
   54342 
   54343 
   54344 
   54345 
   54346 { set +x
   54347 $as_echo "$at_srcdir/conflicts.at:417:  \$PREPARSER ./input"
   54348 at_fn_check_prepare_dynamic " $PREPARSER ./input" "conflicts.at:417"
   54349 ( $at_check_trace;  $PREPARSER ./input
   54350 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54351 at_status=$? at_failed=false
   54352 $at_check_filter
   54353 echo stderr:; tee stderr <"$at_stderr"
   54354 at_fn_diff_devnull "$at_stdout" || at_failed=:
   54355 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:417"
   54356 $at_failed && at_fn_log_failure
   54357 $at_traceon; }
   54358 
   54359 { set +x
   54360 $as_echo "$at_srcdir/conflicts.at:417: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   54361 at_fn_check_prepare_trace "conflicts.at:417"
   54362 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   54363 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54364 at_status=$? at_failed=false
   54365 $at_check_filter
   54366 echo >>"$at_stderr"; $as_echo "syntax error, unexpected \$end, expecting 'a'
   54367 " | \
   54368   $at_diff - "$at_stderr" || at_failed=:
   54369 at_fn_diff_devnull "$at_stdout" || at_failed=:
   54370 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:417"
   54371 $at_failed && at_fn_log_failure
   54372 $at_traceon; }
   54373 
   54374 
   54375 
   54376 
   54377 
   54378 
   54379 
   54380 
   54381 
   54382 
   54383 
   54384 
   54385 
   54386 
   54387 cat >input.y <<'_ATEOF'
   54388 %code top {
   54389 #include <config.h>
   54390 /* We don't need perfect functions for these tests. */
   54391 #undef malloc
   54392 #undef memcmp
   54393 #undef realloc
   54394 }
   54395 
   54396 
   54397 
   54398 %code {
   54399   #include <assert.h>
   54400   #include <stdio.h>
   54401   static void yyerror ( const char *msg);
   54402   int yylex (YYSTYPE *lvalp);
   54403   #define USE(Var)
   54404 }
   54405 
   54406 %define api.pure
   54407 
   54408 %define lr.type canonical-lr
   54409 
   54410 %error-verbose
   54411 
   54412 %%
   54413 
   54414 %nonassoc 'a';
   54415 
   54416 // If $$ = 0 here, then we know that the 'a' destructor is being invoked
   54417 // incorrectly for the 'b' set in the semantic action below.  All 'a'
   54418 // tokens are returned by yylex, which sets $$ = 1.
   54419 %destructor {
   54420   if (!$$)
   54421     fprintf (stderr, "Wrong destructor.\n");
   54422 } 'a';
   54423 
   54424 // Rather than depend on an inconsistent state to induce reading a
   54425 // lookahead as in the previous grammar, just assign the lookahead in a
   54426 // semantic action.  That lookahead isn't needed before either error
   54427 // action is encountered.  In a previous version of Bison, this was a
   54428 // problem as it meant yychar was not translated into yytoken before
   54429 // either error action.  The second error action thus invoked a
   54430 // destructor that it selected according to the incorrect yytoken.  The
   54431 // first error action would have reported an incorrect unexpected token
   54432 // except that, due to the bug described in the previous grammar, the
   54433 // unexpected token was not reported at all.
   54434 start: error-reduce consistent-error 'a' { USE ($3); } ;
   54435 
   54436 error-reduce:
   54437   'a' 'a' consistent-reduction consistent-error 'a'
   54438   { USE (($1, $2, $5)); }
   54439 | 'a' error
   54440   { USE ($1); }
   54441 ;
   54442 
   54443 consistent-reduction: /*empty*/ {
   54444   assert (yychar == YYEMPTY);
   54445   yylval = 0;
   54446   yychar = 'b';
   54447 } ;
   54448 
   54449 consistent-error:
   54450   'a' { USE ($1); }
   54451 | /*empty*/ %prec 'a'
   54452 ;
   54453 
   54454 // Provide another context in which all rules are useful so that this
   54455 // test case looks a little more realistic.
   54456 start: 'b' consistent-error 'b' ;
   54457 
   54458 
   54459 %%
   54460 
   54461 /*--------.
   54462 | yylex.  |
   54463 `--------*/
   54464 
   54465 int yylex (YYSTYPE *lvalp)
   54466 {
   54467   static char const *input = "aa";
   54468   *lvalp = 1;
   54469   return *input++;
   54470 }
   54471 #include <stdio.h>
   54472 /* A C error reporting function.  */
   54473 static
   54474 void yyerror ( const char *msg)
   54475 {
   54476   fprintf (stderr, "%s\n", msg);
   54477 }
   54478 
   54479 
   54480 /*-------.
   54481 | main.  |
   54482 `-------*/
   54483 
   54484 int
   54485 main (void)
   54486 {
   54487   return yyparse ();
   54488 }
   54489 _ATEOF
   54490 
   54491 
   54492 
   54493 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   54494   at_save_special_files
   54495   mkdir xml-tests
   54496     # Don't combine these Bison invocations since we want to be sure that
   54497   # --report=all isn't required to get the full XML file.
   54498   { set +x
   54499 $as_echo "$at_srcdir/conflicts.at:421: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   54500                   --graph=xml-tests/test.dot -o input.c input.y"
   54501 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:421"
   54502 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   54503                   --graph=xml-tests/test.dot -o input.c input.y
   54504 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54505 at_status=$? at_failed=false
   54506 $at_check_filter
   54507 echo stderr:; cat "$at_stderr"
   54508 echo stdout:; cat "$at_stdout"
   54509 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:421"
   54510 $at_failed && at_fn_log_failure
   54511 $at_traceon; }
   54512 
   54513   { set +x
   54514 $as_echo "$at_srcdir/conflicts.at:421: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   54515 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "conflicts.at:421"
   54516 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   54517 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54518 at_status=$? at_failed=false
   54519 $at_check_filter
   54520 echo stderr:; cat "$at_stderr"
   54521 echo stdout:; cat "$at_stdout"
   54522 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:421"
   54523 $at_failed && at_fn_log_failure
   54524 $at_traceon; }
   54525 
   54526     cp xml-tests/test.output expout
   54527   { set +x
   54528 $as_echo "$at_srcdir/conflicts.at:421: \$XSLTPROC \\
   54529              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   54530              xml-tests/test.xml"
   54531 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:421"
   54532 ( $at_check_trace; $XSLTPROC \
   54533              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   54534              xml-tests/test.xml
   54535 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54536 at_status=$? at_failed=false
   54537 $at_check_filter
   54538 at_fn_diff_devnull "$at_stderr" || at_failed=:
   54539 $at_diff expout "$at_stdout" || at_failed=:
   54540 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:421"
   54541 $at_failed && at_fn_log_failure
   54542 $at_traceon; }
   54543 
   54544   sort xml-tests/test.dot > expout
   54545   { set +x
   54546 $as_echo "$at_srcdir/conflicts.at:421: \$XSLTPROC \\
   54547              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   54548              xml-tests/test.xml | sort"
   54549 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:421"
   54550 ( $at_check_trace; $XSLTPROC \
   54551              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   54552              xml-tests/test.xml | sort
   54553 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54554 at_status=$? at_failed=false
   54555 $at_check_filter
   54556 at_fn_diff_devnull "$at_stderr" || at_failed=:
   54557 $at_diff expout "$at_stdout" || at_failed=:
   54558 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:421"
   54559 $at_failed && at_fn_log_failure
   54560 $at_traceon; }
   54561 
   54562   rm -rf xml-tests expout
   54563   at_restore_special_files
   54564 fi
   54565 { set +x
   54566 $as_echo "$at_srcdir/conflicts.at:421: bison -o input.c input.y"
   54567 at_fn_check_prepare_trace "conflicts.at:421"
   54568 ( $at_check_trace; bison -o input.c input.y
   54569 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54570 at_status=$? at_failed=false
   54571 $at_check_filter
   54572 at_fn_diff_devnull "$at_stderr" || at_failed=:
   54573 at_fn_diff_devnull "$at_stdout" || at_failed=:
   54574 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:421"
   54575 $at_failed && at_fn_log_failure
   54576 $at_traceon; }
   54577 
   54578 
   54579    { set +x
   54580 $as_echo "$at_srcdir/conflicts.at:421: \$BISON_C_WORKS"
   54581 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "conflicts.at:421"
   54582 ( $at_check_trace; $BISON_C_WORKS
   54583 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54584 at_status=$? at_failed=false
   54585 $at_check_filter
   54586 echo stderr:; cat "$at_stderr"
   54587 echo stdout:; cat "$at_stdout"
   54588 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:421"
   54589 $at_failed && at_fn_log_failure
   54590 $at_traceon; }
   54591 
   54592 { set +x
   54593 $as_echo "$at_srcdir/conflicts.at:421: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   54594 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "conflicts.at:421"
   54595 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   54596 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54597 at_status=$? at_failed=false
   54598 $at_check_filter
   54599 echo stderr:; cat "$at_stderr"
   54600 echo stdout:; cat "$at_stdout"
   54601 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:421"
   54602 $at_failed && at_fn_log_failure
   54603 $at_traceon; }
   54604 
   54605 
   54606 
   54607 
   54608 
   54609 { set +x
   54610 $as_echo "$at_srcdir/conflicts.at:421:  \$PREPARSER ./input"
   54611 at_fn_check_prepare_dynamic " $PREPARSER ./input" "conflicts.at:421"
   54612 ( $at_check_trace;  $PREPARSER ./input
   54613 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54614 at_status=$? at_failed=false
   54615 $at_check_filter
   54616 echo stderr:; tee stderr <"$at_stderr"
   54617 at_fn_diff_devnull "$at_stdout" || at_failed=:
   54618 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:421"
   54619 $at_failed && at_fn_log_failure
   54620 $at_traceon; }
   54621 
   54622 { set +x
   54623 $as_echo "$at_srcdir/conflicts.at:421: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   54624 at_fn_check_prepare_trace "conflicts.at:421"
   54625 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   54626 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54627 at_status=$? at_failed=false
   54628 $at_check_filter
   54629 echo >>"$at_stderr"; $as_echo "syntax error, unexpected \$end, expecting 'a'
   54630 " | \
   54631   $at_diff - "$at_stderr" || at_failed=:
   54632 at_fn_diff_devnull "$at_stdout" || at_failed=:
   54633 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:421"
   54634 $at_failed && at_fn_log_failure
   54635 $at_traceon; }
   54636 
   54637 
   54638 
   54639 
   54640 
   54641 
   54642 
   54643 
   54644 
   54645 
   54646 
   54647 
   54648 
   54649 
   54650 
   54651 cat >input.y <<'_ATEOF'
   54652 %code top {
   54653 #include <config.h>
   54654 /* We don't need perfect functions for these tests. */
   54655 #undef malloc
   54656 #undef memcmp
   54657 #undef realloc
   54658 }
   54659 
   54660 
   54661 
   54662 %code {
   54663   #include <assert.h>
   54664   #include <stdio.h>
   54665   static void yyerror ( const char *msg);
   54666   int yylex (YYSTYPE *lvalp);
   54667   #define USE(Var)
   54668 }
   54669 
   54670 %define api.pure
   54671 
   54672 %define parse.lac full
   54673 
   54674 %error-verbose
   54675 
   54676 %%
   54677 
   54678 %nonassoc 'a';
   54679 
   54680 // If $$ = 0 here, then we know that the 'a' destructor is being invoked
   54681 // incorrectly for the 'b' set in the semantic action below.  All 'a'
   54682 // tokens are returned by yylex, which sets $$ = 1.
   54683 %destructor {
   54684   if (!$$)
   54685     fprintf (stderr, "Wrong destructor.\n");
   54686 } 'a';
   54687 
   54688 // Rather than depend on an inconsistent state to induce reading a
   54689 // lookahead as in the previous grammar, just assign the lookahead in a
   54690 // semantic action.  That lookahead isn't needed before either error
   54691 // action is encountered.  In a previous version of Bison, this was a
   54692 // problem as it meant yychar was not translated into yytoken before
   54693 // either error action.  The second error action thus invoked a
   54694 // destructor that it selected according to the incorrect yytoken.  The
   54695 // first error action would have reported an incorrect unexpected token
   54696 // except that, due to the bug described in the previous grammar, the
   54697 // unexpected token was not reported at all.
   54698 start: error-reduce consistent-error 'a' { USE ($3); } ;
   54699 
   54700 error-reduce:
   54701   'a' 'a' consistent-reduction consistent-error 'a'
   54702   { USE (($1, $2, $5)); }
   54703 | 'a' error
   54704   { USE ($1); }
   54705 ;
   54706 
   54707 consistent-reduction: /*empty*/ {
   54708   assert (yychar == YYEMPTY);
   54709   yylval = 0;
   54710   yychar = 'b';
   54711 } ;
   54712 
   54713 consistent-error:
   54714   'a' { USE ($1); }
   54715 | /*empty*/ %prec 'a'
   54716 ;
   54717 
   54718 // Provide another context in which all rules are useful so that this
   54719 // test case looks a little more realistic.
   54720 start: 'b' consistent-error 'b' ;
   54721 
   54722 
   54723 %%
   54724 
   54725 /*--------.
   54726 | yylex.  |
   54727 `--------*/
   54728 
   54729 int yylex (YYSTYPE *lvalp)
   54730 {
   54731   static char const *input = "aa";
   54732   *lvalp = 1;
   54733   return *input++;
   54734 }
   54735 #include <stdio.h>
   54736 /* A C error reporting function.  */
   54737 static
   54738 void yyerror ( const char *msg)
   54739 {
   54740   fprintf (stderr, "%s\n", msg);
   54741 }
   54742 
   54743 
   54744 /*-------.
   54745 | main.  |
   54746 `-------*/
   54747 
   54748 int
   54749 main (void)
   54750 {
   54751   return yyparse ();
   54752 }
   54753 _ATEOF
   54754 
   54755 
   54756 
   54757 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   54758   at_save_special_files
   54759   mkdir xml-tests
   54760     # Don't combine these Bison invocations since we want to be sure that
   54761   # --report=all isn't required to get the full XML file.
   54762   { set +x
   54763 $as_echo "$at_srcdir/conflicts.at:426: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   54764                   --graph=xml-tests/test.dot -o input.c input.y"
   54765 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:426"
   54766 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   54767                   --graph=xml-tests/test.dot -o input.c input.y
   54768 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54769 at_status=$? at_failed=false
   54770 $at_check_filter
   54771 echo stderr:; cat "$at_stderr"
   54772 echo stdout:; cat "$at_stdout"
   54773 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:426"
   54774 $at_failed && at_fn_log_failure
   54775 $at_traceon; }
   54776 
   54777   { set +x
   54778 $as_echo "$at_srcdir/conflicts.at:426: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   54779 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "conflicts.at:426"
   54780 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   54781 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54782 at_status=$? at_failed=false
   54783 $at_check_filter
   54784 echo stderr:; cat "$at_stderr"
   54785 echo stdout:; cat "$at_stdout"
   54786 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:426"
   54787 $at_failed && at_fn_log_failure
   54788 $at_traceon; }
   54789 
   54790     cp xml-tests/test.output expout
   54791   { set +x
   54792 $as_echo "$at_srcdir/conflicts.at:426: \$XSLTPROC \\
   54793              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   54794              xml-tests/test.xml"
   54795 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:426"
   54796 ( $at_check_trace; $XSLTPROC \
   54797              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   54798              xml-tests/test.xml
   54799 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54800 at_status=$? at_failed=false
   54801 $at_check_filter
   54802 at_fn_diff_devnull "$at_stderr" || at_failed=:
   54803 $at_diff expout "$at_stdout" || at_failed=:
   54804 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:426"
   54805 $at_failed && at_fn_log_failure
   54806 $at_traceon; }
   54807 
   54808   sort xml-tests/test.dot > expout
   54809   { set +x
   54810 $as_echo "$at_srcdir/conflicts.at:426: \$XSLTPROC \\
   54811              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   54812              xml-tests/test.xml | sort"
   54813 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:426"
   54814 ( $at_check_trace; $XSLTPROC \
   54815              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   54816              xml-tests/test.xml | sort
   54817 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54818 at_status=$? at_failed=false
   54819 $at_check_filter
   54820 at_fn_diff_devnull "$at_stderr" || at_failed=:
   54821 $at_diff expout "$at_stdout" || at_failed=:
   54822 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:426"
   54823 $at_failed && at_fn_log_failure
   54824 $at_traceon; }
   54825 
   54826   rm -rf xml-tests expout
   54827   at_restore_special_files
   54828 fi
   54829 { set +x
   54830 $as_echo "$at_srcdir/conflicts.at:426: bison -o input.c input.y"
   54831 at_fn_check_prepare_trace "conflicts.at:426"
   54832 ( $at_check_trace; bison -o input.c input.y
   54833 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54834 at_status=$? at_failed=false
   54835 $at_check_filter
   54836 at_fn_diff_devnull "$at_stderr" || at_failed=:
   54837 at_fn_diff_devnull "$at_stdout" || at_failed=:
   54838 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:426"
   54839 $at_failed && at_fn_log_failure
   54840 $at_traceon; }
   54841 
   54842 
   54843    { set +x
   54844 $as_echo "$at_srcdir/conflicts.at:426: \$BISON_C_WORKS"
   54845 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "conflicts.at:426"
   54846 ( $at_check_trace; $BISON_C_WORKS
   54847 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54848 at_status=$? at_failed=false
   54849 $at_check_filter
   54850 echo stderr:; cat "$at_stderr"
   54851 echo stdout:; cat "$at_stdout"
   54852 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:426"
   54853 $at_failed && at_fn_log_failure
   54854 $at_traceon; }
   54855 
   54856 { set +x
   54857 $as_echo "$at_srcdir/conflicts.at:426: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   54858 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "conflicts.at:426"
   54859 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   54860 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54861 at_status=$? at_failed=false
   54862 $at_check_filter
   54863 echo stderr:; cat "$at_stderr"
   54864 echo stdout:; cat "$at_stdout"
   54865 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:426"
   54866 $at_failed && at_fn_log_failure
   54867 $at_traceon; }
   54868 
   54869 
   54870 
   54871 
   54872 
   54873 { set +x
   54874 $as_echo "$at_srcdir/conflicts.at:426:  \$PREPARSER ./input"
   54875 at_fn_check_prepare_dynamic " $PREPARSER ./input" "conflicts.at:426"
   54876 ( $at_check_trace;  $PREPARSER ./input
   54877 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54878 at_status=$? at_failed=false
   54879 $at_check_filter
   54880 echo stderr:; tee stderr <"$at_stderr"
   54881 at_fn_diff_devnull "$at_stdout" || at_failed=:
   54882 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:426"
   54883 $at_failed && at_fn_log_failure
   54884 $at_traceon; }
   54885 
   54886 { set +x
   54887 $as_echo "$at_srcdir/conflicts.at:426: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   54888 at_fn_check_prepare_trace "conflicts.at:426"
   54889 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   54890 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   54891 at_status=$? at_failed=false
   54892 $at_check_filter
   54893 echo >>"$at_stderr"; $as_echo "syntax error, unexpected 'b'
   54894 " | \
   54895   $at_diff - "$at_stderr" || at_failed=:
   54896 at_fn_diff_devnull "$at_stdout" || at_failed=:
   54897 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:426"
   54898 $at_failed && at_fn_log_failure
   54899 $at_traceon; }
   54900 
   54901 
   54902 
   54903 
   54904 
   54905 
   54906 
   54907 
   54908 
   54909 
   54910 
   54911 
   54912 
   54913 
   54914 cat >input.y <<'_ATEOF'
   54915 %code top {
   54916 #include <config.h>
   54917 /* We don't need perfect functions for these tests. */
   54918 #undef malloc
   54919 #undef memcmp
   54920 #undef realloc
   54921 }
   54922 
   54923 
   54924 
   54925 %code {
   54926   #include <assert.h>
   54927   #include <stdio.h>
   54928   static void yyerror ( const char *msg);
   54929   int yylex (YYSTYPE *lvalp);
   54930   #define USE(Var)
   54931 }
   54932 
   54933 %define api.pure
   54934 
   54935 %define parse.lac full
   54936                              %define lr.default-reductions accepting
   54937 
   54938 %error-verbose
   54939 
   54940 %%
   54941 
   54942 %nonassoc 'a';
   54943 
   54944 // If $$ = 0 here, then we know that the 'a' destructor is being invoked
   54945 // incorrectly for the 'b' set in the semantic action below.  All 'a'
   54946 // tokens are returned by yylex, which sets $$ = 1.
   54947 %destructor {
   54948   if (!$$)
   54949     fprintf (stderr, "Wrong destructor.\n");
   54950 } 'a';
   54951 
   54952 // Rather than depend on an inconsistent state to induce reading a
   54953 // lookahead as in the previous grammar, just assign the lookahead in a
   54954 // semantic action.  That lookahead isn't needed before either error
   54955 // action is encountered.  In a previous version of Bison, this was a
   54956 // problem as it meant yychar was not translated into yytoken before
   54957 // either error action.  The second error action thus invoked a
   54958 // destructor that it selected according to the incorrect yytoken.  The
   54959 // first error action would have reported an incorrect unexpected token
   54960 // except that, due to the bug described in the previous grammar, the
   54961 // unexpected token was not reported at all.
   54962 start: error-reduce consistent-error 'a' { USE ($3); } ;
   54963 
   54964 error-reduce:
   54965   'a' 'a' consistent-reduction consistent-error 'a'
   54966   { USE (($1, $2, $5)); }
   54967 | 'a' error
   54968   { USE ($1); }
   54969 ;
   54970 
   54971 consistent-reduction: /*empty*/ {
   54972   assert (yychar == YYEMPTY);
   54973   yylval = 0;
   54974   yychar = 'b';
   54975 } ;
   54976 
   54977 consistent-error:
   54978   'a' { USE ($1); }
   54979 | /*empty*/ %prec 'a'
   54980 ;
   54981 
   54982 // Provide another context in which all rules are useful so that this
   54983 // test case looks a little more realistic.
   54984 start: 'b' consistent-error 'b' ;
   54985 
   54986 
   54987 %%
   54988 
   54989 /*--------.
   54990 | yylex.  |
   54991 `--------*/
   54992 
   54993 int yylex (YYSTYPE *lvalp)
   54994 {
   54995   static char const *input = "aa";
   54996   *lvalp = 1;
   54997   return *input++;
   54998 }
   54999 #include <stdio.h>
   55000 /* A C error reporting function.  */
   55001 static
   55002 void yyerror ( const char *msg)
   55003 {
   55004   fprintf (stderr, "%s\n", msg);
   55005 }
   55006 
   55007 
   55008 /*-------.
   55009 | main.  |
   55010 `-------*/
   55011 
   55012 int
   55013 main (void)
   55014 {
   55015   return yyparse ();
   55016 }
   55017 _ATEOF
   55018 
   55019 
   55020 
   55021 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   55022   at_save_special_files
   55023   mkdir xml-tests
   55024     # Don't combine these Bison invocations since we want to be sure that
   55025   # --report=all isn't required to get the full XML file.
   55026   { set +x
   55027 $as_echo "$at_srcdir/conflicts.at:430: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   55028                   --graph=xml-tests/test.dot -o input.c input.y"
   55029 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:430"
   55030 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   55031                   --graph=xml-tests/test.dot -o input.c input.y
   55032 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55033 at_status=$? at_failed=false
   55034 $at_check_filter
   55035 echo stderr:; cat "$at_stderr"
   55036 echo stdout:; cat "$at_stdout"
   55037 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:430"
   55038 $at_failed && at_fn_log_failure
   55039 $at_traceon; }
   55040 
   55041   { set +x
   55042 $as_echo "$at_srcdir/conflicts.at:430: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   55043 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "conflicts.at:430"
   55044 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   55045 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55046 at_status=$? at_failed=false
   55047 $at_check_filter
   55048 echo stderr:; cat "$at_stderr"
   55049 echo stdout:; cat "$at_stdout"
   55050 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:430"
   55051 $at_failed && at_fn_log_failure
   55052 $at_traceon; }
   55053 
   55054     cp xml-tests/test.output expout
   55055   { set +x
   55056 $as_echo "$at_srcdir/conflicts.at:430: \$XSLTPROC \\
   55057              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   55058              xml-tests/test.xml"
   55059 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:430"
   55060 ( $at_check_trace; $XSLTPROC \
   55061              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   55062              xml-tests/test.xml
   55063 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55064 at_status=$? at_failed=false
   55065 $at_check_filter
   55066 at_fn_diff_devnull "$at_stderr" || at_failed=:
   55067 $at_diff expout "$at_stdout" || at_failed=:
   55068 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:430"
   55069 $at_failed && at_fn_log_failure
   55070 $at_traceon; }
   55071 
   55072   sort xml-tests/test.dot > expout
   55073   { set +x
   55074 $as_echo "$at_srcdir/conflicts.at:430: \$XSLTPROC \\
   55075              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   55076              xml-tests/test.xml | sort"
   55077 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:430"
   55078 ( $at_check_trace; $XSLTPROC \
   55079              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   55080              xml-tests/test.xml | sort
   55081 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55082 at_status=$? at_failed=false
   55083 $at_check_filter
   55084 at_fn_diff_devnull "$at_stderr" || at_failed=:
   55085 $at_diff expout "$at_stdout" || at_failed=:
   55086 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:430"
   55087 $at_failed && at_fn_log_failure
   55088 $at_traceon; }
   55089 
   55090   rm -rf xml-tests expout
   55091   at_restore_special_files
   55092 fi
   55093 { set +x
   55094 $as_echo "$at_srcdir/conflicts.at:430: bison -o input.c input.y"
   55095 at_fn_check_prepare_trace "conflicts.at:430"
   55096 ( $at_check_trace; bison -o input.c input.y
   55097 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55098 at_status=$? at_failed=false
   55099 $at_check_filter
   55100 at_fn_diff_devnull "$at_stderr" || at_failed=:
   55101 at_fn_diff_devnull "$at_stdout" || at_failed=:
   55102 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:430"
   55103 $at_failed && at_fn_log_failure
   55104 $at_traceon; }
   55105 
   55106 
   55107    { set +x
   55108 $as_echo "$at_srcdir/conflicts.at:430: \$BISON_C_WORKS"
   55109 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "conflicts.at:430"
   55110 ( $at_check_trace; $BISON_C_WORKS
   55111 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55112 at_status=$? at_failed=false
   55113 $at_check_filter
   55114 echo stderr:; cat "$at_stderr"
   55115 echo stdout:; cat "$at_stdout"
   55116 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:430"
   55117 $at_failed && at_fn_log_failure
   55118 $at_traceon; }
   55119 
   55120 { set +x
   55121 $as_echo "$at_srcdir/conflicts.at:430: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   55122 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "conflicts.at:430"
   55123 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   55124 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55125 at_status=$? at_failed=false
   55126 $at_check_filter
   55127 echo stderr:; cat "$at_stderr"
   55128 echo stdout:; cat "$at_stdout"
   55129 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:430"
   55130 $at_failed && at_fn_log_failure
   55131 $at_traceon; }
   55132 
   55133 
   55134 
   55135 
   55136 
   55137 { set +x
   55138 $as_echo "$at_srcdir/conflicts.at:430:  \$PREPARSER ./input"
   55139 at_fn_check_prepare_dynamic " $PREPARSER ./input" "conflicts.at:430"
   55140 ( $at_check_trace;  $PREPARSER ./input
   55141 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55142 at_status=$? at_failed=false
   55143 $at_check_filter
   55144 echo stderr:; tee stderr <"$at_stderr"
   55145 at_fn_diff_devnull "$at_stdout" || at_failed=:
   55146 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:430"
   55147 $at_failed && at_fn_log_failure
   55148 $at_traceon; }
   55149 
   55150 { set +x
   55151 $as_echo "$at_srcdir/conflicts.at:430: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   55152 at_fn_check_prepare_trace "conflicts.at:430"
   55153 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   55154 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55155 at_status=$? at_failed=false
   55156 $at_check_filter
   55157 echo >>"$at_stderr"; $as_echo "syntax error, unexpected \$end
   55158 " | \
   55159   $at_diff - "$at_stderr" || at_failed=:
   55160 at_fn_diff_devnull "$at_stdout" || at_failed=:
   55161 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:430"
   55162 $at_failed && at_fn_log_failure
   55163 $at_traceon; }
   55164 
   55165 
   55166 
   55167 
   55168 
   55169 
   55170 
   55171 
   55172 
   55173 
   55174 
   55175 
   55176 
   55177 
   55178   set +x
   55179   $at_times_p && times >"$at_times_file"
   55180 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   55181 read at_status <"$at_status_file"
   55182 #AT_STOP_183
   55183 #AT_START_184
   55184 at_fn_group_banner 184 'conflicts.at:456' \
   55185   "LAC: %nonassoc requires splitting canonical LR states" "" 10
   55186 at_xfail=no
   55187 (
   55188   $as_echo "184. $at_setup_line: testing $at_desc ..."
   55189   $at_traceon
   55190 
   55191 
   55192 cat >input.y <<'_ATEOF'
   55193 %code top {
   55194 #include <config.h>
   55195 /* We don't need perfect functions for these tests. */
   55196 #undef malloc
   55197 #undef memcmp
   55198 #undef realloc
   55199 }
   55200 
   55201 %code {
   55202   #include <stdio.h>
   55203   static void yyerror ( const char *msg);
   55204   static int yylex (void);
   55205 }
   55206 
   55207 %error-verbose
   55208 %nonassoc 'a'
   55209 
   55210 %%
   55211 
   55212 start:
   55213   'a' problem 'a' // First context.
   55214 | 'b' problem 'b' // Second context.
   55215 | 'c' reduce-nonassoc // Just makes reduce-nonassoc useful.
   55216 ;
   55217 
   55218 problem:
   55219   look reduce-nonassoc
   55220 | look 'a'
   55221 | look 'b'
   55222 ;
   55223 
   55224 // For the state reached after shifting the 'a' in these productions,
   55225 // lookahead sets are the same in both the first and second contexts.
   55226 // Thus, canonical LR reuses the same state for both contexts.  However,
   55227 // the lookahead 'a' for the reduction "look: 'a'" later becomes an
   55228 // error action only in the first context.  In order to immediately
   55229 // detect the syntax error on 'a' here for only the first context, this
   55230 // canonical LR state would have to be split into two states, and the
   55231 // 'a' lookahead would have to be removed from only one of the states.
   55232 look:
   55233   'a' // Reduction lookahead set is always ['a', 'b'].
   55234 | 'a' 'b'
   55235 | 'a' 'c' // 'c' is forgotten as an expected token.
   55236 ;
   55237 
   55238 reduce-nonassoc: %prec 'a';
   55239 
   55240 %%
   55241 #include <stdio.h>
   55242 /* A C error reporting function.  */
   55243 static
   55244 void yyerror ( const char *msg)
   55245 {
   55246   fprintf (stderr, "%s\n", msg);
   55247 }
   55248 #include <assert.h>
   55249 static
   55250 int yylex (void)
   55251 {
   55252   static char const input[] = "aaa";
   55253   static size_t toknum = 0;
   55254   int res;
   55255   ;
   55256   assert (toknum < sizeof input / sizeof input[0]);
   55257   res = input[toknum++];
   55258   ;
   55259   return res;
   55260 }
   55261 
   55262 int
   55263 main (void)
   55264 {
   55265   return yyparse ();
   55266 }
   55267 _ATEOF
   55268 
   55269 
   55270 
   55271 
   55272 # Show canonical LR's failure.
   55273 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   55274   at_save_special_files
   55275   mkdir xml-tests
   55276     # Don't combine these Bison invocations since we want to be sure that
   55277   # --report=all isn't required to get the full XML file.
   55278   { set +x
   55279 $as_echo "$at_srcdir/conflicts.at:511: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   55280                   --graph=xml-tests/test.dot -Dlr.type=canonical-lr -o input.c input.y"
   55281 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:511"
   55282 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   55283                   --graph=xml-tests/test.dot -Dlr.type=canonical-lr -o input.c input.y
   55284 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55285 at_status=$? at_failed=false
   55286 $at_check_filter
   55287 echo stderr:; cat "$at_stderr"
   55288 echo stdout:; cat "$at_stdout"
   55289 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:511"
   55290 $at_failed && at_fn_log_failure
   55291 $at_traceon; }
   55292 
   55293   { set +x
   55294 $as_echo "$at_srcdir/conflicts.at:511: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Dlr.type=canonical-lr -o input.c input.y"
   55295 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Dlr.type=canonical-lr -o input.c input.y" "conflicts.at:511"
   55296 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Dlr.type=canonical-lr -o input.c input.y
   55297 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55298 at_status=$? at_failed=false
   55299 $at_check_filter
   55300 echo stderr:; cat "$at_stderr"
   55301 echo stdout:; cat "$at_stdout"
   55302 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:511"
   55303 $at_failed && at_fn_log_failure
   55304 $at_traceon; }
   55305 
   55306     cp xml-tests/test.output expout
   55307   { set +x
   55308 $as_echo "$at_srcdir/conflicts.at:511: \$XSLTPROC \\
   55309              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   55310              xml-tests/test.xml"
   55311 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:511"
   55312 ( $at_check_trace; $XSLTPROC \
   55313              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   55314              xml-tests/test.xml
   55315 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55316 at_status=$? at_failed=false
   55317 $at_check_filter
   55318 at_fn_diff_devnull "$at_stderr" || at_failed=:
   55319 $at_diff expout "$at_stdout" || at_failed=:
   55320 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:511"
   55321 $at_failed && at_fn_log_failure
   55322 $at_traceon; }
   55323 
   55324   sort xml-tests/test.dot > expout
   55325   { set +x
   55326 $as_echo "$at_srcdir/conflicts.at:511: \$XSLTPROC \\
   55327              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   55328              xml-tests/test.xml | sort"
   55329 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:511"
   55330 ( $at_check_trace; $XSLTPROC \
   55331              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   55332              xml-tests/test.xml | sort
   55333 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55334 at_status=$? at_failed=false
   55335 $at_check_filter
   55336 at_fn_diff_devnull "$at_stderr" || at_failed=:
   55337 $at_diff expout "$at_stdout" || at_failed=:
   55338 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:511"
   55339 $at_failed && at_fn_log_failure
   55340 $at_traceon; }
   55341 
   55342   rm -rf xml-tests expout
   55343   at_restore_special_files
   55344 fi
   55345 { set +x
   55346 $as_echo "$at_srcdir/conflicts.at:511: bison -Dlr.type=canonical-lr -o input.c input.y"
   55347 at_fn_check_prepare_trace "conflicts.at:511"
   55348 ( $at_check_trace; bison -Dlr.type=canonical-lr -o input.c input.y
   55349 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55350 at_status=$? at_failed=false
   55351 $at_check_filter
   55352 echo >>"$at_stderr"; $as_echo "input.y: conflicts: 2 shift/reduce
   55353 " | \
   55354   $at_diff - "$at_stderr" || at_failed=:
   55355 at_fn_diff_devnull "$at_stdout" || at_failed=:
   55356 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:511"
   55357 $at_failed && at_fn_log_failure
   55358 $at_traceon; }
   55359 
   55360 
   55361 { set +x
   55362 $as_echo "$at_srcdir/conflicts.at:515: \$BISON_C_WORKS"
   55363 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "conflicts.at:515"
   55364 ( $at_check_trace; $BISON_C_WORKS
   55365 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55366 at_status=$? at_failed=false
   55367 $at_check_filter
   55368 echo stderr:; cat "$at_stderr"
   55369 echo stdout:; cat "$at_stdout"
   55370 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:515"
   55371 $at_failed && at_fn_log_failure
   55372 $at_traceon; }
   55373 
   55374 { set +x
   55375 $as_echo "$at_srcdir/conflicts.at:515: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   55376 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "conflicts.at:515"
   55377 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   55378 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55379 at_status=$? at_failed=false
   55380 $at_check_filter
   55381 echo stderr:; cat "$at_stderr"
   55382 echo stdout:; cat "$at_stdout"
   55383 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:515"
   55384 $at_failed && at_fn_log_failure
   55385 $at_traceon; }
   55386 
   55387 { set +x
   55388 $as_echo "$at_srcdir/conflicts.at:516:  \$PREPARSER ./input"
   55389 at_fn_check_prepare_dynamic " $PREPARSER ./input" "conflicts.at:516"
   55390 ( $at_check_trace;  $PREPARSER ./input
   55391 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55392 at_status=$? at_failed=false
   55393 $at_check_filter
   55394 echo stderr:; tee stderr <"$at_stderr"
   55395 at_fn_diff_devnull "$at_stdout" || at_failed=:
   55396 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:516"
   55397 $at_failed && at_fn_log_failure
   55398 $at_traceon; }
   55399 
   55400 { set +x
   55401 $as_echo "$at_srcdir/conflicts.at:516: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   55402 at_fn_check_prepare_trace "conflicts.at:516"
   55403 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   55404 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55405 at_status=$? at_failed=false
   55406 $at_check_filter
   55407 echo >>"$at_stderr"; $as_echo "syntax error, unexpected 'a', expecting 'b'
   55408 " | \
   55409   $at_diff - "$at_stderr" || at_failed=:
   55410 at_fn_diff_devnull "$at_stdout" || at_failed=:
   55411 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:516"
   55412 $at_failed && at_fn_log_failure
   55413 $at_traceon; }
   55414 
   55415 
   55416 
   55417 # It's corrected by LAC.
   55418 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   55419   at_save_special_files
   55420   mkdir xml-tests
   55421     # Don't combine these Bison invocations since we want to be sure that
   55422   # --report=all isn't required to get the full XML file.
   55423   { set +x
   55424 $as_echo "$at_srcdir/conflicts.at:521: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   55425                   --graph=xml-tests/test.dot -Dlr.type=canonical-lr -Dparse.lac=full \\
   55426                  -o input.c input.y"
   55427 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:521"
   55428 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   55429                   --graph=xml-tests/test.dot -Dlr.type=canonical-lr -Dparse.lac=full \
   55430                  -o input.c input.y
   55431 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55432 at_status=$? at_failed=false
   55433 $at_check_filter
   55434 echo stderr:; cat "$at_stderr"
   55435 echo stdout:; cat "$at_stdout"
   55436 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:521"
   55437 $at_failed && at_fn_log_failure
   55438 $at_traceon; }
   55439 
   55440   { set +x
   55441 $as_echo "$at_srcdir/conflicts.at:521: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Dlr.type=canonical-lr -Dparse.lac=full \\
   55442                  -o input.c input.y"
   55443 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:521"
   55444 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Dlr.type=canonical-lr -Dparse.lac=full \
   55445                  -o input.c input.y
   55446 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55447 at_status=$? at_failed=false
   55448 $at_check_filter
   55449 echo stderr:; cat "$at_stderr"
   55450 echo stdout:; cat "$at_stdout"
   55451 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:521"
   55452 $at_failed && at_fn_log_failure
   55453 $at_traceon; }
   55454 
   55455     cp xml-tests/test.output expout
   55456   { set +x
   55457 $as_echo "$at_srcdir/conflicts.at:521: \$XSLTPROC \\
   55458              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   55459              xml-tests/test.xml"
   55460 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:521"
   55461 ( $at_check_trace; $XSLTPROC \
   55462              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   55463              xml-tests/test.xml
   55464 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55465 at_status=$? at_failed=false
   55466 $at_check_filter
   55467 at_fn_diff_devnull "$at_stderr" || at_failed=:
   55468 $at_diff expout "$at_stdout" || at_failed=:
   55469 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:521"
   55470 $at_failed && at_fn_log_failure
   55471 $at_traceon; }
   55472 
   55473   sort xml-tests/test.dot > expout
   55474   { set +x
   55475 $as_echo "$at_srcdir/conflicts.at:521: \$XSLTPROC \\
   55476              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   55477              xml-tests/test.xml | sort"
   55478 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:521"
   55479 ( $at_check_trace; $XSLTPROC \
   55480              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   55481              xml-tests/test.xml | sort
   55482 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55483 at_status=$? at_failed=false
   55484 $at_check_filter
   55485 at_fn_diff_devnull "$at_stderr" || at_failed=:
   55486 $at_diff expout "$at_stdout" || at_failed=:
   55487 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:521"
   55488 $at_failed && at_fn_log_failure
   55489 $at_traceon; }
   55490 
   55491   rm -rf xml-tests expout
   55492   at_restore_special_files
   55493 fi
   55494 { set +x
   55495 $as_echo "$at_srcdir/conflicts.at:521: bison -Dlr.type=canonical-lr -Dparse.lac=full \\
   55496                  -o input.c input.y"
   55497 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:521"
   55498 ( $at_check_trace; bison -Dlr.type=canonical-lr -Dparse.lac=full \
   55499                  -o input.c input.y
   55500 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55501 at_status=$? at_failed=false
   55502 $at_check_filter
   55503 echo >>"$at_stderr"; $as_echo "input.y: conflicts: 2 shift/reduce
   55504 " | \
   55505   $at_diff - "$at_stderr" || at_failed=:
   55506 at_fn_diff_devnull "$at_stdout" || at_failed=:
   55507 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:521"
   55508 $at_failed && at_fn_log_failure
   55509 $at_traceon; }
   55510 
   55511 
   55512 { set +x
   55513 $as_echo "$at_srcdir/conflicts.at:525: \$BISON_C_WORKS"
   55514 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "conflicts.at:525"
   55515 ( $at_check_trace; $BISON_C_WORKS
   55516 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55517 at_status=$? at_failed=false
   55518 $at_check_filter
   55519 echo stderr:; cat "$at_stderr"
   55520 echo stdout:; cat "$at_stdout"
   55521 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:525"
   55522 $at_failed && at_fn_log_failure
   55523 $at_traceon; }
   55524 
   55525 { set +x
   55526 $as_echo "$at_srcdir/conflicts.at:525: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   55527 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "conflicts.at:525"
   55528 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   55529 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55530 at_status=$? at_failed=false
   55531 $at_check_filter
   55532 echo stderr:; cat "$at_stderr"
   55533 echo stdout:; cat "$at_stdout"
   55534 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:525"
   55535 $at_failed && at_fn_log_failure
   55536 $at_traceon; }
   55537 
   55538 { set +x
   55539 $as_echo "$at_srcdir/conflicts.at:526:  \$PREPARSER ./input"
   55540 at_fn_check_prepare_dynamic " $PREPARSER ./input" "conflicts.at:526"
   55541 ( $at_check_trace;  $PREPARSER ./input
   55542 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55543 at_status=$? at_failed=false
   55544 $at_check_filter
   55545 echo stderr:; tee stderr <"$at_stderr"
   55546 at_fn_diff_devnull "$at_stdout" || at_failed=:
   55547 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:526"
   55548 $at_failed && at_fn_log_failure
   55549 $at_traceon; }
   55550 
   55551 { set +x
   55552 $as_echo "$at_srcdir/conflicts.at:526: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   55553 at_fn_check_prepare_trace "conflicts.at:526"
   55554 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   55555 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55556 at_status=$? at_failed=false
   55557 $at_check_filter
   55558 echo >>"$at_stderr"; $as_echo "syntax error, unexpected 'a', expecting 'b' or 'c'
   55559 " | \
   55560   $at_diff - "$at_stderr" || at_failed=:
   55561 at_fn_diff_devnull "$at_stdout" || at_failed=:
   55562 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:526"
   55563 $at_failed && at_fn_log_failure
   55564 $at_traceon; }
   55565 
   55566 
   55567 
   55568 # IELR is sufficient when LAC is used.
   55569 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   55570   at_save_special_files
   55571   mkdir xml-tests
   55572     # Don't combine these Bison invocations since we want to be sure that
   55573   # --report=all isn't required to get the full XML file.
   55574   { set +x
   55575 $as_echo "$at_srcdir/conflicts.at:531: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   55576                   --graph=xml-tests/test.dot -Dlr.type=ielr -Dparse.lac=full -o input.c input.y"
   55577 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:531"
   55578 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   55579                   --graph=xml-tests/test.dot -Dlr.type=ielr -Dparse.lac=full -o input.c input.y
   55580 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55581 at_status=$? at_failed=false
   55582 $at_check_filter
   55583 echo stderr:; cat "$at_stderr"
   55584 echo stdout:; cat "$at_stdout"
   55585 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:531"
   55586 $at_failed && at_fn_log_failure
   55587 $at_traceon; }
   55588 
   55589   { set +x
   55590 $as_echo "$at_srcdir/conflicts.at:531: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Dlr.type=ielr -Dparse.lac=full -o input.c input.y"
   55591 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Dlr.type=ielr -Dparse.lac=full -o input.c input.y" "conflicts.at:531"
   55592 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -Dlr.type=ielr -Dparse.lac=full -o input.c input.y
   55593 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55594 at_status=$? at_failed=false
   55595 $at_check_filter
   55596 echo stderr:; cat "$at_stderr"
   55597 echo stdout:; cat "$at_stdout"
   55598 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:531"
   55599 $at_failed && at_fn_log_failure
   55600 $at_traceon; }
   55601 
   55602     cp xml-tests/test.output expout
   55603   { set +x
   55604 $as_echo "$at_srcdir/conflicts.at:531: \$XSLTPROC \\
   55605              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   55606              xml-tests/test.xml"
   55607 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:531"
   55608 ( $at_check_trace; $XSLTPROC \
   55609              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   55610              xml-tests/test.xml
   55611 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55612 at_status=$? at_failed=false
   55613 $at_check_filter
   55614 at_fn_diff_devnull "$at_stderr" || at_failed=:
   55615 $at_diff expout "$at_stdout" || at_failed=:
   55616 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:531"
   55617 $at_failed && at_fn_log_failure
   55618 $at_traceon; }
   55619 
   55620   sort xml-tests/test.dot > expout
   55621   { set +x
   55622 $as_echo "$at_srcdir/conflicts.at:531: \$XSLTPROC \\
   55623              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   55624              xml-tests/test.xml | sort"
   55625 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:531"
   55626 ( $at_check_trace; $XSLTPROC \
   55627              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   55628              xml-tests/test.xml | sort
   55629 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55630 at_status=$? at_failed=false
   55631 $at_check_filter
   55632 at_fn_diff_devnull "$at_stderr" || at_failed=:
   55633 $at_diff expout "$at_stdout" || at_failed=:
   55634 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:531"
   55635 $at_failed && at_fn_log_failure
   55636 $at_traceon; }
   55637 
   55638   rm -rf xml-tests expout
   55639   at_restore_special_files
   55640 fi
   55641 { set +x
   55642 $as_echo "$at_srcdir/conflicts.at:531: bison -Dlr.type=ielr -Dparse.lac=full -o input.c input.y"
   55643 at_fn_check_prepare_trace "conflicts.at:531"
   55644 ( $at_check_trace; bison -Dlr.type=ielr -Dparse.lac=full -o input.c input.y
   55645 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55646 at_status=$? at_failed=false
   55647 $at_check_filter
   55648 echo >>"$at_stderr"; $as_echo "input.y: conflicts: 2 shift/reduce
   55649 " | \
   55650   $at_diff - "$at_stderr" || at_failed=:
   55651 at_fn_diff_devnull "$at_stdout" || at_failed=:
   55652 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:531"
   55653 $at_failed && at_fn_log_failure
   55654 $at_traceon; }
   55655 
   55656 
   55657 { set +x
   55658 $as_echo "$at_srcdir/conflicts.at:535: \$BISON_C_WORKS"
   55659 at_fn_check_prepare_dynamic "$BISON_C_WORKS" "conflicts.at:535"
   55660 ( $at_check_trace; $BISON_C_WORKS
   55661 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55662 at_status=$? at_failed=false
   55663 $at_check_filter
   55664 echo stderr:; cat "$at_stderr"
   55665 echo stdout:; cat "$at_stdout"
   55666 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:535"
   55667 $at_failed && at_fn_log_failure
   55668 $at_traceon; }
   55669 
   55670 { set +x
   55671 $as_echo "$at_srcdir/conflicts.at:535: \$CC \$CFLAGS \$CPPFLAGS \$LDFLAGS -o input input.c \$LIBS"
   55672 at_fn_check_prepare_dynamic "$CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS" "conflicts.at:535"
   55673 ( $at_check_trace; $CC $CFLAGS $CPPFLAGS $LDFLAGS -o input input.c $LIBS
   55674 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55675 at_status=$? at_failed=false
   55676 $at_check_filter
   55677 echo stderr:; cat "$at_stderr"
   55678 echo stdout:; cat "$at_stdout"
   55679 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:535"
   55680 $at_failed && at_fn_log_failure
   55681 $at_traceon; }
   55682 
   55683 { set +x
   55684 $as_echo "$at_srcdir/conflicts.at:536:  \$PREPARSER ./input"
   55685 at_fn_check_prepare_dynamic " $PREPARSER ./input" "conflicts.at:536"
   55686 ( $at_check_trace;  $PREPARSER ./input
   55687 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55688 at_status=$? at_failed=false
   55689 $at_check_filter
   55690 echo stderr:; tee stderr <"$at_stderr"
   55691 at_fn_diff_devnull "$at_stdout" || at_failed=:
   55692 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:536"
   55693 $at_failed && at_fn_log_failure
   55694 $at_traceon; }
   55695 
   55696 { set +x
   55697 $as_echo "$at_srcdir/conflicts.at:536: sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr"
   55698 at_fn_check_prepare_trace "conflicts.at:536"
   55699 ( $at_check_trace; sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr
   55700 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55701 at_status=$? at_failed=false
   55702 $at_check_filter
   55703 echo >>"$at_stderr"; $as_echo "syntax error, unexpected 'a', expecting 'b' or 'c'
   55704 " | \
   55705   $at_diff - "$at_stderr" || at_failed=:
   55706 at_fn_diff_devnull "$at_stdout" || at_failed=:
   55707 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:536"
   55708 $at_failed && at_fn_log_failure
   55709 $at_traceon; }
   55710 
   55711 
   55712 
   55713   set +x
   55714   $at_times_p && times >"$at_times_file"
   55715 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   55716 read at_status <"$at_status_file"
   55717 #AT_STOP_184
   55718 #AT_START_185
   55719 at_fn_group_banner 185 'conflicts.at:546' \
   55720   "Unresolved SR Conflicts" "                        " 10
   55721 at_xfail=no
   55722 (
   55723   $as_echo "185. $at_setup_line: testing $at_desc ..."
   55724   $at_traceon
   55725 
   55726 
   55727 
   55728 
   55729 cat >input.y <<'_ATEOF'
   55730 %token NUM OP
   55731 %%
   55732 exp: exp OP exp | NUM;
   55733 _ATEOF
   55734 
   55735 
   55736 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   55737   at_save_special_files
   55738   mkdir xml-tests
   55739     # Don't combine these Bison invocations since we want to be sure that
   55740   # --report=all isn't required to get the full XML file.
   55741   { set +x
   55742 $as_echo "$at_srcdir/conflicts.at:556: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   55743                   --graph=xml-tests/test.dot -o input.c --report=all input.y"
   55744 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:556"
   55745 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   55746                   --graph=xml-tests/test.dot -o input.c --report=all input.y
   55747 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55748 at_status=$? at_failed=false
   55749 $at_check_filter
   55750 echo stderr:; cat "$at_stderr"
   55751 echo stdout:; cat "$at_stdout"
   55752 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:556"
   55753 $at_failed && at_fn_log_failure
   55754 $at_traceon; }
   55755 
   55756   { set +x
   55757 $as_echo "$at_srcdir/conflicts.at:556: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c --report=all input.y"
   55758 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c --report=all input.y" "conflicts.at:556"
   55759 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c --report=all input.y
   55760 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55761 at_status=$? at_failed=false
   55762 $at_check_filter
   55763 echo stderr:; cat "$at_stderr"
   55764 echo stdout:; cat "$at_stdout"
   55765 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:556"
   55766 $at_failed && at_fn_log_failure
   55767 $at_traceon; }
   55768 
   55769     cp xml-tests/test.output expout
   55770   { set +x
   55771 $as_echo "$at_srcdir/conflicts.at:556: \$XSLTPROC \\
   55772              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   55773              xml-tests/test.xml"
   55774 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:556"
   55775 ( $at_check_trace; $XSLTPROC \
   55776              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   55777              xml-tests/test.xml
   55778 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55779 at_status=$? at_failed=false
   55780 $at_check_filter
   55781 at_fn_diff_devnull "$at_stderr" || at_failed=:
   55782 $at_diff expout "$at_stdout" || at_failed=:
   55783 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:556"
   55784 $at_failed && at_fn_log_failure
   55785 $at_traceon; }
   55786 
   55787   sort xml-tests/test.dot > expout
   55788   { set +x
   55789 $as_echo "$at_srcdir/conflicts.at:556: \$XSLTPROC \\
   55790              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   55791              xml-tests/test.xml | sort"
   55792 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:556"
   55793 ( $at_check_trace; $XSLTPROC \
   55794              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   55795              xml-tests/test.xml | sort
   55796 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55797 at_status=$? at_failed=false
   55798 $at_check_filter
   55799 at_fn_diff_devnull "$at_stderr" || at_failed=:
   55800 $at_diff expout "$at_stdout" || at_failed=:
   55801 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:556"
   55802 $at_failed && at_fn_log_failure
   55803 $at_traceon; }
   55804 
   55805   rm -rf xml-tests expout
   55806   at_restore_special_files
   55807 fi
   55808 { set +x
   55809 $as_echo "$at_srcdir/conflicts.at:556: bison -o input.c --report=all input.y"
   55810 at_fn_check_prepare_trace "conflicts.at:556"
   55811 ( $at_check_trace; bison -o input.c --report=all input.y
   55812 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55813 at_status=$? at_failed=false
   55814 $at_check_filter
   55815 echo >>"$at_stderr"; $as_echo "input.y: conflicts: 1 shift/reduce
   55816 " | \
   55817   $at_diff - "$at_stderr" || at_failed=:
   55818 at_fn_diff_devnull "$at_stdout" || at_failed=:
   55819 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:556"
   55820 $at_failed && at_fn_log_failure
   55821 $at_traceon; }
   55822 
   55823 
   55824 
   55825 # Check the contents of the report.
   55826 { set +x
   55827 $as_echo "$at_srcdir/conflicts.at:561: cat input.output"
   55828 at_fn_check_prepare_trace "conflicts.at:561"
   55829 ( $at_check_trace; cat input.output
   55830 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55831 at_status=$? at_failed=false
   55832 $at_check_filter
   55833 at_fn_diff_devnull "$at_stderr" || at_failed=:
   55834 echo >>"$at_stdout"; $as_echo "State 5 conflicts: 1 shift/reduce
   55835 
   55836 
   55837 Grammar
   55838 
   55839     0 \$accept: exp \$end
   55840 
   55841     1 exp: exp OP exp
   55842     2    | NUM
   55843 
   55844 
   55845 Terminals, with rules where they appear
   55846 
   55847 \$end (0) 0
   55848 error (256)
   55849 NUM (258) 2
   55850 OP (259) 1
   55851 
   55852 
   55853 Nonterminals, with rules where they appear
   55854 
   55855 \$accept (5)
   55856     on left: 0
   55857 exp (6)
   55858     on left: 1 2, on right: 0 1
   55859 
   55860 
   55861 State 0
   55862 
   55863     0 \$accept: . exp \$end
   55864     1 exp: . exp OP exp
   55865     2    | . NUM
   55866 
   55867     NUM  shift, and go to state 1
   55868 
   55869     exp  go to state 2
   55870 
   55871 
   55872 State 1
   55873 
   55874     2 exp: NUM .
   55875 
   55876     \$default  reduce using rule 2 (exp)
   55877 
   55878 
   55879 State 2
   55880 
   55881     0 \$accept: exp . \$end
   55882     1 exp: exp . OP exp
   55883 
   55884     \$end  shift, and go to state 3
   55885     OP    shift, and go to state 4
   55886 
   55887 
   55888 State 3
   55889 
   55890     0 \$accept: exp \$end .
   55891 
   55892     \$default  accept
   55893 
   55894 
   55895 State 4
   55896 
   55897     1 exp: . exp OP exp
   55898     1    | exp OP . exp
   55899     2    | . NUM
   55900 
   55901     NUM  shift, and go to state 1
   55902 
   55903     exp  go to state 5
   55904 
   55905 
   55906 State 5
   55907 
   55908     1 exp: exp . OP exp
   55909     1    | exp OP exp .  [\$end, OP]
   55910 
   55911     OP  shift, and go to state 4
   55912 
   55913     OP        [reduce using rule 1 (exp)]
   55914     \$default  reduce using rule 1 (exp)
   55915 " | \
   55916   $at_diff - "$at_stdout" || at_failed=:
   55917 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:561"
   55918 $at_failed && at_fn_log_failure
   55919 $at_traceon; }
   55920 
   55921 
   55922   set +x
   55923   $at_times_p && times >"$at_times_file"
   55924 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   55925 read at_status <"$at_status_file"
   55926 #AT_STOP_185
   55927 #AT_START_186
   55928 at_fn_group_banner 186 'conflicts.at:653' \
   55929   "Resolved SR Conflicts" "                          " 10
   55930 at_xfail=no
   55931 (
   55932   $as_echo "186. $at_setup_line: testing $at_desc ..."
   55933   $at_traceon
   55934 
   55935 
   55936 
   55937 
   55938 cat >input.y <<'_ATEOF'
   55939 %token NUM OP
   55940 %left OP
   55941 %%
   55942 exp: exp OP exp | NUM;
   55943 _ATEOF
   55944 
   55945 
   55946 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   55947   at_save_special_files
   55948   mkdir xml-tests
   55949     # Don't combine these Bison invocations since we want to be sure that
   55950   # --report=all isn't required to get the full XML file.
   55951   { set +x
   55952 $as_echo "$at_srcdir/conflicts.at:664: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   55953                   --graph=xml-tests/test.dot -o input.c --report=all input.y"
   55954 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:664"
   55955 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   55956                   --graph=xml-tests/test.dot -o input.c --report=all input.y
   55957 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55958 at_status=$? at_failed=false
   55959 $at_check_filter
   55960 echo stderr:; cat "$at_stderr"
   55961 echo stdout:; cat "$at_stdout"
   55962 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:664"
   55963 $at_failed && at_fn_log_failure
   55964 $at_traceon; }
   55965 
   55966   { set +x
   55967 $as_echo "$at_srcdir/conflicts.at:664: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c --report=all input.y"
   55968 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c --report=all input.y" "conflicts.at:664"
   55969 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c --report=all input.y
   55970 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55971 at_status=$? at_failed=false
   55972 $at_check_filter
   55973 echo stderr:; cat "$at_stderr"
   55974 echo stdout:; cat "$at_stdout"
   55975 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:664"
   55976 $at_failed && at_fn_log_failure
   55977 $at_traceon; }
   55978 
   55979     cp xml-tests/test.output expout
   55980   { set +x
   55981 $as_echo "$at_srcdir/conflicts.at:664: \$XSLTPROC \\
   55982              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   55983              xml-tests/test.xml"
   55984 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:664"
   55985 ( $at_check_trace; $XSLTPROC \
   55986              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   55987              xml-tests/test.xml
   55988 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   55989 at_status=$? at_failed=false
   55990 $at_check_filter
   55991 at_fn_diff_devnull "$at_stderr" || at_failed=:
   55992 $at_diff expout "$at_stdout" || at_failed=:
   55993 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:664"
   55994 $at_failed && at_fn_log_failure
   55995 $at_traceon; }
   55996 
   55997   sort xml-tests/test.dot > expout
   55998   { set +x
   55999 $as_echo "$at_srcdir/conflicts.at:664: \$XSLTPROC \\
   56000              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   56001              xml-tests/test.xml | sort"
   56002 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:664"
   56003 ( $at_check_trace; $XSLTPROC \
   56004              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   56005              xml-tests/test.xml | sort
   56006 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56007 at_status=$? at_failed=false
   56008 $at_check_filter
   56009 at_fn_diff_devnull "$at_stderr" || at_failed=:
   56010 $at_diff expout "$at_stdout" || at_failed=:
   56011 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:664"
   56012 $at_failed && at_fn_log_failure
   56013 $at_traceon; }
   56014 
   56015   rm -rf xml-tests expout
   56016   at_restore_special_files
   56017 fi
   56018 { set +x
   56019 $as_echo "$at_srcdir/conflicts.at:664: bison -o input.c --report=all input.y"
   56020 at_fn_check_prepare_trace "conflicts.at:664"
   56021 ( $at_check_trace; bison -o input.c --report=all input.y
   56022 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56023 at_status=$? at_failed=false
   56024 $at_check_filter
   56025 at_fn_diff_devnull "$at_stderr" || at_failed=:
   56026 at_fn_diff_devnull "$at_stdout" || at_failed=:
   56027 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:664"
   56028 $at_failed && at_fn_log_failure
   56029 $at_traceon; }
   56030 
   56031 
   56032 
   56033 # Check the contents of the report.
   56034 { set +x
   56035 $as_echo "$at_srcdir/conflicts.at:667: cat input.output"
   56036 at_fn_check_prepare_trace "conflicts.at:667"
   56037 ( $at_check_trace; cat input.output
   56038 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56039 at_status=$? at_failed=false
   56040 $at_check_filter
   56041 at_fn_diff_devnull "$at_stderr" || at_failed=:
   56042 echo >>"$at_stdout"; $as_echo "Grammar
   56043 
   56044     0 \$accept: exp \$end
   56045 
   56046     1 exp: exp OP exp
   56047     2    | NUM
   56048 
   56049 
   56050 Terminals, with rules where they appear
   56051 
   56052 \$end (0) 0
   56053 error (256)
   56054 NUM (258) 2
   56055 OP (259) 1
   56056 
   56057 
   56058 Nonterminals, with rules where they appear
   56059 
   56060 \$accept (5)
   56061     on left: 0
   56062 exp (6)
   56063     on left: 1 2, on right: 0 1
   56064 
   56065 
   56066 State 0
   56067 
   56068     0 \$accept: . exp \$end
   56069     1 exp: . exp OP exp
   56070     2    | . NUM
   56071 
   56072     NUM  shift, and go to state 1
   56073 
   56074     exp  go to state 2
   56075 
   56076 
   56077 State 1
   56078 
   56079     2 exp: NUM .
   56080 
   56081     \$default  reduce using rule 2 (exp)
   56082 
   56083 
   56084 State 2
   56085 
   56086     0 \$accept: exp . \$end
   56087     1 exp: exp . OP exp
   56088 
   56089     \$end  shift, and go to state 3
   56090     OP    shift, and go to state 4
   56091 
   56092 
   56093 State 3
   56094 
   56095     0 \$accept: exp \$end .
   56096 
   56097     \$default  accept
   56098 
   56099 
   56100 State 4
   56101 
   56102     1 exp: . exp OP exp
   56103     1    | exp OP . exp
   56104     2    | . NUM
   56105 
   56106     NUM  shift, and go to state 1
   56107 
   56108     exp  go to state 5
   56109 
   56110 
   56111 State 5
   56112 
   56113     1 exp: exp . OP exp
   56114     1    | exp OP exp .  [\$end, OP]
   56115 
   56116     \$default  reduce using rule 1 (exp)
   56117 
   56118     Conflict between rule 1 and token OP resolved as reduce (%left OP).
   56119 " | \
   56120   $at_diff - "$at_stdout" || at_failed=:
   56121 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:667"
   56122 $at_failed && at_fn_log_failure
   56123 $at_traceon; }
   56124 
   56125 
   56126   set +x
   56127   $at_times_p && times >"$at_times_file"
   56128 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   56129 read at_status <"$at_status_file"
   56130 #AT_STOP_186
   56131 #AT_START_187
   56132 at_fn_group_banner 187 'conflicts.at:775' \
   56133   "Defaulted Conflicted Reduction" "                 " 10
   56134 at_xfail=no
   56135 (
   56136   $as_echo "187. $at_setup_line: testing $at_desc ..."
   56137   $at_traceon
   56138 
   56139 
   56140 
   56141 cat >input.y <<'_ATEOF'
   56142 %%
   56143 exp: num | id;
   56144 num: '0';
   56145 id : '0';
   56146 %%
   56147 _ATEOF
   56148 
   56149 
   56150 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   56151   at_save_special_files
   56152   mkdir xml-tests
   56153     # Don't combine these Bison invocations since we want to be sure that
   56154   # --report=all isn't required to get the full XML file.
   56155   { set +x
   56156 $as_echo "$at_srcdir/conflicts.at:786: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   56157                   --graph=xml-tests/test.dot -o input.c --report=all input.y"
   56158 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:786"
   56159 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   56160                   --graph=xml-tests/test.dot -o input.c --report=all input.y
   56161 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56162 at_status=$? at_failed=false
   56163 $at_check_filter
   56164 echo stderr:; cat "$at_stderr"
   56165 echo stdout:; cat "$at_stdout"
   56166 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:786"
   56167 $at_failed && at_fn_log_failure
   56168 $at_traceon; }
   56169 
   56170   { set +x
   56171 $as_echo "$at_srcdir/conflicts.at:786: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c --report=all input.y"
   56172 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c --report=all input.y" "conflicts.at:786"
   56173 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c --report=all input.y
   56174 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56175 at_status=$? at_failed=false
   56176 $at_check_filter
   56177 echo stderr:; cat "$at_stderr"
   56178 echo stdout:; cat "$at_stdout"
   56179 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:786"
   56180 $at_failed && at_fn_log_failure
   56181 $at_traceon; }
   56182 
   56183     cp xml-tests/test.output expout
   56184   { set +x
   56185 $as_echo "$at_srcdir/conflicts.at:786: \$XSLTPROC \\
   56186              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   56187              xml-tests/test.xml"
   56188 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:786"
   56189 ( $at_check_trace; $XSLTPROC \
   56190              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   56191              xml-tests/test.xml
   56192 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56193 at_status=$? at_failed=false
   56194 $at_check_filter
   56195 at_fn_diff_devnull "$at_stderr" || at_failed=:
   56196 $at_diff expout "$at_stdout" || at_failed=:
   56197 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:786"
   56198 $at_failed && at_fn_log_failure
   56199 $at_traceon; }
   56200 
   56201   sort xml-tests/test.dot > expout
   56202   { set +x
   56203 $as_echo "$at_srcdir/conflicts.at:786: \$XSLTPROC \\
   56204              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   56205              xml-tests/test.xml | sort"
   56206 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:786"
   56207 ( $at_check_trace; $XSLTPROC \
   56208              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   56209              xml-tests/test.xml | sort
   56210 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56211 at_status=$? at_failed=false
   56212 $at_check_filter
   56213 at_fn_diff_devnull "$at_stderr" || at_failed=:
   56214 $at_diff expout "$at_stdout" || at_failed=:
   56215 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:786"
   56216 $at_failed && at_fn_log_failure
   56217 $at_traceon; }
   56218 
   56219   rm -rf xml-tests expout
   56220   at_restore_special_files
   56221 fi
   56222 { set +x
   56223 $as_echo "$at_srcdir/conflicts.at:786: bison -o input.c --report=all input.y"
   56224 at_fn_check_prepare_trace "conflicts.at:786"
   56225 ( $at_check_trace; bison -o input.c --report=all input.y
   56226 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56227 at_status=$? at_failed=false
   56228 $at_check_filter
   56229 echo >>"$at_stderr"; $as_echo "input.y: conflicts: 1 reduce/reduce
   56230 input.y:4.6-8: warning: rule useless in parser due to conflicts: id: '0'
   56231 " | \
   56232   $at_diff - "$at_stderr" || at_failed=:
   56233 at_fn_diff_devnull "$at_stdout" || at_failed=:
   56234 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:786"
   56235 $at_failed && at_fn_log_failure
   56236 $at_traceon; }
   56237 
   56238 # Defining POSIXLY_CORRECT causes bison to complain if options are
   56239 # added after the grammar file name, so skip these checks in that
   56240 # case.
   56241 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   56242   at_save_special_files
   56243 
   56244   # To avoid expanding it repeatedly, store specified stdout.
   56245   : >expout
   56246 
   56247   # Run with -Werror.
   56248   { set +x
   56249 $as_echo "$at_srcdir/conflicts.at:786: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c --report=all input.y -Werror"
   56250 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c --report=all input.y -Werror" "conflicts.at:786"
   56251 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o input.c --report=all input.y -Werror
   56252 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56253 at_status=$? at_failed=false
   56254 $at_check_filter
   56255 echo stderr:; tee stderr <"$at_stderr"
   56256 $at_diff expout "$at_stdout" || at_failed=:
   56257 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:786"
   56258 $at_failed && at_fn_log_failure
   56259 $at_traceon; }
   56260 
   56261 
   56262   # Build expected stderr up to and including the "warnings being
   56263   # treated as errors" message.
   56264   cat >at-bison-check-warnings <<'_ATEOF'
   56265 input.y: conflicts: 1 reduce/reduce
   56266 input.y:4.6-8: warning: rule useless in parser due to conflicts: id: '0'
   56267 _ATEOF
   56268 
   56269   at_bison_check_first=`sed -n \
   56270     '/: warning: /{=;q;}' at-bison-check-warnings`
   56271   : ${at_bison_check_first:=1}
   56272   at_bison_check_first_tmp=`sed -n \
   56273     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   56274   : ${at_bison_check_first_tmp:=1}
   56275   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   56276     at_bison_check_first=$at_bison_check_first_tmp
   56277   fi
   56278   if test $at_bison_check_first -gt 1; then
   56279     sed -n "1,`expr $at_bison_check_first - 1`"p \
   56280       at-bison-check-warnings > experr
   56281   fi
   56282   echo 'bison: warnings being treated as errors' >> experr
   56283 
   56284   # Finish building expected stderr and check.  Unlike warnings,
   56285   # complaints cause bison to exit early.  Thus, with -Werror, bison
   56286   # does not necessarily report all warnings that it does without
   56287   # -Werror, but it at least reports one.
   56288   at_bison_check_last=`sed -n '$=' stderr`
   56289   : ${at_bison_check_last:=1}
   56290   at_bison_check_last=`expr $at_bison_check_last - 1`
   56291   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   56292     at-bison-check-warnings >> experr
   56293   { set +x
   56294 $as_echo "$at_srcdir/conflicts.at:786: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   56295               stderr 1>&2"
   56296 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:786"
   56297 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   56298               stderr 1>&2
   56299 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56300 at_status=$? at_failed=false
   56301 $at_check_filter
   56302 $at_diff experr "$at_stderr" || at_failed=:
   56303 at_fn_diff_devnull "$at_stdout" || at_failed=:
   56304 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:786"
   56305 $at_failed && at_fn_log_failure
   56306 $at_traceon; }
   56307 
   56308 
   56309   # Now check --warnings=error.
   56310   cp stderr experr
   56311   { set +x
   56312 $as_echo "$at_srcdir/conflicts.at:786: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c --report=all input.y --warnings=error"
   56313 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c --report=all input.y --warnings=error" "conflicts.at:786"
   56314 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o input.c --report=all input.y --warnings=error
   56315 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56316 at_status=$? at_failed=false
   56317 $at_check_filter
   56318 $at_diff experr "$at_stderr" || at_failed=:
   56319 $at_diff expout "$at_stdout" || at_failed=:
   56320 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:786"
   56321 $at_failed && at_fn_log_failure
   56322 $at_traceon; }
   56323 
   56324 
   56325   # Now check -Wnone and --warnings=none by making sure that
   56326   # -Werror doesn't change the exit status when -Wnone or
   56327   # --warnings=none is specified.
   56328   { set +x
   56329 $as_echo "$at_srcdir/conflicts.at:786: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c --report=all input.y -Wnone -Werror"
   56330 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c --report=all input.y -Wnone -Werror" "conflicts.at:786"
   56331 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o input.c --report=all input.y -Wnone -Werror
   56332 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56333 at_status=$? at_failed=false
   56334 $at_check_filter
   56335 at_fn_diff_devnull "$at_stderr" || at_failed=:
   56336 $at_diff expout "$at_stdout" || at_failed=:
   56337 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:786"
   56338 $at_failed && at_fn_log_failure
   56339 $at_traceon; }
   56340 
   56341   { set +x
   56342 $as_echo "$at_srcdir/conflicts.at:786: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c --report=all input.y --warnings=none -Werror"
   56343 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c --report=all input.y --warnings=none -Werror" "conflicts.at:786"
   56344 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o input.c --report=all input.y --warnings=none -Werror
   56345 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56346 at_status=$? at_failed=false
   56347 $at_check_filter
   56348 at_fn_diff_devnull "$at_stderr" || at_failed=:
   56349 $at_diff expout "$at_stdout" || at_failed=:
   56350 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:786"
   56351 $at_failed && at_fn_log_failure
   56352 $at_traceon; }
   56353 
   56354 
   56355   at_restore_special_files
   56356 fi
   56357 
   56358 # Check the contents of the report.
   56359 { set +x
   56360 $as_echo "$at_srcdir/conflicts.at:792: cat input.output"
   56361 at_fn_check_prepare_trace "conflicts.at:792"
   56362 ( $at_check_trace; cat input.output
   56363 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56364 at_status=$? at_failed=false
   56365 $at_check_filter
   56366 at_fn_diff_devnull "$at_stderr" || at_failed=:
   56367 echo >>"$at_stdout"; $as_echo "Rules useless in parser due to conflicts
   56368 
   56369     4 id: '0'
   56370 
   56371 
   56372 State 1 conflicts: 1 reduce/reduce
   56373 
   56374 
   56375 Grammar
   56376 
   56377     0 \$accept: exp \$end
   56378 
   56379     1 exp: num
   56380     2    | id
   56381 
   56382     3 num: '0'
   56383 
   56384     4 id: '0'
   56385 
   56386 
   56387 Terminals, with rules where they appear
   56388 
   56389 \$end (0) 0
   56390 '0' (48) 3 4
   56391 error (256)
   56392 
   56393 
   56394 Nonterminals, with rules where they appear
   56395 
   56396 \$accept (4)
   56397     on left: 0
   56398 exp (5)
   56399     on left: 1 2, on right: 0
   56400 num (6)
   56401     on left: 3, on right: 1
   56402 id (7)
   56403     on left: 4, on right: 2
   56404 
   56405 
   56406 State 0
   56407 
   56408     0 \$accept: . exp \$end
   56409     1 exp: . num
   56410     2    | . id
   56411     3 num: . '0'
   56412     4 id: . '0'
   56413 
   56414     '0'  shift, and go to state 1
   56415 
   56416     exp  go to state 2
   56417     num  go to state 3
   56418     id   go to state 4
   56419 
   56420 
   56421 State 1
   56422 
   56423     3 num: '0' .  [\$end]
   56424     4 id: '0' .  [\$end]
   56425 
   56426     \$end      reduce using rule 3 (num)
   56427     \$end      [reduce using rule 4 (id)]
   56428     \$default  reduce using rule 3 (num)
   56429 
   56430 
   56431 State 2
   56432 
   56433     0 \$accept: exp . \$end
   56434 
   56435     \$end  shift, and go to state 5
   56436 
   56437 
   56438 State 3
   56439 
   56440     1 exp: num .
   56441 
   56442     \$default  reduce using rule 1 (exp)
   56443 
   56444 
   56445 State 4
   56446 
   56447     2 exp: id .
   56448 
   56449     \$default  reduce using rule 2 (exp)
   56450 
   56451 
   56452 State 5
   56453 
   56454     0 \$accept: exp \$end .
   56455 
   56456     \$default  accept
   56457 " | \
   56458   $at_diff - "$at_stdout" || at_failed=:
   56459 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:792"
   56460 $at_failed && at_fn_log_failure
   56461 $at_traceon; }
   56462 
   56463 
   56464   set +x
   56465   $at_times_p && times >"$at_times_file"
   56466 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   56467 read at_status <"$at_status_file"
   56468 #AT_STOP_187
   56469 #AT_START_188
   56470 at_fn_group_banner 188 'conflicts.at:894' \
   56471   "%expect not enough" "                             " 10
   56472 at_xfail=no
   56473 (
   56474   $as_echo "188. $at_setup_line: testing $at_desc ..."
   56475   $at_traceon
   56476 
   56477 
   56478 cat >input.y <<'_ATEOF'
   56479 %token NUM OP
   56480 %expect 0
   56481 %%
   56482 exp: exp OP exp | NUM;
   56483 _ATEOF
   56484 
   56485 
   56486 
   56487 { set +x
   56488 $as_echo "$at_srcdir/conflicts.at:903: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y"
   56489 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y" "conflicts.at:903"
   56490 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o input.c input.y
   56491 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56492 at_status=$? at_failed=false
   56493 $at_check_filter
   56494 echo >>"$at_stderr"; $as_echo "input.y: conflicts: 1 shift/reduce
   56495 input.y: error: expected 0 shift/reduce conflicts
   56496 " | \
   56497   $at_diff - "$at_stderr" || at_failed=:
   56498 at_fn_diff_devnull "$at_stdout" || at_failed=:
   56499 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:903"
   56500 $at_failed && at_fn_log_failure
   56501 $at_traceon; }
   56502 
   56503 
   56504   set +x
   56505   $at_times_p && times >"$at_times_file"
   56506 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   56507 read at_status <"$at_status_file"
   56508 #AT_STOP_188
   56509 #AT_START_189
   56510 at_fn_group_banner 189 'conflicts.at:914' \
   56511   "%expect right" "                                  " 10
   56512 at_xfail=no
   56513 (
   56514   $as_echo "189. $at_setup_line: testing $at_desc ..."
   56515   $at_traceon
   56516 
   56517 
   56518 cat >input.y <<'_ATEOF'
   56519 %token NUM OP
   56520 %expect 1
   56521 %%
   56522 exp: exp OP exp | NUM;
   56523 _ATEOF
   56524 
   56525 
   56526 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   56527   at_save_special_files
   56528   mkdir xml-tests
   56529     # Don't combine these Bison invocations since we want to be sure that
   56530   # --report=all isn't required to get the full XML file.
   56531   { set +x
   56532 $as_echo "$at_srcdir/conflicts.at:923: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   56533                   --graph=xml-tests/test.dot -o input.c input.y"
   56534 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:923"
   56535 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   56536                   --graph=xml-tests/test.dot -o input.c input.y
   56537 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56538 at_status=$? at_failed=false
   56539 $at_check_filter
   56540 echo stderr:; cat "$at_stderr"
   56541 echo stdout:; cat "$at_stdout"
   56542 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:923"
   56543 $at_failed && at_fn_log_failure
   56544 $at_traceon; }
   56545 
   56546   { set +x
   56547 $as_echo "$at_srcdir/conflicts.at:923: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   56548 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "conflicts.at:923"
   56549 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   56550 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56551 at_status=$? at_failed=false
   56552 $at_check_filter
   56553 echo stderr:; cat "$at_stderr"
   56554 echo stdout:; cat "$at_stdout"
   56555 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:923"
   56556 $at_failed && at_fn_log_failure
   56557 $at_traceon; }
   56558 
   56559     cp xml-tests/test.output expout
   56560   { set +x
   56561 $as_echo "$at_srcdir/conflicts.at:923: \$XSLTPROC \\
   56562              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   56563              xml-tests/test.xml"
   56564 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:923"
   56565 ( $at_check_trace; $XSLTPROC \
   56566              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   56567              xml-tests/test.xml
   56568 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56569 at_status=$? at_failed=false
   56570 $at_check_filter
   56571 at_fn_diff_devnull "$at_stderr" || at_failed=:
   56572 $at_diff expout "$at_stdout" || at_failed=:
   56573 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:923"
   56574 $at_failed && at_fn_log_failure
   56575 $at_traceon; }
   56576 
   56577   sort xml-tests/test.dot > expout
   56578   { set +x
   56579 $as_echo "$at_srcdir/conflicts.at:923: \$XSLTPROC \\
   56580              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   56581              xml-tests/test.xml | sort"
   56582 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:923"
   56583 ( $at_check_trace; $XSLTPROC \
   56584              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   56585              xml-tests/test.xml | sort
   56586 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56587 at_status=$? at_failed=false
   56588 $at_check_filter
   56589 at_fn_diff_devnull "$at_stderr" || at_failed=:
   56590 $at_diff expout "$at_stdout" || at_failed=:
   56591 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:923"
   56592 $at_failed && at_fn_log_failure
   56593 $at_traceon; }
   56594 
   56595   rm -rf xml-tests expout
   56596   at_restore_special_files
   56597 fi
   56598 { set +x
   56599 $as_echo "$at_srcdir/conflicts.at:923: bison -o input.c input.y"
   56600 at_fn_check_prepare_trace "conflicts.at:923"
   56601 ( $at_check_trace; bison -o input.c input.y
   56602 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56603 at_status=$? at_failed=false
   56604 $at_check_filter
   56605 at_fn_diff_devnull "$at_stderr" || at_failed=:
   56606 at_fn_diff_devnull "$at_stdout" || at_failed=:
   56607 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:923"
   56608 $at_failed && at_fn_log_failure
   56609 $at_traceon; }
   56610 
   56611 
   56612   set +x
   56613   $at_times_p && times >"$at_times_file"
   56614 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   56615 read at_status <"$at_status_file"
   56616 #AT_STOP_189
   56617 #AT_START_190
   56618 at_fn_group_banner 190 'conflicts.at:931' \
   56619   "%expect too much" "                               " 10
   56620 at_xfail=no
   56621 (
   56622   $as_echo "190. $at_setup_line: testing $at_desc ..."
   56623   $at_traceon
   56624 
   56625 
   56626 cat >input.y <<'_ATEOF'
   56627 %token NUM OP
   56628 %expect 2
   56629 %%
   56630 exp: exp OP exp | NUM;
   56631 _ATEOF
   56632 
   56633 
   56634 
   56635 { set +x
   56636 $as_echo "$at_srcdir/conflicts.at:940: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y"
   56637 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y" "conflicts.at:940"
   56638 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o input.c input.y
   56639 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56640 at_status=$? at_failed=false
   56641 $at_check_filter
   56642 echo >>"$at_stderr"; $as_echo "input.y: conflicts: 1 shift/reduce
   56643 input.y: error: expected 2 shift/reduce conflicts
   56644 " | \
   56645   $at_diff - "$at_stderr" || at_failed=:
   56646 at_fn_diff_devnull "$at_stdout" || at_failed=:
   56647 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:940"
   56648 $at_failed && at_fn_log_failure
   56649 $at_traceon; }
   56650 
   56651 
   56652   set +x
   56653   $at_times_p && times >"$at_times_file"
   56654 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   56655 read at_status <"$at_status_file"
   56656 #AT_STOP_190
   56657 #AT_START_191
   56658 at_fn_group_banner 191 'conflicts.at:951' \
   56659   "%expect with reduce conflicts" "                  " 10
   56660 at_xfail=no
   56661 (
   56662   $as_echo "191. $at_setup_line: testing $at_desc ..."
   56663   $at_traceon
   56664 
   56665 
   56666 cat >input.y <<'_ATEOF'
   56667 %expect 0
   56668 %%
   56669 program: a 'a' | a a;
   56670 a: 'a';
   56671 _ATEOF
   56672 
   56673 
   56674 
   56675 { set +x
   56676 $as_echo "$at_srcdir/conflicts.at:960: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y"
   56677 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison -o input.c input.y" "conflicts.at:960"
   56678 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison -o input.c input.y
   56679 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56680 at_status=$? at_failed=false
   56681 $at_check_filter
   56682 echo >>"$at_stderr"; $as_echo "input.y: conflicts: 1 reduce/reduce
   56683 input.y: error: expected 0 reduce/reduce conflicts
   56684 " | \
   56685   $at_diff - "$at_stderr" || at_failed=:
   56686 at_fn_diff_devnull "$at_stdout" || at_failed=:
   56687 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:960"
   56688 $at_failed && at_fn_log_failure
   56689 $at_traceon; }
   56690 
   56691 
   56692   set +x
   56693   $at_times_p && times >"$at_times_file"
   56694 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   56695 read at_status <"$at_status_file"
   56696 #AT_STOP_191
   56697 #AT_START_192
   56698 at_fn_group_banner 192 'conflicts.at:971' \
   56699   "%prec with user string" "                         " 10
   56700 at_xfail=no
   56701 (
   56702   $as_echo "192. $at_setup_line: testing $at_desc ..."
   56703   $at_traceon
   56704 
   56705 
   56706 cat >input.y <<'_ATEOF'
   56707 %%
   56708 exp:
   56709   "foo" %prec "foo"
   56710 ;
   56711 _ATEOF
   56712 
   56713 
   56714 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   56715   at_save_special_files
   56716   mkdir xml-tests
   56717     # Don't combine these Bison invocations since we want to be sure that
   56718   # --report=all isn't required to get the full XML file.
   56719   { set +x
   56720 $as_echo "$at_srcdir/conflicts.at:980: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   56721                   --graph=xml-tests/test.dot -o input.c input.y"
   56722 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:980"
   56723 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   56724                   --graph=xml-tests/test.dot -o input.c input.y
   56725 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56726 at_status=$? at_failed=false
   56727 $at_check_filter
   56728 echo stderr:; cat "$at_stderr"
   56729 echo stdout:; cat "$at_stdout"
   56730 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:980"
   56731 $at_failed && at_fn_log_failure
   56732 $at_traceon; }
   56733 
   56734   { set +x
   56735 $as_echo "$at_srcdir/conflicts.at:980: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   56736 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "conflicts.at:980"
   56737 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   56738 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56739 at_status=$? at_failed=false
   56740 $at_check_filter
   56741 echo stderr:; cat "$at_stderr"
   56742 echo stdout:; cat "$at_stdout"
   56743 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:980"
   56744 $at_failed && at_fn_log_failure
   56745 $at_traceon; }
   56746 
   56747     cp xml-tests/test.output expout
   56748   { set +x
   56749 $as_echo "$at_srcdir/conflicts.at:980: \$XSLTPROC \\
   56750              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   56751              xml-tests/test.xml"
   56752 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:980"
   56753 ( $at_check_trace; $XSLTPROC \
   56754              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   56755              xml-tests/test.xml
   56756 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56757 at_status=$? at_failed=false
   56758 $at_check_filter
   56759 at_fn_diff_devnull "$at_stderr" || at_failed=:
   56760 $at_diff expout "$at_stdout" || at_failed=:
   56761 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:980"
   56762 $at_failed && at_fn_log_failure
   56763 $at_traceon; }
   56764 
   56765   sort xml-tests/test.dot > expout
   56766   { set +x
   56767 $as_echo "$at_srcdir/conflicts.at:980: \$XSLTPROC \\
   56768              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   56769              xml-tests/test.xml | sort"
   56770 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:980"
   56771 ( $at_check_trace; $XSLTPROC \
   56772              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   56773              xml-tests/test.xml | sort
   56774 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56775 at_status=$? at_failed=false
   56776 $at_check_filter
   56777 at_fn_diff_devnull "$at_stderr" || at_failed=:
   56778 $at_diff expout "$at_stdout" || at_failed=:
   56779 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:980"
   56780 $at_failed && at_fn_log_failure
   56781 $at_traceon; }
   56782 
   56783   rm -rf xml-tests expout
   56784   at_restore_special_files
   56785 fi
   56786 { set +x
   56787 $as_echo "$at_srcdir/conflicts.at:980: bison -o input.c input.y"
   56788 at_fn_check_prepare_trace "conflicts.at:980"
   56789 ( $at_check_trace; bison -o input.c input.y
   56790 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56791 at_status=$? at_failed=false
   56792 $at_check_filter
   56793 at_fn_diff_devnull "$at_stderr" || at_failed=:
   56794 at_fn_diff_devnull "$at_stdout" || at_failed=:
   56795 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:980"
   56796 $at_failed && at_fn_log_failure
   56797 $at_traceon; }
   56798 
   56799 
   56800   set +x
   56801   $at_times_p && times >"$at_times_file"
   56802 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   56803 read at_status <"$at_status_file"
   56804 #AT_STOP_192
   56805 #AT_START_193
   56806 at_fn_group_banner 193 'conflicts.at:988' \
   56807   "%no-default-prec without %prec" "                 " 10
   56808 at_xfail=no
   56809 (
   56810   $as_echo "193. $at_setup_line: testing $at_desc ..."
   56811   $at_traceon
   56812 
   56813 
   56814 cat >input.y <<'_ATEOF'
   56815 %left '+'
   56816 %left '*'
   56817 
   56818 %%
   56819 
   56820 %no-default-prec;
   56821 
   56822 e:   e '+' e
   56823    | e '*' e
   56824    | '0'
   56825    ;
   56826 _ATEOF
   56827 
   56828 
   56829 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   56830   at_save_special_files
   56831   mkdir xml-tests
   56832     # Don't combine these Bison invocations since we want to be sure that
   56833   # --report=all isn't required to get the full XML file.
   56834   { set +x
   56835 $as_echo "$at_srcdir/conflicts.at:1004: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   56836                   --graph=xml-tests/test.dot -o input.c input.y"
   56837 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:1004"
   56838 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   56839                   --graph=xml-tests/test.dot -o input.c input.y
   56840 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56841 at_status=$? at_failed=false
   56842 $at_check_filter
   56843 echo stderr:; cat "$at_stderr"
   56844 echo stdout:; cat "$at_stdout"
   56845 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:1004"
   56846 $at_failed && at_fn_log_failure
   56847 $at_traceon; }
   56848 
   56849   { set +x
   56850 $as_echo "$at_srcdir/conflicts.at:1004: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   56851 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "conflicts.at:1004"
   56852 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   56853 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56854 at_status=$? at_failed=false
   56855 $at_check_filter
   56856 echo stderr:; cat "$at_stderr"
   56857 echo stdout:; cat "$at_stdout"
   56858 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:1004"
   56859 $at_failed && at_fn_log_failure
   56860 $at_traceon; }
   56861 
   56862     cp xml-tests/test.output expout
   56863   { set +x
   56864 $as_echo "$at_srcdir/conflicts.at:1004: \$XSLTPROC \\
   56865              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   56866              xml-tests/test.xml"
   56867 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:1004"
   56868 ( $at_check_trace; $XSLTPROC \
   56869              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   56870              xml-tests/test.xml
   56871 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56872 at_status=$? at_failed=false
   56873 $at_check_filter
   56874 at_fn_diff_devnull "$at_stderr" || at_failed=:
   56875 $at_diff expout "$at_stdout" || at_failed=:
   56876 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:1004"
   56877 $at_failed && at_fn_log_failure
   56878 $at_traceon; }
   56879 
   56880   sort xml-tests/test.dot > expout
   56881   { set +x
   56882 $as_echo "$at_srcdir/conflicts.at:1004: \$XSLTPROC \\
   56883              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   56884              xml-tests/test.xml | sort"
   56885 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:1004"
   56886 ( $at_check_trace; $XSLTPROC \
   56887              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   56888              xml-tests/test.xml | sort
   56889 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56890 at_status=$? at_failed=false
   56891 $at_check_filter
   56892 at_fn_diff_devnull "$at_stderr" || at_failed=:
   56893 $at_diff expout "$at_stdout" || at_failed=:
   56894 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:1004"
   56895 $at_failed && at_fn_log_failure
   56896 $at_traceon; }
   56897 
   56898   rm -rf xml-tests expout
   56899   at_restore_special_files
   56900 fi
   56901 { set +x
   56902 $as_echo "$at_srcdir/conflicts.at:1004: bison -o input.c input.y"
   56903 at_fn_check_prepare_trace "conflicts.at:1004"
   56904 ( $at_check_trace; bison -o input.c input.y
   56905 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56906 at_status=$? at_failed=false
   56907 $at_check_filter
   56908 echo >>"$at_stderr"; $as_echo "input.y: conflicts: 4 shift/reduce
   56909 " | \
   56910   $at_diff - "$at_stderr" || at_failed=:
   56911 at_fn_diff_devnull "$at_stdout" || at_failed=:
   56912 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:1004"
   56913 $at_failed && at_fn_log_failure
   56914 $at_traceon; }
   56915 
   56916 
   56917   set +x
   56918   $at_times_p && times >"$at_times_file"
   56919 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   56920 read at_status <"$at_status_file"
   56921 #AT_STOP_193
   56922 #AT_START_194
   56923 at_fn_group_banner 194 'conflicts.at:1014' \
   56924   "%no-default-prec with %prec" "                    " 10
   56925 at_xfail=no
   56926 (
   56927   $as_echo "194. $at_setup_line: testing $at_desc ..."
   56928   $at_traceon
   56929 
   56930 
   56931 cat >input.y <<'_ATEOF'
   56932 %left '+'
   56933 %left '*'
   56934 
   56935 %%
   56936 
   56937 %no-default-prec;
   56938 
   56939 e:   e '+' e %prec '+'
   56940    | e '*' e %prec '*'
   56941    | '0'
   56942    ;
   56943 _ATEOF
   56944 
   56945 
   56946 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   56947   at_save_special_files
   56948   mkdir xml-tests
   56949     # Don't combine these Bison invocations since we want to be sure that
   56950   # --report=all isn't required to get the full XML file.
   56951   { set +x
   56952 $as_echo "$at_srcdir/conflicts.at:1030: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   56953                   --graph=xml-tests/test.dot -o input.c input.y"
   56954 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:1030"
   56955 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   56956                   --graph=xml-tests/test.dot -o input.c input.y
   56957 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56958 at_status=$? at_failed=false
   56959 $at_check_filter
   56960 echo stderr:; cat "$at_stderr"
   56961 echo stdout:; cat "$at_stdout"
   56962 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:1030"
   56963 $at_failed && at_fn_log_failure
   56964 $at_traceon; }
   56965 
   56966   { set +x
   56967 $as_echo "$at_srcdir/conflicts.at:1030: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   56968 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "conflicts.at:1030"
   56969 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   56970 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56971 at_status=$? at_failed=false
   56972 $at_check_filter
   56973 echo stderr:; cat "$at_stderr"
   56974 echo stdout:; cat "$at_stdout"
   56975 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:1030"
   56976 $at_failed && at_fn_log_failure
   56977 $at_traceon; }
   56978 
   56979     cp xml-tests/test.output expout
   56980   { set +x
   56981 $as_echo "$at_srcdir/conflicts.at:1030: \$XSLTPROC \\
   56982              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   56983              xml-tests/test.xml"
   56984 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:1030"
   56985 ( $at_check_trace; $XSLTPROC \
   56986              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   56987              xml-tests/test.xml
   56988 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   56989 at_status=$? at_failed=false
   56990 $at_check_filter
   56991 at_fn_diff_devnull "$at_stderr" || at_failed=:
   56992 $at_diff expout "$at_stdout" || at_failed=:
   56993 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:1030"
   56994 $at_failed && at_fn_log_failure
   56995 $at_traceon; }
   56996 
   56997   sort xml-tests/test.dot > expout
   56998   { set +x
   56999 $as_echo "$at_srcdir/conflicts.at:1030: \$XSLTPROC \\
   57000              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   57001              xml-tests/test.xml | sort"
   57002 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:1030"
   57003 ( $at_check_trace; $XSLTPROC \
   57004              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   57005              xml-tests/test.xml | sort
   57006 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   57007 at_status=$? at_failed=false
   57008 $at_check_filter
   57009 at_fn_diff_devnull "$at_stderr" || at_failed=:
   57010 $at_diff expout "$at_stdout" || at_failed=:
   57011 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:1030"
   57012 $at_failed && at_fn_log_failure
   57013 $at_traceon; }
   57014 
   57015   rm -rf xml-tests expout
   57016   at_restore_special_files
   57017 fi
   57018 { set +x
   57019 $as_echo "$at_srcdir/conflicts.at:1030: bison -o input.c input.y"
   57020 at_fn_check_prepare_trace "conflicts.at:1030"
   57021 ( $at_check_trace; bison -o input.c input.y
   57022 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   57023 at_status=$? at_failed=false
   57024 $at_check_filter
   57025 at_fn_diff_devnull "$at_stderr" || at_failed=:
   57026 at_fn_diff_devnull "$at_stdout" || at_failed=:
   57027 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:1030"
   57028 $at_failed && at_fn_log_failure
   57029 $at_traceon; }
   57030 
   57031 
   57032   set +x
   57033   $at_times_p && times >"$at_times_file"
   57034 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   57035 read at_status <"$at_status_file"
   57036 #AT_STOP_194
   57037 #AT_START_195
   57038 at_fn_group_banner 195 'conflicts.at:1038' \
   57039   "%default-prec" "                                  " 10
   57040 at_xfail=no
   57041 (
   57042   $as_echo "195. $at_setup_line: testing $at_desc ..."
   57043   $at_traceon
   57044 
   57045 
   57046 cat >input.y <<'_ATEOF'
   57047 %left '+'
   57048 %left '*'
   57049 
   57050 %%
   57051 
   57052 %default-prec;
   57053 
   57054 e:   e '+' e
   57055    | e '*' e
   57056    | '0'
   57057    ;
   57058 _ATEOF
   57059 
   57060 
   57061 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   57062   at_save_special_files
   57063   mkdir xml-tests
   57064     # Don't combine these Bison invocations since we want to be sure that
   57065   # --report=all isn't required to get the full XML file.
   57066   { set +x
   57067 $as_echo "$at_srcdir/conflicts.at:1054: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   57068                   --graph=xml-tests/test.dot -o input.c input.y"
   57069 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:1054"
   57070 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   57071                   --graph=xml-tests/test.dot -o input.c input.y
   57072 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   57073 at_status=$? at_failed=false
   57074 $at_check_filter
   57075 echo stderr:; cat "$at_stderr"
   57076 echo stdout:; cat "$at_stdout"
   57077 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:1054"
   57078 $at_failed && at_fn_log_failure
   57079 $at_traceon; }
   57080 
   57081   { set +x
   57082 $as_echo "$at_srcdir/conflicts.at:1054: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y"
   57083 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y" "conflicts.at:1054"
   57084 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml -o input.c input.y
   57085 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   57086 at_status=$? at_failed=false
   57087 $at_check_filter
   57088 echo stderr:; cat "$at_stderr"
   57089 echo stdout:; cat "$at_stdout"
   57090 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:1054"
   57091 $at_failed && at_fn_log_failure
   57092 $at_traceon; }
   57093 
   57094     cp xml-tests/test.output expout
   57095   { set +x
   57096 $as_echo "$at_srcdir/conflicts.at:1054: \$XSLTPROC \\
   57097              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   57098              xml-tests/test.xml"
   57099 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:1054"
   57100 ( $at_check_trace; $XSLTPROC \
   57101              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   57102              xml-tests/test.xml
   57103 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   57104 at_status=$? at_failed=false
   57105 $at_check_filter
   57106 at_fn_diff_devnull "$at_stderr" || at_failed=:
   57107 $at_diff expout "$at_stdout" || at_failed=:
   57108 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:1054"
   57109 $at_failed && at_fn_log_failure
   57110 $at_traceon; }
   57111 
   57112   sort xml-tests/test.dot > expout
   57113   { set +x
   57114 $as_echo "$at_srcdir/conflicts.at:1054: \$XSLTPROC \\
   57115              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   57116              xml-tests/test.xml | sort"
   57117 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:1054"
   57118 ( $at_check_trace; $XSLTPROC \
   57119              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   57120              xml-tests/test.xml | sort
   57121 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   57122 at_status=$? at_failed=false
   57123 $at_check_filter
   57124 at_fn_diff_devnull "$at_stderr" || at_failed=:
   57125 $at_diff expout "$at_stdout" || at_failed=:
   57126 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:1054"
   57127 $at_failed && at_fn_log_failure
   57128 $at_traceon; }
   57129 
   57130   rm -rf xml-tests expout
   57131   at_restore_special_files
   57132 fi
   57133 { set +x
   57134 $as_echo "$at_srcdir/conflicts.at:1054: bison -o input.c input.y"
   57135 at_fn_check_prepare_trace "conflicts.at:1054"
   57136 ( $at_check_trace; bison -o input.c input.y
   57137 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   57138 at_status=$? at_failed=false
   57139 $at_check_filter
   57140 at_fn_diff_devnull "$at_stderr" || at_failed=:
   57141 at_fn_diff_devnull "$at_stdout" || at_failed=:
   57142 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:1054"
   57143 $at_failed && at_fn_log_failure
   57144 $at_traceon; }
   57145 
   57146 
   57147   set +x
   57148   $at_times_p && times >"$at_times_file"
   57149 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
   57150 read at_status <"$at_status_file"
   57151 #AT_STOP_195
   57152 #AT_START_196
   57153 at_fn_group_banner 196 'conflicts.at:1062' \
   57154   "Unreachable States After Conflict Resolution" "   " 10
   57155 at_xfail=no
   57156 (
   57157   $as_echo "196. $at_setup_line: testing $at_desc ..."
   57158   $at_traceon
   57159 
   57160 
   57161 # If conflict resolution makes states unreachable, remove those states, report
   57162 # rules that are then unused, and don't report conflicts in those states.  Test
   57163 # what happens when a nonterminal becomes useless as a result of state removal
   57164 # since that causes lalr.o's goto map to be rewritten.
   57165 
   57166 cat >input.y <<'_ATEOF'
   57167 %output "input.c"
   57168 %left 'a'
   57169 
   57170 %%
   57171 
   57172 start: resolved_conflict 'a' reported_conflicts 'a' ;
   57173 
   57174 /* S/R conflict resolved as reduce, so the state with item
   57175  * (resolved_conflict: 'a' . unreachable1) and all it transition successors are
   57176  * unreachable, and the associated production is useless.  */
   57177 resolved_conflict:
   57178     'a' unreachable1
   57179   | %prec 'a'
   57180   ;
   57181 
   57182 /* S/R conflict that need not be reported since it is unreachable because of
   57183  * the previous conflict resolution.  Nonterminal unreachable1 and all its
   57184  * productions are useless.  */
   57185 unreachable1:
   57186     'a' unreachable2
   57187   |
   57188   ;
   57189 
   57190 /* Likewise for a R/R conflict and nonterminal unreachable2.  */
   57191 unreachable2: | ;
   57192 
   57193 /* Make sure remaining S/R and R/R conflicts are still reported correctly even
   57194  * when their states are renumbered due to state removal.  */
   57195 reported_conflicts:
   57196     'a'
   57197   | 'a'
   57198   |
   57199   ;
   57200 
   57201 _ATEOF
   57202 
   57203 
   57204 if test x"$BISON_TEST_XML" = x1 && test x"$XSLTPROC" != x""; then
   57205   at_save_special_files
   57206   mkdir xml-tests
   57207     # Don't combine these Bison invocations since we want to be sure that
   57208   # --report=all isn't required to get the full XML file.
   57209   { set +x
   57210 $as_echo "$at_srcdir/conflicts.at:1106: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \\
   57211                   --graph=xml-tests/test.dot --report=all input.y"
   57212 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:1106"
   57213 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all --report-file=xml-tests/test.output \
   57214                   --graph=xml-tests/test.dot --report=all input.y
   57215 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   57216 at_status=$? at_failed=false
   57217 $at_check_filter
   57218 echo stderr:; cat "$at_stderr"
   57219 echo stdout:; cat "$at_stdout"
   57220 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:1106"
   57221 $at_failed && at_fn_log_failure
   57222 $at_traceon; }
   57223 
   57224   { set +x
   57225 $as_echo "$at_srcdir/conflicts.at:1106: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all input.y"
   57226 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all input.y" "conflicts.at:1106"
   57227 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --xml=xml-tests/test.xml --report=all input.y
   57228 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   57229 at_status=$? at_failed=false
   57230 $at_check_filter
   57231 echo stderr:; cat "$at_stderr"
   57232 echo stdout:; cat "$at_stdout"
   57233 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:1106"
   57234 $at_failed && at_fn_log_failure
   57235 $at_traceon; }
   57236 
   57237     cp xml-tests/test.output expout
   57238   { set +x
   57239 $as_echo "$at_srcdir/conflicts.at:1106: \$XSLTPROC \\
   57240              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2text.xsl \\
   57241              xml-tests/test.xml"
   57242 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:1106"
   57243 ( $at_check_trace; $XSLTPROC \
   57244              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2text.xsl \
   57245              xml-tests/test.xml
   57246 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   57247 at_status=$? at_failed=false
   57248 $at_check_filter
   57249 at_fn_diff_devnull "$at_stderr" || at_failed=:
   57250 $at_diff expout "$at_stdout" || at_failed=:
   57251 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:1106"
   57252 $at_failed && at_fn_log_failure
   57253 $at_traceon; }
   57254 
   57255   sort xml-tests/test.dot > expout
   57256   { set +x
   57257 $as_echo "$at_srcdir/conflicts.at:1106: \$XSLTPROC \\
   57258              \`VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --print-datadir\`/xslt/xml2dot.xsl \\
   57259              xml-tests/test.xml | sort"
   57260 at_fn_check_prepare_notrace 'a `...` command substitution' "conflicts.at:1106"
   57261 ( $at_check_trace; $XSLTPROC \
   57262              `VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --print-datadir`/xslt/xml2dot.xsl \
   57263              xml-tests/test.xml | sort
   57264 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   57265 at_status=$? at_failed=false
   57266 $at_check_filter
   57267 at_fn_diff_devnull "$at_stderr" || at_failed=:
   57268 $at_diff expout "$at_stdout" || at_failed=:
   57269 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:1106"
   57270 $at_failed && at_fn_log_failure
   57271 $at_traceon; }
   57272 
   57273   rm -rf xml-tests expout
   57274   at_restore_special_files
   57275 fi
   57276 { set +x
   57277 $as_echo "$at_srcdir/conflicts.at:1106: bison --report=all input.y"
   57278 at_fn_check_prepare_trace "conflicts.at:1106"
   57279 ( $at_check_trace; bison --report=all input.y
   57280 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   57281 at_status=$? at_failed=false
   57282 $at_check_filter
   57283 echo >>"$at_stderr"; $as_echo "input.y: conflicts: 1 shift/reduce, 1 reduce/reduce
   57284 input.y:12.5-20: warning: rule useless in parser due to conflicts: resolved_conflict: 'a' unreachable1
   57285 input.y:20.5-20: warning: rule useless in parser due to conflicts: unreachable1: 'a' unreachable2
   57286 input.y:21.4: warning: rule useless in parser due to conflicts: unreachable1: /* empty */
   57287 input.y:25.13: warning: rule useless in parser due to conflicts: unreachable2: /* empty */
   57288 input.y:25.16: warning: rule useless in parser due to conflicts: unreachable2: /* empty */
   57289 input.y:31.5-7: warning: rule useless in parser due to conflicts: reported_conflicts: 'a'
   57290 input.y:32.4: warning: rule useless in parser due to conflicts: reported_conflicts: /* empty */
   57291 " | \
   57292   $at_diff - "$at_stderr" || at_failed=:
   57293 at_fn_diff_devnull "$at_stdout" || at_failed=:
   57294 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:1106"
   57295 $at_failed && at_fn_log_failure
   57296 $at_traceon; }
   57297 
   57298 # Defining POSIXLY_CORRECT causes bison to complain if options are
   57299 # added after the grammar file name, so skip these checks in that
   57300 # case.
   57301 if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
   57302   at_save_special_files
   57303 
   57304   # To avoid expanding it repeatedly, store specified stdout.
   57305   : >expout
   57306 
   57307   # Run with -Werror.
   57308   { set +x
   57309 $as_echo "$at_srcdir/conflicts.at:1106: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all input.y -Werror"
   57310 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all input.y -Werror" "conflicts.at:1106"
   57311 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all input.y -Werror
   57312 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   57313 at_status=$? at_failed=false
   57314 $at_check_filter
   57315 echo stderr:; tee stderr <"$at_stderr"
   57316 $at_diff expout "$at_stdout" || at_failed=:
   57317 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:1106"
   57318 $at_failed && at_fn_log_failure
   57319 $at_traceon; }
   57320 
   57321 
   57322   # Build expected stderr up to and including the "warnings being
   57323   # treated as errors" message.
   57324   cat >at-bison-check-warnings <<'_ATEOF'
   57325 input.y: conflicts: 1 shift/reduce, 1 reduce/reduce
   57326 input.y:12.5-20: warning: rule useless in parser due to conflicts: resolved_conflict: 'a' unreachable1
   57327 input.y:20.5-20: warning: rule useless in parser due to conflicts: unreachable1: 'a' unreachable2
   57328 input.y:21.4: warning: rule useless in parser due to conflicts: unreachable1: /* empty */
   57329 input.y:25.13: warning: rule useless in parser due to conflicts: unreachable2: /* empty */
   57330 input.y:25.16: warning: rule useless in parser due to conflicts: unreachable2: /* empty */
   57331 input.y:31.5-7: warning: rule useless in parser due to conflicts: reported_conflicts: 'a'
   57332 input.y:32.4: warning: rule useless in parser due to conflicts: reported_conflicts: /* empty */
   57333 _ATEOF
   57334 
   57335   at_bison_check_first=`sed -n \
   57336     '/: warning: /{=;q;}' at-bison-check-warnings`
   57337   : ${at_bison_check_first:=1}
   57338   at_bison_check_first_tmp=`sed -n \
   57339     '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
   57340   : ${at_bison_check_first_tmp:=1}
   57341   if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
   57342     at_bison_check_first=$at_bison_check_first_tmp
   57343   fi
   57344   if test $at_bison_check_first -gt 1; then
   57345     sed -n "1,`expr $at_bison_check_first - 1`"p \
   57346       at-bison-check-warnings > experr
   57347   fi
   57348   echo 'bison: warnings being treated as errors' >> experr
   57349 
   57350   # Finish building expected stderr and check.  Unlike warnings,
   57351   # complaints cause bison to exit early.  Thus, with -Werror, bison
   57352   # does not necessarily report all warnings that it does without
   57353   # -Werror, but it at least reports one.
   57354   at_bison_check_last=`sed -n '$=' stderr`
   57355   : ${at_bison_check_last:=1}
   57356   at_bison_check_last=`expr $at_bison_check_last - 1`
   57357   sed -n "$at_bison_check_first,$at_bison_check_last"p \
   57358     at-bison-check-warnings >> experr
   57359   { set +x
   57360 $as_echo "$at_srcdir/conflicts.at:1106: sed 's,.*/\\(bison: warnings being treated as errors\\)\$,\\1,' \\
   57361               stderr 1>&2"
   57362 at_fn_check_prepare_notrace 'an embedded newline' "conflicts.at:1106"
   57363 ( $at_check_trace; sed 's,.*/\(bison: warnings being treated as errors\)$,\1,' \
   57364               stderr 1>&2
   57365 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   57366 at_status=$? at_failed=false
   57367 $at_check_filter
   57368 $at_diff experr "$at_stderr" || at_failed=:
   57369 at_fn_diff_devnull "$at_stdout" || at_failed=:
   57370 at_fn_check_status 0 $at_status "$at_srcdir/conflicts.at:1106"
   57371 $at_failed && at_fn_log_failure
   57372 $at_traceon; }
   57373 
   57374 
   57375   # Now check --warnings=error.
   57376   cp stderr experr
   57377   { set +x
   57378 $as_echo "$at_srcdir/conflicts.at:1106: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all input.y --warnings=error"
   57379 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all input.y --warnings=error" "conflicts.at:1106"
   57380 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all input.y --warnings=error
   57381 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   57382 at_status=$? at_failed=false
   57383 $at_check_filter
   57384 $at_diff experr "$at_stderr" || at_failed=:
   57385 $at_diff expout "$at_stdout" || at_failed=:
   57386 at_fn_check_status 1 $at_status "$at_srcdir/conflicts.at:1106"
   57387 $at_failed && at_fn_log_failure
   57388 $at_traceon; }
   57389 
   57390 
   57391   # Now check -Wnone and --warnings=none by making sure that
   57392   # -Werror doesn't change the exit status when -Wnone or
   57393   # --warnings=none is specified.
   57394   { set +x
   57395 $as_echo "$at_srcdir/conflicts.at:1106: VALGRIND_OPTS=\"\$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all input.y -Wnone -Werror"
   57396 at_fn_check_prepare_dynamic "VALGRIND_OPTS=\"$VALGRIND_OPTS --leak-check=summary --show-reachable=no\"; export VALGRIND_OPTS; bison --report=all input.y -Wnone -Werror" "conflicts.at:1106"
   57397 ( $at_check_trace; VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; export VALGRIND_OPTS; bison --report=all input.y -Wnone -Werror
   57398 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
   57399 at_status=$? at_failed=false
   57400 $at_check_filter
   57401 at_fn_diff_devnull "$at_stderr" || at_failed=:
   57402 $at_diff expout "$at_stdout" || at_failed=:
   57403