src/org/kaivos/fortob/FortobInterpreter.java
public static void main(String[] args) {
		if (args.length < 1) {
			System.err.println("usage: fortob [-d] <file>");
			System.exit(1);
			return;
		}
		
		int i = 0;
		for (; i < args.length-1; i++) {
			switch (args[i]) {
			case "-d":
				FortobReadcom.DEBUG = true;
				break;
			default:
				System.err.println("Unknown option `" + args[i] + "'");
				System.exit(1);
				return;
			}
		}
		
		String file = args[i];
		
		try {
			TokenList tl = scanner.tokenize(new File(file));
			
			FortobEnvironment env = new FortobEnvironment();
			
			FortobReadcom.READCOM.proceed(Checker.check(tl), env);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
/**
	 * Reads a file and interprets it using FortobReadcom.
	 * 
	 * @param args Should contain only one element, the name of the file
	 */
Reads a file and interprets it using FortobReadcom.

@param args Should contain only one element, the name of the file
Reads a file and interprets it using FortobReadcom . @param args Should contain only one element the name of the file
public static void main(String[] args) {
		if (args.length < 1) {
			System.err.println("usage: fortob [-d] <file>");
			System.exit(1);
			return;
		}
		int i = 0;
		for (; i < args.length-1; i++) {
			switch (args[i]) {
			case "-d":
				FortobReadcom.DEBUG = true;
				break;
			default:
				System.err.println("Unknown option `" + args[i] + "'");
				System.exit(1);
				return;
			}
		}
		String file = args[i];
		try {
			TokenList tl = scanner.tokenize(new File(file));
			FortobEnvironment env = new FortobEnvironment();
			FortobReadcom.READCOM.proceed(Checker.check(tl), env);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
public static void main ( String [ ] args ) { if ( args . length < 1 ) { System . err . println ( "usage: fortob [-d] <file>" ) ; System . exit ( 1 ) ; return ; } int i = 0 ; for ( ; i < args . length - 1 ; i ++ ) { switch ( args [ i ] ) { case "-d" : FortobReadcom . DEBUG = true ; break ; default : System . err . println ( "Unknown option `" + args [ i ] + "'" ) ; System . exit ( 1 ) ; return ; } } String file = args [ i ] ; try { TokenList tl = scanner . tokenize ( new File ( file ) ) ; FortobEnvironment env = new FortobEnvironment ( ) ; FortobReadcom . READCOM . proceed ( Checker . check ( tl ) , env ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } }
Reads a file and interprets it using FortobReadcom.
Reads a file and interprets it using FortobReadcom .