3 ms·
Unlimited lookahead parsers are not necessarily inefficient in terms of time. PEGs for instance run in linear time, but use up linear memory, which is the probl
by ogogmad 6y ago
Unlimited lookahead parsers are not necessarily inefficient in terms of time. PEGs for instance run in linear time, but use up linear memory, which is the problem: https://en.wikipedia.org/wiki/Parsing_expression_grammar https://en.wikipedia.org/wiki/Parsing_expression_grammar
> - How does the Go parser's implementation differ from those of the languages I'd previously listed which all also have angle brackets for comparison (and bit shifts, as another commenter pointed out) while apparently avoiding unbounded look-ahead?
I think parsing Java or C++ requires unlimited lookahead.
- echlebek 6y agohttps://blog.reverberate.org/2013/08/parsing-c-is-literally-undecidable.html https://blog.reverberate.org/2013/08/parsing-c-is-literally-...