bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Purity of yyerror etc.


From: Paul Eggert
Subject: Re: Purity of yyerror etc.
Date: Sun, 3 Nov 2002 23:34:20 -0800 (PST)

> From: Akim Demaille <address@hidden>
> Date: 03 Nov 2002 17:50:15 +0100

> | Why not instead pass a single argument that specifies the parsing context?
> 
> There is no comon set of argument used, plus that's really
> obfuscation.

I don't understand this comment.  Why would it be obfuscation?  It's
merely a calling convention.

There is a problem with the current approach, which may be relevant:
"configure --enable-gcc-warnings; make check" fails due to warnings
about unused parameters.  Here's an (edited) testsuite.log to
illustrate.

## --------------------------- ##
## GNU Bison 1.75b test suite. ##
## --------------------------- ##

testsuite: command line was:
  $ ./testsuite 

## ----------- ##
## ChangeLogs. ##
## ----------- ##

testsuite: ../ChangeLog:
| 2002-11-03  Akim Demaille  <address@hidden>
| 
|       * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
|       New.
|       * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
|       (b4_parse_param): Remove.
|       Use b4_identification.
|       Propagate b4_pure_args where needed to pass them to yyerror.
|       * data/glr.m4 (b4_parse_param): Remove.
|       (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)

testsuite: ../po/ChangeLog:
| 2002-08-08  gettextize  <address@hidden>
| 
|       * Rules-quot: New file, from gettext-0.11.5.
|       * boldquot.sed: New file, from gettext-0.11.5.
|       * address@hidden: New file, from gettext-0.11.5.
|       * address@hidden: New file, from gettext-0.11.5.
|       * insert-header.sin: New file, from gettext-0.11.5.
|       * quot.sed: New file, from gettext-0.11.5.
|       * remove-potcdate.sin: New file, from gettext-0.11.5.
| 

## --------- ##
## Platform. ##
## --------- ##

hostname = sic.twinsun.com
uname -m = sun4u
uname -r = 5.8
uname -s = SunOS
uname -v = Generic_108528-16

/usr/bin/uname -p = sparc
/bin/uname -X     = System = SunOS
Node = sic.twinsun.com
Release = 5.8
KernelID = Generic_108528-16
Machine = sun4u
BusType = <unknown>
Serial = <unknown>
Users = <unknown>
OEM# = 0
Origin# = 1
NumCPU = 1

/bin/arch              = sun4
/usr/bin/arch -k       = sun4u
/usr/convex/getsysinfo = unknown
hostinfo               = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /net/knick/home/eggert/src/gnu/bison.tmp/tests
PATH: /net/knick/home/eggert/bin
PATH: /opt/reb/bin
PATH: /opt/reb/sbin
PATH: /usr/krb5/bin
PATH: /usr/krb5/sbin
PATH: /usr/bin
PATH: /usr/sbin
PATH: /usr/perl5/5.00503/bin
PATH: /usr/ccs/bin
PATH: /usr/dt/bin
PATH: /usr/openwin/bin
PATH: /opt/sfw/bin
PATH: /opt/sfw/sbin
PATH: /opt/SUNWspro/bin
PATH: /usr/proc/bin
PATH: /usr/apache/bin
PATH: /opt/informix/bin
PATH: /opt/frame/bin
PATH: /opt/SUNWut/bin
PATH: /opt/SUNWut/sbin
PATH: /sbin

testsuite: atconfig:
| # Configurable variable values for building test suites.
| # Generated by ./config.status.
| # Copyright 2000, 2001 Free Software Foundation, Inc.
| 
| # The test suite will define top_srcdir=/../.. etc.
| at_testdir='tests'
| abs_builddir='/net/knick/home/eggert/src/gnu/bison.tmp/tests'
| at_srcdir='.'
| abs_srcdir='/net/knick/home/eggert/src/gnu/bison.tmp/tests'
| at_top_srcdir='..'
| abs_top_srcdir='/net/knick/home/eggert/src/gnu/bison.tmp'
| at_top_builddir='../'
| abs_top_builddir='/net/knick/home/eggert/src/gnu/bison.tmp'
| 
| AUTOTEST_PATH='tests'
| 
| SHELL=${CONFIG_SHELL-'/bin/bash'}

