| 1 |
Syntax: bf(%type) tt(<type> symbol-list) |
| 2 |
|
| 3 |
To associate (non-)terminals with specific semantic value types |
| 4 |
the bf(%type) directive is used. |
| 5 |
|
| 6 |
When tt(%polymorphic) is used to specify multiple semantic value types, |
| 7 |
(non-)terminals can be associated with one of the semantic value types |
| 8 |
specified with the tt(%polymorphic) directive. |
| 9 |
|
| 10 |
When tt(%union) is used to specify multiple semantic value types, |
| 11 |
(non-)terminals can be associated with one of the tt(union) fields specified |
| 12 |
with the tt(%union) directive. |
| 13 |
|
| 14 |
With this directive, tt(symbol-list) defines of one or more blank or comma |
| 15 |
delimited grammatical symbols (i.e., terminal and/or nonterminal symbols); |
| 16 |
tt(type) is either a polymorphic type-identifier or a field name defined in |
| 17 |
the tt(%union) specification. The specified nonterminal(s) are automatically |
| 18 |
associated with the indicate semantic type. The pointed arrows are part of the |
| 19 |
type specification. |
| 20 |
|
| 21 |
When the semantic value type of a terminal symbol is defined the |
| 22 |
em(lexical scanner) rather than the parser's actions must assign the |
| 23 |
appropriate semantic value to link(d_val_)(DVAL) just prior to returning the |
| 24 |
token. To associate terminal symbols with semantic values, terminal symbols |
| 25 |
can also be specified in a tt(%type) directive. |