template based parser generator gets major speed boost

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Tue Apr 1 03:39:47 PDT 2008


BCS wrote:
> I'm planing on adding "!" as a "not" suffix in dparse (if "Blah" can be 
> parsed, fail, else continue from the same place) and I'm wondering if 
> anyone would find the reverse useful (try to parse a "Foo", if it works, 
> drop it, back up to where we started and continue, else fail). Also is 
> there any suggestions as to what suffix to use?

Wouldn't that be equivalent to '!!'?
At least, from what I understand "Foo!!" would mean: if "Foo!" can be 
parsed then fail, otherwise succeed (matching the empty string).
The first should happen if "Foo" can't be parsed, the second one happens 
if it can.

It's not the most intuitive operator, of course ;).


More information about the Digitalmars-d-announce mailing list