in reply to Is Regexp::Grammars a suitable tool for recognising card game hands?

There are two separate problems: Finding strings such as "♥9 ♥9 ♠J ♠J ♠J" in a piece of text - that can be done with a regex, no need for a full-blown grammar.

The second problem is comparing the values of two hands, for which grammars won't help you at all.

  • Comment on Re: Is Regexp::Grammars a suitable tool for recognising card game hands?