Syntactic completion templates depend on special grammar production rules that are automatically generated by make-permissive.jar. This works in Spoofax-stable, however, it seems that Spoofax-nightly uses an old version of the make-permissive tool.

Submitted by Maartje on 2 September 2013 at 19:11

On 2 September 2013 at 19:11 Maartje tagged completion

On 2 September 2013 at 19:12 Maartje tagged completion

On 3 September 2013 at 07:57 Gabriël Konat commented:

We observed this as well in Green-Marl, syntactic completions don’t work. In NaBL, syntactic completions (generated by SDF3) do actually work. The only big difference between those projects is that Green-Marl uses the Stratego Java backend, where NaBL uses the interpreter. But it would be weird if this caused it?

I did remove spoofaxlang from our main build a couple of weeks ago. Spoofax actually used the make-permissive in the spoofaxlang generator, which may have been newer than the one in the standard generator. If so, a fix would be to copy the jar from the spoofaxlang generator into the standard generator.

On 3 September 2013 at 08:28 Guido Wachsmuth commented:

I am not sure how this relates to the problems in Green-Marl, but I have a student working on an individual schedule for the IN4303 assignments. He mentioned that his manually completion templates do not work until he adds a completion proposer and a completion strategy (even if it is not implemented) to the esv file.

On 3 September 2013 at 09:12 Eelco Visser commented:

Just copying a JAR sounds like a bad idea. We need to understand the version dependencies and the source code that generates them.

On 3 September 2013 at 09:30 Maartje commented:

The make-permissive.jar is build by the make-permissive project “”.
The jar is responsible for extending the grammar (include/MyLang.def => include/MyLang-Permissive.def) with 1) water recovery rules 2) insertion recovery rules 3) syntactic completion rules. The syntactic completion rules help the parser to decide whether a syntactic construct is expected at the cursor location. The problem seems to be that the syntactic completion rules are generated in Spoofax-stable, but not in Spoofax-nightly.

Example of such a rule:
“|#Definition|” -> Definition {completion}

This rule supports the template:
completion template Definition :
“entity " " {” (cursor) “}” (blank)

On 3 September 2013 at 19:28 Gabriël Konat commented:

Ah, so this is a separate issue from completion templates generated from SDF3 (template language) not working? Since the ones from SDF3 go into an ESV file.

Right now, make-permissive is a static jar (committed to the repo: in the Spoofax generator project, but it should probably be built in the build farm?

Log in to post comments