blob: 523bd3065b1df41064ad3b142986ad0895fca7d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
package com.seaofnodes.simple;
import java.nio.file.Files;
import java.nio.file.Path;
public class Main {
// Compile and run a simple program
public static void main( String[] args ) throws Exception {
// First arg is file, 2nd+ args are program args
String src = Files.readString(Path.of(args[0]));
int arg = Integer.valueOf(args[1]);
CodeGen code = new CodeGen(src);
code.parse().opto().typeCheck().GCM().localSched();
System.out.println(code._stop);
System.out.println(Eval2.eval(code,arg,100000));
}
}
|