This is screwed up. I've narrowed the issue down to one line in new_scanner.l:
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:EXP {EXP}{SP}("+"|"-"|"*"|"/"){SP}{VAL}|{VAL}
and I rewrote the conditional regex:Code:BINOP "+"|"-"|"*"|"/" EXP_END ({SP}{BINOP}{SP}{VAL})*
win.Code:{VAL}{EXP_END}{SP}(">"|"<"){SP}{VAL}{EXP_END}




Reply With Quote