File: README.dollar

package info (click to toggle)
bisonc%2B%2B 6.09.02-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,984 kB
  • sloc: cpp: 9,375; ansic: 1,505; fortran: 1,134; makefile: 1,062; sh: 526; yacc: 84; lex: 60
file content (187 lines) | stat: -rw-r--r-- 11,075 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187

Single:
              AtDollar                      handler:
              Pattern   represents:         (empty: see up)
------------------------------------------------------------------
$$          -   DD      d_val               dval
_$$         -   refDD   d_val               dval       
$$.         -   DDm     d_val.              dvalMem
$$->        -   DDp     d_val->             dvalPtr
$$(             DDpar   d_val(              dvalPar
            
$nr         -   Dn      d_vsp[idx]          dvsp        
_$nr        -   refDn   d_vsp[idx]          dvsp        
$nr.        -   Dnm     d_vsp[idx].         svsMem
$nr->       -   Dnp     d_vsp[idx]->        svsPtr
            
$-nr        -   D_      d_vsp[idx]          dvsp        
_$-nr       -   refD_   d_vsp[idx]          dvsp        
$-nr.       -   D_m     d_vsp[idx].         svsMem
$-nr->      -   D_p     d_vsp[idx]->        svsPtr
            
$<TAG>-nr   -   Dt_     err                 errNoTag
$<TAG>-nr.  -   Dt_m    err        
$<TAG>-nr-> -   Dt_p    err
-----------------------------------------------------------------

===============================================================================================

Unions:
                                   represents:
              AtDollar  ---------------------------------                       handler:        
              Pattern   tagged:                 untagged:       x =             (empty: see up) 
-----------------------------------------------------------------------------------------------
$$          -   DD      d_val.TAG               d_val           d_val           dvalUnion       
_$$         -   refDD   d_val or dval.Tag       d_val                           dvalRefUnion
$$.         -   DDm     d_val.TAG.              d_val.                          dvalUnionMem    
$$->        -   DDp     d_val.TAG->             d_val->                         dvalUnionPtr    
$$(             DDpar   d_val(                                                  dvalPar
                                                                                                
$nr         -   Dn      d_vsp[idx].TAG          d_vsp[idx]      d_vsp[idx]      svsUnion        
_$nr        -   refDn   d_vsp[idx] or ...Tag    d_vsp[idx]                      svsRefUnion
$nr.        -   Dnm     d_vsp[idx].TAG.         d_vsp[idx].                     svsUnionMem     
$nr->       -   Dnp     d_vsp[idx].TAG->        d_vsp[idx]->                    svsUnionPtr     
                                                                                                
$-nr        -   D_      d_vsp[idx]              d_vsp[idx]      d_vsp[idx]      svs             
_$-nr       -   refD_   d_vsp[idx]              d_vsp[idx]                                      
$-nr.       -   D_m     d_vsp[idx].             d_vsp[idx].                     svsMem          
$-nr->      -   D_p     d_vsp[idx]->            d_vsp[idx]->                    svsPtr          
                                                                                                
$<TAG>-nr   -   Dt_     d_vsp[idx].TAG                                          svsUnionTag     
$<TAG>-nr.  -   Dt_m    d_vsp[idx].TAG.                                         svsUnionTagMem  
$<TAG>-nr-> -   Dt_p    d_vsp[idx].TAG->                                        svsUnionTagPtr  
-----------------------------------------------------------------------------------------------


===============================================================================================

Polymorphic:
                                   represents:
              AtDollar  ---------------------------------                       handler:        
              Pattern       tagged:             untagged:       x =             (empty: see up) 
-----------------------------------------------------------------------------------------------
$$          -   DD      d_val.get<TAG>()        d_val           d_val           dvalPoly       
_$$         -   refDD   d_val                   d_val                           dval            
$$.         -   DDm     d_val.get<TAG>().       d_val.                          dvalPolyMem    
$$->        -   DDp     d_val.get<TAG>()->      d_val->                         dvalPolyPtr    
$$(             DDpar   d_val(                                                  dvalPolyPar
                                                                                                
$nr         -   Dn      d_vsp[idx].get<TAG>()   d_vsp[idx]      d_vsp[idx]      svsPoly        
_$nr        -   refDn   d_vsp[idx]              d_vsp[idx]                      svs             
$nr.        -   Dnm     d_vsp[idx].get<TAG>().  d_vsp[idx].                     svsPolyMem     
$nr->       -   Dnp     d_vsp[idx].get<TAG>()-> d_vsp[idx]->                    svsPolyPtr     
                                                                                                
$-nr        -   D_      d_vsp[idx]              d_vsp[idx]      d_vsp[idx]      svs             
_$-nr       -   refD_   d_vsp[idx]              d_vsp[idx]                                      
$-nr.       -   D_m     d_vsp[idx].             d_vsp[idx].                     svsMem          
$-nr->      -   D_p     d_vsp[idx]->            d_vsp[idx]->                    svsPtr          
                                                                                                
$<TAG>-nr   -   Dt_     d_vsp[idx].get<TAG>()                                   svsPolyTag     
$<TAG>-nr.  -   Dt_m    d_vsp[idx].get<TAG>().                                  svsPolyTagMem  
$<TAG>-nr-> -   Dt_p    d_vsp[idx].get<TAG>()->                                 svsPolyTagPtr  
-----------------------------------------------------------------------------------------------


========================= BELOW: OLD, IGNORE ==================================================
===============================================================================================
===============================================================================================

Handling $-specifications: see semtag.cc

-------------------------------------------------------------------------
Negative $-index e.g,, ($-1, S<type>-1):
-------------------------------------------------------------------------
specification:      action:
-------------------------------------------------------------------------
    $-1             d_negativeDollarIndicesOK  or SINGLE or no auto assoc: 
                                                                no action
                    else: warn STYPE_ is used

    $<type>-1       err: no <type> allowed for neg. indices
-------------------------------------------------------------------------

-----------------------------------------------------------------------------
$$. or $i.
-----------------------------------------------------------------------------
$$. and $i. are handled like $$ and $1, but the action `AUTO' (auto was
            specified, but $$. or $i. was used) the warnAutoIgnored warning
            is issued, and no field substitution takes place
-----------------------------------------------------------------------------
  auto:       $<spec>:          action:
-----------------------------------------------------------------------------
    id          -               NONE (AUTO fm semTag): warnAutoIgnored
(all other combinations: as with $$ and $i, below)
-----------------------------------------------------------------------------



-----------------------------------------------------------------------------
$$ or $i specifications (i >= 0):
-----------------------------------------------------------------------------
  auto:       $<spec>:          action:
-----------------------------------------------------------------------------
    -           -               NONE
                STYPE_         NONE
                <xx>            SINGLE: err: <xx> not defined        
                                semType UNION:  EXPLICIT
                                        POLYMORPHIC: existing tag: EXPLICIT
                                                     otherwise: ERR
                                                        <xx> not defined
-----------------------------------------------------------------------------
    STYPE_     -               NONE
                STYPE_         NONE
                <xx>            SINGLE: err: <xx> not defined        
                                semType UNION:  EXPLICIT
                                        POLYMORPHIC: existing tag: EXPLICIT
                                                     otherwise: ERR
                                                        <xx> not defined
-----------------------------------------------------------------------------
    id                          OK for UNION, possibly OK for POLYMORHPHIC
                -               AUTO
                STYPE_         NONE
                <xx>            semType UNION:  EXPLICIT
                                        POLYMORPHIC: existing tag: EXPLICIT
                                                            + warn
                                                     otherwise: ERR
                                                        <xx> not defined
-----------------------------------------------------------------------------
    illegal id                  only possible for POLYMORHPHIC
                -               ERR: <id> not defined
                STYPE_         NONE
                <xx>            semType UNION:  EXPLICIT
                                        POLYMORPHIC: existing tag: EXPLICIT
                                                     otherwise: ERR
                                                        <xx> not defined
-----------------------------------------------------------------------------

-----------------------------------------------------------------------------
$$( : (followed by an optional argument list and );
-----------------------------------------------------------------------------
                                only available for POLYMORPHIC
-----------------------------------------------------------------------------
    rule not associated with a %type tag: invalid.

calls d_val_ = STYPE_::semantic<id>(...

    d_val is directly initialized (no default constructor for the rule's
semantic type is required) with a semantic value, constructed using the
perfectly forwarded arguments passed to $$(
-----------------------------------------------------------------------------
 
-----------------------------------------------------------------------------


NONE: parse.cc does not use a field specification
AUTO: replace the $-spec by d_val_.field or d_val_.get<>() from 
        d_rules.sType()
EXPLICIT: replace the $-spec by d_val_.field or d_val_.get<>() from 
          atd.id()





=============================================================================
    lhs type    
    
    none