/* this file is generated by RelaxNGCC */
package relaxngcc.parser.state;
import org.xml.sax.SAXException;
import org.xml.sax.Attributes;
import relaxngcc.parser.ParserRuntime;

    import relaxngcc.grammar.*;
    import relaxngcc.datatype.Datatype;
    import org.xml.sax.Locator;
  


class PatternDefinition extends NGCCHandler {
    private Scope scope;
    private String value;
    private Pattern p;
    private String combine;
    private NGCCDefineParam param;
    protected final ParserRuntime $runtime;
    private int $_ngcc_current_state;
    protected String $uri;
    protected String $localName;
    protected String $qname;

    public final NGCCRuntime getRuntime() {
        return($runtime);
    }

    public PatternDefinition(NGCCHandler parent, NGCCEventSource source, ParserRuntime runtime, int cookie, Scope _scope) {
        super(source, parent, cookie);
        $runtime = runtime;
        this.scope = _scope;
        $_ngcc_current_state = 15;
    }

    public PatternDefinition(ParserRuntime runtime, Scope _scope) {
        this(null, runtime, runtime, -1, _scope);
    }

    private void action0()throws SAXException {
        
          scope.appendBody(value);
        
}

    private void action1()throws SAXException {
        
      scope.append(p,combine);
    
}

    private void action2()throws SAXException {
        
          scope.appendBody(value);
        
}

    private void action3()throws SAXException {
        
          scope.appendImport(value);
        
}

    private void action4()throws SAXException {
        
      scope.setParam(param);
    
}

