Re: Looking for Perl Grammar
- From: Christopher Nehren <apeiron+usenet@xxxxxxxxxxxxxxxxx>
- Date: 29 Apr 2005 17:33:42 GMT
On 2005-04-29, Khamis Abuelkomboz scribbled these curious markings:
> I'm writing a Perl parser and I'm looking for a pure perl grammar. the
> documentation from perl is not a pure grammar, it's more a
> documentation of the perl language.
[Please wrap your lines at 70-72 characters. Thank you.]
First, a bit of folklore: "Only perl can parse Perl". What this means is
that only perl (the program) is capable of properly and completely
parsing Perl (the language). So why not have the existing Perl parser
(accessible at least via the command perl and possibly via a shared
library) do it for you? If you're doing this from C, you should start
with perldoc perlembed (assuming your documentation is installed, of
course; some Unix vendors think that it's bright to not ship
documentation by default).
Second, failing that, you can find the file perly.y in the perl source
kit which contains the grammar for the language.
Best Regards,
Christopher Nehren
--
I abhor a system designed for the "user", if that word is a coded
pejorative meaning "stupid and unsophisticated". -- Ken Thompson
If you ask the wrong questions, you get answers like "42" and "God".
Unix is user friendly. However, it isn't idiot friendly.
.
- References:
- Looking for Perl Grammar
- From: Khamis Abuelkomboz
- Looking for Perl Grammar
- Prev by Date: Re: multiples ifs
- Next by Date: Re: Can this be rewritten better?
- Previous by thread: Looking for Perl Grammar
- Next by thread: Re: Looking for Perl Grammar
- Index(es):
Relevant Pages
|
|