Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Couldn't resolve reference to EnumElem 'bottle'(Problems with references)
Couldn't resolve reference to EnumElem 'bottle' [message #1775299] Fri, 27 October 2017 11:11 Go to next message
Pedro Sánchez is currently offline Pedro SánchezFriend
Messages: 4
Registered: October 2017
Junior Member
Dear friend,
I obtain the error while using the DSL "Couldn't resolve reference to EnumElem 'bottle'"

// in the DSL
enums
thing ::= bottle drop
end

The grammar fragment of interest is the following:

Enums:
name=ID '::=' (r+=EnumElem)*
;

EnumElem:
name=ID
;

Value: {Value}
INT | value=[EnumElem]
;

// and the rule where EnumElem's are not recognized:
OtherRule:
'remember' p=Value
;

It allows INT values but not enum ones.

Several days with this and no solution :(
Many thanks in advance.
Re: Couldn't resolve reference to EnumElem 'bottle' [message #1775313 is a reply to message #1775299] Fri, 27 October 2017 13:34 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
value=[EnumElem]

Is short for

value=[EnumElem|ID]

Which means an Id is parsed which does not allow dots

But the default reference names are

Grandparent.parent.child

So you may use

value=[EnumElem|FQN]

With

FQN: ID ("." ID)* ;

Or you need to adapt IQualifiedBameProvider


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:how to retrieve the Injector
Next Topic:Exclude generated JAR files from indexing
Goto Forum:
  


Current Time: Thu Apr 25 12:55:06 GMT 2024

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

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

Back to the top