JohnEarnest/Decker

Parser bug with negative numbers next to alphabetical characters

razetime opened this issue · 3 comments

Reproduction:

  4=-1+5
0
  5=-1+6
0
  6=-1+7
0
  -1+5
4
  4=5-1
1

Encountered during aoc 2022 day 8, today.

It's parser behavior; not specific to =:

  4=-1+5
0
  4= -1+5
1

  a:5
5
  a-1+5
-1
  a -1+5
4

I believe I have a resolution which makes this behavior less surprising.

- is always such a pain.

Thanks, it seems to be correct now.