Hacker News new | ask | show | jobs
by acchow 4612 days ago
Ah, right. Now that I actually read your code, that's the real bug :p

The issue with this "state machine" approach is you don't have "lookahead".

In the two pass approach (approach from one side, then the other), you essentially have two machines, one implicitly serving as the "lookahead" for the other.