Skip to content

Instantly share code, notes, and snippets.

@tripped
Created December 2, 2013 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tripped/7746366 to your computer and use it in GitHub Desktop.
Save tripped/7746366 to your computer and use it in GitHub Desktop.
Y = lambda g: (lambda f: g(lambda arg: f(f)(arg))) (lambda f: g(lambda arg: f(f)(arg)))
parse_19_02 = lambda s: \
(lambda (str,terminator) = (lambda x = \
Y(lambda f: lambda src: \
(lambda c = next(src): \
[c] if (c == 1 or c == 2) else [c] + f(src))())(s):
((Types.String, x[:len(x)-1]), x[len(x)-1]))():
('19 02', [str], 'load "#a"') if terminator == 2 else
('19 02', [str, long(s)], 'load "#a" -> $#bbbbbb'))()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment