12 lines
561 B
Plaintext
12 lines
561 B
Plaintext
parseRuleSet( // rule set in a list
|
|
T("# Slightly modified from the rules on Wikipedia",
|
|
"A -> apple", "B -> bag", "S -> .shop", "T -> the",
|
|
"the shop -> my brother", "a never used -> .terminating rule")) :
|
|
markov("I bought a B of As from T S.",_).println();
|
|
|
|
parseRuleSet("# BNF Syntax testing rules", "A -> apple",
|
|
"WWWW -> with", "Bgage -> ->.*", "B -> bag", "->.* -> money",
|
|
"W -> WW", "S -> .shop", "T -> the",
|
|
"the shop -> my brother", "a never used -> .terminating rule") :
|
|
markov("I bought a B of As W my Bgage from T S.",_).println();
|