examples: bistromathic: shorten token description

* examples/c/bistromathic/parse.y: "number" is enough.
* doc/bison.texi: Likewise.
This commit is contained in:
Akim Demaille
2020-04-24 18:56:06 +02:00
parent b42702d738
commit 5c9f50b545
4 changed files with 8 additions and 10 deletions

2
NEWS
View File

@@ -83,7 +83,7 @@ GNU Bison NEWS
PLUS "+" PLUS "+"
MINUS "-" MINUS "-"
<double> <double>
NUM _("double precision number") NUM _("number")
<symrec*> <symrec*>
FUN _("function") FUN _("function")
VAR _("variable") VAR _("variable")

View File

@@ -7804,7 +7804,7 @@ or @code{detailed}, token aliases can be internationalized:
%token %token
'\n' _("end of line") '\n' _("end of line")
<double> <double>
NUM _("double precision number") NUM _("number")
<symrec*> <symrec*>
FUN _("function") FUN _("function")
VAR _("variable") VAR _("variable")

View File

@@ -65,13 +65,13 @@ cat >input <<EOF
* *
EOF EOF
run 0 '> * run 0 '> *
> err: 1.1: syntax error: expected end of file or - or ( or exit or double precision number or function or variable before *' > err: 1.1: syntax error: expected end of file or - or ( or exit or number or function or variable before *'
cat >input <<EOF cat >input <<EOF
1 + 2 * * 3 1 + 2 * * 3
EOF EOF
run 0 '> 1 + 2 * * 3 run 0 '> 1 + 2 * * 3
> err: 1.9: syntax error: expected - or ( or double precision number or function or variable before *' > err: 1.9: syntax error: expected - or ( or number or function or variable before *'
cat >input <<EOF cat >input <<EOF
100% 100%
@@ -107,18 +107,16 @@ sed -e 's/\\t/ /g' >input <<EOF
(1+\t\t (1+\t\t
EOF EOF
run 0 '> (1+ run 0 '> (1+
( cos ln ( - atan cos exp ln number sin sqrt
- double precision number sin
atan exp sqrt
> (1+ > (1+
> err: 1.4: syntax error: expected - or ( or double precision number or function or variable before end of file' > err: 1.4: syntax error: expected - or ( or number or function or variable before end of file'
# Check the completion of a word. # Check the completion of a word.
sed -e 's/\\t/ /g' >input <<EOF sed -e 's/\\t/ /g' >input <<EOF
(at\t\t (at\t\t
EOF EOF
run 0 '> (atan ( '' run 0 '> (atan ( ''
> err: 1.9: syntax error: expected - or ( or double precision number or function or variable before end of file' > err: 1.9: syntax error: expected - or ( or number or function or variable before end of file'
# Check the completion at the very beginning. # Check the completion at the very beginning.
sed -e 's/\\t/ /g' >input <<EOF sed -e 's/\\t/ /g' >input <<EOF

View File

@@ -96,7 +96,7 @@
EQUAL "=" EQUAL "="
EXIT "exit" EXIT "exit"
<double> <double>
NUM _("double precision number") NUM _("number")
<symrec*> <symrec*>
FUN _("function") FUN _("function")
VAR _("variable") VAR _("variable")