bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: %destructor feedback


From: Akim Demaille
Subject: Re: %destructor feedback
Date: Thu, 05 Jan 2006 14:38:24 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

>>> "Paul" == Paul Eggert <address@hidden> writes:

 > Akim Demaille <address@hidden> writes:
 >> Paul, in English you'd write mid-rule action, right?

 > Yes.

 >> And in code? mid_rule, midrule?

 > Either would be fine.  Currently the code uses both spellings (in
 > different contexts), which is confusing.  I mildly prefer "midrule" as
 > it's shorter and combines better with other things, e.g.,
 > "grammar_midrule_action" is slightly easier to read than
 > "grammar_mid_rule_action".

OK, done.

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.

Index: src/reader.c
===================================================================
RCS file: /cvsroot/bison/bison/src/reader.c,v
retrieving revision 1.246
diff -u -u -r1.246 reader.c
--- src/reader.c 4 Jan 2006 09:18:37 -0000 1.246
+++ src/reader.c 5 Jan 2006 13:38:41 -0000
@@ -221,7 +221,7 @@
 symbol_typed_p (const symbol_list *s)
 {
   return (s->sym->type_name
-         || s->mid_rule && s->mid_rule->used);
+         || s->midrule && s->midrule->used);
 }
 
 /*----------------------------------------------------------------.
@@ -341,7 +341,7 @@
   /* Insert the dummy nonterminal replacing the midrule action into
      the current rule.  Bind it to its dedicated rule.  */
   grammar_current_rule_symbol_append (dummy, dummy_location);
-  grammar_end->mid_rule = midrule;
+  grammar_end->midrule = midrule;
 }
 
 /* Set the precedence symbol of the current rule to PRECSYM. */
Index: src/symlist.c
===================================================================
RCS file: /cvsroot/bison/bison/src/symlist.c,v
retrieving revision 1.16
diff -u -u -r1.16 symlist.c
--- src/symlist.c 4 Jan 2006 09:18:37 -0000 1.16
+++ src/symlist.c 5 Jan 2006 13:38:41 -0000
@@ -38,7 +38,7 @@
   res->sym = sym;
   res->location = loc;
 
-  res->mid_rule = NULL;
+  res->midrule = NULL;
 
   res->action = NULL;
   res->used = false;
Index: src/symlist.h
===================================================================
RCS file: /cvsroot/bison/bison/src/symlist.h,v
retrieving revision 1.13
diff -u -u -r1.13 symlist.h
--- src/symlist.h 4 Jan 2006 09:18:37 -0000 1.13
+++ src/symlist.h 5 Jan 2006 13:38:41 -0000
@@ -34,7 +34,7 @@
 
   /* If this symbol is the generated lhs for a mid-rule, a pointer to
      that mid-rule.  */
-  struct symbol_list *mid_rule;
+  struct symbol_list *midrule;
 
   /* The action is attached to the LHS of a rule. */
   const char *action;






reply via email to

[Prev in Thread] Current Thread [Next in Thread]