[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
location.hh position.hh files generated with %location directive
From: |
Arthur Schwarz |
Subject: |
location.hh position.hh files generated with %location directive |
Date: |
Thu, 12 Dec 2013 15:46:37 -0800 (PST) |
Bison 2.7.1
Win 7
Manual 3.0
Section 10.1.1 page 157
position.hh
location.hh
The definition of the classes position and location, used for location
tracking when enabled. These files are not generated if the
%define variable api.location.type is defined. See Section 10.1.3
[C++ Location Values],page 159.
Location tracking is not enabled, the files are still generated. Is this an
issue with Bison 3.0 or is it just local to Bison 2.7.1?
Let me suggest alternate wording:
These files are generated by Bison when the %location directive
enabling location and position tracking is in the input Bison
grammar file. If the %define api.location.type {type} directive
(or %define api.location.type {class}?) directive is include
then these files are not generated. In this case the (class?)
or structure required to support location tracking is specified
by the user.
If the files are always generated, as shown in the example, then whatever
description is provided should specify what use the files have when the
%location directive is not present.
Whether the suggested alternate wording is accepted or not accepted, the
specification of the directive as "%define variable api.location.type" is
incorrect and should be changed to "%define api.location.type".
art
--- Input Bison Grammar File
%language "C++"
%start start
%token <int> TOKEN
%defines // error message if not included
%%
start : start '+' TOKEN
| TOKEN
;
%%
--- Generated files
location.hh
position.hh
stack.hh
x.tab.cc
x.tab.hh
- There are some tabs in the generated files, Arthur Schwarz, 2013/12/07
- Re: There are some tabs in the generated files, Akim Demaille, 2013/12/09
- location.hh position.hh files generated with %location directive,
Arthur Schwarz <=
- Manual corrections, Arthur Schwarz, 2013/12/13
- Java generator fatal error message, Arthur Schwarz, 2013/12/13
- api.push-pull push inconsistently defined for Java, Arthur Schwarz, 2013/12/13
- yypush_parse not fully defined, Arthur Schwarz, 2013/12/14
- api.token.constructor not described accurately,, Arthur Schwarz, 2013/12/14
- Re: api.token.constructor not described accurately,, Arthur Schwarz, 2013/12/14
- Re: Java generator fatal error message, Akim Demaille, 2013/12/15