3 |
* URGENT: Documenting C++ output |
* URGENT: Documenting C++ output |
4 |
Write a first documentation for C++ output. |
Write a first documentation for C++ output. |
5 |
|
|
|
* Report and GLR |
|
|
How would Paul like to display the conflicted actions? In particular, |
|
|
what when two reductions are possible on a given lookahead, but one is |
|
|
part of $default. Should we make the two reductions explicit, or just |
|
|
keep $default? See the following point. |
|
6 |
|
|
7 |
* Report and Disabled Reductions |
* Error messages |
8 |
See `tests/conflicts.at (Defaulted Conflicted Reduction)', and decide |
Some are really funky. For instance |
9 |
what we want to do. |
|
10 |
|
type clash (`%s' `%s') on default action |
11 |
|
|
12 |
|
is really weird. Revisit them all. |
13 |
|
|
14 |
|
* Stupid error messages |
15 |
|
An example shows it easily: |
16 |
|
|
17 |
|
src/bison/tests % ./testsuite -k calc,location,error-verbose -l |
18 |
|
GNU Bison 1.49a test suite test groups: |
19 |
|
|
20 |
|
NUM: FILENAME:LINE TEST-GROUP-NAME |
21 |
|
KEYWORDS |
22 |
|
|
23 |
|
51: calc.at:440 Calculator --locations --yyerror-verbose |
24 |
|
52: calc.at:442 Calculator --defines --locations --name-prefix=calc --verbose --yacc --yyerror-verbose |
25 |
|
54: calc.at:445 Calculator --debug --defines --locations --name-prefix=calc --verbose --yacc --yyerror-verbose |
26 |
|
src/bison/tests % ./testsuite 51 -d |
27 |
|
## --------------------------- ## |
28 |
|
## GNU Bison 1.49a test suite. ## |
29 |
|
## --------------------------- ## |
30 |
|
51: calc.at:440 ok |
31 |
|
## ---------------------------- ## |
32 |
|
## All 1 tests were successful. ## |
33 |
|
## ---------------------------- ## |
34 |
|
src/bison/tests % cd ./testsuite.dir/51 |
35 |
|
tests/testsuite.dir/51 % echo "()" | ./calc |
36 |
|
1.2-1.3: parse error, unexpected ')', expecting error or "number" or '-' or '(' |
37 |
|
|
38 |
|
|
39 |
|
* read_pipe.c |
40 |
|
This is not portable to DOS for instance. Implement a more portable |
41 |
|
scheme. Sources of inspiration include GNU diff, and Free Recode. |
42 |
|
|
43 |
|
|
44 |
* value_components_used |
* value_components_used |
45 |
Was defined but not used: where was it coming from? It can't be to |
Was defined but not used: where was it coming from? It can't be to |
46 |
check if %union is used, since the user is free to $<foo>n on her |
check if %union is used, since the user is free to $<foo>n on her |
47 |
union, doesn't she? |
union, doesn't she? |
48 |
|
|
|
* yyerror, yyprint interface |
|
|
It should be improved, in particular when using Bison features such as |
|
|
locations, and YYPARSE_PARAMS. For the time being, it is recommended |
|
|
to #define yyerror and yyprint to steal internal variables... |
|
49 |
|
|
50 |
* documentation |
* Report |
|
Explain $axiom (and maybe change its name: BTYacc names it `goal', |
|
|
byacc `$accept' probably based on AT&T Yacc, Meta `Start'...). |
|
|
Complete the glossary (item, axiom, ?). Should we also rename `$'? |
|
|
BYacc uses `$end'. `$eof' is attracting, but after all we may be |
|
|
parsing a string, a stream etc. |
|
51 |
|
|
52 |
* Error messages |
** GLR |
53 |
Some are really funky. For instance |
How would Paul like to display the conflicted actions? In particular, |
54 |
|
what when two reductions are possible on a given lookahead, but one is |
55 |
type clash (`%s' `%s') on default action |
part of $default. Should we make the two reductions explicit, or just |
56 |
|
keep $default? See the following point. |
57 |
|
|
58 |
is really weird. Revisit them all. |
** Disabled Reductions |
59 |
|
See `tests/conflicts.at (Defaulted Conflicted Reduction)', and decide |
60 |
|
what we want to do. |
61 |
|
|
62 |
* Report documentation |
** Documentation |
63 |
Extend with error productions. The hard part will probably be finding |
Extend with error productions. The hard part will probably be finding |
64 |
the right rule so that a single state does not exhibit too many yet |
the right rule so that a single state does not exhibit too many yet |
65 |
undocumented ``features''. Maybe an empty action ought to be |
undocumented ``features''. Maybe an empty action ought to be |
66 |
presented too. Shall we try to make a single grammar with all these |
presented too. Shall we try to make a single grammar with all these |
67 |
features, or should we have several very small grammars? |
features, or should we have several very small grammars? |
68 |
|
|
69 |
* Documentation |
** --report=conflict-path |
70 |
Some history of Bison and some bibliography would be most welcome. |
Provide better assistance for understanding the conflicts by providing |
71 |
Are there any Texinfo standards for bibliography? |
a sample text exhibiting the (LALR) ambiguity. See the paper from |
72 |
|
DeRemer and Penello: they already provide the algorithm. |
73 |
|
|
74 |
|
|
75 |
* Several %unions |
* Extentions |
76 |
|
|
77 |
|
** yyerror, yysymprint interface |
78 |
|
It should be improved, in particular when using Bison features such as |
79 |
|
locations, and YYPARSE_PARAMS. For the time being, it is recommended |
80 |
|
to #define yyerror and yyprint to steal internal variables... |
81 |
|
|
82 |
|
** Several %unions |
83 |
I think this is a pleasant (but useless currently) feature, but in the |
I think this is a pleasant (but useless currently) feature, but in the |
84 |
future, I want a means to %include other bits of grammars, and _then_ |
future, I want a means to %include other bits of grammars, and _then_ |
85 |
it will be important for the various bits to define their needs in |
it will be important for the various bits to define their needs in |
100 |
char *sval; |
char *sval; |
101 |
} |
} |
102 |
|
|
|
* --report=conflict-path |
|
|
Provide better assistance for understanding the conflicts by providing |
|
|
a sample text exhibiting the (LALR) ambiguity. See the paper from |
|
|
DeRemer and Penello: they already provide the algorithm. |
|
|
|
|
|
* Coding system independence |
|
|
Paul notes: |
|
|
|
|
|
Currently Bison assumes 8-bit bytes (i.e. that UCHAR_MAX is |
|
|
255). It also assumes that the 8-bit character encoding is |
|
|
the same for the invocation of 'bison' as it is for the |
|
|
invocation of 'cc', but this is not necessarily true when |
|
|
people run bison on an ASCII host and then use cc on an EBCDIC |
|
|
host. I don't think these topics are worth our time |
|
|
addressing (unless we find a gung-ho volunteer for EBCDIC or |
|
|
PDP-10 ports :-) but they should probably be documented |
|
|
somewhere. |
|
|
|
|
103 |
* Unit rules |
* Unit rules |
104 |
Maybe we could expand unit rules, i.e., transform |
Maybe we could expand unit rules, i.e., transform |
105 |
|
|
117 |
`Parsing Techniques: a Practical Guide', it includes information about |
`Parsing Techniques: a Practical Guide', it includes information about |
118 |
this issue. Does anybody have it? |
this issue. Does anybody have it? |
119 |
|
|
|
* Stupid error messages |
|
|
An example shows it easily: |
|
120 |
|
|
|
src/bison/tests % ./testsuite -k calc,location,error-verbose -l |
|
|
GNU Bison 1.49a test suite test groups: |
|
121 |
|
|
122 |
NUM: FILENAME:LINE TEST-GROUP-NAME |
* Documentation |
|
KEYWORDS |
|
123 |
|
|
124 |
51: calc.at:440 Calculator --locations --yyerror-verbose |
** Vocabulary |
125 |
52: calc.at:442 Calculator --defines --locations --name-prefix=calc --verbose --yacc --yyerror-verbose |
Explain $axiom (and maybe change its name: BTYacc names it `goal', |
126 |
54: calc.at:445 Calculator --debug --defines --locations --name-prefix=calc --verbose --yacc --yyerror-verbose |
byacc `$accept' probably based on AT&T Yacc, Meta `Start'...). |
127 |
src/bison/tests % ./testsuite 51 -d |
Complete the glossary (item, axiom, ?). Should we also rename `$'? |
128 |
## --------------------------- ## |
BYacc uses `$end'. `$eof' is attracting, but after all we may be |
129 |
## GNU Bison 1.49a test suite. ## |
parsing a string, a stream etc. |
130 |
## --------------------------- ## |
|
131 |
51: calc.at:440 ok |
** History/Bibliography |
132 |
## ---------------------------- ## |
Some history of Bison and some bibliography would be most welcome. |
133 |
## All 1 tests were successful. ## |
Are there any Texinfo standards for bibliography? |
134 |
## ---------------------------- ## |
|
135 |
src/bison/tests % cd ./testsuite.dir/51 |
|
136 |
tests/testsuite.dir/51 % echo "()" | ./calc |
|
137 |
1.2-1.3: parse error, unexpected ')', expecting error or "number" or '-' or '(' |
|
138 |
|
* Coding system independence |
139 |
|
Paul notes: |
140 |
|
|
141 |
|
Currently Bison assumes 8-bit bytes (i.e. that UCHAR_MAX is |
142 |
|
255). It also assumes that the 8-bit character encoding is |
143 |
|
the same for the invocation of 'bison' as it is for the |
144 |
|
invocation of 'cc', but this is not necessarily true when |
145 |
|
people run bison on an ASCII host and then use cc on an EBCDIC |
146 |
|
host. I don't think these topics are worth our time |
147 |
|
addressing (unless we find a gung-ho volunteer for EBCDIC or |
148 |
|
PDP-10 ports :-) but they should probably be documented |
149 |
|
somewhere. |
150 |
|
|
|
* read_pipe.c |
|
|
This is not portable to DOS for instance. Implement a more portable |
|
|
scheme. Sources of inspiration include GNU diff, and Free Recode. |
|
151 |
|
|
|
* Memory leaks in the generator |
|
|
A round of memory leak clean ups would be most welcome. Dmalloc, |
|
|
Checker GCC, Electric Fence, or Valgrind: you chose your tool. |
|
152 |
|
|
153 |
* --graph |
* --graph |
154 |
Show reductions. [] |
Show reductions. [] |
192 |
See if we can integrate backtracking in Bison. Contact the BTYacc |
See if we can integrate backtracking in Bison. Contact the BTYacc |
193 |
maintainers. |
maintainers. |
194 |
|
|
195 |
* RR conflicts |
** Keeping the conflicted actions |
196 |
See if we can use precedence between rules to solve RR conflicts. See |
First, analyze the differences between byacc and btyacc (I'm referring |
197 |
what POSIX says. |
to the executables). Find where the conflicts are preserved. |
198 |
|
|
199 |
|
** Compare with the GLR tables |
200 |
|
See how isomorphic the way BTYacc and the way the GLR adjustements in |
201 |
|
Bison are compatible. *As much as possible* one should try to use the |
202 |
|
same implementation in the Bison executables. I insist: it should be |
203 |
|
very feasible to use the very same conflict tables. |
204 |
|
|
205 |
|
** Adjust the skeletons |
206 |
|
Import the skeletons for C and C++. |
207 |
|
|
208 |
|
** Improve the skeletons |
209 |
|
Have them support yysymprint, yydestruct and so forth. |
210 |
|
|
211 |
|
|
212 |
* Precedence |
* Precedence |
213 |
|
|
214 |
|
** Partial order |
215 |
It is unfortunate that there is a total order for precedence. It |
It is unfortunate that there is a total order for precedence. It |
216 |
makes it impossible to have modular precedence information. We should |
makes it impossible to have modular precedence information. We should |
217 |
move to partial orders. |
move to partial orders (sounds like series/parallel orders to me). |
218 |
|
|
219 |
This will be possible with a Bison parser for the grammar, as it will |
This will be possible with a Bison parser for the grammar, as it will |
220 |
make it much easier to extend the grammar. |
make it much easier to extend the grammar. |
221 |
|
|
222 |
|
** Correlation b/w precedence and associativity |
223 |
|
Also, I fail to understand why we have to assign the same |
224 |
|
associativity to operators with the same precedence. For instance, |
225 |
|
why can't I decide that the precedence of * and / is the same, but the |
226 |
|
latter is nonassoc? |
227 |
|
|
228 |
|
If there is really no profound motivation, we should find a new syntax |
229 |
|
to allow specifying this. |
230 |
|
|
231 |
|
** RR conflicts |
232 |
|
See if we can use precedence between rules to solve RR conflicts. See |
233 |
|
what POSIX says. |
234 |
|
|
235 |
|
|
236 |
* $undefined |
* $undefined |
237 |
From Hans: |
From Hans: |
238 |
- If the Bison generated parser experiences an undefined number in the |
- If the Bison generated parser experiences an undefined number in the |
241 |
|
|
242 |
Suggest: Change the name $undefined to undefined; looks better in outputs. |
Suggest: Change the name $undefined to undefined; looks better in outputs. |
243 |
|
|
244 |
|
|
245 |
* Default Action |
* Default Action |
246 |
From Hans: |
From Hans: |
247 |
- For use with my C++ parser, I transported the "switch (yyn)" statement |
- For use with my C++ parser, I transported the "switch (yyn)" statement |
258 |
|
|
259 |
Note: Robert Anisko handles this. He knows how to do it. |
Note: Robert Anisko handles this. He knows how to do it. |
260 |
|
|
261 |
|
|
262 |
* Warnings |
* Warnings |
263 |
It would be nice to have warning support. See how Autoconf handles |
It would be nice to have warning support. See how Autoconf handles |
264 |
them, it is fairly well described there. It would be very nice to |
them, it is fairly well described there. It would be very nice to |
269 |
thought about it, and know many of the components that can be used to |
thought about it, and know many of the components that can be used to |
270 |
implement it. |
implement it. |
271 |
|
|
272 |
|
|
273 |
* Pre and post actions. |
* Pre and post actions. |
274 |
From: Florian Krohm <florian@edamail.fishkill.ibm.com> |
From: Florian Krohm <florian@edamail.fishkill.ibm.com> |
275 |
Subject: YYACT_EPILOGUE |
Subject: YYACT_EPILOGUE |