]> git.saurik.com Git - bison.git/commitdiff
style: rename internal "stype" as "union_members" for clarity
authorAkim Demaille <akim@lrde.epita.fr>
Mon, 4 Feb 2013 17:35:51 +0000 (18:35 +0100)
committerAkim Demaille <akim@lrde.epita.fr>
Mon, 4 Feb 2013 17:45:21 +0000 (18:45 +0100)
"stype" is quite unclear, and it also collides with the former %define
variable that had the same name (replaced by api.value.type).

* src/parse-gram.y (stype): Rename as...
(union_members): this.
* data/bison.m4: Adjust.
(b4_user_stype): Rename as...
(b4_user_union_members): this.
* data/c++.m4, data/c.m4: Adjust.
* src/parse-gram.c: regen.

data/bison.m4
data/c++.m4
data/c.m4
src/parse-gram.c
src/parse-gram.y

index 704f172eb0e7efc0ed3cb40b35868a5b321e491a..d01124bb486f936a88e126016ab4616d70fd3300 100644 (file)
@@ -577,14 +577,14 @@ m4_define([b4_define_user_code],
 # b4_user_initial_action
 # b4_user_post_prologue
 # b4_user_pre_prologue
-# b4_user_stype
+# b4_user_union_members
 # ----------------------
 # Macros that issue user code, ending with synclines.
 b4_define_user_code([actions])
 b4_define_user_code([initial_action])
 b4_define_user_code([post_prologue])
 b4_define_user_code([pre_prologue])
-b4_define_user_code([stype])
+b4_define_user_code([union_members])
 
 
 # b4_check_user_names(WHAT, USER-LIST, BISON-NAMESPACE)
index 7e00aad994f1c04f30658bb9c190e5f4b5e0522a..b034a4a629e66bb33f5d980e26d982b5917544c0 100644 (file)
@@ -117,10 +117,10 @@ m4_define([b4_token_enums],
 # Declare semantic_type.
 m4_define([b4_semantic_type_declare],
 [    /// Symbol semantic values.
-m4_ifdef([b4_stype],
+m4_ifdef([b4_union_members],
 [    union semantic_type
     {
-b4_user_stype
+b4_user_union_members
     };],
 [m4_if(b4_tag_seen_flag, 0,
 [[    typedef int semantic_type;]],
index 3ddaa112d6dda8700226914df2bbe5e36d1ca3d5..f145c737055823425fb51aca40c223ce17ee04ed 100644 (file)
--- a/data/c.m4
+++ b/data/c.m4
@@ -501,11 +501,11 @@ b4_locations_if([, yylocationp])[]b4_user_args[);
 m4_define([b4_value_type_define],
 [[/* Value type.  */
 #if ! defined ]b4_api_PREFIX[STYPE && ! defined ]b4_api_PREFIX[STYPE_IS_DECLARED
-]m4_ifdef([b4_stype],
+]m4_ifdef([b4_union_members],
 [[typedef union ]b4_union_name[ ]b4_api_PREFIX[STYPE;
 union ]b4_union_name[
 {
-]b4_user_stype[
+]b4_user_union_members[
 };
 # define ]b4_api_PREFIX[STYPE_IS_TRIVIAL 1]],
 [m4_if(b4_tag_seen_flag, 0,
index 301a0f62f8ddfd33f915c754abda0224a100eb0d..cc42b0d07a53df8d94ba8a5fb5f976eba49f4482 100644 (file)
@@ -2349,7 +2349,7 @@ yyreduce:
 #line 439 "src/parse-gram.y" /* yacc.c:1669  */
     {
       union_seen = true;
-      muscle_code_grow ("stype", (yyvsp[0].chars), (yylsp[0]));
+      muscle_code_grow ("union_members", (yyvsp[0].chars), (yylsp[0]));
       code_scanner_last_string_free ();
     }
 #line 2356 "src/parse-gram.c" /* yacc.c:1669  */
index 0fd4687e412d7e756b53b114afd42a9ffcd3bf45..2c84cb1c525b6d62ca83c97de556baa84d83beb7 100644 (file)
@@ -438,7 +438,7 @@ grammar_declaration:
   "%union" union_name braceless
     {
       union_seen = true;
-      muscle_code_grow ("stype", $3, @3);
+      muscle_code_grow ("union_members", $3, @3);
       code_scanner_last_string_free ();
     }
 ;