refactoring knp parser for the combined usage with CharBuffer