Thanks all,
in the end I've used PetitParser and I was really surprised and happy how easy and far I've got with it.
TBH using regular expressions in Pharo feels extremely uncomfortable to me compared to Perl or Ruby, but maybe that was design decision by the author to not be too hacky.
So at least to me PetitParser feels like a more practical regex library than Regex itself.
Peter
On Tue, Mar 31, 2015 at 5:08 PM, Damien Cassou <damien.cassou@gmail.com> wrote:
Peter Uhn��k <i.uhnak@gmail.com> writes:
> Hi,
>
> I would like to parse text like
> -----
> id(param1, param2, ... paramX)
> id -> id
> id ->> id
> -----
> id is alphanumeric string,
> param is any string optionally enclosed in quotes (so both quoted and
> unquoted string is needed)
I would start with streams and regular expressions. If that's not
powerful enough I would use PetitParser. If that's not fast enough, I
would try SmaCC and compare speed.
--
Damien Cassou
http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill