mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
d: minor clean up
* doc/bison.texi: Use @samp, not "...", around pieces of code. * examples/d/calc/calc.y: Don't promote %union.
This commit is contained in:
@@ -20,17 +20,14 @@
|
||||
%language "D"
|
||||
|
||||
%define api.parser.class {Calc}
|
||||
%define parse.error detailed
|
||||
%define parse.trace
|
||||
%define api.push-pull push
|
||||
%define api.token.constructor
|
||||
%define api.value.type union
|
||||
%define parse.error detailed
|
||||
%define parse.trace
|
||||
|
||||
%locations
|
||||
|
||||
%union {
|
||||
int ival;
|
||||
}
|
||||
|
||||
/* Bison Declarations */
|
||||
%token PLUS "+"
|
||||
MINUS "-"
|
||||
@@ -39,9 +36,9 @@
|
||||
LPAR "("
|
||||
RPAR ")"
|
||||
EOL "end of line"
|
||||
%token <ival> NUM "number"
|
||||
%type <ival> exp
|
||||
%printer { yyo.write($$); } <ival>
|
||||
%token <int> NUM "number"
|
||||
%type <int> exp
|
||||
%printer { yyo.write($$); } <int>
|
||||
|
||||
%left "-" "+"
|
||||
%left "*" "/"
|
||||
|
||||
Reference in New Issue
Block a user