mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 15:23:02 +00:00
* src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
bucket. Adjust all dependencies. * src/reduce.c (nonterminals_reduce): Don't forget to renumber the `number' of the buckets too. * src/gram.h: Include `symtab.h'. (associativity): Move to... * src/symtab.h: here. No longer include `gram.h'.
This commit is contained in:
12
src/gram.h
12
src/gram.h
@@ -98,6 +98,7 @@
|
||||
|
||||
Associativities are recorded similarly in SYMBOLS[I]->assoc. */
|
||||
|
||||
#include "symtab.h"
|
||||
|
||||
#define ISTOKEN(s) ((s) < ntokens)
|
||||
#define ISVAR(s) ((s) >= ntokens)
|
||||
@@ -113,22 +114,13 @@ extern int nritems;
|
||||
|
||||
extern int start_symbol;
|
||||
|
||||
/* Associativity values for tokens and rules. */
|
||||
typedef enum
|
||||
{
|
||||
right_assoc,
|
||||
left_assoc,
|
||||
non_assoc
|
||||
} associativity;
|
||||
|
||||
|
||||
typedef struct rule_s
|
||||
{
|
||||
/* The number of the rule in the source. It is usually the index in
|
||||
RULES too, except if there are useless rules. */
|
||||
short number;
|
||||
|
||||
short lhs;
|
||||
bucket *lhs;
|
||||
short *rhs;
|
||||
short prec;
|
||||
short precsym;
|
||||
|
||||
Reference in New Issue
Block a user