Commit abe44f80 authored by Yann Régis-Gianas's avatar Yann Régis-Gianas

doc/main.tex: Precise that only unnamed semantic values can be referred using...

doc/main.tex: Precise that only unnamed semantic values can be referred using positional identifiers.
parent d52738aa
......@@ -531,9 +531,10 @@ A semantic action is a piece of \ocaml code that is executed in order to
assign a semantic value to the nonterminal symbol with which this production
group is associated. A semantic action can refer to the (already computed)
semantic values of the terminal or nonterminal symbols that appear in the
production via the semantic value identifiers bound by the production. For
compatibility with \ocamlyacc, semantic actions can also refer to these
semantic values via positional keywords of the form
production via the semantic value identifiers bound by the production.
For compatibility with \ocamlyacc, semantic actions can also refer to
unnamed semantic values via positional keywords of the form
\kw{\$1}, \kw{\$2}, etc.\ This style is discouraged. Furthermore, as
a positional keyword of the form \kw{\$i} is internally rewritten as
\nt{\_i}, such identifiers are forbidden.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment