Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Usage of and(&) operator in grammar rule(Why & when to use and(&) operator in grammar rule)
Usage of and(&) operator in grammar rule [message #1802635] Wed, 13 February 2019 05:06 Go to next message
Shashi D M is currently offline Shashi D MFriend
Messages: 32
Registered: August 2011
Dear All,

In some of the example i observed that, the & operator used inside the rule definition, could any one clarify why and when to use this & operator in rule definition instead of OR(|).

('resolution' resolution=NumberConstant)?
& ('unit' unit=STRING)?
& ('offset' offset=NumberConstant)?
& (range=RangeSpec)?

In the above example each feature is separated by & operator, so why and when we usually apply/use such operator in rule definition

Thank you
Re: Usage of and(&) operator in grammar rule [message #1802636 is a reply to message #1802635] Wed, 13 February 2019 05:32 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13280
Registered: July 2009
Senior Member
From the docs


Unordered Groups
The elements of an unordered group can occur in any order, but each element must appear once. Members of unordered groups are separated by &.

Need professional support for Xtext, Xpand, EMF?
Go to:
Twitter : @chrdietrich
Blog :
Previous Topic:Cross reference problem with rename element
Next Topic:XText 2.16 looking for XBase lib 2.10
Goto Forum:

Current Time: Sat Dec 14 21:59:00 GMT 2019

Powered by FUDForum. Page generated in 0.01563 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top