RE: NASL2: precedence of 'logical NOT'

"Jim Cervantes" <[email protected]>
Newsgroups gmane.comp.security.nessus.devel
Message-ID <[email protected]>
Isn't it true that most programming languages give unary operators very high
precedence?  I have always found this easy on the brain since it translates
into unary operators always binding to tokens that immediately follow.
Won't most people with at least some programming experience find what you
are suggesting to be unfamiliar?

Jim

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Michel Arboi
> Sent: Sunday, February 16, 2003 3:28 PM
> To: Nessus Devel
> Subject: NASL2: precedence of 'logical NOT'
>
>
> First I forgot to put '!' in the list of %prec instruction.
> Then I added it, but probably in the wrong place.
> _Currently_, things like ! x == y are parsed as (!x) == y, which is
> wrong IMHO. It should be ! (x == y)
>
> Worse "! x >< y" is parsed as "(!x) >< y" which is absurd.
>
> So, the priority of NOT should be set _below_ the priority of the
> compare operators.
> Where exactly? Below AND and OR? Or not?
> i.e. "! x && y" = "! (x && y)" or "(!x) && y" ?
> I vote for the 2nd interpretation.
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.