[PUGS] [PATCH] Fix unary -

2 views
Skip to first unread message

Luke Palmer

unread,
Feb 26, 2005, 3:11:05 AM2/26/05
to Compiler List
I hunted down the -1 + 10 == -11 bug. I came up with a fix, but I'm not
sure how apporpriate the fix is, which is why I'm submitting it as a
patch. The problem was that in Prim.hs all the symbolic unaries were
being listed alongside the named unaries, and the unaries in the
precedence table were being overwritten by the universal-precedence
named unaries.

I fixed it by adding a new "associativity", "spre" (symbolic prefix).
This is for prefix things that are listed in the precedence table in
Parser.hs.

Please look over it.

Luke

pugs-spre.patch

Autrijus Tang

unread,
Feb 26, 2005, 4:44:40 AM2/26/05
to Luke Palmer, Compiler List
On Sat, Feb 26, 2005 at 01:11:05AM -0700, Luke Palmer wrote:
> I fixed it by adding a new "associativity", "spre" (symbolic prefix).
> This is for prefix things that are listed in the precedence table in
> Parser.hs.
>
> Please look over it.

It looks sane. We eventually want to regenerate the whole table
using the precedence traits (without hard-coded tables in Parser.hs),
and this needs to be redone when that happens, but for now it should
work. Applied!

Thanks,
/Autrijus/

Reply all
Reply to author
Forward
0 new messages