nabl code generation error when defining static name: variable 'c-uri1__' used, but not bound
I installed Spoofax 1.2 in Eclipse 4.4 and played a bit with the demo project. When I tried to remove the module names, I got a code generation error:
[java] ** Error in definition nabl-def-site: [java] variable 'c-uri1__' used, but not bound [java] ** Error in definition nabl-def-site: [java] variable 's-uri1__' used, but not bound
Start.Module = < <Definition*; separator="\n\n"> > Definition.Entity = <test>
binding rules Module(_) : defines Module "default"
The static name triggers the error.Submitted by Danny Groenewegen on 29 August 2014 at 16:23
Definition clauses must be based on variables from the pattern, like
Module(x) : defines Module x
or use an implicit definition instead:
Module(x) : implicitly defines Module "default"
But implicit definitions cannot scope their subterms, if you want scoping as well you have to desugar the
Moduleterm and put
Why is the
implicitlyin the syntax, it seems superfluous because the quotes already indicate a static name. What else does it do besides breaking scoping?
I think this could either be desugared automatically, or there needs to be an error on
defines Module "default".
Log in to post comments