Page 1 of 1

precedence of "implies"

PostPosted: Mon Aug 23, 2010 8:55 pm
by Charles
Nev, in your notes in the wiki you stated that "and", "or" and "implies" all had the same precedence which sounded incorrect to me. I checked the precedence table in CobraParser.cobra which gives:
...

'IN': 35,
'NOTIN': 35,

'AND': 30,
'OR': 30,

'IMPLIES': 20,

'ASSIGN': 20,
...
This makes "implies" as low as assignments, enabling you to put other arithmetic, comparison and boolean expressions on either side of "implies".

If there is a reason why you thought it was the same level, such as some test result you got, please let me know.

Re: precedence of "implies"

PostPosted: Tue Aug 24, 2010 1:48 pm
by nevdelap
Perfect. I thought that after reading something else in the compiler code. My mistake. Thanks!