- The Perl part of using Parse::RecDescent is very simple.
- Basically, one has two strings. One string containing the grammar,
another string containing the text that has to be parsed.
- First, create a parser:
my $parser = Parse::RecDescent -> new ($grammar) or die;
- Then, parse the text given a certain startrule:
my $result = $parser -> startrule ($text);