reader: clarify variable names

* src/reader.c (grammar_rule_check_and_complete): When 'p' and 'lhs'
are aliases, prefer the latter, for clarity and consistency.
(grammar_current_rule_begin): Avoid 'p', current_rule suffices.
* src/gram.h, src/gram.c: Comment changes.

ptdr#	calc.tab.c
This commit is contained in:
Akim Demaille
2019-03-23 08:07:13 +01:00
parent 5de4e79fc8
commit ae91c3cce3
4 changed files with 19 additions and 16 deletions

View File

@@ -26,7 +26,9 @@
# include "symtab.h"
# include "named-ref.h"
/* A list of symbols, used during the parsing to store the rules. */
/* A list of symbols, used during the parsing for many different
purposes: rules, symbol declarations or properties (such as
%destructor, etc.)... */
typedef struct symbol_list
{
/**
@@ -67,9 +69,10 @@ typedef struct symbol_list
struct symbol_list *midrule_parent_rule;
int midrule_parent_rhs_index;
/* ---------------------------------------------- */
/* Apply to the rule (attached to the LHS only). */
/* ---------------------------------------------- */
/*--------------------------------------------------------------.
| Used for rules only (attached to the "LHS", one per rule even |
| when several RHSs are bound to a single lhs via "|"). |
`--------------------------------------------------------------*/
/* Precedence/associativity. */
symbol *ruleprec;