blob: 9e1c38b5639f37d70649ca058224a316b500e0f1 (
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.driver(CodeGen.Phase.LocalSched);
System.out.println(code._stop);
System.out.println(Eval2.eval(code,arg,100000));
}
}
|