opendap/src/main/java/opendap/dap/parsers/Dap2Parse.java
void
    tagparse(Dap2Parse parsestate, int kind) throws ParseException
    {
        /* Create the storage object corresponding to what we are parsing */
        String expected = parseactual();
        switch (kind) {
        case SCAN_DATASET:
            parseClass = DapDDS;
            if(ddsobject == null)
                throw new ParseException("DapParse: found DDS, expected " + expected);
            break;
        case SCAN_ATTR:
            parseClass = DapDAS;
            if(dasobject == null)
                throw new ParseException("DapParse: found DAS, expected " + parseactual());
            lexstate.dassetup();
            break;
        case SCAN_ERROR:
            parseClass = DapERR;
            if(errobject == null)
                throw new ParseException("DapParse: found error{}, expected " + parseactual());
            break;
        default:
            throw new ParseException("Unknown tag argument: " + kind);
        }
    }
void
    tagparse(Dap2Parse parsestate, int kind) throws ParseException
    {
        /* Create the storage object corresponding to what we are parsing */
        String expected = parseactual();
        switch (kind) {
        case SCAN_DATASET:
            parseClass = DapDDS;
            if(ddsobject == null)
                throw new ParseException("DapParse: found DDS, expected " + expected);
            break;
        case SCAN_ATTR:
            parseClass = DapDAS;
            if(dasobject == null)
                throw new ParseException("DapParse: found DAS, expected " + parseactual());
            lexstate.dassetup();
            break;
        case SCAN_ERROR:
            parseClass = DapERR;
            if(errobject == null)
                throw new ParseException("DapParse: found error{}, expected " + parseactual());
            break;
        default:
            throw new ParseException("Unknown tag argument: " + kind);
        }
    }
/* Use the initial keyword to indicate what we are parsing