mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* examples/variant-11.test examples/variant-11.yy, * examples/variant.test examples/variant.yy: Move into examples/c++/. * examples/c++/README: New. * examples/README, examples/c++/local.mk, examples/local.mk: Adjust.
39 lines
1.3 KiB
Plaintext
39 lines
1.3 KiB
Plaintext
This directory contains examples of Bison grammar files in C++.
|
|
|
|
* Examples in C++
|
|
|
|
** simple.yy - Simple example in C++14
|
|
A very simple example in C++, based on variants and symbol constructors.
|
|
Variants allow to use any C++ type as semantic value type, and symbol
|
|
constructors ensure consistency between declared token type and effective
|
|
semantic value.
|
|
|
|
Extracted from the documentation: "A Simple C++ Example".
|
|
https://www.gnu.org/software/bison/manual/html_node/A-Simple-C_002b_002b-Example.html
|
|
|
|
** variant.yy - Self-contained example in C++98
|
|
A varition of simple.yy, in C++98.
|
|
|
|
** variant-11.yy - Self-contained example in modern C++
|
|
Another variation of simple.yy, 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
|