report: put the dot after %empty in items

When printing items, it is clearer to put the dot after %emtpy rather
than before:

     0 $accept: . unit "end of file"
     1 unit: . assignments exp
-    2 assignments: . %empty
+    2 assignments: %empty .
     3            | . assignments assignment

Also, use the Unicode characters if they are supported.

* src/gram.c (item_print): Put the dot after %emtpy.
* tests/conflicts.at, tests/reduce.at, tests/report.at: Adjust.
This commit is contained in:
Akim Demaille
2020-10-04 14:35:46 +02:00
parent 7cd195b30a
commit 36143b5ecc
4 changed files with 38 additions and 35 deletions

View File

@@ -1164,7 +1164,7 @@ State 12
4 A: 'a' 'a' . B
5 B: . 'a'
6 | . %empty ]AT_COND_CASE([[LALR]], [[['a', 'b']]], [[['a']]])[
6 | %empty . ]AT_COND_CASE([[LALR]], [[['a', 'b']]], [[['a']]])[
]AT_COND_CASE([[canonical LR]], [['a']],
[[$default]])[ reduce using rule 6 (B)
@@ -1194,7 +1194,7 @@ State 15
4 A: 'a' 'a' . B
5 B: . 'a'
6 | . %empty [$end]
6 | %empty . [$end]
7 c: 'a' 'a' . 'b'
'a' shift, and go to state ]AT_COND_CASE([[canonical LR]], [[20]],
@@ -1257,7 +1257,7 @@ State 22]])[
4 A: 'a' 'a' . B
5 B: . 'a'
6 | . %empty ['b']
6 | %empty . ['b']
'a' shift, and go to state ]AT_COND_CASE([[canonical LR]], [[23]],
[[16]])[
@@ -1683,8 +1683,8 @@ State 3
1 start: a . b
2 | a . b 'a'
3 | a . c 'b'
5 b: . %empty [$end, 'a']
6 c: . %empty ['b']]AT_COND_CASE([[most]], [[
5 b: %empty . [$end, 'a']
6 c: %empty . ['b']]AT_COND_CASE([[most]], [[
'b' reduce using rule 6 (c)
$default reduce using rule 5 (b)]], [[