=begin pod =TITLE class Grammar class Grammar is Cursor { } C is the superclass that classes automatically get when they are declared with the C keyword instead of C. =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 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 object, and also sets the caller's C<$/> variable to the result Match object. =end pod