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
In reply to Re: RecDescent reuse or modular grammar
by knobunc
in thread RecDescent reuse or modular grammar
by PetaMem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |