in reply to Re^3: Only perl parses perl hash notation?
in thread Only perl parses perl hash notation?
The Windows equivalent would be: "Nothing can parse Perl except PERL.EXE."
The saying is NOT trying to suggest that a Perl script can flawlessly parse Perl language snippets. That is a common misconception and misunderstanding. A parser written in Perl can do a lot, but any parser you're likely(*) to write in Perl will fail to parse all of the Perl language.
The wisdom in this koan is to realize that the Perl language is so crufty with special-cases and funky exceptions to its own grammars that it would be folly to try to parse any Perl script by writing a parser from scratch. Even the human brain can't always parse Perl in many cases. You'll get hung up on the many years of grammar evolution.
(*) Unless you're implementing Perl6, which is really just using Perl6 to plan Perl6.
--
[ e d @ h a l l e y . c c ]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Only perl parses perl hash notation?
by BrowserUk (Patriarch) on Oct 05, 2004 at 13:46 UTC | |
by halley (Prior) on Oct 05, 2004 at 19:20 UTC | |
by BrowserUk (Patriarch) on Oct 05, 2004 at 20:13 UTC | |
by SpanishInquisition (Pilgrim) on Oct 05, 2004 at 13:57 UTC | |
by BrowserUk (Patriarch) on Oct 05, 2004 at 14:19 UTC | |
by SpanishInquisition (Pilgrim) on Oct 05, 2004 at 14:55 UTC | |
by Anonymous Monk on Oct 06, 2004 at 10:46 UTC | |
|
Re^5: Only perl parses perl hash notation?
by SpanishInquisition (Pilgrim) on Oct 05, 2004 at 13:53 UTC |