/[bison]/bison/src/LR0.c
ViewVC logotype

Diff of /bison/src/LR0.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by akim, Tue Nov 7 16:28:46 2000 UTC revision 1.15.2.1 by akim, Sat Sep 22 17:19:03 2001 UTC
# Line 33  Line 33 
33    
34  int nstates;  int nstates;
35  int final_state;  int final_state;
36  core *first_state;  core *first_state = NULL;
37  shifts *first_shift;  shifts *first_shift = NULL;
38  reductions *first_reduction;  reductions *first_reduction = NULL;
39    
40  static core *this_state;  static core *this_state = NULL;
41  static core *last_state;  static core *last_state = NULL;
42  static shifts *last_shift;  static shifts *last_shift = NULL;
43  static reductions *last_reduction;  static reductions *last_reduction = NULL;
44    
45  static int nshifts;  static int nshifts;
46  static short *shift_symbol;  static short *shift_symbol = NULL;
47    
48  static short *redset;  static short *redset = NULL;
49  static short *shiftset;  static short *shiftset = NULL;
50    
51  static short **kernel_base;  static short **kernel_base = NULL;
52  static short **kernel_end;  static short **kernel_end = NULL;
53  static short *kernel_items;  static short *kernel_items = NULL;
54    
55  /* hash table for states, to recognize equivalent ones.  */  /* hash table for states, to recognize equivalent ones.  */
56    
57  #define STATE_TABLE_SIZE        1009  #define STATE_TABLE_SIZE        1009
58  static core **state_table;  static core **state_table = NULL;
59    
60    
61  static void  static void
62  allocate_itemsets (void)  allocate_itemsets (void)
63  {  {
64    short *itemp;    short *itemp = NULL;
65    int symbol;    int symbol;
66    int i;    int i;
67    int count;    int count;
68    short *symbol_count;    short *symbol_count = NULL;
69    
70    count = 0;    count = 0;
71    symbol_count = XCALLOC (short, nsyms);    symbol_count = XCALLOC (short, nsyms);
# Line 89  allocate_itemsets (void) Line 89  allocate_itemsets (void)
89       We allocate that much space for each symbol.  */       We allocate that much space for each symbol.  */
90    
91    kernel_base = XCALLOC (short *, nsyms);    kernel_base = XCALLOC (short *, nsyms);
92    kernel_items = XCALLOC (short, count);    if (count)
93        kernel_items = XCALLOC (short, count);
94    
95    count = 0;    count = 0;
96    for (i = 0; i < nsyms; i++)    for (i = 0; i < nsyms; i++)

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.15.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26