Beginner : Xtext help [message #699742] |
Fri, 22 July 2011 08:31 |
Arun Messages: 26 Registered: July 2011 |
Junior Member |
|
|
Hi,
One of the rule in my model as follows,
MessageConfig:
"MessageConfig" name=ID "{"
(messageSourceConfig+=MessageSourceConfig)*
"}"
;
MessageSourceConfig:
"MessageSourceConfig" name=ID "sends (a) message(s) {"
(("via port" portname+=ID)? "to the destination(s)" destination+=ID (',' destination+=ID)* "of type" (dmsType+=DMSTYPE)* (',' dmsType+=DMSTYPE)* "managed by" (providerType+=ProviderType)* (',' providerType+=ProviderType)* )*
"}"
;
DMSTYPE:
TOPIC | QUEUE;
TOPIC:
name="topic";
QUEUE:
name="queue";
ProviderType:
LOCAL | SQLDMS;
LOCAL:
name="local";
SQLDMS:
name="sqldms";
When i write a rule in editor , im getting duplicate rule id,
MessageConfig TestConfig {
MessageSourceConfig TestSource sends (a) message(s) {
via port normal to the destination(s) normalmsgtpoic,emergencymdgtopic of type queue,topic managed by sqldms,local
via port emergency to the destination(s) normalmsgtpoic,emergencytopi of type topic managed by sqldms
}
Error:
Duplicate DMSType topic and Duplicate ProviderType sqldms.
kindly help on this.
Thanks,
Arun
}
|
|
|
|
Re: Beginner : Xtext help [message #699749 is a reply to message #699742] |
Fri, 22 July 2011 08:50 |
|
Hi,
you have static names so they are of course not unique if you use them twice.
but if you want to use them as enums why dont you declare them as enums
enum DMSTYPE:
TOPIC="topic" | QUEUE="queue";
enum ProviderType:
LOCAL="local" | SQLDMS="sqldms";
~Christian
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
Powered by
FUDForum. Page generated in 0.03792 seconds