>>>>> "Tom" == Tom Lane <t...@sss.pgh.pa.us> writes:
>> Patch attached. >> This fixes two bugs: first the mis-lexing of two-char ops as mentioned >> originally; second, the O(N^3) lexing time of strings of - or + >> characters is reduced to O(N^2) (in practice it's better than O(N^2) >> once N gets large because the bison stack gets blown out, ending the >> loop early). Tom> Looks reasonable offhand (didn't test). A couple of thoughts: Tom> * Some regression tests exercising these code paths might be a Tom> good thing. Agreed. Any preferences where they should go? Tom> * There should likely be a comment near where EQUALS_GREATER and Tom> friends are defined, pointing out that if we add any more Tom> multi-character operators with special precedences, this code has Tom> to be taught about them. Agreed; will do this. -- Andrew (irc:RhodiumToad)