Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: RecDescent reuse or modular grammar

by knobunc (Pilgrim)
on Jun 18, 2001 at 18:56 UTC ( #89319=note: print w/ replies, xml ) Need Help??


in reply to RecDescent reuse or modular grammar

Can't you just build your grammar up from pieces? e.g.:

my $expression_grammar = qq(# Your common grammar here ); my $facts_grammar = qq(main: .... $expression_grammar ); my $rules_grammar = qq(main: ... $expression_grammar ); my $facts_parser = Parse::RecDescent->new($facts_grammar); my $rules_parser = Parse::RecDescent->new($rules_grammar);

-ben


Comment on Re: RecDescent reuse or modular grammar
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2015-07-06 08:39 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 (70 votes), past polls