Book a Demo

Author Topic: reverse code with far keyword  (Read 5143 times)

olli_s

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
reverse code with far keyword
« on: July 13, 2011, 06:41:15 pm »
Hi,
I have to reverse engineer c-code, which uses some none-ANSI keywords like "far". When opening it with the internal editor, a "Parse Error on line xxx" is shown and it seems that not all of the code is interpreted correctly. How can I add these keywords to the affected project to have the code being parsed error-free?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: reverse code with far keyword
« Reply #1 on: July 13, 2011, 07:00:30 pm »
you can't.

Geert

olli_s

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: reverse code with far keyword
« Reply #2 on: July 13, 2011, 07:10:35 pm »
Hallo Geert,

when using other tools like spell checkers it helped to use something like "define far" in their configuration files to replace the far-keyword by nothing ("").
Is there such a possibility in EA - e. g. define a type that replaces far with blanks so the parser is satisfied?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: reverse code with far keyword
« Reply #3 on: July 13, 2011, 07:13:36 pm »
I'm afraid there's no way at all to interfere in the inner workings of the reverse engineering process.

Geert

olli_s

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: reverse code with far keyword
« Reply #4 on: July 13, 2011, 07:19:02 pm »
o.k. - then let's try it the other way round. Is there a language macro like __EA__ that I could use for a constuct like

#ifdef __EA__
#define far
#endif

in my code, which again the parser recognizes?


Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: reverse code with far keyword
« Reply #5 on: July 14, 2011, 09:33:08 am »
Geert, this is a common problem and EA has had handling for it since before version 4.

os14, Look at Settings | Preprocessor macros.

Just add "far" into that list.

olli_s

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: reverse code with far keyword
« Reply #6 on: July 14, 2011, 03:51:22 pm »
That did it - how simple life can be ...  :)

Thanks for you efforts

Olaf

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: reverse code with far keyword
« Reply #7 on: July 14, 2011, 04:15:04 pm »
Quote
Geert, this is a common problem and EA has had handling for it since before version 4.

os14, Look at Settings | Preprocessor macros.

Just add "far" into that list.

Oops I didn't know about that, sorry for the misleading answers :-[

Geert