Skip to content

Instantly share code, notes, and snippets.

@tyler
Created January 8, 2011 08:09
Show Gist options
  • Save tyler/770665 to your computer and use it in GitHub Desktop.
Save tyler/770665 to your computer and use it in GitHub Desktop.
[tyler][00:07][~/Code/Hartford]⇒ cat micro.har
x = 43
y = 11
z = add(y, 3)
calculate = (Integer a, Integer b) -> Integer
add(sub(a, 38), b)
print_int(calculate(x, z))
[tyler][00:06][~/Code/Hartford]⇒ ruby scanner.rb micro.har > micro.tok
[tyler][00:06][~/Code/Hartford]⇒ python ply_parse.py micro.tok > micro.ll
[tyler][00:06][~/Code/Hartford]⇒ llvm-as micro.ll
[tyler][00:07][~/Code/Hartford]⇒ llvmc micro.bc -o micro.out
[tyler][00:07][~/Code/Hartford]⇒ ./micro.out
19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment