3 ms·
It is formally proven that Perl can't be parsed! https://www.perlmonks.org/index.pl?node_id=663393 https://www.perlmonks.org/index.pl?node_id=663393
by lloeki 5y ago
It is formally proven that Perl can't be parsed!
https://www.perlmonks.org/index.pl?node_id=663393 https://www.perlmonks.org/index.pl?node_id=663393
- RandalSchwartz 5y agoIt has been said that "the Perl compiler is based on yacc, lex, smoke, and mirrors."
- bmn__ 5y agoIt can be externally parsed with ambiguities. The article is written by someone who authored such a parsing toolkit about three years later. Despite what you may have learnt, an ambiguous parse tree is still a useful thing to have, we can build tools taking it into account, also most existing tools can be modified in a straightforward fashion to make use of the extra nodes. The real Perl parser disambiguates with heuristics and run-time hints. There exists an unambiguous subset of Perl syntax that is expressible with a BNF grammar, and such is amenable to all parsers. http://p3rl.org/standard#DESCRIPTION http://p3rl.org/standard#DESCRIPTION
- lloeki 5y agoYeah, I always found the linked post to not be all that serious about it anyway, just a funny, satisfying hacker thing.