Oops, time to go home... function makeDict(t) local d={} for i=1,getn(t) do d[ t[i] ]=1 end return d end tokens = makeDict { "~=", "<=", ">=", "<", ">", "==", "=", "+", "-", "*", etc }