I have now had to copy-paste and reformat my list of keywords three times:

  1. Reject productions (the language doesn’t allow keywords to be used as identifiers anywhere)
  2. Follow restrictions
  3. Keyword completion

It would be great if at some point one can just write down the list of keywords once, and the rest is generated from this.

It would already be an improvement if completion keyword would accept a list of keywords, instead of requiring the completion keyword term for every keyword separately. (correct me if I’m wrong, but I didn’t see a way to do this.)

The third instantiation of the keyword list could possibly be removed by improving the -Completions.generated.esv file. Maybe the keywords could somehow be extracted from the lexical syntax and/or follow restrictions?

Submitted by Tobi Vollebregt on 24 September 2010 at 12:21

On 26 September 2010 at 13:24 Lennart Kats commented:

There is definitely room for improvement in SDF w.r.t. keywords. Maybe something to talk about offline? The completion keywords are a different matter: there you get redundancy because the syntax and completion are specified in different languages, in different files. Once you start reorganizing projects around language features, this may improve. One thing to note though is that completion keyword is mostly useless. When do you ever use code completion to insert the while keyword? The completion template construct is more general, and can be used to insert a complete while loop template instead. As of 0.5.3 the templates are more context-sensitive and you also get a bit of code completion on the completion template construct which should help you write them. The tricky part is that you usually want to customize the layout and inserted names, so you can’t fully derive them from the grammar.

On 23 March 2011 at 14:57 Tobi Vollebregt tagged completion

On 8 January 2013 at 16:45 Gabriël Konat tagged sdf

On 8 January 2013 at 16:45 Gabriël Konat removed tag stratego

On 8 January 2013 at 16:45 Gabriël Konat removed tag completion

Log in to post comments