These trampoline functions are normally only used in mutation scenarios when a subtree of a labeled alternative is re-generated by calling the function named as the labeled alternative. If the label is recurring, this function is an artificial trampoline that calls one of the functions that have the same name prefix but differ in a numbered suffix (e.g., rule_Label calls rule_Label_1 or rule_Label_2). The trampoline function is expected to be transparent, i.e., to create a tree structure as if one of the number-suffixed functions was called.
However, until now, the tree structures created by the trampolines and the way the trees were created were incorrect. The trampoline created two extra nodes in the tree: one UnparserRule node named as the labeled alternative (e.g., rule_Lable) and one UnparserRuleAlternative node.
Issue 1: Both nodes are superfluous in the end result.
Issue 2: Both nodes are necessary to help the decision model choose between the number-suffixed functions. But then, the UnparserRule should be named as the main rule that contains the labeled alternatives (e.g., rule).
coverage: 85.627% (-0.4%) from 86.015%
when pulling 4190f73508fd5ed9027add9ce3580a9e032f33b0 on akosthekiss:recur-trampolines
into 35417bc64d6e79e6bb116a5501fdc4f815558867 on renatahodovan:master.
These trampoline functions are normally only used in mutation scenarios when a subtree of a labeled alternative is re-generated by calling the function named as the labeled alternative. If the label is recurring, this function is an artificial trampoline that calls one of the functions that have the same name prefix but differ in a numbered suffix (e.g.,
rule_Label
callsrule_Label_1
orrule_Label_2
). The trampoline function is expected to be transparent, i.e., to create a tree structure as if one of the number-suffixed functions was called.However, until now, the tree structures created by the trampolines and the way the trees were created were incorrect. The trampoline created two extra nodes in the tree: one UnparserRule node named as the labeled alternative (e.g.,
rule_Lable
) and one UnparserRuleAlternative node.rule
).This commit fixes both issues.