    public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
        int $ai;
        $uri = $__uri;
        $localName = $__local;
        $qname = $__qname;
        switch($_ngcc_current_state) {
        case 10:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java-import"))) {
                    $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                    $_ngcc_current_state = 12;
                }
                else {
                    $_ngcc_current_state = 6;
                    $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
                }
            }
            break;
        case 5:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java-body"))) {
                    $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                    $_ngcc_current_state = 8;
                }
                else {
                    if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar")) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java"))))))))))))))))))))) {
                        NGCCHandler h = new patterns(this, super._source, $runtime, 491);
                        spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                    }
                    else {
                        unexpectedEnterElement($__qname);
                    }
                }
            }
            break;
        case 6:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java-body"))) {
                    $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                    $_ngcc_current_state = 8;
                }
                else {
                    $_ngcc_current_state = 5;
                    $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
                }
            }
            break;
        case 15:
            {
                if(($ai = $runtime.getAttributeIndex("","combine"))>=0) {
                    $runtime.consumeAttribute($ai);
                    $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    $_ngcc_current_state = 14;
                    $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
                }
            }
            break;
        case 1:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java-body"))) {
                    $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                    $_ngcc_current_state = 3;
                }
                else {
                    $_ngcc_current_state = 0;
                    $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
                }
            }
            break;
        case 14:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element")) || (($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java-body")) || ((($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","params"))>=0 && ((((((((((((((((((((($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java")) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value"))) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java-import"))) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java-body"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")))) || ((($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","access"))>=0 && ((((((((((((((((((((($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java")) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value"))) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java-import"))) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java-body"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")))) || (($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java")) || ((($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","return-type"))>=0 && ((((((((((((((((((((($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java")) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value"))) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java-import"))) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java-body"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")))) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref")) || ((($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0 && ((((((((((((((((((((($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java")) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value"))) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java-import"))) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java-body"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")))) || ((($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","return-value"))>=0 && ((((((((((((((((((((($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java")) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value"))) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java-import"))) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java-body"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")))) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group")) || (($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java-import")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore")) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar")))))))))))))))))))))))))))) {
                    NGCCHandler h = new NGCCdefine(this, super._source, $runtime, 503, scope.name);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 0:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java-body"))) {
                    $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                    $_ngcc_current_state = 3;
                }
                else {
                    revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
                }
            }
            break;
        default:
            {
                unexpectedEnterElement($__qname);
            }
            break;
        }
    }

    public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
        int $ai;
        $uri = $__uri;
        $localName = $__local;
        $qname = $__qname;
        switch($_ngcc_current_state) {
        case 10:
            {
                $_ngcc_current_state = 6;
                $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
            }
            break;
        case 11:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java-import"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 6;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 7:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java-body"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 5;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 2:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java-body"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 0;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 6:
            {
                $_ngcc_current_state = 5;
                $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
            }
            break;
        case 15:
            {
                if(($ai = $runtime.getAttributeIndex("","combine"))>=0) {
                    $runtime.consumeAttribute($ai);
                    $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
                }
                else {
                    $_ngcc_current_state = 14;
                    $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
                }
            }
            break;
        case 1:
            {
                $_ngcc_current_state = 0;
                $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
            }
            break;
        case 14:
            {
                if((($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","params"))>=0 || (($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","access"))>=0 || (($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","return-type"))>=0 || (($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0 || ($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","return-value"))>=0))))) {
                    NGCCHandler h = new NGCCdefine(this, super._source, $runtime, 503, scope.name);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 0:
            {
                revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
            }
            break;
        default:
            {
                unexpectedLeaveElement($__qname);
            }
            break;
        }
    }

    public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
        int $ai;
        $uri = $__uri;
        $localName = $__local;
        $qname = $__qname;
        switch($_ngcc_current_state) {
        case 10:
            {
                $_ngcc_current_state = 6;
                $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
            }
            break;
        case 6:
            {
                $_ngcc_current_state = 5;
                $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
            }
            break;
        case 15:
            {
                if(($__uri.equals("") && $__local.equals("combine"))) {
                    $_ngcc_current_state = 17;
                }
                else {
                    $_ngcc_current_state = 14;
                    $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
                }
            }
            break;
        case 1:
            {
                $_ngcc_current_state = 0;
                $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
            }
            break;
        case 14:
            {
                if((($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("params")) || (($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("access")) || (($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("return-type")) || (($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("class")) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("return-value"))))))) {
                    NGCCHandler h = new NGCCdefine(this, super._source, $runtime, 503, scope.name);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 0:
            {
                revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
            }
            break;
        default:
            {
                unexpectedEnterAttribute($__qname);
            }
            break;
        }
    }

    public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
        int $ai;
        $uri = $__uri;
        $localName = $__local;
        $qname = $__qname;
        switch($_ngcc_current_state) {
        case 10:
            {
                $_ngcc_current_state = 6;
                $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
            }
            break;
        case 6:
            {
                $_ngcc_current_state = 5;
                $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
            }
            break;
        case 15:
            {
                $_ngcc_current_state = 14;
                $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
            }
            break;
        case 1:
            {
                $_ngcc_current_state = 0;
                $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
            }
            break;
        case 0:
            {
                revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
            }
            break;
        case 16:
            {
                if(($__uri.equals("") && $__local.equals("combine"))) {
                    $_ngcc_current_state = 14;
                }
                else {
                    unexpectedLeaveAttribute($__qname);
                }
            }
            break;
        default:
            {
                unexpectedLeaveAttribute($__qname);
            }
            break;
        }
    }

    public void text(String $value) throws SAXException {
        int $ai;
        switch($_ngcc_current_state) {
        case 10:
            {
                $_ngcc_current_state = 6;
                $runtime.sendText(super._cookie, $value);
            }
            break;
        case 3:
            {
                value = $value;
                $_ngcc_current_state = 2;
                action0();
            }
            break;
        case 8:
            {
                value = $value;
                $_ngcc_current_state = 7;
                action2();
            }
            break;
        case 12:
            {
                value = $value;
                $_ngcc_current_state = 11;
                action3();
            }
            break;
        case 6:
            {
                $_ngcc_current_state = 5;
                $runtime.sendText(super._cookie, $value);
            }
            break;
        case 15:
            {
                if(($ai = $runtime.getAttributeIndex("","combine"))>=0) {
                    $runtime.consumeAttribute($ai);
                    $runtime.sendText(super._cookie, $value);
                }
                else {
                    $_ngcc_current_state = 14;
                    $runtime.sendText(super._cookie, $value);
                }
            }
            break;
        case 17:
            {
                combine = $value;
                $_ngcc_current_state = 16;
            }
            break;
        case 1:
            {
                $_ngcc_current_state = 0;
                $runtime.sendText(super._cookie, $value);
            }
            break;
        case 14:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","return-value"))>=0) {
                    NGCCHandler h = new NGCCdefine(this, super._source, $runtime, 503, scope.name);
                    spawnChildFromText(h, $value);
                }
                else {
                    if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                        NGCCHandler h = new NGCCdefine(this, super._source, $runtime, 503, scope.name);
                        spawnChildFromText(h, $value);
                    }
                    else {
                        if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","return-type"))>=0) {
                            NGCCHandler h = new NGCCdefine(this, super._source, $runtime, 503, scope.name);
                            spawnChildFromText(h, $value);
                        }
                        else {
                            if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","access"))>=0) {
                                NGCCHandler h = new NGCCdefine(this, super._source, $runtime, 503, scope.name);
                                spawnChildFromText(h, $value);
                            }
                            else {
                                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","params"))>=0) {
                                    NGCCHandler h = new NGCCdefine(this, super._source, $runtime, 503, scope.name);
                                    spawnChildFromText(h, $value);
                                }
                            }
                        }
                    }
                }
            }
            break;
        case 0:
            {
                revertToParentFromText(this, super._cookie, $value);
            }
            break;
        }
    }

    public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
        switch($__cookie__) {
        case 491:
            {
                p = ((Pattern)$__result__);
                action1();
                $_ngcc_current_state = 1;
            }
            break;
        case 503:
            {
                param = ((NGCCDefineParam)$__result__);
                action4();
                $_ngcc_current_state = 10;
            }
            break;
        }
    }

    public boolean accepted() {
        return((($_ngcc_current_state == 0) || ($_ngcc_current_state == 1)));
    }


}

