Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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?
Re: Writing a Grammar?
by planetscape (Canon) 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 about the Monastery: (7)
As of 2014-07-28 21:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (209 votes), past polls