4 ms·
Just write your parser as a collection of functions that can use tail calls. You should end up with a similar structure, i.e. a block of code with jumps instead
by tijsvd 6y ago
Just write your parser as a collection of functions that can use tail calls. You should end up with a similar structure, i.e. a block of code with jumps instead of calls.
Even in C++ I'd prefer that over a goto-based system (unless generated).