/[bison]/bison/src/closure.h
ViewVC logotype

Diff of /bison/src/closure.h

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

revision 1.6 by akim, Wed Dec 5 09:41:01 2001 UTC revision 1.7 by akim, Sun Apr 7 17:42:12 2002 UTC
# Line 1  Line 1 
1  /* Subroutines for bison  /* Subroutines for bison
2     Copyright 1984, 1989, 2000, 2001  Free Software Foundation, Inc.     Copyright (C) 1984, 1989, 2000, 2001, 2002  Free Software Foundation, Inc.
3    
4     This file is part of Bison, the GNU Compiler Compiler.     This file is part of Bison, the GNU Compiler Compiler.
5    
# Line 21  Line 21 
21  #ifndef CLOSURE_H_  #ifndef CLOSURE_H_
22  # define CLOSURE_H_  # define CLOSURE_H_
23    
 /* Subroutines of file LR0.c. */  
   
24  /* Allocates the itemset and ruleset vectors, and precomputes useful  /* Allocates the itemset and ruleset vectors, and precomputes useful
25     data so that closure can be called.  n is the number of elements to     data so that closure can be called.  n is the number of elements to
26     allocate for itemset.  */     allocate for itemset.  */
# Line 31  void new_closure PARAMS ((int n)); Line 29  void new_closure PARAMS ((int n));
29    
30    
31  /* Given the kernel (aka core) of a state (a vector of item numbers  /* Given the kernel (aka core) of a state (a vector of item numbers
32     ITEMS, of length N), set up ruleset and itemset to indicate what     ITEMS, of length N), set up RULESET and ITEMSET to indicate what
33     rules could be run and which items could be accepted when those     rules could be run and which items could be accepted when those
34     items are the active ones.     items are the active ones.
35    
36     ruleset contains a bit for each rule.  closure sets the bits for     RULESET contains a bit for each rule.  CLOSURE sets the bits for
37     all rules which could potentially describe the next input to be     all rules which could potentially describe the next input to be
38     read.     read.
39    
40     ITEMSET is a vector of item numbers; NITEMSET is its size     ITEMSET is a vector of item numbers; NITEMSET is its size
41     9actually, points to just beyond the end of the part of it that is     (actually, points to just beyond the end of the part of it that is
42     significant).  closure places there the indices of all items which     significant).  CLOSURE places there the indices of all items which
43     represent units of input that could arrive next.  */     represent units of input that could arrive next.  */
44    
45  void closure PARAMS ((short *items, int n));  void closure PARAMS ((short *items, int n));
46    
47    
48  /* Frees itemset, ruleset and internal data.  */  /* Frees ITEMSET, RULESET and internal data.  */
49    
50  void free_closure PARAMS ((void));  void free_closure PARAMS ((void));
51    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

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