Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Variable Reference or New Variable Declaration
Variable Reference or New Variable Declaration [message #1231043] Mon, 13 January 2014 17:29 Go to next message
Michael Ernst is currently offline Michael ErnstFriend
Messages: 49
Registered: July 2010
Member
Hi,

I got a grammar which uses some marker element like "var type name" to define new variables. Now I want that I'm also able to write something like "a = 2" without the "var" and "type" elements. So on the left side of an assignment can either be a variable reference or a new variable definition. But how does the grammar looks like if the type "reference" or "variable declaration" depends on the current scope? Any ideas or examples?

Kind regards
Michael
Re: Variable Reference or New Variable Declaration [message #1231045 is a reply to message #1231043] Mon, 13 January 2014 17:32 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13666
Registered: July 2009
Senior Member
Hi,

it aint that easy

http://www.eclipse.org/forums/index.php/m/1228307/?srch=ILinkingDiagnosticMessageProvider#msg_1228307


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

[Updated on: Mon, 13 January 2014 17:32]

Report message to a moderator

Previous Topic:Errors when extending OCL
Next Topic:Xtext grammar translation bug?
Goto Forum:
  


Current Time: Tue Dec 01 19:03:40 GMT 2020

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

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

Back to the top