Browse files

[README] updates

Also pushed COOLTHINGS down into new docs/ directory, and added a list of
  • Loading branch information...
1 parent d026724 commit c48c45bbb866eaf56975d5c43ff704803d442a64 @masak committed Feb 20, 2010
Showing with 52 additions and 14 deletions.
  1. +8 −14 README
  2. 0 { → docs}/COOLTHINGS
  3. +44 −0 docs/REGEXES_IN_GGE
@@ -18,18 +18,11 @@ challenge: PGE surprisingly not slow enough? We know a number of ways to
fix that...
GGE, the Glacial Grammar Engine, is a faithful port of PGE from PIR to Perl
-6. It tries (albeit not too hard) to be implementation-independent, and it
-also attempts (though perhaps not too convincingly) to be a drop-in
-replacement for PGE. Most importantly, besides being written in Perl 6
-rather than PIR, it brings one new essential feature to the table: it's
-slower. Much slower... but still quite cool. Hence the name.
-The "albeit not too hard" reservation to the implementation-independence
-stems from the fact that some PIR tricks used by PGE are unavailable in
-Perl 6. When faced with a choice of (a) giving up, and (b) cheating by
-introducing some PIR-dependent workaround, the latter road will be chosen.
-That said, implementation-independence stands as a goal whenever possible,
-just as with all honest Perl 6 code.
+6. It tries to be implementation-independent, and it also attempts (though
+perhaps not too convincingly) to be a drop-in replacement for PGE. Most
+importantly, besides being written in Perl 6 rather than PIR, it brings one new
+essential feature to the table: it's slower. Much slower... but still quite
+cool. Hence the name.
The "though perhaps not too convincingly" reservation to GGE attempting to
be a drop-in replacement for PGE stems from the fact that now that regular
@@ -40,11 +33,12 @@ course, it would be a fun challenge in itself to restrict the writing of
GGE to a strict subset of Perl 6 -- one not using any regexes at all,
directly or indirectly -- but that is not the kind of fun optimized for in
this case. Future teams of developers are welcome to optimize for that kind
-of fun, should they wish.
+of fun, should they wish. The instances of conscious transgressions in GGE are
+listed in docs/REGEXES_IN_GGE.
For an overview of the status of the project, see STATUS. For an overview
of the cool things that could be built with the project as a dependency,
+see docs/COOLTHINGS.
== License
File renamed without changes.
@@ -0,0 +1,44 @@
+Regexes are a very useful construct, even in a regex engine. Since we're not
+in a position where we're building a regex engine for the first time and
+simply *can't* use regex matching, we might as well use it when it's
+* The file t/perl6regex/01-regex.t is full of regex matches. We're not
+ testing those regexes anyway, so we might as well use them fully.
+* The CodeString.emit method in GGE::Exp uses .subst and regexes to substitute
+ in an argument where it finds '%' followed by a digit or a letter.
+* The code emitted for term:<< and term:>> do some /\w/ matching.
+* GGE::Match.cclass uses regex matching to check whether a character belongs
+ to a particular character class or not. (Parrot already stores large
+ generated tables with this information. Rather than reproduce those tables
+ in GGE, we call down to PGE.) The methods upper, lower, alpha, digit etc
+ all delegate to the cclass method with different regexes.
+* The GGE::Match.ident method does matching agains /<alpha>/ and /\w/.
+* The GGE::Match.wb method matches against /\w/.
+* The method matches against /\W/ and /\s/.
+* GGE::Perl6Regex.parseterm matches against /\s/ and /\w/.
+* GGE::Exp::p6escapes matches against /\s/.
+* GGE::Exp::parse_term_backslash matches against /\w/.
+* GGE::Exp::parse_subname matches against /\w/.
+* GGE::Exp::parse_enumcharclass matches against /\s/.
+* GGE::Exp::parse_quant matches against /\s/ and /\d/.
+* GGE::Exp::parse_dollar matches against /\d/.
+* GGE::Exp::parse_modifier matches against /\d/ and /\w+/.
+As is clearly evident, those character classes show up everywhere. To really
+rid GGE of all dependencies of an existing grammar engine, one would have to
+give GGE its own generated table with character class information.

0 comments on commit c48c45b

Please sign in to comment.