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
|
itemization(
itt($$ = )
A semantic value is assigned to the rule's nonterminal's semantic
value. The right-hand side (rhs) of the assignment expression must be an
expression of the type that is associated with $$. This assignment operation
assumes that the type of the rhs-expression equals $$'s semantic value
type. If the types don't match the compiler issues a compilation error when
compiling tt(parse.cc). Casting the rhs to the correct value type is possible,
but in that case the function call operator (see the next item) is preferred,
as it does not require casting. If no semantic value type was associated with
$$ then the assignment tt($$ = STYPE_{}) can be used.
itt($$(expr))
A value is assigned to the rule's nonterminal's semantic value. tt(Expr)
must be of a type that can be statically cast to $$'s semantic value type. The
required tt(static_cast) is generated by bic() and doesn't have to be
specified for tt(expr).
itt(_$$)
This refers to the rule's nonterminal's semantic value, disregarding any
polymorphic type that might have been associated with the rule's nonterminal.
itt($$)
If no polymorphic type was associated with the rule's nonterminal then
this is shorthand for a reference to the rule's plain tt(STYPE_) value. If a
polymorphic value type was associated with the rule's nonterminal then this
shorthand represents a reference to a value of that particular type.
itt($$.)
If no polymorphic type was associated with the rule's nonterminal then
this is shorthand for the member selector operator, applied to a reference to
the rule's nonterminal's tt(STYPE_) value. If a polymorphic value type was
associated with the rule's nonterminal then this shorthand represents the
member selector operator, applied to a reference of that particular type.
itt($$->)
If no polymorphic type was associated with the rule's nonterminal then
this is shorthand for the pointer to member operator, applied to a reference
to the rule's nonterminal's tt(STYPE_) value. If a polymorphic value type
was associated with the rule's nonterminal then this shorthand represents the
pointer to member operator, applied to a reference of that particular type.
itt(_$1)
This refers to the current production rule's first component's generic
tt(STYPE_) value.
itt($1)
This shorthand refers to the semantic value of the production rule's
first element. If it was associated with a polymorphic type, then tt($1)
refers to a value of that particular type. If no association was defined then
tt($1) represents a generic tt(STYPE_) value.
itt($1.)
If the production rule's first component's semantic value was associated
with a polymorphic type, then tt($1.) is shorthand for the member selector
operator, applied to the value of the associated polymorphic type. If no
association was defined then tt($1.) is shorthand for the member selector
operator, applied to the first component's generic tt(STYPE_) value.
itt($1->)
If the production rule's first component's semantic value was associated
with a polymorphic type, then tt($1->) is shorthand for the pointer to member
operator, applied to the value of the associated polymorphic type. If no
association was defined then tt($1.) is shorthand for the pointer to member
operator, applied to the first component's generic tt(STYPE_) value.
itt(_$-1)
This refers to the generic (tt(STYPE_)) value of a component in a
production rule, listed immediately before the current rule's nonterminal ($-2
refers to a component used two elements before the current nonterminal, etc.).
itt($-1)
Same: this refers to the generic (tt(STYPE_)) value of a component in a
production rule, listed immediately before the current rule's nonterminal ($-2
refers to a component used two elements before the current nonterminal, etc.).
itt($-1.)
This is shorthand for the member selector operator applied to to the
generic tt(STYPE_) value of some production rule element, 1 element before
the current rule's nonterminal.
itt($-1->)
This is shorthand for the pointer to member operator applied to to the
generic tt(STYPE_) value of some production rule element, 1 element before
the current rule's nonterminal.
itt($<tag>-1)
This shorthand represents a reference to the semantic value of the
polymorphic type associated with tt(tag) of some production rule element, 1
element before the current rule's nonterminal.
If, when using the generated parser's class tt(parse) function, the
polymorphic type of that element turns out not to match the type that is
associated with tt(tag) then a run-time fatal error results.
If that happens, and the tt(debug) option/directive had been specified when
bic() was run, then rerun the program after specifying
tt(parser.setDebug(Parser::ACTIONCASES)) to locate the tt(parse) function's
action block where the fatal error was encountered.
itt($<tag>-1.)
This shorthand represents the member selector operator, applied to the
semantic value of the polymorphic type associated with tt(tag) of some
production rule element, 1 element before the current rule's nonterminal.
If, when using the generated parser's class tt(parse) function, the
polymorphic type of that element turns out not to match the type that is
associated with tt(tag) then a run-time fatal error results. The procedure
suggested at the previous (tt($<tag>-1)) item for solving such errors can be
applied here as well.
itt($<tag>-1->)
This shorthand represents the pointer to member selector operator, applied
to the semantic value of the polymorphic type associated with tt(tag) of some
production rule element, 1 element before the current rule's nonterminal.
If, when using the generated parser's class tt(parse) function, the
polymorphic type of that element turns out not to match the type that is
associated with tt(tag) then a run-time fatal error results. The procedure
suggested at the previous (tt($<tag>-1)) item for solving such errors can be
applied here as well.
)
|