@@ -0,0 +1,2486 @@
+/*%0A * Created by brightSPARK Labs%0A * www.brightsparklabs.com%0A */%0A%0Apackage com.brightsparklabs.asanti.reader.parser;%0A%0Aimport java.text.ParseException;%0Aimport java.util.Map;%0Aimport java.util.regex.Matcher;%0Aimport java.util.regex.Pattern;%0A%0Aimport com.brightsparklabs.asanti.model.schema.AsnSchemaTypeDefinition;%0Aimport com.google.common.base.Splitter;%0Aimport com.google.common.collect.ImmutableMap;%0Aimport com.google.common.collect.Maps;%0A%0A/**%0A * Logic for parsing the %7B@code IMPORTS%7D from a module within an ASN.1 schema%0A *%0A * @author brightSPARK Labs%0A */%0Apublic class AsnSchemaImportsParser%0A%7B%0A    // -------------------------------------------------------------------------%0A    // CONSTANTS%0A    // -------------------------------------------------------------------------%0A%0A    /** pattern to match an import statement pertaining to a single module */%0A    private static final Pattern PATTERN_MODULE_IMPORT = Pattern.compile(%22(.+?) FROM (.+?) %5C%5C%7B.+?%5C%5C%7D%22);%0A%0A    /** splitter to separate comma delimited strings */%0A    private static final Splitter COMMA_SPLITTER = Splitter.on(',')%0A            .omitEmptyStrings()%0A            .trimResults();%0A%0A    // -------------------------------------------------------------------------%0A    // PUBLIC METHODS%0A    // -------------------------------------------------------------------------%0A%0A    /**%0A     * Parses a type definition from a module from an ASN.1 schema%0A     *%0A     * @param name%0A     *            the name of the defined type (i.e. the text on the left hand%0A     *            side of the %7B@code ::=%7D)%0A     * @param value%0A     *            the value of the defined type (i.e. the text on the right hand%0A     *            side of the %7B@code ::=%7D)%0A     *%0A     * @return an %7B@link AsnSchemaTypeDefinition%7D representing the parsed data%0A     *%0A     * @throws ParseException%0A     *             if any errors occur while parsing the type%0A     */%0A    public static ImmutableMap%3CString, String%3E parse(String imports) throws ParseException%0A    %7B%0A        final Map%3CString, String%3E typeToModule = Maps.newHashMap();%0A%0A        final Matcher matcher = PATTERN_MODULE_IMPORT.matcher(imports);%0A        while (matcher.find())%0A        %7B%0A            final Iterable%3CString%3E types = COMMA_SPLITTER.split(matcher.group(1));%0A            final String module = matcher.group(2);%0A            for (final String type : types)%0A            %7B%0A                typeToModule.put(type, module);%0A            %7D%0A        %7D%0A        return ImmutableMap.copyOf(typeToModule);%0A    %7D%0A%7D%0A

Add parser for parsing IMPORTS section