A constant attribute of a node type T
with value of type U
.
A constant attribute of a node type T
with value of type U
. The
value is given by the computation u
which is evaluated at most once.
An attribute of a node type T
with value of type U
, supported by a circularity
test.
An attribute of a node type T
with value of type U
, supported by a circularity
test. The value of the attribute is computed by the function f
. f
will be
called each time the value of the attribute is accessed. f
should not itself
require the value of this attribute. If it does, a circularity error is reported
by throwing an IllegalStateException
.
A variation of the UncachedAttribute
class for parameterised attributes.
Define an uncached attribute of T
nodes of type U
by the function f
,
which should not depend on the value of this attribute.
Define an uncached attribute of T
nodes of type U
by the function f
,
which should not depend on the value of this attribute. The computed
attribute value is cached so it will be computed at most once.
As for the other attr
with the first argument specifying a name for
the constructed attribute.
As for the other constant
with the first argument specifying a name for
the constructed attribute.
As for the other constant
with the first argument specifying a name for
the constructed attribute.
Define a constant attribute of T
nodes of type U
given by the value
u
.
Define a constant attribute of T
nodes of type U
given by the value
u
. u
is evaluated at most once.
Define a parameterised uncached attribute of T
nodes of type U
by the
function f
, which takes an argument of type A
.
Define a parameterised uncached attribute of T
nodes of type U
by the
function f
, which takes an argument of type A
. The computed attribute
value for a given T
and A
pair is cached so it will be computed at most
once.
As for the other paramAttr
with the first argument specifying a name for
the constructed attribute.
Reusable implementation of attribution of syntax trees in a functional style with attribute values computed each time they are accessed.