public void classSet(CharClass charClass) throws LexerException{
		ArrayList<Character> charList = new ArrayList<Character>();
		ArrayList<Integer> rangeList = new ArrayList<Integer>();
		while(current_sym != ']'){
			if(current_sym == '-'){
				rangeList.add(charList.size()-1);
			}
			else{
				charList.add(getClassChar());
			}
			nextSym(SPACES);
		}
		for(int i = 0; i<charList.size(); i++){
			if(rangeList.contains(i) && i < charList.size()-1){
				//if index i is marked as the start of a range and is not the last entry in the list add the range
				if(!charClass.addRange(charList.get(i),charList.get(i+1))){
					throw new LexerException("Invalid character range: empty");
				}
				rangeList.remove(rangeList.indexOf(i));
				i++;
			}
			else if(!rangeList.contains(i)){
				//if index i is not marked as the start of a range add the char
				charClass.addChar(charList.get(i));
			}
			else{
				throw new LexerException("Invalid character range: no ending character");
			}
		}
		if(!rangeList.isEmpty()){
			throw new LexerException("Invalid character range: no starting character");
		}
		accept(']',NO_SPACES);
	}