mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 23:03:04 +00:00
* src/gram.h (associativity): New enum type which replaces the
former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with `right_assoc', `left_assoc' and `non_assoc'. Adjust all dependencies. * src/reader.c: Formatting changes. (LTYPESTR): Don't define it, use it as a literal in `reader_output_yylsp'. * src/symtab.h (symbol_class): New enum type which replaces the former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with `sunknown', `stoken and `snterm'.
This commit is contained in:
14
src/symtab.h
14
src/symtab.h
@@ -20,14 +20,18 @@
|
||||
|
||||
#ifndef SYMTAB_H_
|
||||
# define SYMTAB_H_
|
||||
# include "gram.h"
|
||||
|
||||
#define TABSIZE 1009
|
||||
|
||||
/* symbol classes */
|
||||
|
||||
#define SUNKNOWN 0
|
||||
#define STOKEN 1 /* terminal symbol */
|
||||
#define SNTERM 2 /* non-terminal */
|
||||
typedef enum
|
||||
{
|
||||
unknown_sym,
|
||||
token_sym, /* terminal symbol */
|
||||
nterm_sym /* non-terminal */
|
||||
} symbol_class;
|
||||
|
||||
#define SALIAS -9991 /* for symbol generated with an alias */
|
||||
|
||||
@@ -39,13 +43,13 @@ typedef struct bucket
|
||||
char *type_name;
|
||||
short value;
|
||||
short prec;
|
||||
short assoc;
|
||||
associativity assoc;
|
||||
short user_token_number;
|
||||
/* special value SALIAS in the identifier half of the
|
||||
identifier-symbol pair for an alias */
|
||||
struct bucket *alias;
|
||||
/* points to the other in the identifier-symbol pair for an alias */
|
||||
char class;
|
||||
symbol_class class;
|
||||
}
|
||||
bucket;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user