public ParsedSchema addSchemaFromString(String input) throws ParseException {
        var stream = new SimpleCharStream(input);
        var parser = new SchemaParser(stream, deployLogger);
        try {
            var schema = parser.schema();
            if (schema == null) {
                throw new IllegalArgumentException("No schema content");
            }
            if (parsedSchemas.containsKey(schema.name())) {
                throw new IllegalArgumentException("Duplicate schemas named " + schema.name());
            }
            parsedSchemas.put(schema.name(), schema);
            return schema;
        } catch (TokenMgrException e) {
            throw new ParseException(stream.formatException("Unknown symbol: " + Exceptions.toMessageString(e)));
        } catch (ParseException pe) {
            throw new ParseException(stream.formatException(Exceptions.toMessageString(pe)));
        }
    }
Class wrapping parsing of schema files and holding a collection of
schemas in the intermediate format.

@author arnej27959
config-model/src/main/java/com/yahoo/schema/parser/IntermediateCollection.java