Files
bison/examples
Akim Demaille 3eb9042a30 c++: introduce api.value.automove
Based on work by Frank Heckenbach.
See http://lists.gnu.org/archive/html/bug-bison/2018-04/msg00000.html
and http://lists.gnu.org/archive/html/bug-bison/2018-09/msg00019.html.

* data/lalr1.cc (b4_rhs_value): Use YY_MOVE api.rhs.automove is set.
* doc/bison.texi (%define Summary): Document api.rhs.automove.
* examples/variant-11.yy: Use it.

* tests/local.at (AT_AUTOMOVE_IF): New.
* tests/c++.at (Variants): Check move semantics.
2018-09-22 09:49:46 +02:00
..
2018-09-13 19:01:33 +02:00
2018-09-13 19:01:33 +02:00
2018-09-13 19:01:33 +02:00

This directory contains examples of Bison grammar files.

* mfcalc
A C example of a multi-function calculator.  Extracted from the
documentation.

* calc++
A C++ version of the canonical example for parsers: a calculator.  Also uses
Flex for the scanner.  Extracted from the documentation.

* variant.yy
A C++ example that uses variants (they allow to use any C++ type as semantic
value type) and symbol constructors (they ensure consistency between
declared token type and effective semantic value).

* variant-11.yy
Another C++ example, closely related to the previous one, but exhibiting
support for C++11's move semantics.

-----

Local Variables:
mode: outline
fill-column: 76
End:

Copyright (C) 2018 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts.  A copy of the license is included in the "GNU Free
Documentation License" file as part of this distribution.

# LocalWords:  mfcalc calc parsers yy