public void parse(ByteBuffer out, CharBuffer in)
			throws StringParseException, MalformedInputException, UnmappableCharacterException {
		try {
			while (in.hasRemaining()) {
				char c = in.get();
				state.checkAccepts(pos, c);
				state = parseChar(out, c);
				pos++;
			}
		}
		catch (Throwable e) {
			in.position(in.position() - 1);
			throw e;
		}
	}
Parse and encode a portion of a string or character representation

@param out the destination buffer for the encoded string or character, having matching byte
           order to the charset.
@param in the source buffer for the representation
@throws StringParseException if the representation could not be parsed
@throws MalformedInputException if a character sequence in the representation is not valid
@throws UnmappableCharacterException if a character cannot be encoded
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/StringRenderParser.java