about summary refs log blame commit diff stats
path: root/lil/scratch.lil
blob: 00ece6d69dc981837d764381bd232fdbbd9de964 (plain) (tree)




















                                                                                                                        
# This is my first attempt at writing giblang in lil
# I shared it on the lilt forums, and got a more 
# compact suggestion from Internet Janitor (maker of lil)

sys.seed:sys.ms
cons: ("b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "r", "s", "t", "v", "w", "z", "ch", "sh", "zh", "th")
vow: ("a", "e", "i", "o", "u", "y", "ee", "ai", "ae", "au")

on syl v c do
	"" fuse random[v 1],random[c 1]
end

on word i v c do
	"" fuse each x in i syl[v c] end
end

p:random[(1,2,2,3,4) 1]
r:range sum p

out:word[r vow cons]
show[out]
(((3 integer)) <- ((copy)) ((34 literal))) cn0: convert-names in main cn0: (((1 boolean)) <- ((equal)) ((1 literal)) ((2 literal))) nil nil cn0: checking arg ((1 literal)) cn0: checking arg ((2 literal)) cn0: checking oarg ((1 boolean)) maybe-add: ((1 boolean)) cn0: (((jump-if)) ((3 boolean)) ((1 offset))) nil nil cn0: checking arg ((3 boolean)) maybe-add: ((3 boolean)) cn0: checking arg ((1 offset)) cn0: (((2 integer)) <- ((copy)) ((3 literal))) nil nil cn0: checking arg ((3 literal)) cn0: checking oarg ((2 integer)) maybe-add: ((2 integer)) cn0: (((reply))) nil nil cn0: (((3 integer)) <- ((copy)) ((34 literal))) nil nil cn0: checking arg ((34 literal)) cn0: checking oarg ((3 integer)) maybe-add: ((3 integer)) cn1: (((1 boolean)) <- ((equal)) ((1 literal)) ((2 literal))) cn1: (((jump-if)) ((3 boolean)) ((1 offset))) cn1: (((2 integer)) <- ((copy)) ((3 literal))) cn1: (((reply))) cn1: (((3 integer)) <- ((copy)) ((34 literal))) schedule: main run: main 0: (((1 boolean)) <- ((equal)) ((1 literal)) ((2 literal))) run: main 0: nil => ((1 boolean)) mem: ((1 boolean)): 1 <= nil run: main 1: (((jump-if)) ((3 boolean)) ((1 offset))) mem: ((3 boolean)) => nil run: main 2: (((2 integer)) <- ((copy)) ((3 literal))) run: main 2: 3 => ((2 integer)) mem: ((2 integer)): 2 <= 3 run: main 3: (((reply))) schedule: done with routine nil