On Wed, Sep 27, 2006 at 09:12:02PM +0000, [EMAIL PROTECTED] wrote: > The documentation should distinguish between those that are just > pre-defined characters classes (E.G., <alpha> and <digit>) and > those that are special builtins (E.G., <before ...> and <commit>. > The former are things that you should be freely allowed to redefine > in a derived grammar, while the other second type may want to be > treated as reserved, or at least mention that redefining them may > break things in surprising ways.
FWIW, thus far in development PGE doesn't treat <before ...> and <commit> as "special built-ins" -- they're subrules, same as <alpha> and <digit>, that can indeed be redefined by derived grammars. And I think that one could argue that redefining <alpha> or <digit> could equally break things in surprising ways. I'm not arguing against the idea of special builtins or saying it's a bad idea -- designating some named assertions as "special/non-derivable" could enable some really nice optimizations and implementation shortcuts that until now I've avoided. I'm just indicating that I haven't come across anything yet in the regex implementation that absolutely requires that certain named assertions receive special treatment in the engine. Thanks, Pm > -------------- Original message ---------------------- > From: "Patrick R. Michaud" <[EMAIL PROTECTED]> > > On Wed, Sep 27, 2006 at 11:59:32AM -0700, David Brunton wrote: > > > A quick scan of S05 reveals definitions for these seven special named > > assertions: > > > [...] > > > > I don't think that <'...'> or <"..."> are really "named assertions". > > > > I think that <!xyz> (as well as <+xyz> and <-xyz>) are simply special forms > > of the named assertion <xyz>. > > > > I should probably compare your list to what PGE has implemented and see if > > there are any differences -- will do that later tonight. > > > > Pm > > > > >