Execute a Markov algorithm: Difference between revisions

Content added Content deleted
m (Ugh!)
(Add a suggested ruleset)
Line 7:
<whitespace> ::= (<tab> | <space>) [<whitespace>]
There is one rule per line. If there is a . present before the <replacement>, then this is a terminating rule in which case the interpreter must halt execution.
 
You are recommended to test using the following rules file:<pre>
# This rules file is extracted from Wikipedia:
# http://en.wikipedia.org/wiki/Markov_Algorithm
A -> apple
B -> bag
S -> shop
T -> the
the shop -> my brother
a never used -> .terminating rule
</pre>
 
=={{header|Ruby}}==