Re: Help with petitparser
Posted by
Lukas Renggli on
Jun 01, 2010; 3:29pm
URL: https://forum.world.st/Help-with-petitparser-tp2238409p2238721.html
> - I don't find to way in petitparser to: parse every string except a list of
> strings.
> For example, I want to parse all string except 'string' and 'STRING'.
The logical #not parser helps you here:
('string' asParser / 'STRING' asParser) not , #letter star plus
> - I don't find a way to parse a string without taking care of its case.
> For example, I want to parse 'string', 'STRING', 'String', 'stRINg', etc ...
This is currently not supported out of the box. You could add it by
subclassing PRLiteralCollectionParser and compare the strings with
#sameAs: instead of #=. If this turns out to be generally useful we
should maybe add it to the core framework?
Lukas
--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users