Skip to content

Commit b51da2f

Browse files
committed
script to run BareBones from terminal
1 parent 2ee982f commit b51da2f

File tree

4 files changed

+7
-18
lines changed

4 files changed

+7
-18
lines changed

.idea/workspace.xml

Lines changed: 0 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

babo

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/bash
2+
3+
/usr/lib/jvm/java-12-openjdk-amd64/bin/java -javaagent:/home/sharpvik/Dev/IntelliJ/lib/idea_rt.jar=42609:/home/sharpvik/Dev/IntelliJ/bin -Dfile.encoding=UTF-8 -classpath /home/sharpvik/Projects/java/BareBones/out/production/BareBones com.company.Main $1
-400 Bytes
Binary file not shown.

src/com/company/Main.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
public class Main {
77

88
public static void main(String[] args) throws Exception {
9-
File inputFile = new File("/home/sharpvik/Projects/java/BareBones/inputs/hard.bb");
9+
//File inputFile = new File("/home/sharpvik/Projects/java/BareBones/inputs/hard.bb");
10+
File inputFile = new File(args[0]);
1011
ArrayList<String> lines = Util.readFileAsLines(inputFile);
1112

1213
ArrayList<Code> ast = AST.analyze(lines, 0); // Syntactic Analyzer to produce Abstract Syntax Tree (AST)
1314

14-
for (Code c: ast)
15-
c.print(0);
15+
//for (Code c: ast)
16+
// c.print(0);
1617

1718
VM vm = new VM(); // Virtual Machine to use AST and produce relevant output
1819
vm.exec(ast);

0 commit comments

Comments
 (0)