2797 |
The C code in an action can refer to the semantic values of the components |
The C code in an action can refer to the semantic values of the components |
2798 |
matched by the rule with the construct @code{$@var{n}}, which stands for |
matched by the rule with the construct @code{$@var{n}}, which stands for |
2799 |
the value of the @var{n}th component. The semantic value for the grouping |
the value of the @var{n}th component. The semantic value for the grouping |
2800 |
being constructed is @code{$$}. (Bison translates both of these constructs |
being constructed is @code{$$}. Bison translates both of these |
2801 |
into array element references when it copies the actions into the parser |
constructs into expressions of the appropriate type when it copies the |
2802 |
file.) |
actions into the parser file. @code{$$} is translated to a modifiable |
2803 |
|
lvalue, so it can be assigned to. |
2804 |
|
|
2805 |
Here is a typical example: |
Here is a typical example: |
2806 |
|
|