/** Templates for building ASTs during normal parsing. * * Deal with many combinations. Dimensions are: * Auto build or rewrite * no label, label, list label (label/no-label handled together) * child, root * token, set, rule, wildcard * * The situation is not too bad as rewrite (->) usage makes ^ and ! * invalid. There is no huge explosion of combinations. */ group ASTParser; @rule.setErrorReturnValue() ::= << retval.tree = this.adaptor.errorNode(this.input, retval.start, this.input.LT(-1), re); >> // TOKEN AST STUFF /** ID and output=AST */ tokenRef(token,label,elementIndex,hetero) ::= << if ( this.state.backtracking===0 ) {