private Command[] readCommandSystem(String fileName, int lcount) throws FileNotFoundException, NumberFormatException, IllegalArgumentException {
		Scanner in = new Scanner(new FileReader(new File(fileName)));
		Vector<Command> commands = new Vector<Command>();
		while(in.hasNextLine()) {
			String[] tokens = in.nextLine().split("[,>]");
			for(int i = 0; i < tokens.length; i++)
				tokens[i] = tokens[i].trim();
			
			if (tokens.length != (lcount * 3 + 2)) {
				in.close();
				throw new IllegalArgumentException();
			}
			
			int currentState = Integer.valueOf(tokens[0]);
			int newState = Integer.valueOf(tokens[lcount + 1]);
			char[] currentData = new char[lcount], newData = new char[lcount];
			byte[] shifts = new byte[lcount];
			for(int i = 0; i < lcount; i++) {
				if(tokens[i + 1].length() != 1) {
					in.close();
					throw new IllegalArgumentException();
				}
				else
					currentData[i] = tokens[i + 1].charAt(0);
				if(tokens[i + lcount + 2].length() != 1) {
					in.close();
					throw new IllegalArgumentException();
				}
				else
					newData[i] = tokens[i + lcount + 2].charAt(0);
				if(tokens[i + 2 * lcount + 2].equals("L"))
					shifts[i] = -1;
				else
					if(tokens[i + 2 * lcount + 2].equals("S"))
						shifts[i] = 0;
					else
						if(tokens[i + 2 * lcount + 2].equals("R"))
							shifts[i] = 1;
						else {
							in.close();
							throw new IllegalArgumentException();
						}
			}
			Command cm = new Command(currentState, newState, currentData, newData, shifts);
			commands.add(cm);
		}
		in.close();
		return commands.toArray(new Command[commands.size()]);
	}