testsuite: atlocal:
| # tests/atlocal.  Generated from atlocal.in by configure.                     
                -*- shell-script -*-
| # Configurable variable values for Bison test suite.
| # Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
| 
| # We need a C compiler.
| CC='gcc'
| 
| # We want no optimization.
| CFLAGS='-g -O2  -Wall -W -Wbad-function-cast -Wcast-align -Wcast-qual 
-Wformat -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wshadow 
-Wstrict-prototypes -Wwrite-strings  -Werror'
| 
| # We need `config.h'.
| CPPFLAGS="-I$abs_top_builddir "
| 
| # Is the compiler GCC?
| GCC='yes'

## ---------------- ##
## Tested programs. ##
## ---------------- ##

testsuite.at:39: /net/knick/home/eggert/src/gnu/bison.tmp/tests/bison --version
bison (GNU Bison) 1.75b
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

## --------------------------- ##
## Silently running the tests. ##
## --------------------------- ##
testsuite: starting at: Sun Nov  3 22:53:41 PST 2002
1. input.at:28: ok      (0m0.010s 0m0.080s)
2. input.at:46: ok      (0m0.030s 0m0.070s)
3. input.at:64: ok      (0m0.010s 0m0.050s)
4. input.at:93: ok      (0m0.710s 0m0.290s)
5. output.at:38: ok     (0m0.150s 0m0.150s)
6. output.at:40: ok     (0m0.120s 0m0.120s)
7. output.at:42: ok     (0m0.150s 0m0.130s)
8. output.at:44: ok     (0m0.140s 0m0.140s)
9. output.at:46: ok     (0m0.140s 0m0.140s)
10. output.at:48: ok    (0m0.120s 0m0.190s)
11. output.at:52: ok    (0m0.130s 0m0.170s)
12. output.at:54: ok    (0m0.150s 0m0.140s)
13. output.at:57: ok    (0m0.150s 0m0.110s)
14. output.at:61: ok    (0m0.140s 0m0.140s)
15. output.at:63: ok    (0m0.110s 0m0.120s)
16. output.at:67: ok    (0m0.100s 0m0.160s)
17. output.at:72: ok    (0m0.130s 0m0.130s)
18. output.at:75: ok    (0m0.120s 0m0.140s)
19. output.at:79: ok    (0m0.130s 0m0.140s)
20. output.at:83: ok    (0m0.130s 0m0.170s)
21. sets.at:66: ok      (0m0.170s 0m0.260s)
22. sets.at:151: ok     (0m0.100s 0m0.160s)
23. sets.at:193: ok     (0m0.180s 0m0.260s)
24. reduce.at:26: ok    (0m0.140s 0m0.090s)
25. reduce.at:70: ok    (0m0.130s 0m0.170s)
26. reduce.at:125: ok   (0m0.080s 0m0.170s)
27. reduce.at:212: ok   (0m0.280s 0m0.270s)
28. reduce.at:301: ok   (0m0.140s 0m0.120s)
29. reduce.at:342: ok   (0m0.010s 0m0.130s)
30. synclines.at:91: ok (0m0.640s 0m0.380s)
31. synclines.at:110: ok        (0m0.540s 0m0.400s)
32. synclines.at:133: ok        (0m0.610s 0m0.480s)
33. synclines.at:152: ok        (0m0.640s 0m0.440s)
34. synclines.at:170: ok        (0m0.650s 0m0.410s)
35. headers.at:27: ok   (0m0.110s 0m0.090s)
36. headers.at:71: ok   (0m0.170s 0m0.180s)
37. headers.at:72: ok   (0m0.140s 0m0.120s)
38. headers.at:81: ok   (0m0.840s 0m0.300s)
39. actions.at:25: ok   (0m1.470s 0m0.340s)
40. actions.at:89: ok   (0m1.060s 0m0.320s)
41. actions.at:160: ok  (0m1.760s 0m0.300s)
42. conflicts.at:31: ok (0m0.110s 0m0.080s)
43. conflicts.at:51: ok (0m0.810s 0m0.490s)
44. conflicts.at:136: ok        (0m0.120s 0m0.160s)
45. conflicts.at:243: ok        (0m0.110s 0m0.150s)
46. conflicts.at:365: ok        (0m0.140s 0m0.130s)
47. conflicts.at:484: ok        (0m0.020s 0m0.090s)
48. conflicts.at:504: ok        (0m0.140s 0m0.070s)
49. conflicts.at:521: ok        (0m0.050s 0m0.050s)
50. calc.at:548: ok     (0m1.190s 0m2.150s)
51. calc.at:550: ok     (0m1.300s 0m1.920s)
52. calc.at:551: ok     (0m1.340s 0m1.830s)
53. calc.at:552: ok     (0m1.270s 0m2.030s)
54. calc.at:553: ok     (0m1.180s 0m2.150s)
55. calc.at:554: ok     (0m1.240s 0m2.080s)
56. calc.at:555: ok     (0m1.340s 0m1.790s)
57. calc.at:557: ok     (0m1.610s 0m1.650s)
58. calc.at:559: ok     (0m1.620s 0m1.800s)
59. calc.at:561: ok     (0m1.970s 0m2.590s)
60. calc.at:562: ok     (0m2.330s 0m2.170s)
61. calc.at:564: ok     (0m2.330s 0m2.550s)
62. calc.at:566: FAILED near `calc.at:566'      (0m2.330s 0m2.550s)
63. calc.at:583: ok     (0m3.580s 0m2.200s)
64. calc.at:585: ok     (0m3.720s 0m2.180s)
65. calc.at:586: ok     (0m3.500s 0m1.830s)
66. calc.at:587: ok     (0m3.640s 0m2.110s)
67. calc.at:588: ok     (0m3.420s 0m2.410s)
68. calc.at:589: ok     (0m3.390s 0m2.320s)
69. calc.at:590: ok     (0m3.630s 0m2.000s)
70. calc.at:592: ok     (0m3.630s 0m1.560s)
71. calc.at:594: ok     (0m3.790s 0m1.620s)
72. calc.at:596: ok     (0m4.220s 0m2.240s)
73. calc.at:597: ok     (0m4.400s 0m1.560s)
74. calc.at:599: ok     (0m4.370s 0m1.530s)
75. calc.at:601: FAILED near `calc.at:601'      (0m4.370s 0m1.530s)
76. torture.at:140: ok  (0m10.200s 0m0.730s)
77. torture.at:231: ok  (0m59.380s 0m2.300s)
78. torture.at:367: FAILED near `torture.at:375'        (0m59.380s 0m2.300s)
[The above test failed because I killed it; it takes too long on my host.]
79. torture.at:441: ok  (0m3.510s 0m4.460s)
80. torture.at:462: ok  (0m3.600s 0m4.400s)
81. existing.at:24: ok  (0m0.430s 0m0.050s)
82. existing.at:364: ok (0m1.430s 0m0.120s)
83. regression.at:27: ok        (0m0.500s 0m0.130s)
84. regression.at:65: ok        (0m0.160s 0m0.150s)
85. regression.at:87: ok        (0m0.100s 0m0.090s)
86. regression.at:113: ok       (0m0.150s 0m0.100s)
87. regression.at:257: ok       (0m0.080s 0m0.130s)
88. regression.at:280: ok       (0m0.030s 0m0.080s)
89. regression.at:313: ok       (0m0.480s 0m0.220s)
90. regression.at:341: ok       (0m0.570s 0m0.100s)
91. regression.at:371: ok       (0m0.140s 0m0.160s)
92. regression.at:548: ok       (0m0.140s 0m0.140s)
93. cxx-type.at:253: ok (0m2.880s 0m0.450s)
94. cxx-type.at:259: ok (0m2.990s 0m0.370s)
95. cxx-type.at:265: ok (0m2.980s 0m0.280s)
96. cxx-type.at:271: ok (0m2.990s 0m0.340s)
97. cxx-type.at:278: ok (0m3.010s 0m0.400s)
98. cxx-type.at:284: ok (0m2.940s 0m0.390s)
99. cxx-type.at:290: ok (0m3.000s 0m0.350s)
100. cxx-type.at:295: ok        (0m3.020s 0m0.380s)
101. cxx-type.at:302: ok        (0m3.140s 0m0.420s)
102. glr-regr1.at:21: FAILED near `glr-regr1.at:88'     (0m3.140s 0m0.420s)
testsuite: ending at: Sun Nov  3 23:01:07 PST 2002


## ------------------------ ##
## Summary of the failures. ##
## ------------------------ ##
Failed tests:
GNU Bison 1.75b test suite test groups:

 NUM: FILENAME:LINE      TEST-GROUP-NAME
      KEYWORDS

  62: calc.at:566        Calculator %pure-parser %error-verbose %debug 
%locations %defines %name-prefix="calc" %verbose %yacc %parse-param "value_t 
*result", "result" %parse-param "int *count", "count"
  75: calc.at:601        Calculator %glr-parser %pure-parser %error-verbose 
%debug %locations %defines %name-prefix="calc" %verbose %yacc %parse-param 
"value_t *result", "result" %parse-param "int *count", "count"
  78: torture.at:367     Many lookaheads
 102: glr-regr1.at:21    Badly Collapsed GLR States


## --------------------------------------- ##
## Verbosely re-running the failing tests. ##
## --------------------------------------- ##

## --------------------------- ##
## GNU Bison 1.75b test suite. ##
## --------------------------- ##
62. calc.at:566: testing Calculator %pure-parser %error-verbose %debug 
%locations %defines %name-prefix=calc %verbose %yacc %parse-param value_t 
*result, result %parse-param int *count, count...
calc.at:566: bison -o calc.c calc.y
calc.at:566: $CC $CFLAGS $CPPFLAGS calc.c -o calc
stderr:
cc1: warnings being treated as errors
calc.y: In function `calcerror':
calc.y:121: warning: unused parameter `calclloc'
calc.y:121: warning: unused parameter `result'
calc.y:121: warning: unused parameter `count'
calc.at:566: exit code was 1, expected 0
62. calc.at:566: FAILED near `calc.at:566'

75. calc.at:601: testing Calculator %glr-parser %pure-parser %error-verbose 
%debug %locations %defines %name-prefix=calc %verbose %yacc %parse-param 
value_t *result, result %parse-param int *count, count...
calc.at:601: bison -o calc.c calc.y
calc.at:601: $CC $CFLAGS $CPPFLAGS calc.c -o calc
stderr:
cc1: warnings being treated as errors
calc.y: In function `calcerror':
calc.y:121: warning: unused parameter `result'
calc.y:121: warning: unused parameter `count'
calc.at:601: exit code was 1, expected 0
75. calc.at:601: FAILED near `calc.at:601'

78. torture.at:367: testing Many lookaheads...
[test output suppressed, since I killed it]
78. torture.at:367: FAILED near `torture.at:375'

