Mercurial > repos > icfp2014
annotate code/test.lm @ 6:0ab6eb5f0190
Implement not, < and <=
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 25 Jul 2014 11:46:34 -0700 |
parents | a9a2ad99adfb |
children | afd55b32549b |
rev | line source |
---|---|
1
68d1447bfdbe
Support for compiling lists, tuples and integer literals in lmc. Added small test lm program for exercising compiler.
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1 #{ |
68d1447bfdbe
Support for compiling lists, tuples and integer literals in lmc. Added small test lm program for exercising compiler.
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
2 init <- { |
68d1447bfdbe
Support for compiling lists, tuples and integer literals in lmc. Added small test lm program for exercising compiler.
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
3 #[1 2 3 4] |
68d1447bfdbe
Support for compiling lists, tuples and integer literals in lmc. Added small test lm program for exercising compiler.
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
4 } |
68d1447bfdbe
Support for compiling lists, tuples and integer literals in lmc. Added small test lm program for exercising compiler.
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
5 |
68d1447bfdbe
Support for compiling lists, tuples and integer literals in lmc. Added small test lm program for exercising compiler.
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
6 main <- { |
3
a9a2ad99adfb
Rework lmc a bit to support labels in generated code. Add support for certain special funcall expressions, namely: if:else, isInteger? value and tail which translate to SEL ATOM CAR and CDR respectively
Michael Pavone <pavone@retrodev.com>
parents:
2
diff
changeset
|
7 if: (isInteger?: 1 | [(2 + 32 * 8) 3 4]) { |
a9a2ad99adfb
Rework lmc a bit to support labels in generated code. Add support for certain special funcall expressions, namely: if:else, isInteger? value and tail which translate to SEL ATOM CAR and CDR respectively
Michael Pavone <pavone@retrodev.com>
parents:
2
diff
changeset
|
8 42 |
a9a2ad99adfb
Rework lmc a bit to support labels in generated code. Add support for certain special funcall expressions, namely: if:else, isInteger? value and tail which translate to SEL ATOM CAR and CDR respectively
Michael Pavone <pavone@retrodev.com>
parents:
2
diff
changeset
|
9 } else: { |
a9a2ad99adfb
Rework lmc a bit to support labels in generated code. Add support for certain special funcall expressions, namely: if:else, isInteger? value and tail which translate to SEL ATOM CAR and CDR respectively
Michael Pavone <pavone@retrodev.com>
parents:
2
diff
changeset
|
10 24 |
a9a2ad99adfb
Rework lmc a bit to support labels in generated code. Add support for certain special funcall expressions, namely: if:else, isInteger? value and tail which translate to SEL ATOM CAR and CDR respectively
Michael Pavone <pavone@retrodev.com>
parents:
2
diff
changeset
|
11 } |
1
68d1447bfdbe
Support for compiling lists, tuples and integer literals in lmc. Added small test lm program for exercising compiler.
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
12 } |
68d1447bfdbe
Support for compiling lists, tuples and integer literals in lmc. Added small test lm program for exercising compiler.
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
13 } |