|
Re: Prioritizing rules in Xtext [message #1180948 is a reply to message #1176551] |
Mon, 11 November 2013 09:08 |
Jan Koehnlein Messages: 760 Registered: July 2009 Location: Hamburg |
Senior Member |
|
|
Usually that is a usecase for semantic predicates, but they are on the
parser level and your example must resolve a lexer ambiguity.
Am 08.11.13 13:00, schrieb Arshad Adavani:
> Hi all,
> Is prioritization of rules in Xtext possible?
>
> I mean, say that I have a rule:
>
> SomeRule:
> (ID | Rule) ;
>
> Rule:
> "_"INT
> ;
>
> So, here SomeRule allows either a ID or Rule. When I type in the editor
> I want this SomeRule to look first for "ID" and then for "Rule". Can I
> prioritize like this ?
>
> Well, here Rule is also a part of ID as "_"INT is compatible with ID,
> but, situation for me is a little complex and I just wanted to know
> whether it can be done.
>
>
> Thanks in advance :)
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
---
Get professional support from the Xtext committers at www.typefox.io
|
|
|
Powered by
FUDForum. Page generated in 0.03304 seconds