102. glr-regr1.at:21: testing Badly Collapsed GLR States...
glr-regr1.at:87: bison -o glr-regr1.c glr-regr1.y
glr-regr1.at:88: $CC $CFLAGS $CPPFLAGS glr-regr1.c -o glr-regr1
stderr:
cc1: warnings being treated as errors
glr-regr1.c: In function `yyFail':
glr-regr1.c:466: warning: implicit declaration of function `yyerror'
glr-regr1.c: In function `yygetLRActions':
glr-regr1.c:625: warning: comparison is always true due to limited range of 
data type
glr-regr1.c: In function `yyprocessOneStack':
glr-regr1.c:1404: warning: implicit declaration of function `yylex'
glr-regr1.c: In function `yyrecoverParseError':
glr-regr1.c:1539: warning: comparison is always true due to limited range of 
data type
glr-regr1.y: In function `exprMerge':
glr-regr1.y:30: warning: unused parameter `x0'
glr-regr1.y:30: warning: unused parameter `x1'
glr-regr1.y: At top level:
glr-regr1.y:37: warning: function declaration isn't a prototype
glr-regr1.y:43: warning: no previous prototype for `yyerror'
glr-regr1.y:50: warning: function declaration isn't a prototype
glr-regr1.at:88: exit code was 1, expected 0
102. glr-regr1.at:21: FAILED near `glr-regr1.at:88'

## ------------------- ##
## Configuration logs. ##
## ------------------- ##

testsuite: ../config.log:
| This file contains any messages produced by compilers while
| running configure, to aid debugging if configure makes a mistake.
| 
| It was created by GNU Bison configure 1.75b, which was
| generated by GNU Autoconf 2.54.  Invocation command line was
| 
|   $ configure --prefix=/tmp/prefix --enable-gcc-warnings
...
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]