README

Glob Grammar

Glob::Grammar

Grammar for the Glob language.

Supports ? and * and ranges (at least some).

Glob::ToRegexActions

If passed as the action to Glob::Grammar, it converts the glob into a (string) regex that can be used for matching against

Sample usage

use	Glob::Grammar;
use	Glob::ToRegexActions;

my $fetched-regex = Glob::Grammar.parse('Module::Name::*', actions => Glob::ToRegexActions.new()).made;
say $fetched-regex;
# OUTPUT: ^Module\\:\\:Name\\:\\:.*$

my $match = 'Module::Name::Complete' ~~ /<$fetched-regex>/;
say $match;
# OUTPUT: Module::Name::Complete

Glob::Grammar v0.0.2

Grammar for Glob language, with an Actions class that converts to regex

Authors

    License

    Artistic-2.0

    Dependencies

    Test Dependencies

    Provides

    • Glob::Grammar
    • Glob::ToRegexActions

    Documentation

    The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.