3 ms·
It doesn't need a full AST. It needs a tokenizer and a nesting level or potentially a stack of different classes of token nesting. This parser would not be dif
by barrkel 11y ago
It doesn't need a full AST. It needs a tokenizer and a nesting level or potentially a stack of different classes of token nesting.
This parser would not be difficult to write; the only "recovery" is in choosing how to react to mismatched token pairs. The simplified problem means heuristics could potentially be used.