Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Cross-reference change RuleCall
Cross-reference change RuleCall [message #640473] Mon, 22 November 2010 09:01 Go to next message
Dusan Savic is currently offline Dusan SavicFriend
Messages: 62
Registered: July 2009
Member
Dear all,
can I change default RuleCall which is ID in cross-reference.

For example:
Role1:
name=ID;
Role2:
ref=[Role1]

This is OK.

But I want something like:
Role1:
name=SENTENCE;// this is for example terminal
Role2:
ref=[Role1];

terminal SENTENCE: ('A'..'Z'|' ')* ;
Re: Cross-reference change RuleCall [message #640482 is a reply to message #640473] Mon, 22 November 2010 09:48 Go to previous messageGo to next message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
Hi,

Role2: ref=[Role1|SENTENCE];

(somewhat hidden in the documentation for cross references, but the example for qualified names uses this syntax)

note that ref=[Role1] is short for ref=[Role1|ID]

Alex
Re: Cross-reference change RuleCall [message #640534 is a reply to message #640482] Mon, 22 November 2010 12:57 Go to previous message
Dusan Savic is currently offline Dusan SavicFriend
Messages: 62
Registered: July 2009
Member
Thanx.
Alex.
Previous Topic:Variables through the grammar and the UML model
Next Topic:Comments in the AST
Goto Forum:
  


Current Time: Thu Apr 25 02:04:44 GMT 2024

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

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

Back to the top