From: | "BGB / cr88192" <cr88192@hotmail.com> |
Newsgroups: | comp.compilers |
Date: | Sat, 1 May 2010 17:24:08 -0700 |
Organization: | albasani.net |
References: | 10-04-073 |
Keywords: | parse, syntax |
Posted-Date: | 02 May 2010 22:22:27 EDT |
"Pallav singh" <singh.pallav@gmail.com> wrote in message
> 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 );
> [How does associativity matter here? Those examples may be redundant, but
> they're not ambiguous. -John]
yeah.
I guess I will add here that associativity only really makes sense when
binary operators are in use:
"3+4*5" => "(3+4)*5" or "3+(4*5)", ...
but, with a unary operator, there is only a single possible parsing:
the operator and the expression it operates on.
one can't have associativity directly between the operators, as this would
not make sense:
"! ! ! x" => "(! !) ! x;"? nope...
however, precedence ordering may still effect things:
"!x+3" => "(!x)+3" or "!(x+3)".
Return to the
comp.compilers page.
Search the
comp.compilers archives again.