Created
April 23, 2010 12:15
-
-
Save denis/376479 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
random | |
AcKd | |
AK | |
AKs | |
AKo | |
TT+ | |
77-KK | |
QQ,AQs,77,44-22,KK+ | |
AJs-A9s | |
K9o+ | |
*/ | |
@start = range; | |
range = randomCards | hands; | |
hands = hand commaHand*; | |
hand = twoCards | twoRanks | twoRanksSuited | twoRanksUnsuited | openRange | closedRange; | |
randomCards = 'random'; | |
twoCards = card card; | |
twoRanks = rank rank; | |
twoRanksSuited = twoRanks suited; | |
twoRanksUnsuited = twoRanks unsuited; | |
suited = 's'; | |
unsuited = 'o'; | |
openRange = twoRanks plus; | |
closedRange = twoRanks minus twoRanks; | |
plus = '+'; | |
minis = '-'; | |
commaHand = comma hand; | |
card = rank suit; | |
rank = ace | king | queen | jack | ten | nine | eight | seven | six | five | four | three | two; | |
ace = 'A'; | |
king = 'K'; | |
queen = 'Q'; | |
jack = 'J'; | |
ten = 'T'; | |
nine = '9'; | |
eight = '8'; | |
seven = '7'; | |
six = '6'; | |
five = '5'; | |
four = '4'; | |
three = '3'; | |
two = '2'; | |
suit = hearts | diamonds | clubs | spades; | |
hearts = 'h'; | |
diamonds = 'd'; | |
clubs = 'c'; | |
spades = 's'; | |
comma = ','; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment