[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
I'm hoping two things right now: 1) that this is the
right place to send this question, and 2) that it
isn't in some obvious FAQ somewhere. In any case...
I'm trying to develop a SableCC grammar that includes
a production of numerous "at-most-one" items whose
order is irrelevant.
For example, using the tokens A, B, and C, all the
following would be acceptable: ABC, CAB, C, A, BAC,
AB, etc. Unacceptable examples include: CC, ABB,
ACAB. Basically any string with duplicates is out,
and I don't care about the ordering of the items that
Any hints? I'm afraid that I'm going to have to
enumerate all the permutations. This wouldn't be bad
with 3 elements, but in my actual application I have
5, which makes for 120 things OR'ed together. Ick.
Thanks for reading. Any suggestions would be
R. Todd Ogrin
Do You Yahoo!?
Make a great connection at Yahoo! Personals.