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

Diff of /bison/src/gram.h

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

revision 1.45 by akim, Thu Jul 25 21:21:02 2002 UTC revision 1.46 by akim, Mon Jul 29 17:30:33 2002 UTC
# Line 36  Line 36 
36    
37     The rules receive rule numbers 1 to NRULES in the order they are     The rules receive rule numbers 1 to NRULES in the order they are
38     written.  More precisely Bison augments the grammar with the     written.  More precisely Bison augments the grammar with the
39     initial rule, `$axiom: START-SYMBOL EOF', which is numbered 1, all     initial rule, `$accept: START-SYMBOL $end', which is numbered 1,
40     the user rules are 2, 3 etc.  Each time a rule number is presented     all the user rules are 2, 3 etc.  Each time a rule number is
41     to the user, we subtract 1, so *displayed* rule numbers are 0, 1,     presented to the user, we subtract 1, so *displayed* rule numbers
42     2...     are 0, 1, 2...
43    
44     Internally, we cannot use the number 0 for a rule because for     Internally, we cannot use the number 0 for a rule because for
45     instance RITEM stores both symbol (the RHS) and rule numbers: the     instance RITEM stores both symbol (the RHS) and rule numbers: the
46     symbols are shorts >= 0, and rule number are stored negative.     symbols are shorts >= 0, and rule number are stored negative.
47     Therefore 0 cannot be used, since it would be both the rule number     Therefore 0 cannot be used, since it would be both the rule number
48     0, and the token EOF).     0, and the token $end).
49    
50     Actions are accessed via the rule number.     Actions are accessed via the rule number.
51    
# Line 68  Line 68 
68    
69     RULES[R].assoc -- the associativity of R.     RULES[R].assoc -- the associativity of R.
70    
71     RULES[R].dprec -- the dynamic precedence level of R (for GLR parsing).     RULES[R].dprec -- the dynamic precedence level of R (for GLR
72       parsing).
73    
74     RULES[R].merger -- index of merging function for R (for GLR parsing).     RULES[R].merger -- index of merging function for R (for GLR
75       parsing).
76    
77     RULES[R].line -- the line where R was defined.     RULES[R].line -- the line where R was defined.
78    

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.46

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