15 Jan 23:00
unordered stuff in the parser combinator
From: David Pollak <feeder.of.the.bears@...>
Subject: unordered stuff in the parser combinator
Newsgroups: gmane.comp.lang.scala.user
Date: 2008-01-15 22:02:36 GMT
Subject: unordered stuff in the parser combinator
Newsgroups: gmane.comp.lang.scala.user
Date: 2008-01-15 22:02:36 GMT
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
RSS Feed