Book a Demo

Author Topic: EA Grammar code synchronization problems  (Read 3247 times)

nsteve

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
EA Grammar code synchronization problems
« on: December 30, 2013, 08:59:58 pm »
Hi everyone,
I have written a grammar to reverse Delphi XE5 code (generics etc.) , which we are using for one project.
The reversing seems to work fine except for some problems:
  • Adding or modifying methods in the model does not update the source code when regenerating the code with the synchronization enabled. It gets generated when using 'overwrite' but from then on synchronizing does not work neither from the source code editor nor from the model.
  • Parsing the source code in the source editor leads to a parse error when the model uses generics. These errors vanish, when the code is updated (like adding something and removing it again) in the source view. Seems like diferent parsers are used.
  • Reversing the implementation for functions or methods from source code does not work - the initial behavior section is empty (this function is enabled for the language). I also tried this for the example language - same problem. I might have missed somehing in the grammar definition.
Can anyone help me please.
These problems severly affect the roundtrip engineering for new languages.

Cheers, Steve

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: EA Grammar code synchronization problems
« Reply #1 on: December 31, 2013, 10:50:14 am »
I can offer some support, but I won't be able to help much unless you provide your grammar.

The second problem sound like EA is using the default Delphi grammar instead of your grammar based on file extension. Does the same thing happen if you disable the built-in delphi language?

The first may be a similar issue. Can't tell from what you've given me.

The last is that you'll need to create an attribute "CODE" from the skip to the end of the method.

nsteve

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: EA Grammar code synchronization problems
« Reply #2 on: January 06, 2014, 07:39:28 pm »
Hello Simon,

thanks for the reply!

I wil try the CODE attribute in the next days - currently I am working on something else.
I have talked to management and they agree to send you the grammar as long it is not made publicly available. Can you supply an email address?

Cheers, Stephan

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: EA Grammar code synchronization problems
« Reply #3 on: January 07, 2014, 08:41:52 am »
Quote
Can you supply an email address?
[email protected] and mark it for attention of Simon M (we have a few Simons).
The Sparx Team
[email protected]