Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Function Object Precedence
#1
Hi

I'm writing a decompiler for an old game called America's Army 2.8.5
I'm coming along well, but have gotten a bit stuck on operator Precedence.

I see in the release notes for 1.2.2.1 that you have solved this
Quote:Function precedences are now decompiled for example prior update “(4 + 5) * 4” was decompiled as “4 + 5 * 4”

What information do I need?

I have precedence on the native operators defenitions in Core.Object.

native(173) static final operator(18) Float % (float A, float B);
native(174) static final operator(20) Float + (float A, float B);
native(175) static final operator(20) Float - (float A, float B);
native(176) static final operator(24) Bool < (float A, float B);

There is also a property in the function definitions, witch is called OperatorPrecedence(After iNative)

Have I missed any input needed?

The lower the Precedence, the higher the importance of keeping it together?

As I understand it the compiler moves around the operators in a statement so the "rules" will produce a correct output

Can you provide any information on this subject(OperatorPrecedence)?
Reply


Messages In This Thread
Function Object Precedence - ELiZ - 06-15-2013, 07:02 PM
RE: Function Object Precedence - eliot - 06-17-2013, 07:08 AM
RE: Function Object Precedence - ELiZ - 06-18-2013, 03:45 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)