style: rename grammar_start_symbols_set as grammar_start_symbols_add

Akim Demaille <[email protected]>
Newsgroups gmane.comp.parsers.bison.patches
Message-ID <[email protected]>
commit d798851e48800f5c36c1a6be1392f465eca617a2
Author: Akim Demaille <[email protected]>
Date:   Sun Nov 22 11:18:20 2020 +0100

    style: rename grammar_start_symbols_set as grammar_start_symbols_add
    
    * src/reader.h, src/reader.c (grammar_start_symbols_set): Rename as...
    (grammar_start_symbols_add): this.
    Adjust dependencies.

diff --git a/src/parse-gram.c b/src/parse-gram.c
index 872758ce..adda86af 100644
--- a/src/parse-gram.c
+++ b/src/parse-gram.c
@@ -2189,7 +2189,7 @@ yyreduce:
 
   case 34: /* grammar_declaration: "%start" symbols.1  */
     {
-      grammar_start_symbols_set ((yyvsp[0].yykind_90));
+      grammar_start_symbols_add ((yyvsp[0].yykind_90));
     }
     break;
 
diff --git a/src/parse-gram.y b/src/parse-gram.y
index ebebd89f..3f2c0147 100644
--- a/src/parse-gram.y
+++ b/src/parse-gram.y
@@ -382,7 +382,7 @@ grammar_declaration:
   symbol_declaration
 | "%start" symbols.1
     {
-      grammar_start_symbols_set ($2);
+      grammar_start_symbols_add ($2);
     }
 | code_props_type "{...}" generic_symlist
     {
diff --git a/src/reader.c b/src/reader.c
index 7aabd835..17038b42 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -51,12 +51,9 @@ bool union_seen = false;
 /* Should rules have a default precedence?  */
 bool default_prec = true;
 
-/*-----------------------.
-| Set the start symbol.  |
-`-----------------------*/
 
 void
-grammar_start_symbols_set (symbol_list *syms)
+grammar_start_symbols_add (symbol_list *syms)
 {
   start_symbols = symbol_list_append (start_symbols, syms);
 }
diff --git a/src/reader.h b/src/reader.h
index b3431dca..c640dba0 100644
--- a/src/reader.h
+++ b/src/reader.h
@@ -49,7 +49,7 @@ extern symbol_list *start_symbols;
    foo.  */
 symbol *switching_token (const symbol *start);
 
-void grammar_start_symbols_set (symbol_list *syms);
+void grammar_start_symbols_add (symbol_list *syms);
 
 void grammar_current_rule_begin (symbol *lhs, location loc,
                                  named_ref *lhs_named_ref);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.