Forums

precedence of "implies"

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

precedence of "implies"

Postby Charles » Mon Aug 23, 2010 8:55 pm

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.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: precedence of "implies"

Postby nevdelap » Tue Aug 24, 2010 1:48 pm

Perfect. I thought that after reading something else in the compiler code. My mistake. Thanks!
call me Nev.
nevdelap
 
Posts: 61
Location: Buenos Aires


Return to Discussion

Who is online

Users browsing this forum: No registered users and 76 guests

cron