21 |
#ifndef READER_H_ |
#ifndef READER_H_ |
22 |
# define READER_H_ |
# define READER_H_ |
23 |
|
|
24 |
# include "location.h" |
# include "symlist.h" |
|
|
|
|
typedef struct symbol_list |
|
|
{ |
|
|
struct symbol_list *next; |
|
|
symbol_t *sym; |
|
|
location_t location; |
|
|
|
|
|
/* The action is attached to the LHS of a rule. */ |
|
|
const char *action; |
|
|
location_t action_location; |
|
|
|
|
|
symbol_t *ruleprec; |
|
|
} symbol_list; |
|
|
|
|
|
symbol_list *symbol_list_new PARAMS ((symbol_t *sym, location_t location)); |
|
|
symbol_list *symbol_list_prepend PARAMS ((symbol_list *list, |
|
|
symbol_t *sym, location_t location)); |
|
|
|
|
25 |
# include "parse-gram.h" |
# include "parse-gram.h" |
26 |
|
|
27 |
typedef struct gram_control_s |
typedef struct gram_control_s |
48 |
location_t *loc, const char *msg); |
location_t *loc, const char *msg); |
49 |
int gram_parse (void *control); |
int gram_parse (void *control); |
50 |
|
|
|
char *get_type_name PARAMS ((int n, symbol_list *rule)); |
|
51 |
extern int typed; |
extern int typed; |
52 |
|
|
53 |
/* From reader.c. */ |
/* From reader.c. */ |
63 |
location_t l)); |
location_t l)); |
64 |
void grammar_current_rule_action_append PARAMS ((const char *action, |
void grammar_current_rule_action_append PARAMS ((const char *action, |
65 |
location_t l)); |
location_t l)); |
66 |
extern symbol_list *current_rule; |
extern symbol_list_t *current_rule; |
67 |
void reader PARAMS ((void)); |
void reader PARAMS ((void)); |
68 |
|
|
69 |
#endif /* !READER_H_ */ |
#endif /* !READER_H_ */ |