Login  Register

Re: Help with petitparser

Posted by hernanmd on Jun 01, 2010; 1:42pm
URL: https://forum.world.st/Help-with-petitparser-tp2238409p2238496.html

Hi Adrien

2010/6/1 Adrien BARREAU <[hidden email]>:
> Hello,
>
> I need some help with petitparser. I encountered 2 problems. Here they are:
>
> - 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'.
>

Something like...

( 'string' asParser / 'STRING' asParser ) negate matches: 'STRING'
( 'string' asParser / 'STRING' asParser ) negate matches: 'STING'

> - 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 ...
>

you may lowercase your input String with #asLowercase?

Hope it helps.

Hernán

_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users