template based parser generator gets major speed boost
BCS
BCS at pathlink.com
Tue Apr 1 10:33:05 PDT 2008
Frits van Bommel wrote:
> 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 ;).
I was kidna hoping for a single char as it make the parsing of the BNF
simpler.
Thinking about it, the only reasonable chars I have left are: ~#$%^&_-=\<>,.
More information about the Digitalmars-d-announce
mailing list