public Token getToken() {		
		StringBuilder keywords = new StringBuilder();
		
		try {
			while(lastChar == ' ' || lastChar == '\t' || lastChar == '\n' || lastChar == '\r') {
				lastChar = input.read();
				position++;
			}

			if(lastChar == -1) return new Token(Token.Type.END);
			
			if(terminals.contains((char) lastChar)) {
				keywords.append((char) lastChar);
				
				Token newToken = Token.parseToken(keywords.toString());
				
				lastChar = ' ';
			
				return newToken;
			}
			
			while(!terminals.contains((char) lastChar)) {
				keywords.append((char) lastChar);
				lastChar = input.read();
				position++;
				if(lastChar == -1) break;
			}
			
			String keyword = keywords.toString();
			
			return Token.parseToken(keyword);
		} catch (IOException e) {
			return new Token(Token.Type.FORCED_END);
		}
	}