|
Berkeley YACC
1993-03-03
Berkeley's version of Yet Another Compiler Compiler
|
#include "defs.h"
Include dependency graph for lalr.c:Go to the source code of this file.
Data Structures | |
| struct | shorts |
Typedefs | |
| typedef struct shorts | shorts |
Functions | |
| short ** | transpose () |
| lalr () | |
| set_state_table () | |
| set_accessing_symbol () | |
| set_shift_table () | |
| set_reduction_table () | |
| set_maxrhs () | |
| initialize_LA () | |
| set_goto_map () | |
| int | map_goto (int state, int symbol) |
| initialize_F () | |
| build_relations () | |
| add_lookback_edge (int stateno, int ruleno, int gotono) | |
| short ** | transpose (short **R, int n) |
| compute_FOLLOWS () | |
| compute_lookaheads () | |
| digraph (short **relation) | |
| traverse (int i) | |
Variables | |
| int | tokensetsize |
| short * | lookaheads |
| short * | LAruleno |
| unsigned * | LA |
| short * | accessing_symbol |
| core ** | state_table |
| shifts ** | shift_table |
| reductions ** | reduction_table |
| short * | goto_map |
| short * | from_state |
| short * | to_state |
| static int | infinity |
| static int | maxrhs |
| static int | ngotos |
| static unsigned * | F |
| static short ** | includes |
| static shorts ** | lookback |
| static short ** | R |
| static short * | INDEX |
| static short * | VERTICES |
| static int | top |
| add_lookback_edge | ( | int | stateno, |
| int | ruleno, | ||
| int | gotono | ||
| ) |
Definition at line 432 of file lalr.c.
References LAruleno, lookaheads, NEW, shorts::next, and shorts::value.
Referenced by build_relations().
Here is the caller graph for this function:| build_relations | ( | ) |
Definition at line 340 of file lalr.c.
References accessing_symbol, add_lookback_edge(), derives, done(), FREE, from_state, includes, ISVAR, map_goto(), maxrhs, NEW2, ngotos, shifts::nshifts, nullable, ritem, rrhs, shifts::shift, to_state, and transpose().
Referenced by lalr().
Here is the call graph for this function:
Here is the caller graph for this function:| compute_FOLLOWS | ( | ) |
| compute_lookaheads | ( | ) |
Definition at line 523 of file lalr.c.
References F, FREE, LA, lookaheads, shorts::next, nstates, tokensetsize, and shorts::value.
Referenced by lalr().
Here is the caller graph for this function:| digraph | ( | short ** | relation | ) |
Definition at line 557 of file lalr.c.
References FREE, INDEX, infinity, NEW2, ngotos, R, top, traverse(), and VERTICES.
Referenced by compute_FOLLOWS(), and initialize_F().
Here is the call graph for this function:
Here is the caller graph for this function:| initialize_F | ( | ) |
Definition at line 263 of file lalr.c.
References accessing_symbol, digraph(), F, FREE, ISVAR, map_goto(), NEW2, ngotos, shifts::nshifts, nullable, SETBIT, shifts::shift, to_state, and tokensetsize.
Referenced by lalr().
Here is the call graph for this function:
Here is the caller graph for this function:| initialize_LA | ( | ) |
Definition at line 128 of file lalr.c.
References LA, LAruleno, lookaheads, NEW2, reductions::nreds, nstates, reductions::rules, and tokensetsize.
Referenced by lalr().
Here is the caller graph for this function:| lalr | ( | ) |
Definition at line 37 of file lalr.c.
References build_relations(), compute_FOLLOWS(), compute_lookaheads(), initialize_F(), initialize_LA(), ntokens, set_accessing_symbol(), set_goto_map(), set_maxrhs(), set_reduction_table(), set_shift_table(), set_state_table(), tokensetsize, and WORDSIZE.
Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:| int map_goto | ( | int | state, |
| int | symbol | ||
| ) |
Definition at line 235 of file lalr.c.
References from_state, goto_map, and high.
Referenced by build_relations(), and initialize_F().
Here is the caller graph for this function:| set_accessing_symbol | ( | ) |
Definition at line 67 of file lalr.c.
References accessing_symbol, core::accessing_symbol, first_state, NEW2, core::next, nstates, and core::number.
Referenced by lalr().
Here is the caller graph for this function:| set_goto_map | ( | ) |
Definition at line 165 of file lalr.c.
References accessing_symbol, fatal(), first_shift, FREE, from_state, goto_map, ISTOKEN, MAXSHORT, NEW2, shifts::next, ngotos, shifts::nshifts, nsyms, ntokens, shifts::number, nvars, shifts::shift, and to_state.
Referenced by lalr().
Here is the call graph for this function:
Here is the caller graph for this function:| set_maxrhs | ( | ) |
| set_reduction_table | ( | ) |
Definition at line 89 of file lalr.c.
References first_reduction, NEW2, reductions::next, nstates, and reductions::number.
Referenced by lalr().
Here is the caller graph for this function:| set_shift_table | ( | ) |
Definition at line 78 of file lalr.c.
References first_shift, NEW2, shifts::next, nstates, and shifts::number.
Referenced by lalr().
Here is the caller graph for this function:| set_state_table | ( | ) |
Definition at line 56 of file lalr.c.
References first_state, NEW2, core::next, nstates, and core::number.
Referenced by lalr().
Here is the caller graph for this function:| short** transpose | ( | ) |
| traverse | ( | int | i | ) |
| short* accessing_symbol |
Definition at line 15 of file lalr.c.
Referenced by build_relations(), find_final_state(), get_shifts(), initialize_F(), output_actions(), print_actions(), print_gotos(), set_accessing_symbol(), and set_goto_map().
|
static |
Definition at line 28 of file lalr.c.
Referenced by compute_lookaheads(), initialize_F(), and traverse().
| short* from_state |
Definition at line 20 of file lalr.c.
Referenced by build_relations(), map_goto(), output_actions(), save_column(), and set_goto_map().
| short* goto_map |
Definition at line 19 of file lalr.c.
Referenced by default_goto(), map_goto(), output_actions(), save_column(), and set_goto_map().
|
static |
Definition at line 29 of file lalr.c.
Referenced by build_relations(), and compute_FOLLOWS().
|
static |
Definition at line 32 of file lalr.c.
Referenced by digraph(), and traverse().
|
static |
Definition at line 25 of file lalr.c.
Referenced by digraph(), and traverse().
| unsigned* LA |
Definition at line 14 of file lalr.c.
Referenced by add_reductions(), compute_lookaheads(), initialize_LA(), and output_actions().
| short* LAruleno |
Definition at line 13 of file lalr.c.
Referenced by add_lookback_edge(), add_reductions(), initialize_LA(), and output_actions().
| short* lookaheads |
Definition at line 12 of file lalr.c.
Referenced by add_lookback_edge(), add_reductions(), compute_lookaheads(), initialize_LA(), and output_actions().
|
static |
Definition at line 26 of file lalr.c.
Referenced by build_relations(), and set_maxrhs().
|
static |
Definition at line 27 of file lalr.c.
Referenced by build_relations(), digraph(), initialize_F(), and set_goto_map().
|
static |
Definition at line 31 of file lalr.c.
Referenced by digraph(), reflexive_transitive_closure(), transitive_closure(), and traverse().
| reductions** reduction_table |
Definition at line 18 of file lalr.c.
Referenced by free_reductions().
| shifts** shift_table |
Definition at line 17 of file lalr.c.
Referenced by find_final_state(), free_shifts(), get_shifts(), print_actions(), and print_gotos().
| core** state_table |
Definition at line 16 of file lalr.c.
Referenced by free_itemsets(), and print_core().
| short* to_state |
Definition at line 21 of file lalr.c.
Referenced by build_relations(), default_goto(), find_final_state(), get_shifts(), initialize_F(), output_actions(), print_gotos(), save_column(), and set_goto_map().
| int tokensetsize |
Definition at line 11 of file lalr.c.
Referenced by add_reductions(), compute_lookaheads(), initialize_F(), initialize_LA(), lalr(), and traverse().
|
static |
Definition at line 34 of file lalr.c.
Referenced by digraph(), and traverse().
|
static |
Definition at line 33 of file lalr.c.
Referenced by digraph(), and traverse().