Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » EGL - syntax error on the simplest example?(Trying to execute listing 7.1 in Epsilon book - stuck)
EGL - syntax error on the simplest example? [message #1063507] Thu, 13 June 2013 06:37 Go to next message
Julian Johnson is currently offline Julian Johnson
Messages: 20
Registered: March 2013
Junior Member
Hi

I've created an egl file, testEpsbook7.1.egl, with the following code (verbatum):

[% for (i in sequence(1..5)) { %]
i is [%=i%]
[% } %]

...but I am getting an error 'multiple markers...', illustrated in attached screen capture. Have experimented, also searched forum, but am baffled. What have I done wrong?

Thanks
Julian.
Re: EGL - syntax error on the simplest example? [message #1063522 is a reply to message #1063507] Thu, 13 June 2013 07:12 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 804
Registered: July 2009
Senior Member
Hi Julian,

The following should work:

[% for (i in Sequence{1..5}) { %]
i is [%=i%]
[% } %]

Regards,
Dimitris
Re: EGL - syntax error on the simplest example? [message #1063527 is a reply to message #1063522] Thu, 13 June 2013 07:32 Go to previous messageGo to next message
Julian Johnson is currently offline Julian Johnson
Messages: 20
Registered: March 2013
Junior Member
Ah, I see curly braces {1..5}. I have corrected the file, saved it, exited editor (all in Eclipse), re-opened file, but still getting the same error.
The egl file copied direct from editing window is:

[% for (i in sequence{1..5}) { %]}
i is [%=i%]
[% } %]

Any other ideas? Do I need to do something to make it re-parse the file?
Re: EGL - syntax error on the simplest example? [message #1063533 is a reply to message #1063527] Thu, 13 June 2013 07:42 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 804
Registered: July 2009
Senior Member
Hi Julian,

It should be "Sequence" instead of "sequence" (EGL is case-sensitive).

Regards,
Dimitris
Re: EGL - syntax error on the simplest example? [message #1063574 is a reply to message #1063533] Thu, 13 June 2013 08:40 Go to previous message
Julian Johnson is currently offline Julian Johnson
Messages: 20
Registered: March 2013
Junior Member
Ahah. Now it works! Thanks. One small step...

J
Previous Topic:patching the source code
Next Topic:Create a product (with RCP) after Eugenia
Goto Forum:
  


Current Time: Fri Aug 01 10:02:09 EDT 2014

Powered by FUDForum. Page generated in 0.02911 seconds