tkob
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val _ = main () |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type_of(return(Values), _, [Arity]) :- length(Values, Arity). | |
| type_of(if(Then, Else), Env, T) :- | |
| type_of(Then, Env, T1), | |
| type_of(Else, Env, T2), | |
| union(T1, T2, T). | |
| type_of(fun([]), _, [] -> []). | |
| type_of(fun([Args->Body|Cdr]), Env, TArity->TBody) :- | |
| length(Args, TArityCar), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tal: parse.sml scan.ulex.sml tal.sml boot.sml | |
| mlton \ | |
| -output 'tal' \ | |
| tal.mlb | |
| scan.ulex.sml: scan.ulex | |
| ml-ulex scan.ulex | |
| parse.sml: parse.cf | |
| proglr < parse.cf > parse.sml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| task compileJasmin(type:Exec) { | |
| ext.classesDir = sourceSets.main.output.classesDir | |
| ext.srcDir = "$projectDir/src/main/jasmin" | |
| ext.sourceSet = fileTree(dir: ext.srcDir, include: '**/*.j') | |
| ext.command = [ | |
| 'jasmin', | |
| '-d', ext.classesDir, | |
| ] | |
| ext.command += ext.sourceSet.getFiles() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.gicentre.handy.*; | |
| import java.awt.Font; | |
| import java.awt.font.FontRenderContext; | |
| import java.awt.image.BufferedImage; | |
| import java.awt.geom.PathIterator; | |
| PathIterator createOutline(String name, int size, String text, float x, float y) { | |
| FontRenderContext frc = | |
| new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB) | |
| .createGraphics() |
| val | smlnj | poly | mosml | smlsharp | aliceml |
|---|---|---|---|---|---|
| ArraySlice.length | yes | yes | yes | yes | yes |
| ArraySlice.sub | yes | yes | yes | yes | yes |
| ArraySlice.update | yes | yes | yes | yes | yes |
| ArraySlice.full | yes | yes | yes | yes | yes |
| ArraySlice.slice | yes | yes | yes | yes | yes |
| ArraySlice.subslice | yes | yes | yes | yes | yes |
| ArraySlice.base | yes | yes | yes | yes | yes |
| ArraySlice.vector | yes | yes | yes | yes | yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sml_comparison.md: comparison.txt | |
| perl -alne 'print map {"|".$$_} @F; if($$.==1) {print "|---" x @F}' \ | |
| < comparison.txt > sml_comparison.md | |
| comparison.txt: smlnj.txt poly.txt mosml.txt smlsharp.txt aliceml.txt | |
| ruby compare.rb val.txt smlnj.txt poly.txt mosml.txt smlsharp.txt aliceml.txt > comparison.txt | |
| smlnj.txt: val.txt | |
| expect -f check.tcl smlnj |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type var = string | |
| type exp = | |
| LetExp of var * exp * exp | |
| | IfExp of exp * exp * exp | |
| | FunExp of var * exp | |
| | AppExp of exp * exp | |
| | IntExp of int | |
| | VarExp of string | |
| | PrimAdd | PrimSub | PrimMul | PrimDiv |