mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
doc: c++: promote api.token.raw
* doc/bison.texi (Calc++ Parser): Here.
This commit is contained in:
@@ -12236,13 +12236,24 @@ designed the grammar for.
|
|||||||
%defines
|
%defines
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
@noindent
|
||||||
|
@findex %define api.token.raw
|
||||||
|
Because our scanner returns only genuine tokens and never simple characters
|
||||||
|
(i.e., it returns @samp{PLUS}, not @samp{'+'}), we can avoid conversions.
|
||||||
|
|
||||||
|
@comment file: calc++/parser.yy
|
||||||
|
@example
|
||||||
|
%define api.token.raw
|
||||||
|
@end example
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
@findex %define api.token.constructor
|
@findex %define api.token.constructor
|
||||||
@findex %define api.value.type variant
|
@findex %define api.value.type variant
|
||||||
This example will use genuine C++ objects as semantic values, therefore, we
|
This example uses genuine C++ objects as semantic values, therefore, we
|
||||||
require the variant-based interface. To make sure we properly use it, we
|
require the variant-based storage of semantic values. To make sure we
|
||||||
enable assertions. To fully benefit from type-safety and more natural
|
properly use it, we enable assertions. To fully benefit from type-safety
|
||||||
definition of ``symbol'', we enable @code{api.token.constructor}.
|
and more natural definition of ``symbol'', we enable
|
||||||
|
@code{api.token.constructor}.
|
||||||
|
|
||||||
@comment file: calc++/parser.yy
|
@comment file: calc++/parser.yy
|
||||||
@example
|
@example
|
||||||
|
|||||||
Reference in New Issue
Block a user