diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2021-06-23 07:19:20 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2021-07-25 18:21:12 +0200 |
commit | 5325292e5db716a0f52e1a331351e6c0d21b23d9 (patch) | |
tree | cb9141dffc9754259223cc716438eca076e14d2f /examples | |
parent | ca403f672c77cb3adf3a244630bebed9cf6544fa (diff) | |
download | bison-5325292e5db716a0f52e1a331351e6c0d21b23d9.tar.gz |
d: minor clean up
* doc/bison.texi: Use @samp, not "...", around pieces of code.
* examples/d/calc/calc.y: Don't promote %union.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/d/calc/calc.y | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/examples/d/calc/calc.y b/examples/d/calc/calc.y index 7273d16c..f2b0e8b2 100644 --- a/examples/d/calc/calc.y +++ b/examples/d/calc/calc.y @@ -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 "*" "/" |