Variables names can be suffixed to a rule element using the colon character (:) followed by the variable name. These can then be used in rule actions to refer to the AST result of the rule element with that variable name.

Examples
USING: prettyprint peg.ebnf math.parser ; "1+2" EBNF[=[ rule=[0-9]:a "+" [0-9]:b => [[ a digit> b digit> + ]] ]=] .
3