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