This is screwed up. I've narrowed the issue down to one line in new_scanner.l:
Code:
EXP {EXP}{SP}("+"|"-"|"*"|"/"){SP}{VAL}|{VAL}
I ruled it further down to the recursive definition! I don't understand, and I must less care. I rewrote it without the {EXP} and now it works!
Code:
BINOP "+"|"-"|"*"|"/"
EXP_END ({SP}{BINOP}{SP}{VAL})*
and I rewrote the conditional regex:
Code:
{VAL}{EXP_END}{SP}(">"|"<"){SP}{VAL}{EXP_END}
win.