mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
Unfortunately I found no way to use the ↳ glyph in Texinfo, so I used
@arrow{} instead, which has a different width, so we have to have all
the examples doubled, once for TeX, another for the rest of the world.
* doc/bison.texi: Use the current display in the examples.
* doc/calc.y, doc/ids.y, doc/if-then-else.y, doc/sequence.y: New.
24 lines
232 B
Plaintext
24 lines
232 B
Plaintext
%union
|
|
{
|
|
int ival;
|
|
const char *sval;
|
|
}
|
|
|
|
%token <ival> NUM
|
|
%nterm <ival> exp
|
|
%token <sval> STR
|
|
%nterm <sval> useless
|
|
|
|
%left '+' '-'
|
|
%left '*'
|
|
|
|
%%
|
|
exp:
|
|
exp '+' exp
|
|
| exp '-' exp
|
|
| exp '*' exp
|
|
| exp '/' exp
|
|
| NUM
|
|
;
|
|
useless: STR;
|