What if you want to embed a table using the field separator in a table using the field separator?
There is no fail here, this is what escaping is for. And with escaping, you can nest infinitely.
There is no fail here, this is what escaping is for. And with escaping, you can nest infinitely.
Don't get caught in the CS trap of thinking you need a completely "general purpose" parser, when a slightly-less-than-completely-general parser will be significantly easier to write, simpler to understand and debug, and faster to execute. And as mentioned above, if you do find yourself needing more than this parser, then you should be looking at non-parsing based approaches anyway.