version 1.16, 2014/01/10 23:01:29 |
version 1.17, 2014/03/08 01:05:39 |
|
|
/* the structure of a symbol table entry */ |
/* the structure of a symbol table entry */ |
|
|
typedef struct bucket bucket; |
typedef struct bucket bucket; |
struct bucket |
struct bucket { |
{ |
struct bucket *link; |
struct bucket *link; |
struct bucket *next; |
struct bucket *next; |
char *name; |
char *name; |
char *tag; |
char *tag; |
short value; |
short value; |
short index; |
short index; |
short prec; |
short prec; |
char class; |
char class; |
char assoc; |
char assoc; |
|
}; |
}; |
|
|
|
|
/* the structure of the LR(0) state machine */ |
/* the structure of the LR(0) state machine */ |
|
|
typedef struct core core; |
typedef struct core core; |
struct core |
struct core { |
{ |
struct core *next; |
struct core *next; |
struct core *link; |
struct core *link; |
short number; |
short number; |
short accessing_symbol; |
short accessing_symbol; |
short nitems; |
short nitems; |
short items[1]; |
short items[1]; |
|
}; |
}; |
|
|
|
|
/* the structure used to record shifts */ |
/* the structure used to record shifts */ |
|
|
typedef struct shifts shifts; |
typedef struct shifts shifts; |
struct shifts |
struct shifts { |
{ |
struct shifts *next; |
struct shifts *next; |
short number; |
short number; |
short nshifts; |
short nshifts; |
short shift[1]; |
short shift[1]; |
|
}; |
}; |
|
|
|
|
/* the structure used to store reductions */ |
/* the structure used to store reductions */ |
|
|
typedef struct reductions reductions; |
typedef struct reductions reductions; |
struct reductions |
struct reductions { |
{ |
struct reductions *next; |
struct reductions *next; |
short number; |
short number; |
short nreds; |
short nreds; |
short rules[1]; |
short rules[1]; |
|
}; |
}; |
|
|
|
|
/* the structure used to represent parser actions */ |
/* the structure used to represent parser actions */ |
|
|
typedef struct action action; |
typedef struct action action; |
struct action |
struct action { |
{ |
struct action *next; |
struct action *next; |
short symbol; |
short symbol; |
short number; |
short number; |
short prec; |
short prec; |
char action_code; |
char action_code; |
char assoc; |
char assoc; |
char suppressed; |
char suppressed; |
|
}; |
}; |
|
|
|
|