Skip to content
Snippets Groups Projects
Commit 3fd6858f authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Macroprocessor: fix priority of operators

- == and != have now lower priority than <= < >= >, for consistency with the
  Dynare modelling language (and incidentally C and C++, but not Julia).

- ^ has now higher priority and no associativity, for consistency with the
  Dynare modelling language (and usual arithmetic notation).

- & has now higher priority than |, and both have lower priority than + and -,
  but higher than inequality comparators. This is not the same as C and C++ (in
  which & and | are just above && and ||), but this allows for expressions such
  as "a|b == c" to have their most natural semantics (i.e. this will compare
  the union of a and b with c; the C/C++ priority level would have resulted in
  a type error).

Ref #5.
parent 4624a310
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment