dap4/d4core/src/main/java/dap4/core/dmr/parser/bison/Dap4ParserImpl.java
@Override
    void
    enterdataset(XMLAttributeMap attrs)
            throws ParseException
    {
        this.debug = getDebugLevel() > 0; // make sure we have the latest value
        if(debug) report("enterdataset");
        SaxEvent name = pull(attrs, "name");
        SaxEvent dapversion = pull(attrs, "dapversion");
        SaxEvent dmrversion = pull(attrs, "dmrversion");
        if(isempty(name))
            throw new ParseException("Empty dataset name attribute");
        // convert and test version numbers
        float ndapversion = DAPVERSION;
        if(dapversion != null)
            try {
                ndapversion = Float.parseFloat(dapversion.value);
            } catch (NumberFormatException nfe) {
                ndapversion = DAPVERSION;
            }
        if(ndapversion != DAPVERSION)
            throw new ParseException("Dataset dapVersion mismatch: " + dapversion.value);
        float ndmrversion = DMRVERSION;
        if(dmrversion != null)
            try {
                ndmrversion = Float.parseFloat(dmrversion.value);
            } catch (NumberFormatException nfe) {
                ndmrversion = DMRVERSION;
            }
        if(ndmrversion != DMRVERSION)
            throw new ParseException("Dataset dmrVersion mismatch: " + dmrversion.value);
        this.root = new DapDataset(name.value);
        this.root.setDapVersion(Float.toString(ndapversion));
        this.root.setDMRVersion(Float.toString(ndmrversion));
        this.root.setDataset(this.root);
        passReserved(attrs, this.root);
        scopestack.push(this.root);
    }
@Override
    void
    enterdataset(XMLAttributeMap attrs)
            throws ParseException
    {
        this.debug = getDebugLevel() > 0; // make sure we have the latest value
        if(debug) report("enterdataset");
        SaxEvent name = pull(attrs, "name");
        SaxEvent dapversion = pull(attrs, "dapversion");
        SaxEvent dmrversion = pull(attrs, "dmrversion");
        if(isempty(name))
            throw new ParseException("Empty dataset name attribute");
        // convert and test version numbers
        float ndapversion = DAPVERSION;
        if(dapversion != null)
            try {
                ndapversion = Float.parseFloat(dapversion.value);
            } catch (NumberFormatException nfe) {
                ndapversion = DAPVERSION;
            }
        if(ndapversion != DAPVERSION)
            throw new ParseException("Dataset dapVersion mismatch: " + dapversion.value);
        float ndmrversion = DMRVERSION;
        if(dmrversion != null)
            try {
                ndmrversion = Float.parseFloat(dmrversion.value);
            } catch (NumberFormatException nfe) {
                ndmrversion = DMRVERSION;
            }
        if(ndmrversion != DMRVERSION)
            throw new ParseException("Dataset dmrVersion mismatch: " + dmrversion.value);
        this.root = new DapDataset(name.value);
        this.root.setDapVersion(Float.toString(ndapversion));
        this.root.setDMRVersion(Float.toString(ndmrversion));
        this.root.setDataset(this.root);
        passReserved(attrs, this.root);
        scopestack.push(this.root);
    }
@ Override void enterdataset ( XMLAttributeMap attrs ) throws ParseException { this . debug = getDebugLevel ( ) > 0 ; // make sure we have the latest value if ( debug ) report ( "enterdataset" ) ; SaxEvent name = pull ( attrs , "name" ) ; SaxEvent dapversion = pull ( attrs , "dapversion" ) ; SaxEvent dmrversion = pull ( attrs , "dmrversion" ) ; if ( isempty ( name ) ) throw new ParseException ( "Empty dataset name attribute" ) ; // convert and test version numbers float ndapversion = DAPVERSION ; if ( dapversion != null ) try { ndapversion = Float . parseFloat ( dapversion . value ) ; } catch ( NumberFormatException nfe ) { ndapversion = DAPVERSION ; } if ( ndapversion != DAPVERSION ) throw new ParseException ( "Dataset dapVersion mismatch: " + dapversion . value ) ; float ndmrversion = DMRVERSION ; if ( dmrversion != null ) try { ndmrversion = Float . parseFloat ( dmrversion . value ) ; } catch ( NumberFormatException nfe ) { ndmrversion = DMRVERSION ; } if ( ndmrversion != DMRVERSION ) throw new ParseException ( "Dataset dmrVersion mismatch: " + dmrversion . value ) ; this . root = new DapDataset ( name . value ) ; this . root . setDapVersion ( Float . toString ( ndapversion ) ) ; this . root . setDMRVersion ( Float . toString ( ndmrversion ) ) ; this . root . setDataset ( this . root ) ; passReserved ( attrs , this . root ) ; scopestack . push ( this . root ) ; }
Abstract action definitions
Abstract action definitions