I just found a significant bug in the flow analysis for decoration via references, e.g. if one were to write
production foo
top::Expr ::= e::Expr
{
forwards to bar(@e);
}
and another grammar adds a new inherited attribute i on Expr, we wouldn't generate an edge for e.i depending on the vertex for i on the subterm vertex corresponding to the first argument of bar in the forward equation. This means that one could use e.i in an aspect for foo, and we could miss some flow errors like if bar didn't supplies an equation for i on its child.
The fix for this is to add these edges later, in constructProductionGraph, when we have the environment with all inherited attribute occurrences.
I just found a significant bug in the flow analysis for decoration via references, e.g. if one were to write
and another grammar adds a new inherited attribute
i
onExpr
, we wouldn't generate an edge fore.i
depending on the vertex fori
on the subterm vertex corresponding to the first argument ofbar
in the forward equation. This means that one could usee.i
in an aspect forfoo
, and we could miss some flow errors like ifbar
didn't supplies an equation fori
on its child.The fix for this is to add these edges later, in
constructProductionGraph
, when we have the environment with all inherited attribute occurrences.