diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2020-04-12 09:54:46 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2020-04-12 13:56:44 +0200 |
commit | 72c9fa4510eb677cf80feb0d161eb38f97ddffe9 (patch) | |
tree | 279fee0844add796b22efd52c5b5b90ce35bd6bf /tests/conflicts.at | |
parent | a555b419904c3619f417f9698b9234d9084c65e5 (diff) | |
download | bison-72c9fa4510eb677cf80feb0d161eb38f97ddffe9.tar.gz |
skeletons: use "end of file" instead of "$end"
The name "$end" is nice in the report, in particular it avoids that
pointed-rules (aka items) be too long. It also helps keeping them
"standard".
But it is bad in error messages, we should report "end of file" (or
maybe "end of input", this is debatable). So, unless the user already
defined the alias for the error token herself, make it "end of file".
It should even be translated if the user already translated some
tokens, so that there is now no strong reason to redefine the $end
token.
* src/output.c (prepare_symbol_names): Issue "end of file" instead of
"$end".
* data/skeletons/lalr1.java (yytnamerr_): Remove the renaming hack.
* build-aux/update-test: Accept files with names containing a "+",
such as c++.at.
* tests/actions.at, tests/c++.at, tests/conflicts.at,
* tests/glr-regression.at, tests/regression.at, tests/skeletons.at:
Adjust.
Diffstat (limited to 'tests/conflicts.at')
-rw-r--r-- | tests/conflicts.at | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/conflicts.at b/tests/conflicts.at index 6300ee96..b6d92c5a 100644 --- a/tests/conflicts.at +++ b/tests/conflicts.at @@ -346,7 +346,7 @@ m4_pushdef([AT_NONASSOC_AND_EOF_CHECK], [AT_BISON_CHECK([$1[ -o input.c input.y]]) AT_COMPILE([input]) -m4_pushdef([AT_EXPECTING], [m4_if($2, [correct], [[, expecting $end]])]) +m4_pushdef([AT_EXPECTING], [m4_if($2, [correct], [[, expecting end of file]])]) AT_PARSER_CHECK([input '0<0']) AT_PARSER_CHECK([input '0<0<0'], [1], [], @@ -509,50 +509,50 @@ m4_pushdef([AT_PREVIOUS_STATE_INPUT], [[a]]) AT_CONSISTENT_ERRORS_CHECK([[%define lr.type ielr]], [AT_PREVIOUS_STATE_GRAMMAR], [AT_PREVIOUS_STATE_INPUT], - [[$end]], [[none]]) + [[end of file]], [[none]]) AT_CONSISTENT_ERRORS_CHECK([[%define lr.type ielr %glr-parser]], [AT_PREVIOUS_STATE_GRAMMAR], [AT_PREVIOUS_STATE_INPUT], - [[$end]], [[none]]) + [[end of file]], [[none]]) AT_CONSISTENT_ERRORS_CHECK([[%define lr.type ielr %language "c++"]], [AT_PREVIOUS_STATE_GRAMMAR], [AT_PREVIOUS_STATE_INPUT], - [[$end]], [[none]]) + [[end of file]], [[none]]) AT_CONSISTENT_ERRORS_CHECK([[%define lr.type ielr %language "java"]], [AT_PREVIOUS_STATE_GRAMMAR], [AT_PREVIOUS_STATE_INPUT], - [[end of input]], [[none]]) + [[end of file]], [[none]]) # Even canonical LR doesn't foresee the error for 'a'! AT_CONSISTENT_ERRORS_CHECK([[%define lr.type ielr %define lr.default-reduction consistent]], [AT_PREVIOUS_STATE_GRAMMAR], [AT_PREVIOUS_STATE_INPUT], - [[$end]], [[ab]]) + [[end of file]], [[ab]]) AT_CONSISTENT_ERRORS_CHECK([[%define lr.type ielr %define lr.default-reduction accepting]], [AT_PREVIOUS_STATE_GRAMMAR], [AT_PREVIOUS_STATE_INPUT], - [[$end]], [[ab]]) + [[end of file]], [[ab]]) AT_CONSISTENT_ERRORS_CHECK([[%define lr.type canonical-lr]], [AT_PREVIOUS_STATE_GRAMMAR], [AT_PREVIOUS_STATE_INPUT], - [[$end]], [[ab]]) + [[end of file]], [[ab]]) # Only LAC gets it right. In C. AT_CONSISTENT_ERRORS_CHECK([[%define lr.type canonical-lr %define parse.lac full]], [AT_PREVIOUS_STATE_GRAMMAR], [AT_PREVIOUS_STATE_INPUT], - [[$end]], [[b]]) + [[end of file]], [[b]]) AT_CONSISTENT_ERRORS_CHECK([[%define lr.type ielr %define parse.lac full]], [AT_PREVIOUS_STATE_GRAMMAR], [AT_PREVIOUS_STATE_INPUT], - [[$end]], [[b]]) + [[end of file]], [[b]]) # Only LAC gets it right. In C++. AT_CONSISTENT_ERRORS_CHECK([[%language "c++" @@ -560,13 +560,13 @@ AT_CONSISTENT_ERRORS_CHECK([[%language "c++" %define parse.lac full]], [AT_PREVIOUS_STATE_GRAMMAR], [AT_PREVIOUS_STATE_INPUT], - [[$end]], [[b]]) + [[end of file]], [[b]]) AT_CONSISTENT_ERRORS_CHECK([[%language "c++" %define lr.type ielr %define parse.lac full]], [AT_PREVIOUS_STATE_GRAMMAR], [AT_PREVIOUS_STATE_INPUT], - [[$end]], [[b]]) + [[end of file]], [[b]]) m4_popdef([AT_PREVIOUS_STATE_GRAMMAR]) m4_popdef([AT_PREVIOUS_STATE_INPUT]) @@ -638,11 +638,11 @@ AT_CONSISTENT_ERRORS_CHECK([[%define lr.default-reduction consistent]], AT_CONSISTENT_ERRORS_CHECK([[%define lr.default-reduction accepting]], [AT_USER_ACTION_GRAMMAR], [AT_USER_ACTION_INPUT], - [[$end]], [[a]]) + [[end of file]], [[a]]) AT_CONSISTENT_ERRORS_CHECK([[%define lr.type canonical-lr]], [AT_USER_ACTION_GRAMMAR], [AT_USER_ACTION_INPUT], - [[$end]], [[a]]) + [[end of file]], [[a]]) AT_CONSISTENT_ERRORS_CHECK([[%define parse.lac full]], [AT_USER_ACTION_GRAMMAR], @@ -652,7 +652,7 @@ AT_CONSISTENT_ERRORS_CHECK([[%define parse.lac full %define lr.default-reduction accepting]], [AT_USER_ACTION_GRAMMAR], [AT_USER_ACTION_INPUT], - [[$end]], [[none]]) + [[end of file]], [[none]]) m4_popdef([AT_USER_ACTION_GRAMMAR]) m4_popdef([AT_USER_ACTION_INPUT]) |