Re: How to handle operator of undefined associativity

Ray <bear@sonic.net>
Sat, 01 May 2010 09:36:56 -0700

          From comp.compilers

Related articles
How to handle operator of undefined associativity singh.pallav@gmail.com (Pallav singh) (2010-04-29)
Re: How to handle operator of undefined associativity bear@sonic.net (Ray) (2010-05-01)
Re: How to handle operator of undefined associativity bartc@freeuk.com (bart.c) (2010-05-01)
Re: How to handle operator of undefined associativity cr88192@hotmail.com (BGB / cr88192) (2010-05-01)
Re: How to handle operator of undefined associativity cfc@shell01.TheWorld.com (Chris F Clark) (2010-05-02)
Re: How to handle operator of undefined associativity gah@ugcs.caltech.edu (glen herrmannsfeldt) (2010-05-03)
Re: How to handle operator of undefined associativity cr88192@hotmail.com (BGB / cr88192) (2010-05-05)
Re: How to handle operator of undefined associativity gah@ugcs.caltech.edu (glen herrmannsfeldt) (2010-05-05)
[5 later articles]
| List of all articles for this month |
From: Ray <bear@sonic.net>
Newsgroups: comp.compilers
Date: Sat, 01 May 2010 09:36:56 -0700
Organization: Doubtful
References: 10-04-073
Keywords: parse, syntax
Posted-Date: 02 May 2010 22:20:07 EDT

Pallav singh wrote:


> we have a unary opeator ( not ) in system verilog assertion.
> the associativity of operator not is undefined.
>
> should user be allowed to write multiple not
>
> not not not ( expr );
> not not ( expr );


A. Associativity doesn't affect the meaning of those expressions.


B. Not allowing people to use an operation (such as "not) on
      valid "not" expressions would be inconsistent with the way
      they can use it on other valid expressions.


C. Even though human beings are unlikely to write the above
      multiple negations, macros and code generators are unlikely
      to be able to completely avoid them.


So, in short, yes. You're free to reach a different conclusion
of course, but I can't think of a reason justifying the inconsistency
you'd introduce by not allowing it.


                                                                Ray



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.