Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Issue with the '*]' character sequence in the generated text
Issue with the '*]' character sequence in the generated text [message #1862475] Wed, 06 December 2023 22:23 Go to next message
Yves BERNARD is currently offline Yves BERNARDFriend
Messages: 152
Registered: July 2014
Senior Member
It looks like if the generated text includes the '*]' a kind of silent internal error happens that prevent any content to be generated. It looks very much as a bug to me.

See the sample code attached.
If you execute it as is, you will get some dummy content in the generated text file.

However, if you remove the double slash from line 19 in order to activate it, the execution seems to work except that it produces an empty file.

I didn't find anything about this in the documentation.
Do I miss something?
  • Attachment: Test.egl
    (Size: 0.38KB, Downloaded 18 times)


Yves
Re: Issue with the '*]' character sequence in the generated text [message #1862478 is a reply to message #1862475] Wed, 06 December 2023 23:08 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Yves,

This happens because *] is end-of-comment marker in EGL (see https://eclipse.dev/epsilon/doc/egl/#comments-and-markers), but clearly, a useful exception should be produced instead of an empty target file. Could you please create an issue about this in the GitHub repo?

Thanks,
Dimitris
Re: Issue with the '*]' character sequence in the generated text [message #1862479 is a reply to message #1862478] Wed, 06 December 2023 23:46 Go to previous messageGo to next message
Yves BERNARD is currently offline Yves BERNARDFriend
Messages: 152
Registered: July 2014
Senior Member
Hello Dimitris,

Thanks for your reply.

I can understand that in the EGL script I have to write:

var x: String = '***'+']';
Instead of:
var x: String = '***]';

As I did in the code sample because of '*]' is actually an EGL reserved character sequence, but the fact that the script engine makes a confusion between the code of the script and the output flow is really a problem. The fact that there is an exception generated will not solve it.

Indeed, it means that, as of today, it's not possible to generate any text file that would have the '*]' character sequence in it. And this is just worst if you consider that this character sequence is quite common in modeling languages (and probably programming ones as well), e.g. for specifying multiplicities or dimensions.

So, I will actually fill a bug but I hope that we could get better than an exception as a resolution! ;-)

Thanks anyway, for this impressive and very useful framework!



Yves
Re: Issue with the '*]' character sequence in the generated text [message #1862480 is a reply to message #1862479] Thu, 07 December 2023 00:06 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Generating a text file that contains *] is certainly possible with EGX/EGL: https://eclipse.dev/epsilon/playground/?3f4fc7c9

The issue in the example you provided is that .prepare() parses a dynamically-generated EGL template which contains the *] sequence. This is a syntax error and there's no way really to work around this.

Thanks,
Dimitris
Re: Issue with the '*]' character sequence in the generated text [message #1862481 is a reply to message #1862480] Thu, 07 December 2023 00:09 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

I've pushed a fix so that an exception is produced when an attempt is made to process a template that contains syntax errors.

Thanks,
Dimitris
Re: Issue with the '*]' character sequence in the generated text [message #1862482 is a reply to message #1862481] Thu, 07 December 2023 03:21 Go to previous messageGo to next message
Yves BERNARD is currently offline Yves BERNARDFriend
Messages: 152
Registered: July 2014
Senior Member
Ok, so if I get you right, it means that the way I used EGL is not appropriate with regard to what I want to achieve, at least considering that generating such a character sequence if part of it.

So, basically, the point is that such a character sequence should never be produced by an "@template" operation, either directly or indirectly, right?



Yves
Re: Issue with the '*]' character sequence in the generated text [message #1862486 is a reply to message #1862482] Thu, 07 December 2023 07:58 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

The issue is not with template operations at all; it is with calling prepare() with a string that is not a valid EGL template, see https://eclipse.dev/epsilon/playground/?db00bf29

Thanks,
Dimitris

[Updated on: Thu, 07 December 2023 08:00]

Report message to a moderator

Previous Topic:EOL Script error in standalone execution: The feature 'x' is not a valid feature
Next Topic:Detect User Inactivity and Logout (Eclipse RCP)
Goto Forum:
  


Current Time: Sat Apr 27 12:39:12 GMT 2024

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

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

Back to the top