Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMT (Generative Modeling Technologies) » [TCS] Is "autoCreate=ifmissing" usable?
[TCS] Is "autoCreate=ifmissing" usable? [message #613626] Thu, 13 March 2008 14:41
Guillaume Savaton is currently offline Guillaume Savaton
Messages: 19
Registered: July 2009
Junior Member
Hi,

I am working on a small example language.
In my TCS syntax, I am trying to use the "autoCreate" parameter like this :

template Program main context
: assignments
;

template Assignment
: variable{refersTo=name, lookIn=owningProgram.variables,
autoCreate=ifmissing} "=" expression ";"
;

When meeting an assigned variable name, the parser creates a new
"Variable" element and correctly sets the "variables" reference in the
surrounding "Program" element.
The problem is that "ifmissing" seems to have the same effect as "always":
if I use the same variable name in several assignments, several variables
with the same name are created.

Since I found no example using "ifmissing", I am wondering whether this
feature has already been used successfully, and how I could get it to work.

Many thanks for your help,

Guillaume
Previous Topic:Re: [ATL][AM3] editing Models
Next Topic:EVL commenting
Goto Forum:
  


Current Time: Fri Oct 31 12:25:56 GMT 2014

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

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