Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
=begin pod | ||
=TITLE class Grammar | ||
class Grammar is Cursor { } | ||
C<Grammar> is the superclass that classes automatically get when they are | ||
declared with the C<grammar> keyword instead of C<class>. | ||
=head1 Methods | ||
=head2 parse | ||
method parse(Grammar:D: $str, :$rule = 'TOP', :$actions) returns Match:D | ||
Matches the grammar against C<$str>, using C<$rule> as start rule, | ||
optionally applying C<$actions> as actions object. | ||
Returns the resulting L<Match> object, and also sets the caller's C<$/> | ||
variable to the result Match object. | ||
=head2 parsefile | ||
method parsefile(Grammar:D: $filename, :$rule = 'TOP', :$actions) returns Match:D | ||
Matches the grammar against the contents of file C<$fielname>, | ||
using C<$rule> as start rule, | ||
optionally applying C<$actions> as actions object. | ||
Returns the resulting L<Match> object, and also sets the caller's C<$/> | ||
variable to the result Match object. | ||
=end pod | ||
|