Ctrl-click fails on terms followed by a * in SDF editor
In the SDF grammar of the sample project of Spoofax,
Ctrl-click on term Definition such as :“module” ID Definition -> Start {cons(“Module”)}
drives the selection on the definition of “Definition”.
However if one adds a * after Definition :
“module” ID Definition* -> Start {cons(“Module”)}
Ctrl-clicking on it does nothing. I guess it is the same for +.
Adding parentheses around “Definition” does not help:
Submitted by Emmanuel Castro on 27 August 2012 at 20:37“module” ID (Definition)* -> Start {cons(“Module”)}
Issue Log
On which version of Spoofax does this occur?
Tested both on current stable (1.0.9.0-r25227) and current unstable (same version).
Tested with the nightly build 1.0.9.0-r25280.
The same problem occurs.
The versionf Eclipse that I use is Version: 3.7.2 Build id: I20110613-1736
Do you want me to try with an other build?
I’ve noted that when star (*) and plus (+) operators applies to sequence of symbols. Ctrl+Click works correctly.
We have to investigate the special behaviour of the ‘reference’ mechanism in Spoofax editors, in the special case of “unary operator” constructs.
I’ve noticed that StrategoReferenceResolver.ALLOW_MULTI_CHILD_PARENT is set to ‘false’ since r22534. Reverting it back to ‘true’ gives the correct behaviour.
I don’t know the implications of reverting it to ‘true’. Maybe LennartKats, who made this modification, can elaborate.
Log in to post comments