1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
The tt(%polymorphic) directive is used to specify a series of semantic value
types. (Non)terminals can be associated with exactly one of these types, or
with the generic tt(STYPE_) semantic value type. When the latter type is used
either another tt(STYPE_) value can be assigned to it, or a value of one of
the defined polymorphic value types can be assigned to it. At any time an
tt(STYPE_) can only hold one single value type. Polymorphic semantic types
are type safe: types cannot be confused. Furthermore, as tt(STYPE_) objects
are responsible for their own memory management, memory leaks cannot occur,
assuming that the different semantic value types do not leak.
In the next overview the available dollar-notations that are available with
polymorphic semantic values are described. In this overview $1 is used as a
generic reference to semantic values of production rule components. Instead of
$1 other available numbered dollar references can also be used.
includefile(polydollar.yo)
|