21 |
#ifndef LALR_H_ |
#ifndef LALR_H_ |
22 |
# define LALR_H_ |
# define LALR_H_ |
23 |
|
|
24 |
# include "bitset.h" |
# include <bitset.h> |
25 |
# include "bitsetv.h" |
# include <bitsetv.h> |
|
|
|
|
/* Import the definition of CORE, TRANSITIONS and REDUCTIONS. */ |
|
|
# include "state.h" |
|
26 |
|
|
27 |
/* Import the definition of RULE_T. */ |
/* Import the definition of RULE_T. */ |
28 |
# include "gram.h" |
# include "gram.h" |
29 |
|
|
30 |
|
/* Import the definition of CORE, TRANSITIONS and REDUCTIONS. */ |
31 |
|
# include "state.h" |
32 |
|
|
33 |
/* Compute how to make the finite state machine deterministic; find |
/* Compute how to make the finite state machine deterministic; find |
34 |
which rules need lookahead in each state, and which lookahead |
which rules need lookahead in each state, and which lookahead |
35 |
tokens they accept. */ |
tokens they accept. */ |
54 |
together and GOTO_MAP[I - NTOKENS] is the index in FROM_STATE and |
together and GOTO_MAP[I - NTOKENS] is the index in FROM_STATE and |
55 |
TO_STATE of the first of them. */ |
TO_STATE of the first of them. */ |
56 |
|
|
57 |
typedef short goto_number_t; |
typedef short goto_number; |
58 |
# define GOTO_NUMBER_MAX ((goto_number_t) SHRT_MAX) |
# define GOTO_NUMBER_MAXIMUM SHRT_MAX |
59 |
|
|
60 |
extern goto_number_t *goto_map; |
extern goto_number *goto_map; |
61 |
extern state_number_t *from_state; |
extern state_number *from_state; |
62 |
extern state_number_t *to_state; |
extern state_number *to_state; |
63 |
|
|
64 |
|
|
65 |
#endif /* !LALR_H_ */ |
#endif /* !LALR_H_ */ |