Commit 0f2f349c authored by Charlie Graham Carr's avatar Charlie Graham Carr

created test file, added prints

parent 75308cb7
File added
/**
* Starting point for a new language interpreter.
* Run your program with
* java Start program
* where program is the file containing the program source code.
*/
import java.lang.Exception;
import java.io.*;
public class Start
{
public static void main(String[] args)
{
public static void main(String[] args)
{
/* Exit with an error if the user hasn't specified a program to run */
if (args.length < 1) {
System.err.println("Syntax: java Start <program>");
System.err.println("SpaceCookies are not yet baked");
System.exit(1);
}
try {
/* Open the program file and read the lines one-by-one */
System.out.println("Welcome, to SpaceCookies");
System.out.println("This is the newest language to be developed by someone who has no idea what they're doing...");
BufferedReader br = new BufferedReader(new FileReader(args[0]));
while (true) {
String line = br.readLine();
......@@ -31,14 +27,13 @@ public class Start
} catch (Exception e) {
System.err.println("Exception: " + e);
}
}
}
/** Process a single line of the input program.
/** Process a single line of the input program.
* @param line Line to process.
*/
private static void process(String line)
{
private static void process(String line)
{
System.out.println("Line: " + line);
}
}ls
}
}
public class test{
public static void main(String[] args) {
println("Welcome to SpaceCookies, hooman");
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment