m4_define([b4_comment],
[b4_comment_([$1], [$2// ], [$2// ])])
+## -------- ##
+## Checks. ##
+## -------- ##
+
+b4_percent_define_check_kind([api.namespace], [code], [deprecated])
+b4_percent_define_check_kind([parser_class_name], [code], [deprecated])
## ---------------- ##
## Default values. ##
# b4_percent_define_default([[api.location.type]], [[location]])
b4_percent_define_default([[filename_type]], [[std::string]])
+# Make it a warning for those who used betas of Bison 3.0.
b4_percent_define_default([[api.namespace]], m4_defn([b4_prefix]))
b4_percent_define_default([[global_tokens_and_yystype]], [[false]])
## Semantic Values. ##
## ----------------- ##
-# b4_semantic_type_declare
-# ------------------------
+
+
+# b4_value_type_declare
+# ---------------------
# Declare semantic_type.
-m4_define([b4_semantic_type_declare],
+m4_define([b4_value_type_declare],
+[b4_value_type_setup[]dnl
[ /// Symbol semantic values.
-m4_ifdef([b4_union_members],
-[ union semantic_type
+]m4_bmatch(b4_percent_define_get_kind([[api.value.type]]),
+[code],
+[[ typedef ]b4_percent_define_get([[api.value.type]])[ semantic_type;]],
+[m4_bmatch(b4_percent_define_get([[api.value.type]]),
+[union\|union-directive],
+[[ union semantic_type
{
-b4_user_union_members
- };],
-[m4_if(b4_tag_seen_flag, 0,
-[[ typedef int semantic_type;]],
-[[ typedef ]b4_api_PREFIX[STYPE semantic_type;]])])])
+ ]b4_user_union_members[
+ };]])])dnl
+])
# b4_public_types_declare
# Depending on %define token_lex, may be output in the header or source file.
m4_define([b4_public_types_declare],
[[#ifndef ]b4_api_PREFIX[STYPE
-]b4_semantic_type_declare[
+]b4_value_type_declare[
#else
typedef ]b4_api_PREFIX[STYPE semantic_type;
#endif]b4_locations_if([