如何在xtext列表中添加分隔符?
问题描述:
我有以下语法片段:
FixtureGroup:
name = ID
':' fixtures += [Fixture]*
';';
在这种情况下,我可以为上述规则键入以下内容:
And in the instance I can type for the above rule the following:
FrontLeft: FrontLeft1 FrontLeft2;
但是,我想输入的内容是以下两者之间的加号:
However, what I like to type is a plus in between:
FrontLeft: FrontLeft1 + FrontLeft2;
我应该如何更改语法以实现此目的?
How should I change the grammar to accomplish this?
答
常用模式是
':' (fixtures += [Fixture] ('+' fixtures += [Fixture])*)?