package djmania.sandbox.old;

import java.io.FileInputStream;
import java.util.*;

/**
	 * @deprecated
	 */

public class SMTokenizer {
	
	public static void main(String[] args) {
		
		String smFileLoc = "resublimity.sm";
		//FileInputStream smFile = new FileInputStream(smFileLoc);
		ArrayList<String> lines = new ArrayList<String>();
		
		try {
			FileInputStream smFile = new FileInputStream(smFileLoc);
			Scanner input;
			input = new Scanner(smFile);
			String buffer;
			while (input.hasNextLine()) {
				buffer = input.nextLine();
				if (buffer.length()>0) { // Avoid the empty lines
					switch (buffer.charAt(0)) {
						case '#':
							// Process header
							break;
						case '/':
							// Ignore comment
							break;
						case ' ':
							// Ignore tab
							break;
						case ',':
							// New measure
							lines.add(",");
						case ';':
							// End of set
							break;
						default: // Notes
							lines.add(buffer);
							//System.out.println(lines.get(lines.size()-1));
					}
				}
			}
			
			for (int i = 0; i < lines.size(); i++) {
				System.out.println(lines.get(i));
			}
			
		} catch (java.io.FileNotFoundException e) {
			System.err.println("File not found.");
		}
	}

}
