I have an Xtext grammar for a CNL sentence and in some its variants I would require the user to write the same parts in the sentence:
Formula:
'It' 'should' 'be' e1=Expr 'and' 'again' e2=Expr;
where Expr is a recursive expression like a boolean formula and the parser should accept the sentence only if e1 and e2 are the same (if e1 = a and b, then e2 should also be a and b).
- Can I do it without writing code only by means of Xtext grammar?
- How to prompt the user in a popup window on Ctrl+Space in the generated IDE that the user should write the same Expr here as it was just written before?