Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Qualified Name ID.ID....KEYWORD
Qualified Name ID.ID....KEYWORD [message #1840372] Tue, 13 April 2021 12:56 Go to next message
John Doe is currently offline John DoeFriend
Messages: 138
Registered: October 2020
Senior Member
Hi all,

I am writing a grammar in which I am using the following rule for the qualified name:

QualifiedName:
	ID ("." ID)*;


However, I have a specific case where the element that I will reference is as follows:
Wheel:
name="wheel" ;

And is located inside an element that is identified by an id.
Car:
name=ID
wheel=[wheel|QualifiedName]

So if I try to write the following grammar:
Audi
ID.ID.ID.wheel (let's say that I am referencing this from another file where I will have multiple ID in front of wheel).

I get mismatched expecting RULE_ID. I also tried it with STRING but it doesn't work. wheel in this case will be used as a keyword so any suggestions on how to change the qualified name to accept this specific case?

Thank you!




Re: Qualified Name ID.ID....KEYWORD [message #1840374 is a reply to message #1840372] Tue, 13 April 2021 13:06 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13925
Registered: July 2009
Senior Member
see https://blogs.itemis.com/en/xtext-hint-identifiers-conflicting-with-keywords

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Supressing content assist auto activation in DSL comments
Next Topic:How to disable validation when editing in xtext editor?
Goto Forum:
  


Current Time: Thu May 06 00:23:51 GMT 2021

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

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

Back to the top