lalr.c File Reference

#include "defs.h"

Include dependency graph for lalr.c:

Go to the source code of this file.

Data Structures

struct  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


Function Documentation

add_lookback_edge int  stateno,
int  ruleno,
int  gotono
 

Definition at line 432 of file lalr.c.

References assert, LAruleno, lookaheads, lookback, NEW, and sp.

build_relations  ) 
 

Definition at line 340 of file lalr.c.

References accessing_symbol, derives, done, from_state, i, if(), includes, j, length, maxrhs, NEW2, ritem, rrhs, shift_table, sp, states, and to_state.

Referenced by lalr().

compute_FOLLOWS  ) 
 

Definition at line 517 of file lalr.c.

References digraph(), and includes.

Referenced by lalr().

compute_lookaheads  ) 
 

Definition at line 523 of file lalr.c.

References F, i, LA, lookaheads, lookback, next, nstates, sp, and tokensetsize.

Referenced by lalr().

digraph short **  relation  ) 
 

Definition at line 557 of file lalr.c.

References i, INDEX, infinity, NEW2, R, top, traverse(), and VERTICES.

Referenced by compute_FOLLOWS().

initialize_F  ) 
 

Definition at line 263 of file lalr.c.

References accessing_symbol, F, i, if(), ISVAR, j, k, NEW2, ngotos, SETBIT, shift_table, sp, to_state, and tokensetsize.

Referenced by lalr().

initialize_LA  ) 
 

Definition at line 128 of file lalr.c.

References i, j, k, lookaheads, NEW2, reductions::nreds, nstates, and reduction_table.

Referenced by lalr().

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().

int map_goto int  state,
int  symbol
 

Definition at line 235 of file lalr.c.

References assert, from_state, goto_map, high, and s.

set_accessing_symbol  ) 
 

Definition at line 67 of file lalr.c.

References accessing_symbol, first_state, NEW2, nstates, and sp.

Referenced by lalr().

set_goto_map  ) 
 

Definition at line 165 of file lalr.c.

References accessing_symbol, fatal(), first_shift, goto_map, i, if(), ISTOKEN, k, MAXSHORT, NEW2, ngotos, ntokens, nvars, and sp.

Referenced by lalr().

set_maxrhs  ) 
 

Definition at line 100 of file lalr.c.

References length, max, nitems, and ritem.

Referenced by lalr().

set_reduction_table  ) 
 

Definition at line 89 of file lalr.c.

References first_reduction, NEW2, reductions::next, nstates, reductions::number, and reduction_table.

Referenced by lalr().

set_shift_table  ) 
 

Definition at line 78 of file lalr.c.

References first_shift, NEW2, nstates, shift_table, and sp.

Referenced by lalr().

set_state_table  ) 
 

Definition at line 56 of file lalr.c.

References first_state, NEW2, nstates, sp, and state_table.

Referenced by lalr().

short** transpose short **  R,
int  n
 

Definition at line 460 of file lalr.c.

References NEW2, and sp.

short** transpose  ) 
 

Definition at line 1183 of file editline.c.

References c, CHAR, CSmove, CSstay, End, left(), and TTYshow().

Referenced by encrypt(), f(), and setkey().

traverse int  i  ) 
 

Definition at line 584 of file lalr.c.

References base, F, INDEX, infinity, j, R, tokensetsize, top, and VERTICES.

Referenced by digraph(), mkdifferences(), and mkstatefile().


Variable Documentation

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().

unsigned* F [static]
 

Definition at line 28 of file lalr.c.

Referenced by compute_lookaheads(), Field(), initialize_F(), Macro(), nr_UL(), and traverse().

short* from_state
 

Definition at line 20 of file lalr.c.

Referenced by build_relations(), map_goto(), and output_actions().

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().

short** includes [static]
 

Definition at line 29 of file lalr.c.

Referenced by build_relations(), and compute_FOLLOWS().

short* INDEX [static]
 

Definition at line 32 of file lalr.c.

int infinity [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(), and output_actions().

short* LAruleno
 

Definition at line 13 of file lalr.c.

Referenced by add_lookback_edge(), add_reductions(), 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().

shorts** lookback [static]
 

Definition at line 30 of file lalr.c.

Referenced by add_lookback_edge(), and compute_lookaheads().

int maxrhs [static]
 

Definition at line 26 of file lalr.c.

Referenced by build_relations().

int ngotos [static]
 

Definition at line 27 of file lalr.c.

Referenced by initialize_F(), and set_goto_map().

short** R [static]
 

Definition at line 31 of file lalr.c.

reductions** reduction_table
 

Definition at line 18 of file lalr.c.

Referenced by free_reductions(), initialize_LA(), and set_reduction_table().

shifts** shift_table
 

Definition at line 17 of file lalr.c.

Referenced by build_relations(), find_final_state(), free_shifts(), get_shifts(), initialize_F(), print_actions(), print_gotos(), and set_shift_table().

core** state_table
 

Definition at line 16 of file lalr.c.

Referenced by free_itemsets(), print_core(), and set_state_table().

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(), and save_column().

int tokensetsize
 

Definition at line 11 of file lalr.c.

Referenced by add_reductions(), compute_lookaheads(), initialize_F(), lalr(), and traverse().

int top [static]
 

Definition at line 34 of file lalr.c.

Referenced by cmdloop(), d_fgoloff(), digraph(), f_do_open(), freearea(), freeset(), freezeset(), garbage(), glob1(), gnu_sort(), main(), nxdomain(), SetUpScreen(), sortsyms(), traverse(), and upd_wind().

short* VERTICES [static]
 

Definition at line 33 of file lalr.c.

Referenced by digraph(), and traverse().


Generated on Fri Apr 14 22:59:55 2006 for minix by  doxygen 1.4.6