Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Writing a Grammar?

by jdrago_999 (Hermit)
on Mar 31, 2007 at 03:28 UTC ( #607602=perlquestion: print w/ replies, xml ) Need Help??
jdrago_999 has asked for the wisdom of the Perl Monks concerning the following question:

Monks -

I've suddenly become interested in learning how to write a grammar. Once I get the hang of it, I might write a grammar for something useful (who knows?).

I know that there is Parse::RecDescent but after seeing the syntax used in Perl-6.0.0-STD.pm, I think I'm missing something.

The syntax used in that file is clear and instantly recognizable. Where can I learn more?

Thanks!

Comment on Writing a Grammar?
Replies are listed 'Best First'.
Re: Writing a Grammar?
by planetscape (Chancellor) on Mar 31, 2007 at 03:35 UTC
Re: Writing a Grammar?
by NetWallah (Abbot) on Mar 31, 2007 at 05:21 UTC
    I continue to enjoy using merlyn's Inline::Spew module, which generates text based on a user-defined grammar. Wonderful for Mission statements, and performance reviews!.

    It, in turn, uses Parse::RecDescent, but hides the complexities.

         "Choose a job you like and you will never have to work a day of your life" - Confucius

Re: Writing a Grammar?
by adrianh (Chancellor) on Apr 01, 2007 at 08:06 UTC
    I know that there is Parse::RecDescent but after seeing the syntax used in Perl-6.0.0-STD.pm, I think I'm missing something.

    What you're missing is that the latter is Perl 6 :-)

    For another approach to parsers in Perl 5 you might want to take a look at HOP::Parser.

Re: Writing a Grammar?
by jdrago_999 (Hermit) on Apr 02, 2007 at 17:00 UTC
    Thanks to everyone for your replies - I'll look into the options presented.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://607602]
Approved by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2015-07-31 06:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls