GrassMudHorse is an extension to Whitespace syntax.
GrassMudHorse uses 草 “grass” (U+8349), 泥 “mud” (U+6CE5), and 马 “horse”
(U+9A6C) for S
, T
, and L
tokens, respectively, and adds two more tokens:
河 “river” (U+6CB3) and 蟹 “crab” (U+87F9). It extends the grammar by allowing
end
to be written equivalently as either “river crab” or “horse horse horse”
(i.e., L
L
L
). Only some implementations support river and crab.
The grammar for scanning tokens in the original Java implementation is as follows:
tokens ::=
| C* R* G { S }
| C* R* M { T }
| C* R* H { L }
| C* R* EOF { EOF }
| R+ C { RC }
G ::= "草"
M ::= "泥"
H ::= "马"
R ::= "河"
C ::= "蟹"
There are two behaviors for handling unpaired river and crab tokens: ignoring them (as in the original Java implementation) or erroring (as in the Erlang implementation by the same author).
GrassMudHorse is a reference to a couple of Chinese internet memes: The Grass Mud Horse (a profane homophonic pun) is said to be a species of alpaca from the Mahler Gobi Desert, whose existence is threatened by river crabs (a pun criticizing internet censorship).