It is possible to make an NTA uncached via a cache declaration

Issue #263 resolved
Jesper Öqvist created an issue

JastAdd 2.2.2

With a cache declaration it is possible to change the caching of an NTA declared in the abstract grammar:

A ::= /A/;

syn lazy A A.getA() = new A();
uncache A.getA(); // Should not be allowed.

It is also possible to omit the lazy in the attribute declaration matching the abstract grammar declared NTA which leads to the same behavior. This issue should not be about fixing what happens when lazy is omitted, it is just about disabling the caching of an NTA as above.

Note that it is not possible to make a sythesized NTA uncached using a cache declaration:

syn nta A A.ntaA() = new A();
uncache A.ntaA(); // No effect.

Comments (2)

  1. Jesper Öqvist reporter

    Cache declarations can't disable NTA caching

    This makes NTAs declared in the abstract grammar safe from cache declarations trying to make them uncached.

    fixes #263 (bitbucket)

    → <<cset e97a2d5af349>>

  2. Jesper Öqvist reporter

    Cache declarations can't disable NTA caching

    This makes NTAs declared in the abstract grammar safe from cache declarations trying to make them uncached.

    fixes #263 (bitbucket)

    → <<cset 73e4989bc1ad>>

  3. Log in to comment