[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Manual changes for api.prefix
From: |
Arthur Schwarz |
Subject: |
Manual changes for api.prefix |
Date: |
Fri, 13 Dec 2013 13:47:55 -0800 |
Section 3.7.13 page 87
%define api.prefix {prefix} should be %define api.prefix prefix
Language C yy strings renamed
Language C++ namespaces in *.hh and *.cc renamed. yy strings unaffected.
Language Java can't get the fool thing to work.
Section 3.8 page 94
yytokentype missing from the enumeration.
I believe that 3.8 Multiple Parsers in Same Program only affects C and Java
and C++ differently. Most particularly in C++ and Java multiple instances of
the same parser need no additional support, whereas in C they do. And in all
the languages multiple different parsers need renaming, hence api.prefix,
and should be separately mentioned. The title should reflect this
distinction.
Sample code
--- code ---
%language "C++"
//%define api.position.type Class
%define api.prefix calc
%locations
%start start
%token <int> TOKEN
%defines // error message if not included
%%
start : start '+' TOKEN { int a = @3.line; }
| TOKEN
;
%%
--- end code ---
commands used to ferret changes:
grep calc *.hh *.cc | sort -fu
files attached with changes
Cdiff
Description: Binary data
C++diff
Description: Binary data
- Manual changes for api.prefix,
Arthur Schwarz <=