Small simplification in grammar language semantic actions.
@@ -462,18 +462,18 @@ def act_grammar(_, nodes):
pg_actions = {
"Assoc": lambda _, nodes: nodes[0].value,
- "AssocPrior": [lambda _, nodes: [nodes[0]],
- lambda _, nodes: [nodes[0]],
+ "AssocPrior": [lambda _, nodes: nodes,
+ lambda _, nodes: nodes,
act_assoc_prior],
"Prior": lambda _, value: int(value),
"Term": [act_term_str, act_term_regex],
"Name": lambda _, value: value,
"NonTermRef": lambda _, nodes: NonTerminal(nodes[0]),
"GSymbol": lambda _, nodes: nodes[0],
- "Sequence": [lambda _, nodes: [nodes[0]], act_sequence],
+ "Sequence": [lambda _, nodes: nodes, act_sequence],
"ProductionRHS": [lambda _, nodes: [ProductionRHS(nodes[0])],
act_production_rhs],
- "ProductionRHSs": [lambda _, nodes: [nodes[0]],
+ "ProductionRHSs": [lambda _, nodes: nodes,
act_prod_rhss],
"Production": act_production,
"ProductionSet": [lambda _, nodes: nodes[0], act_prodset],
