Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong operator precedence #16

Closed
GoogleCodeExporter opened this issue Mar 22, 2015 · 3 comments
Closed

Wrong operator precedence #16

GoogleCodeExporter opened this issue Mar 22, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link


I spotted this while parsing something like

Var1 == 1 && Var2 == 2
--
The probable cause is that in mpOprtBinCommon.h many operators have a wrong 
priority. 
In that file you see that the priority of inline defined classes (such as 
OprtEQ) is set equal to 2, instead (I suppose) of prRELATIONAL1

The same applies to relation operators below (prRELATIONAL2).

Also I guess (but I'm not sure) that the MUP_BINARY_OPERATOR definitions in 
that file are not correct. 

 MUP_BINARY_OPERATOR(OprtBAnd, _T("and"),  bool_type, _T("less than"), 1, oaLEFT, a&&b)

should that line have a priority value taken from the EOprPriority enumeration, 
instead of "1"?


Original issue reported on code.google.com by tho...@gmail.com on 19 Dec 2012 at 11:06

@GoogleCodeExporter
Copy link
Author

Thanks for the report. This is one of the bug reports where i start intending 
to explain why this can't possibly be true and end up with an alarminly high 
rate of WTF's per second while looking at the code.

This issue should be fixed in V2.1.6. SVN and binary archives were already 
updated.

Original comment by ib...@gmx.info on 20 Dec 2012 at 10:03

@GoogleCodeExporter
Copy link
Author

Original comment by ib...@gmx.info on 20 Dec 2012 at 10:04

  • Changed state: Fixed
  • Added labels: Priority-High, OpSys-All
  • Removed labels: Priority-Medium

@GoogleCodeExporter
Copy link
Author

:)

thank you!

Original comment by tho...@gmail.com on 21 Dec 2012 at 7:29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant