3 ms·
The much paraded statically unresolvable ambiguity does not apply when the Perl 5 parser parses Perl 5 code for reasons explained in the article. The parse tre
by chromatic 17y ago
The much paraded statically unresolvable ambiguity does not apply when the Perl 5 parser parses Perl 5 code for reasons explained in the article. The parse tree produced is unambiguous.
Grammar modifications in BEGIN blocks make the parsing process a little different from many other languages with which I believe readers are familiar.
- gdp 17y agoSure, the generation of a parse tree is unambiguous, but the traversal order of that tree is not statically determinable. I'm not even saying there is anything wrong with this, I'm just arguing that the way you have described the "compilation" process in Perl is basically a textbook description of an interpreter that relies on some runtime information in order to execute the program.