api.value.type: implement proper support, check, and document

* data/c.m4 (b4_symbol_type_register, b4_type_define_tag)
(b4_symbol_value_union, b4_value_type_setup_union)
(b4_value_type_setup_variant, b4_value_type_setup):
New.
(b4_value_type_define): Use it to set up properly the type.
Handle the various possible values of api.value.type.
* data/c++.m4 (b4_value_type_declare): Likewise.
* data/lalr1.cc (b4_value_type_setup_variant): Redefine.

* tests/types.at: New.
Exercise all the C/C++ skeletons with different types of
api.value.type values.
* tests/local.mk, tests/testsuite.at: Use it.

* doc/bison.texi (%define Summary): Document api.value.type.
* NEWS: Advertise it, together with api.token.constructor.
This commit is contained in:
Akim Demaille
2013-02-08 17:17:33 +01:00
parent dde95ca432
commit 6574576cfb
9 changed files with 463 additions and 25 deletions

View File

@@ -35,6 +35,9 @@ m4_include([sets.at])
# Testing grammar reduction.
m4_include([reduce.at])
# Testing conflicts detection and resolution.
m4_include([conflicts.at])
# Testing that #lines are correct.
m4_include([synclines.at])
@@ -44,8 +47,8 @@ m4_include([headers.at])
# Testing that user actions are properly performed.
m4_include([actions.at])
# Testing conflicts detection and resolution.
m4_include([conflicts.at])
# Testing semantic types support.
m4_include([types.at])
# Fulling testing (compilation and execution of the parser) on calc.
m4_include([calc.at])