public static void main( String[] args ) throws Exception {
		UIParser ui = new UIParser();

		for(int i = 0; i < args.length; i++ ){
			if( args[i].charAt(0) == '-' ){
				if(args[i].length() == 1){
					// Following the UNIX convention, if the file
					// is "-", the standard input is used.
					ui.parseInput(System.in);
				}
				else {
					char opt = args[i].charAt(1);
					switch(opt){
					case 'd' :
						currentDir = args[++i];
						if( currentDir.endsWith( File.separator )){
							currentDir += File.separator;
						}
						break;

					case 'V' :
						ui.includeVersion = true;
						break;

					default :
						System.err.println("Option " + args[i] + " unkown. Please read the documentation.");
						System.exit(1);
					}
				}
			}
			else {
				// Parse the specified file.
				File f = new File( args[i] );
				ui.parseInput( new BufferedInputStream( new FileInputStream(f)));
			}
		}
	}