private String inform(ParseTree stateCtx, ParseTree ctx, String name, String value, boolean fakeChild) {
        String path = name;
        if (stateCtx != null) {
            State myState = new State(stateCtx, name);

            if (!fakeChild) {
                state.put(stateCtx, myState);
            }

            PathType childType;
            switch (name) {
                case COMMENTS:
                    childType = PathType.COMMENT;
                    break;
                case VERSION:
                    childType = PathType.VERSION;
                    break;
                default:
                    childType = PathType.CHILD;
            }

            path = myState.calculatePath(childType, fakeChild);
        }
        analyzer.inform(path, value, ctx);
        return path;
    }
Parse the useragent and return every part that was found.

@param userAgent The useragent instance that needs to be parsed
@return If the parse was valid (i.e. were there any parser errors: true=valid; false=has errors
analyzer/src/main/java/nl/basjes/parse/useragent/parse/UserAgentTreeFlattener.java