David Pollak | 15 Jan 23:02
Picon
Gravatar

unordered stuff in the parser combinator

Howdy,

I'm working on a grammar using the parser combinator.

One of the challenges that I have is parsing stuff that must be present, but doesn't have to be in a particular order.  If I have 'dog', 'cat', 'fish' and 'moose' and my zoo is:

zoo = (dog ~ cat ~ fish ~ moose) | (dog ~ fish ~ cat ~ moose) | (dog ~ fish ~ moose ~ cat) ...

Is there a better way to express this?

Thanks,

David

--
lift, the secure, simple, powerful web framework http://liftweb.net
Collaborative Task Management http://much4.us


Gmane