diff --git a/.gitignore b/.gitignore index 70f1f03..94aa69b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,8 @@ Makefile /src/Partcl/*.pir /src/Partcl/commands/*.pir /src/ARE/*.pir -/src/Glob/*.pir +/src/StringGlob/*.pir +/src/FileGlob/*.pir /src/init.pir /src/options.pir /src/Tcl*.pir diff --git a/build/Makefile.in b/build/Makefile.in index 30ce02d..8c2a2a0 100644 --- a/build/Makefile.in +++ b/build/Makefile.in @@ -17,9 +17,9 @@ GEN_SOURCES = \ src/ARE/Actions.pir \ src/ARE/Compiler.pir \ src/ARE/Grammar.pir \ - src/Glob/Actions.pir \ - src/Glob/Compiler.pir \ - src/Glob/Grammar.pir \ + src/StringGlob/Actions.pir \ + src/StringGlob/Compiler.pir \ + src/StringGlob/Grammar.pir \ src/Partcl/Actions.pir \ src/Partcl/Compiler.pir \ src/Partcl/Grammar.pir \ diff --git a/src/Glob/Compiler.pm b/src/Glob/Compiler.pm deleted file mode 100644 index 9dfbf00..0000000 --- a/src/Glob/Compiler.pm +++ /dev/null @@ -1,9 +0,0 @@ -class Glob::Compiler is HLL::Compiler { - INIT { - Glob::Compiler.parsegrammar(Glob::Grammar); - Glob::Compiler.parseactions(Glob::Actions); - Glob::Compiler.language('Glob'); - } -} - -# vim: filetype=perl6: diff --git a/src/Partcl.pir b/src/Partcl.pir index 174e550..c9ca30d 100644 --- a/src/Partcl.pir +++ b/src/Partcl.pir @@ -34,9 +34,9 @@ .include 'src/ARE/Grammar.pir' .include 'src/ARE/Actions.pir' .include 'src/ARE/Compiler.pir' -.include 'src/Glob/Grammar.pir' -.include 'src/Glob/Actions.pir' -.include 'src/Glob/Compiler.pir' +.include 'src/StringGlob/Grammar.pir' +.include 'src/StringGlob/Actions.pir' +.include 'src/StringGlob/Compiler.pir' .include 'src/init.pir' .include 'src/options.pir' diff --git a/src/Partcl/commands/string.pm b/src/Partcl/commands/string.pm index 07676b6..e1250a1 100644 --- a/src/Partcl/commands/string.pm +++ b/src/Partcl/commands/string.pm @@ -108,8 +108,8 @@ our sub string(*@args) { } ## my &dumper := Q:PIR { %r = get_root_global ['parrot'], '_dumper' }; - ## &dumper(Glob::Compiler.compile($pattern, :target)); - my $globber := Glob::Compiler.compile($pattern); + ## &dumper(StringGlob::Compiler.compile($pattern, :target)); + my $globber := StringGlob::Compiler.compile($pattern); ?Regex::Cursor.parse($string, :rule($globber), :c(0)); } elsif $cmd eq 'range' { return ''; diff --git a/src/Glob/Actions.pm b/src/StringGlob/Actions.pm similarity index 98% rename from src/Glob/Actions.pm rename to src/StringGlob/Actions.pm index ad1888b..ed3217b 100644 --- a/src/Glob/Actions.pm +++ b/src/StringGlob/Actions.pm @@ -1,4 +1,4 @@ -class Glob::Actions is HLL::Actions; +class StringGlob::Actions is HLL::Actions; method TOP($/) { my $ast := $.ast; diff --git a/src/StringGlob/Compiler.pm b/src/StringGlob/Compiler.pm new file mode 100644 index 0000000..7992165 --- /dev/null +++ b/src/StringGlob/Compiler.pm @@ -0,0 +1,9 @@ +class StringGlob::Compiler is HLL::Compiler { + INIT { + StringGlob::Compiler.parsegrammar(StringGlob::Grammar); + StringGlob::Compiler.parseactions(StringGlob::Actions); + StringGlob::Compiler.language('StringGlob'); + } +} + +# vim: filetype=perl6: diff --git a/src/Glob/Grammar.pm b/src/StringGlob/Grammar.pm similarity index 91% rename from src/Glob/Grammar.pm rename to src/StringGlob/Grammar.pm index 303ae39..f165945 100644 --- a/src/Glob/Grammar.pm +++ b/src/StringGlob/Grammar.pm @@ -1,4 +1,4 @@ -grammar Glob::Grammar is HLL::Grammar; +grammar StringGlob::Grammar is HLL::Grammar; token TOP {