All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.coode.parsers.ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser Maven / Gradle / Ivy

// $ANTLR 3.2 Sep 23, 2009 12:02:23 MOWLParser.g 2011-01-10 16:18:12
package org.coode.parsers;

import java.util.ArrayList;
import java.util.List;

import org.antlr.runtime.BaseRecognizer;
import org.antlr.runtime.BitSet;
import org.antlr.runtime.DFA;
import org.antlr.runtime.EarlyExitException;
import org.antlr.runtime.IntStream;
import org.antlr.runtime.NoViableAltException;
import org.antlr.runtime.Parser;
import org.antlr.runtime.ParserRuleReturnScope;
import org.antlr.runtime.RecognitionException;
import org.antlr.runtime.RecognizerSharedState;
import org.antlr.runtime.RuleReturnScope;
import org.antlr.runtime.Token;
import org.antlr.runtime.TokenStream;
import org.antlr.runtime.tree.CommonTreeAdaptor;
import org.antlr.runtime.tree.RewriteEarlyExitException;
import org.antlr.runtime.tree.RewriteEmptyStreamException;
import org.antlr.runtime.tree.RewriteRuleSubtreeStream;
import org.antlr.runtime.tree.RewriteRuleTokenStream;
import org.antlr.runtime.tree.TreeAdaptor;
import org.coode.oppl.log.Logger;
import org.coode.oppl.log.Logging;

@SuppressWarnings({ "javadoc", "incomplete-switch", "synthetic-access" })
public class ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser
        extends Parser {
    public static final int COMMA = 37;
    public static final int GREATER_THAN = 667;
    public static final int DIFFERENT_FROM = 24;
    public static final int LESS_THAN = 665;
    public static final int TYPE_ASSERTION = 66;
    public static final int INCOMPLETE_CONJUNCTION = 615;
    public static final int SAME_AS_AXIOM = 52;
    public static final int INCOMPLETE_SUB_CLASS_AXIOM = 604;
    public static final int TYPES = 39;
    public static final int ROLE_ASSERTION = 67;
    public static final int ALL_RESTRICTION = 62;
    public static final int QUESTION_MARK = 46;
    public static final int AND = 10;
    public static final int EXPRESSION = 69;
    public static final int CONSTANT = 70;
    public static final int VALUE_RESTRICTION = 63;
    public static final int ONE_OF = 65;
    public static final int CARDINALITY_RESTRICTION = 64;
    public static final int SAME_AS = 23;
    public static final int EXACTLY = 17;
    public static final int TRANSITIVE = 34;
    public static final int SUBCLASS_OF = 20;
    public static final int ENTITY_REFERENCE = 45;
    public static final int CONJUNCTION = 56;
    public static final int INVERSE_OF = 25;
    public static final int AT = 629;
    public static final int RANGE = 28;
    public static final int DATA_RANGE = 692;
    public static final int CLOSED_PARENTHESYS = 8;
    public static final int PROPERTY_CHAIN = 57;
    public static final int OPEN_SQUARE_BRACKET = 662;
    public static final int EQUIVALENT_TO_AXIOM = 49;
    public static final int INCOMPLETE_ALL_RESTRICTION = 619;
    public static final int SYMMETRIC = 30;
    public static final int DISJOINT_WITH = 26;
    public static final int INCOMPLETE_VALUE_RESTRICTION = 622;
    public static final int DISJUNCTION = 55;
    public static final int INCOMPLETE_CARDINALITY_RESTRICTION = 620;
    public static final int NEGATED_EXPRESSION = 58;
    public static final int EQUAL = 664;
    public static final int DIFFERENT_FROM_AXIOM = 53;
    public static final int GREATER_THAN_EQUAL = 668;
    public static final int EQUIVALENT_TO = 22;
    public static final int DOMAIN = 27;
    public static final int SUB_PROPERTY_OF = 21;
    public static final int INVERSE_OBJECT_PROPERTY_EXPRESSION = 68;
    public static final int INVERSE_PROPERTY = 60;
    public static final int SUB_CLASS_AXIOM = 48;
    public static final int SUB_PROPERTY_AXIOM = 51;
    public static final int INCOMPLETE_DIFFERENT_FROM_AXIOM = 609;
    public static final int INCOMPLETE_INVERSE_OBJECT_PROPERTY_EXPRESSION = 616;
    public static final int IDENTIFIER = 44;
    public static final int UNARY_AXIOM = 54;
    public static final int INCOMPLETE_PROPERTY_CHAIN = 613;
    public static final int OPEN_CURLY_BRACES = 6;
    public static final int STANDALONE_EXPRESSION = 600;
    public static final int CLOSED_SQUARE_BRACKET = 663;
    public static final int INSTANCE_OF = 38;
    public static final int INCOMPLETE_DISJUNCTION = 614;
    public static final int SOME_RESTRICTION = 61;
    public static final int INCOMPLETE_SUB_PROPERTY_AXIOM = 607;
    public static final int INCOMPLETE_INVERSE_OF = 612;
    public static final int IRI = 110;
    public static final int INCOMPLETE_DOMAIN = 610;
    public static final int LESS_THAN_EQUAL = 666;
    public static final int VALUE = 18;
    public static final int INCOMPLETE_UNARY_AXIOM = 603;
    public static final int INVERSE_FUNCTIONAL = 35;
    public static final int OR = 11;
    public static final int INCOMPLETE_EXPRESSION = 623;
    public static final int INTEGER = 42;
    public static final int INVERSE = 19;
    public static final int HAS_KEY = 109;
    public static final int DISJOINT_WITH_AXIOM = 50;
    public static final int INCOMPLETE_DISJOINT_WITH_AXIOM = 606;
    public static final int DIGIT = 41;
    public static final int COMPOSITION = 4;
    public static final int ANNOTATION_ASSERTION = 111;
    public static final int INCOMPLETE_RANGE = 611;
    public static final int FUNCTIONAL = 29;
    public static final int LETTER = 43;
    public static final int MAX = 16;
    public static final int INCOMPLETE_ROLE_ASSERTION = 602;
    public static final int NEGATED_ASSERTION = 59;
    public static final int ONLY = 14;
    public static final int DBLQUOTE = 40;
    public static final int MIN = 15;
    public static final int POW = 36;
    public static final int INCOMPLETE_TYPE_ASSERTION = 601;
    public static final int INCOMPLETE_ONE_OF = 621;
    public static final int INCOMPLETE_NEGATED_EXPRESSION = 617;
    public static final int WHITESPACE = 9;
    public static final int SOME = 13;
    public static final int INCOMPLETE_SAME_AS_AXIOM = 608;
    public static final int INCOMPLETE_EQUIVALENT_TO_AXIOM = 605;
    public static final int EOF = -1;
    public static final int ANTI_SYMMETRIC = 31;
    public static final int Tokens = 47;
    public static final int CLOSED_CURLY_BRACES = 7;
    public static final int INCOMPLETE_SOME_RESTRICTION = 618;
    public static final int REFLEXIVE = 32;
    public static final int NOT = 12;
    public static final int OPEN_PARENTHESYS = 5;
    public static final int IRREFLEXIVE = 33;
    // delegates
    // delegators
    public ManchesterOWLSyntaxAutoCompleteCombinedParser gManchesterOWLSyntaxAutoCompleteCombined;
    public ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase gManchesterOWLSyntaxAutoCompleteBase;
    public ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase gParent;

    public ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser(
            TokenStream input,
            ManchesterOWLSyntaxAutoCompleteCombinedParser gManchesterOWLSyntaxAutoCompleteCombined,
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase gManchesterOWLSyntaxAutoCompleteBase) {
        this(input, new RecognizerSharedState(),
                gManchesterOWLSyntaxAutoCompleteCombined,
                gManchesterOWLSyntaxAutoCompleteBase);
    }

    public ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser(
            TokenStream input,
            RecognizerSharedState state,
            ManchesterOWLSyntaxAutoCompleteCombinedParser gManchesterOWLSyntaxAutoCompleteCombined,
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase gManchesterOWLSyntaxAutoCompleteBase) {
        super(input, state);
        this.gManchesterOWLSyntaxAutoCompleteCombined = gManchesterOWLSyntaxAutoCompleteCombined;
        this.gManchesterOWLSyntaxAutoCompleteBase = gManchesterOWLSyntaxAutoCompleteBase;
        gParent = gManchesterOWLSyntaxAutoCompleteBase;
    }

    protected TreeAdaptor adaptor = new CommonTreeAdaptor();

    public void setTreeAdaptor(TreeAdaptor adaptor) {
        this.adaptor = adaptor;
    }

    public TreeAdaptor getTreeAdaptor() {
        return adaptor;
    }

    @Override
    public String[] getTokenNames() {
        return ManchesterOWLSyntaxAutoCompleteCombinedParser.tokenNames;
    }

    @Override
    public String getGrammarFileName() {
        return "MOWLParser.g";
    }

    @Override
    public void displayRecognitionError(String[] tokenNames, RecognitionException e) {}

    public static class axiom_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "axiom"
    // MOWLParser.g:64:1: axiom options {backtrack=true; } : ( binaryAxiom -> ^(
    // binaryAxiom ) | unaryAxiom -> ^( unaryAxiom ) | assertionAxiom -> ^(
    // assertionAxiom ) | hasKeyAxiom -> ^( hasKeyAxiom ) |
    // annotationAssertionAxiom -> ^( annotationAssertionAxiom ) );
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.axiom_return
            axiom() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.axiom_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.axiom_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.binaryAxiom_return binaryAxiom1 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.unaryAxiom_return unaryAxiom2 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.assertionAxiom_return assertionAxiom3 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.hasKeyAxiom_return hasKeyAxiom4 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.annotationAssertionAxiom_return annotationAssertionAxiom5 = null;
        RewriteRuleSubtreeStream stream_assertionAxiom = new RewriteRuleSubtreeStream(
                adaptor, "rule assertionAxiom");
        RewriteRuleSubtreeStream stream_binaryAxiom = new RewriteRuleSubtreeStream(
                adaptor, "rule binaryAxiom");
        RewriteRuleSubtreeStream stream_hasKeyAxiom = new RewriteRuleSubtreeStream(
                adaptor, "rule hasKeyAxiom");
        RewriteRuleSubtreeStream stream_annotationAssertionAxiom = new RewriteRuleSubtreeStream(
                adaptor, "rule annotationAssertionAxiom");
        RewriteRuleSubtreeStream stream_unaryAxiom = new RewriteRuleSubtreeStream(
                adaptor, "rule unaryAxiom");
        try {
            // MOWLParser.g:64:37: ( binaryAxiom -> ^( binaryAxiom ) |
            // unaryAxiom -> ^( unaryAxiom ) | assertionAxiom -> ^(
            // assertionAxiom ) | hasKeyAxiom -> ^( hasKeyAxiom ) |
            // annotationAssertionAxiom -> ^( annotationAssertionAxiom ) )
            int alt1 = 5;
            alt1 = dfa1.predict(input);
            switch (alt1) {
                case 1:
                // MOWLParser.g:65:3: binaryAxiom
                {
                    pushFollow(FOLLOW_binaryAxiom_in_axiom232);
                    binaryAxiom1 = binaryAxiom();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_binaryAxiom.add(binaryAxiom1.getTree());
                    }
                    // AST REWRITE
                    // elements: binaryAxiom
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 65:15: -> ^( binaryAxiom )
                        {
                            // MOWLParser.g:65:18: ^( binaryAxiom )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_binaryAxiom.nextNode(), root_1);
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 2:
                // MOWLParser.g:66:5: unaryAxiom
                {
                    pushFollow(FOLLOW_unaryAxiom_in_axiom244);
                    unaryAxiom2 = unaryAxiom();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_unaryAxiom.add(unaryAxiom2.getTree());
                    }
                    // AST REWRITE
                    // elements: unaryAxiom
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 66:16: -> ^( unaryAxiom )
                        {
                            // MOWLParser.g:66:19: ^( unaryAxiom )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_unaryAxiom.nextNode(), root_1);
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 3:
                // MOWLParser.g:67:5: assertionAxiom
                {
                    pushFollow(FOLLOW_assertionAxiom_in_axiom256);
                    assertionAxiom3 = assertionAxiom();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_assertionAxiom.add(assertionAxiom3.getTree());
                    }
                    // AST REWRITE
                    // elements: assertionAxiom
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 67:20: -> ^( assertionAxiom )
                        {
                            // MOWLParser.g:67:23: ^( assertionAxiom )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_assertionAxiom.nextNode(), root_1);
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 4:
                // MOWLParser.g:68:5: hasKeyAxiom
                {
                    pushFollow(FOLLOW_hasKeyAxiom_in_axiom268);
                    hasKeyAxiom4 = hasKeyAxiom();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_hasKeyAxiom.add(hasKeyAxiom4.getTree());
                    }
                    // AST REWRITE
                    // elements: hasKeyAxiom
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 68:17: -> ^( hasKeyAxiom )
                        {
                            // MOWLParser.g:68:19: ^( hasKeyAxiom )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_hasKeyAxiom.nextNode(), root_1);
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 5:
                // MOWLParser.g:69:5: annotationAssertionAxiom
                {
                    pushFollow(FOLLOW_annotationAssertionAxiom_in_axiom279);
                    annotationAssertionAxiom5 = annotationAssertionAxiom();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_annotationAssertionAxiom.add(annotationAssertionAxiom5
                                .getTree());
                    }
                    // AST REWRITE
                    // elements: annotationAssertionAxiom
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 69:30: -> ^( annotationAssertionAxiom )
                        {
                            // MOWLParser.g:69:32: ^( annotationAssertionAxiom )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_annotationAssertionAxiom.nextNode(),
                                        root_1);
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "axiom"
    public static class annotationAssertionAxiom_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "annotationAssertionAxiom"
    // MOWLParser.g:72:1: annotationAssertionAxiom options {backtrack=true; } :
    // ( iri p= atomic o= constant -> ^( ANNOTATION_ASSERTION iri ^( EXPRESSION
    // $p) ^( EXPRESSION $o) ) | iri p= atomic a= atomic -> ^(
    // ANNOTATION_ASSERTION iri ^( EXPRESSION $p) ^( EXPRESSION $a) ) |
    // subjectIRI= iri p= atomic objectIRI= iri -> ^( ANNOTATION_ASSERTION
    // $subjectIRI ^( EXPRESSION $p) ^( EXPRESSION $objectIRI) ) );
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.annotationAssertionAxiom_return
            annotationAssertionAxiom() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.annotationAssertionAxiom_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.annotationAssertionAxiom_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.atomic_return p = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.constant_return o = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.atomic_return a = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.iri_return subjectIRI = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.iri_return objectIRI = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.iri_return iri6 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.iri_return iri7 = null;
        RewriteRuleSubtreeStream stream_iri = new RewriteRuleSubtreeStream(adaptor,
                "rule iri");
        RewriteRuleSubtreeStream stream_atomic = new RewriteRuleSubtreeStream(adaptor,
                "rule atomic");
        RewriteRuleSubtreeStream stream_constant = new RewriteRuleSubtreeStream(adaptor,
                "rule constant");
        try {
            // MOWLParser.g:73:32: ( iri p= atomic o= constant -> ^(
            // ANNOTATION_ASSERTION iri ^( EXPRESSION $p) ^( EXPRESSION $o) ) |
            // iri p= atomic a= atomic -> ^( ANNOTATION_ASSERTION iri ^(
            // EXPRESSION $p) ^( EXPRESSION $a) ) | subjectIRI= iri p= atomic
            // objectIRI= iri -> ^( ANNOTATION_ASSERTION $subjectIRI ^(
            // EXPRESSION $p) ^( EXPRESSION $objectIRI) ) )
            int alt2 = 3;
            int LA2_0 = input.LA(1);
            if (LA2_0 == IRI) {
                int LA2_1 = input.LA(2);
                if (LA2_1 == IDENTIFIER) {
                    switch (input.LA(3)) {
                        case DBLQUOTE: {
                            alt2 = 1;
                        }
                            break;
                        case IDENTIFIER:
                        case ENTITY_REFERENCE: {
                            alt2 = 2;
                        }
                            break;
                        case IRI: {
                            alt2 = 3;
                        }
                            break;
                        default:
                            if (state.backtracking > 0) {
                                state.failed = true;
                                return retval;
                            }
                            NoViableAltException nvae = new NoViableAltException("", 2,
                                    2, input);
                            throw nvae;
                    }
                } else if (LA2_1 == ENTITY_REFERENCE) {
                    switch (input.LA(3)) {
                        case IDENTIFIER:
                        case ENTITY_REFERENCE: {
                            alt2 = 2;
                        }
                            break;
                        case IRI: {
                            alt2 = 3;
                        }
                            break;
                        case DBLQUOTE: {
                            alt2 = 1;
                        }
                            break;
                        default:
                            if (state.backtracking > 0) {
                                state.failed = true;
                                return retval;
                            }
                            NoViableAltException nvae = new NoViableAltException("", 2,
                                    3, input);
                            throw nvae;
                    }
                } else {
                    if (state.backtracking > 0) {
                        state.failed = true;
                        return retval;
                    }
                    NoViableAltException nvae = new NoViableAltException("", 2, 1, input);
                    throw nvae;
                }
            } else {
                if (state.backtracking > 0) {
                    state.failed = true;
                    return retval;
                }
                NoViableAltException nvae = new NoViableAltException("", 2, 0, input);
                throw nvae;
            }
            switch (alt2) {
                case 1:
                // MOWLParser.g:74:3: iri p= atomic o= constant
                {
                    pushFollow(FOLLOW_iri_in_annotationAssertionAxiom311);
                    iri6 = iri();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_iri.add(iri6.getTree());
                    }
                    pushFollow(FOLLOW_atomic_in_annotationAssertionAxiom316);
                    p = atomic();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_atomic.add(p.getTree());
                    }
                    pushFollow(FOLLOW_constant_in_annotationAssertionAxiom322);
                    o = constant();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_constant.add(o.getTree());
                    }
                    // AST REWRITE
                    // elements: iri, o, p
                    // token labels:
                    // rule labels: o, p, retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        RewriteRuleSubtreeStream stream_o = new RewriteRuleSubtreeStream(
                                adaptor, "rule o", o != null ? o.tree : null);
                        RewriteRuleSubtreeStream stream_p = new RewriteRuleSubtreeStream(
                                adaptor, "rule p", p != null ? p.tree : null);
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 74:30: -> ^( ANNOTATION_ASSERTION iri ^( EXPRESSION
                        // $p) ^( EXPRESSION $o) )
                        {
                            // MOWLParser.g:74:33: ^( ANNOTATION_ASSERTION iri
                            // ^( EXPRESSION $p) ^( EXPRESSION $o) )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        adaptor.create(ANNOTATION_ASSERTION,
                                                "ANNOTATION_ASSERTION"), root_1);
                                adaptor.addChild(root_1, stream_iri.nextTree());
                                // MOWLParser.g:74:60: ^( EXPRESSION $p)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_p.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                // MOWLParser.g:74:77: ^( EXPRESSION $o)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_o.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 2:
                // MOWLParser.g:75:5: iri p= atomic a= atomic
                {
                    pushFollow(FOLLOW_iri_in_annotationAssertionAxiom350);
                    iri7 = iri();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_iri.add(iri7.getTree());
                    }
                    pushFollow(FOLLOW_atomic_in_annotationAssertionAxiom355);
                    p = atomic();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_atomic.add(p.getTree());
                    }
                    pushFollow(FOLLOW_atomic_in_annotationAssertionAxiom361);
                    a = atomic();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_atomic.add(a.getTree());
                    }
                    // AST REWRITE
                    // elements: iri, p, a
                    // token labels:
                    // rule labels: a, p, retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        RewriteRuleSubtreeStream stream_a = new RewriteRuleSubtreeStream(
                                adaptor, "rule a", a != null ? a.tree : null);
                        RewriteRuleSubtreeStream stream_p = new RewriteRuleSubtreeStream(
                                adaptor, "rule p", p != null ? p.tree : null);
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 75:30: -> ^( ANNOTATION_ASSERTION iri ^( EXPRESSION
                        // $p) ^( EXPRESSION $a) )
                        {
                            // MOWLParser.g:75:33: ^( ANNOTATION_ASSERTION iri
                            // ^( EXPRESSION $p) ^( EXPRESSION $a) )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        adaptor.create(ANNOTATION_ASSERTION,
                                                "ANNOTATION_ASSERTION"), root_1);
                                adaptor.addChild(root_1, stream_iri.nextTree());
                                // MOWLParser.g:75:60: ^( EXPRESSION $p)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_p.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                // MOWLParser.g:75:77: ^( EXPRESSION $a)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_a.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 3:
                // MOWLParser.g:76:5: subjectIRI= iri p= atomic objectIRI= iri
                {
                    pushFollow(FOLLOW_iri_in_annotationAssertionAxiom393);
                    subjectIRI = iri();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_iri.add(subjectIRI.getTree());
                    }
                    pushFollow(FOLLOW_atomic_in_annotationAssertionAxiom398);
                    p = atomic();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_atomic.add(p.getTree());
                    }
                    pushFollow(FOLLOW_iri_in_annotationAssertionAxiom404);
                    objectIRI = iri();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_iri.add(objectIRI.getTree());
                    }
                    // AST REWRITE
                    // elements: subjectIRI, p, objectIRI
                    // token labels:
                    // rule labels: subjectIRI, objectIRI, p, retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        RewriteRuleSubtreeStream stream_subjectIRI = new RewriteRuleSubtreeStream(
                                adaptor, "rule subjectIRI",
                                subjectIRI != null ? subjectIRI.tree : null);
                        RewriteRuleSubtreeStream stream_objectIRI = new RewriteRuleSubtreeStream(
                                adaptor, "rule objectIRI",
                                objectIRI != null ? objectIRI.tree : null);
                        RewriteRuleSubtreeStream stream_p = new RewriteRuleSubtreeStream(
                                adaptor, "rule p", p != null ? p.tree : null);
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 76:48: -> ^( ANNOTATION_ASSERTION $subjectIRI ^(
                        // EXPRESSION $p) ^( EXPRESSION $objectIRI) )
                        {
                            // MOWLParser.g:76:51: ^( ANNOTATION_ASSERTION
                            // $subjectIRI ^( EXPRESSION $p) ^( EXPRESSION
                            // $objectIRI) )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        adaptor.create(ANNOTATION_ASSERTION,
                                                "ANNOTATION_ASSERTION"), root_1);
                                adaptor.addChild(root_1, stream_subjectIRI.nextTree());
                                // MOWLParser.g:76:86: ^( EXPRESSION $p)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_p.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                // MOWLParser.g:76:103: ^( EXPRESSION
                                // $objectIRI)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_objectIRI.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "annotationAssertionAxiom"
    public static class iri_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "iri"
    // MOWLParser.g:80:1: iri : IRI -> IRI ;
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.iri_return
            iri() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.iri_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.iri_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        Token IRI8 = null;
        RewriteRuleTokenStream stream_IRI = new RewriteRuleTokenStream(adaptor,
                "token IRI");
        try {
            // MOWLParser.g:81:2: ( IRI -> IRI )
            // MOWLParser.g:82:2: IRI
            {
                IRI8 = (Token) match(input, IRI, FOLLOW_IRI_in_iri440);
                if (state.failed) {
                    return retval;
                }
                if (state.backtracking == 0) {
                    stream_IRI.add(IRI8);
                }
                // AST REWRITE
                // elements: IRI
                // token labels:
                // rule labels: retval
                // token list labels:
                // rule list labels:
                // wildcard labels:
                if (state.backtracking == 0) {
                    retval.tree = root_0;
                    root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                    // 82:6: -> IRI
                    {
                        adaptor.addChild(root_0, stream_IRI.nextNode());
                    }
                    retval.tree = root_0;
                }
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "iri"
    public static class hasKeyAxiom_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "hasKeyAxiom"
    // MOWLParser.g:85:1: hasKeyAxiom : exp= expression HAS_KEY
    // propertyExpression ( COMMA propertyExpression )* -> ^( HAS_KEY ^(
    // EXPRESSION $exp) ( ^( EXPRESSION propertyExpression ) )+ ) ;
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.hasKeyAxiom_return
            hasKeyAxiom() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.hasKeyAxiom_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.hasKeyAxiom_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        Token HAS_KEY9 = null;
        Token COMMA11 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.expression_return exp = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.propertyExpression_return propertyExpression10 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.propertyExpression_return propertyExpression12 = null;
        RewriteRuleTokenStream stream_COMMA = new RewriteRuleTokenStream(adaptor,
                "token COMMA");
        RewriteRuleTokenStream stream_HAS_KEY = new RewriteRuleTokenStream(adaptor,
                "token HAS_KEY");
        RewriteRuleSubtreeStream stream_propertyExpression = new RewriteRuleSubtreeStream(
                adaptor, "rule propertyExpression");
        RewriteRuleSubtreeStream stream_expression = new RewriteRuleSubtreeStream(
                adaptor, "rule expression");
        try {
            // MOWLParser.g:86:2: (exp= expression HAS_KEY propertyExpression (
            // COMMA propertyExpression )* -> ^( HAS_KEY ^( EXPRESSION $exp) (
            // ^( EXPRESSION propertyExpression ) )+ ) )
            // MOWLParser.g:87:3: exp= expression HAS_KEY propertyExpression (
            // COMMA propertyExpression )*
            {
                pushFollow(FOLLOW_expression_in_hasKeyAxiom461);
                exp = expression();
                state._fsp--;
                if (state.failed) {
                    return retval;
                }
                if (state.backtracking == 0) {
                    stream_expression.add(exp.getTree());
                }
                HAS_KEY9 = (Token) match(input, HAS_KEY, FOLLOW_HAS_KEY_in_hasKeyAxiom463);
                if (state.failed) {
                    return retval;
                }
                if (state.backtracking == 0) {
                    stream_HAS_KEY.add(HAS_KEY9);
                }
                pushFollow(FOLLOW_propertyExpression_in_hasKeyAxiom465);
                propertyExpression10 = propertyExpression();
                state._fsp--;
                if (state.failed) {
                    return retval;
                }
                if (state.backtracking == 0) {
                    stream_propertyExpression.add(propertyExpression10.getTree());
                }
                // MOWLParser.g:87:47: ( COMMA propertyExpression )*
                loop3: do {
                    int alt3 = 2;
                    int LA3_0 = input.LA(1);
                    if (LA3_0 == COMMA) {
                        alt3 = 1;
                    }
                    switch (alt3) {
                        case 1:
                        // MOWLParser.g:87:48: COMMA propertyExpression
                        {
                            COMMA11 = (Token) match(input, COMMA,
                                    FOLLOW_COMMA_in_hasKeyAxiom468);
                            if (state.failed) {
                                return retval;
                            }
                            if (state.backtracking == 0) {
                                stream_COMMA.add(COMMA11);
                            }
                            pushFollow(FOLLOW_propertyExpression_in_hasKeyAxiom470);
                            propertyExpression12 = propertyExpression();
                            state._fsp--;
                            if (state.failed) {
                                return retval;
                            }
                            if (state.backtracking == 0) {
                                stream_propertyExpression.add(propertyExpression12
                                        .getTree());
                            }
                        }
                            break;
                        default:
                            break loop3;
                    }
                } while (true);
                // AST REWRITE
                // elements: exp, HAS_KEY, propertyExpression
                // token labels:
                // rule labels: exp, retval
                // token list labels:
                // rule list labels:
                // wildcard labels:
                if (state.backtracking == 0) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_exp = new RewriteRuleSubtreeStream(
                            adaptor, "rule exp", exp != null ? exp.tree : null);
                    root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                    // 87:75: -> ^( HAS_KEY ^( EXPRESSION $exp) ( ^( EXPRESSION
                    // propertyExpression ) )+ )
                    {
                        // MOWLParser.g:87:78: ^( HAS_KEY ^( EXPRESSION $exp) (
                        // ^( EXPRESSION propertyExpression ) )+ )
                        {
                            ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                    .nil();
                            root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                    stream_HAS_KEY.nextNode(), root_1);
                            // MOWLParser.g:87:88: ^( EXPRESSION $exp)
                            {
                                ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_2 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        adaptor.create(EXPRESSION, "EXPRESSION"), root_2);
                                adaptor.addChild(root_2, stream_exp.nextTree());
                                adaptor.addChild(root_1, root_2);
                            }
                            if (!stream_propertyExpression.hasNext()) {
                                throw new RewriteEarlyExitException();
                            }
                            while (stream_propertyExpression.hasNext()) {
                                // MOWLParser.g:87:108: ^( EXPRESSION
                                // propertyExpression )
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2,
                                            stream_propertyExpression.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                            }
                            stream_propertyExpression.reset();
                            adaptor.addChild(root_0, root_1);
                        }
                    }
                    retval.tree = root_0;
                }
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "hasKeyAxiom"
    public static class assertionAxiom_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "assertionAxiom"
    // MOWLParser.g:92:1: assertionAxiom options {backtrack=true; } : (i= atomic
    // ( INSTANCE_OF | TYPES ) expression -> ^( TYPE_ASSERTION ^( EXPRESSION
    // expression ) ^( EXPRESSION $i) ) | subject= atomic propertyExpression
    // value -> ^( ROLE_ASSERTION ^( EXPRESSION $subject) ^( EXPRESSION
    // propertyExpression ) ^( EXPRESSION value ) ) | NOT assertionAxiom -> ^(
    // NEGATED_ASSERTION assertionAxiom ) );
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.assertionAxiom_return
            assertionAxiom() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.assertionAxiom_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.assertionAxiom_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        Token INSTANCE_OF13 = null;
        Token TYPES14 = null;
        Token NOT18 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.atomic_return i = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.atomic_return subject = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.expression_return expression15 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.propertyExpression_return propertyExpression16 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.value_return value17 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.assertionAxiom_return assertionAxiom19 = null;
        RewriteRuleTokenStream stream_TYPES = new RewriteRuleTokenStream(adaptor,
                "token TYPES");
        RewriteRuleTokenStream stream_NOT = new RewriteRuleTokenStream(adaptor,
                "token NOT");
        RewriteRuleTokenStream stream_INSTANCE_OF = new RewriteRuleTokenStream(adaptor,
                "token INSTANCE_OF");
        RewriteRuleSubtreeStream stream_propertyExpression = new RewriteRuleSubtreeStream(
                adaptor, "rule propertyExpression");
        RewriteRuleSubtreeStream stream_value = new RewriteRuleSubtreeStream(adaptor,
                "rule value");
        RewriteRuleSubtreeStream stream_assertionAxiom = new RewriteRuleSubtreeStream(
                adaptor, "rule assertionAxiom");
        RewriteRuleSubtreeStream stream_atomic = new RewriteRuleSubtreeStream(adaptor,
                "rule atomic");
        RewriteRuleSubtreeStream stream_expression = new RewriteRuleSubtreeStream(
                adaptor, "rule expression");
        try {
            // MOWLParser.g:92:41: (i= atomic ( INSTANCE_OF | TYPES ) expression
            // -> ^( TYPE_ASSERTION ^( EXPRESSION expression ) ^( EXPRESSION $i)
            // ) | subject= atomic propertyExpression value -> ^( ROLE_ASSERTION
            // ^( EXPRESSION $subject) ^( EXPRESSION propertyExpression ) ^(
            // EXPRESSION value ) ) | NOT assertionAxiom -> ^( NEGATED_ASSERTION
            // assertionAxiom ) )
            int alt5 = 3;
            switch (input.LA(1)) {
                case IDENTIFIER: {
                    int LA5_1 = input.LA(2);
                    if (LA5_1 == INVERSE || LA5_1 >= IDENTIFIER
                            && LA5_1 <= ENTITY_REFERENCE) {
                        alt5 = 2;
                    } else if (LA5_1 >= INSTANCE_OF && LA5_1 <= TYPES) {
                        alt5 = 1;
                    } else {
                        if (state.backtracking > 0) {
                            state.failed = true;
                            return retval;
                        }
                        NoViableAltException nvae = new NoViableAltException("", 5, 1,
                                input);
                        throw nvae;
                    }
                }
                    break;
                case ENTITY_REFERENCE: {
                    int LA5_2 = input.LA(2);
                    if (LA5_2 >= INSTANCE_OF && LA5_2 <= TYPES) {
                        alt5 = 1;
                    } else if (LA5_2 == INVERSE || LA5_2 >= IDENTIFIER
                            && LA5_2 <= ENTITY_REFERENCE) {
                        alt5 = 2;
                    } else {
                        if (state.backtracking > 0) {
                            state.failed = true;
                            return retval;
                        }
                        NoViableAltException nvae = new NoViableAltException("", 5, 2,
                                input);
                        throw nvae;
                    }
                }
                    break;
                case NOT: {
                    alt5 = 3;
                }
                    break;
                default:
                    if (state.backtracking > 0) {
                        state.failed = true;
                        return retval;
                    }
                    NoViableAltException nvae = new NoViableAltException("", 5, 0, input);
                    throw nvae;
            }
            switch (alt5) {
                case 1:
                // MOWLParser.g:93:3: i= atomic ( INSTANCE_OF | TYPES )
                // expression
                {
                    pushFollow(FOLLOW_atomic_in_assertionAxiom518);
                    i = atomic();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_atomic.add(i.getTree());
                    }
                    // MOWLParser.g:93:14: ( INSTANCE_OF | TYPES )
                    int alt4 = 2;
                    int LA4_0 = input.LA(1);
                    if (LA4_0 == INSTANCE_OF) {
                        alt4 = 1;
                    } else if (LA4_0 == TYPES) {
                        alt4 = 2;
                    } else {
                        if (state.backtracking > 0) {
                            state.failed = true;
                            return retval;
                        }
                        NoViableAltException nvae = new NoViableAltException("", 4, 0,
                                input);
                        throw nvae;
                    }
                    switch (alt4) {
                        case 1:
                        // MOWLParser.g:93:15: INSTANCE_OF
                        {
                            INSTANCE_OF13 = (Token) match(input, INSTANCE_OF,
                                    FOLLOW_INSTANCE_OF_in_assertionAxiom521);
                            if (state.failed) {
                                return retval;
                            }
                            if (state.backtracking == 0) {
                                stream_INSTANCE_OF.add(INSTANCE_OF13);
                            }
                        }
                            break;
                        case 2:
                        // MOWLParser.g:93:29: TYPES
                        {
                            TYPES14 = (Token) match(input, TYPES,
                                    FOLLOW_TYPES_in_assertionAxiom525);
                            if (state.failed) {
                                return retval;
                            }
                            if (state.backtracking == 0) {
                                stream_TYPES.add(TYPES14);
                            }
                        }
                            break;
                    }
                    pushFollow(FOLLOW_expression_in_assertionAxiom528);
                    expression15 = expression();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_expression.add(expression15.getTree());
                    }
                    // AST REWRITE
                    // elements: i, expression
                    // token labels:
                    // rule labels: i, retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        RewriteRuleSubtreeStream stream_i = new RewriteRuleSubtreeStream(
                                adaptor, "rule i", i != null ? i.tree : null);
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 93:47: -> ^( TYPE_ASSERTION ^( EXPRESSION expression
                        // ) ^( EXPRESSION $i) )
                        {
                            // MOWLParser.g:93:50: ^( TYPE_ASSERTION ^(
                            // EXPRESSION expression ) ^( EXPRESSION $i) )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        adaptor.create(TYPE_ASSERTION, "TYPE_ASSERTION"),
                                        root_1);
                                // MOWLParser.g:93:67: ^( EXPRESSION expression
                                // )
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_expression.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                // MOWLParser.g:93:92: ^( EXPRESSION $i)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_i.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 2:
                // MOWLParser.g:94:7: subject= atomic propertyExpression value
                {
                    pushFollow(FOLLOW_atomic_in_assertionAxiom559);
                    subject = atomic();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_atomic.add(subject.getTree());
                    }
                    pushFollow(FOLLOW_propertyExpression_in_assertionAxiom561);
                    propertyExpression16 = propertyExpression();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_propertyExpression.add(propertyExpression16.getTree());
                    }
                    pushFollow(FOLLOW_value_in_assertionAxiom564);
                    value17 = value();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_value.add(value17.getTree());
                    }
                    // AST REWRITE
                    // elements: propertyExpression, value, subject
                    // token labels:
                    // rule labels: retval, subject
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        RewriteRuleSubtreeStream stream_subject = new RewriteRuleSubtreeStream(
                                adaptor, "rule subject", subject != null ? subject.tree
                                        : null);
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 94:50: -> ^( ROLE_ASSERTION ^( EXPRESSION $subject)
                        // ^( EXPRESSION propertyExpression ) ^( EXPRESSION
                        // value ) )
                        {
                            // MOWLParser.g:94:53: ^( ROLE_ASSERTION ^(
                            // EXPRESSION $subject) ^( EXPRESSION
                            // propertyExpression ) ^( EXPRESSION value ) )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        adaptor.create(ROLE_ASSERTION, "ROLE_ASSERTION"),
                                        root_1);
                                // MOWLParser.g:94:70: ^( EXPRESSION $subject)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_subject.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                // MOWLParser.g:94:93: ^( EXPRESSION
                                // propertyExpression )
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2,
                                            stream_propertyExpression.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                // MOWLParser.g:94:126: ^( EXPRESSION value )
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_value.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 3:
                // MOWLParser.g:96:5: NOT assertionAxiom
                {
                    NOT18 = (Token) match(input, NOT, FOLLOW_NOT_in_assertionAxiom598);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_NOT.add(NOT18);
                    }
                    pushFollow(FOLLOW_assertionAxiom_in_assertionAxiom600);
                    assertionAxiom19 = assertionAxiom();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_assertionAxiom.add(assertionAxiom19.getTree());
                    }
                    // AST REWRITE
                    // elements: assertionAxiom
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 96:24: -> ^( NEGATED_ASSERTION assertionAxiom )
                        {
                            // MOWLParser.g:96:27: ^( NEGATED_ASSERTION
                            // assertionAxiom )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        adaptor.create(NEGATED_ASSERTION,
                                                "NEGATED_ASSERTION"), root_1);
                                adaptor.addChild(root_1, stream_assertionAxiom.nextTree());
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "assertionAxiom"
    public static class binaryAxiom_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "binaryAxiom"
    // MOWLParser.g:101:1: binaryAxiom options {backtrack=true; } : (lhs=
    // expression SUBCLASS_OF superClass= expression -> ^( SUB_CLASS_AXIOM ^(
    // EXPRESSION $lhs) ^( EXPRESSION $superClass) ) | lhs= expression
    // EQUIVALENT_TO rhs= expression -> ^( EQUIVALENT_TO_AXIOM ^( EXPRESSION
    // $lhs) ^( EXPRESSION $rhs) ) | lhs= expression DISJOINT_WITH disjoint=
    // expression -> ^( DISJOINT_WITH_AXIOM ^( EXPRESSION $lhs) ^( EXPRESSION
    // $disjoint) ) | lhs= expression SUB_PROPERTY_OF superProperty=
    // propertyExpression -> ^( SUB_PROPERTY_AXIOM ^( EXPRESSION $lhs) ^(
    // EXPRESSION $superProperty) ) | lhsID= atomic INVERSE_OF rhsAtomic= atomic
    // -> ^( INVERSE_OF ^( EXPRESSION $lhsID) ^( EXPRESSION $rhsAtomic) ) |
    // lhsID= atomic SAME_AS rhsID= atomic -> ^( SAME_AS_AXIOM ^( EXPRESSION
    // $lhsID) ^( EXPRESSION $rhsID) ) | lhsID= atomic DIFFERENT_FROM rhsID=
    // atomic -> ^( DIFFERENT_FROM_AXIOM ^( EXPRESSION $lhsID) ^( EXPRESSION
    // $rhsID) ) | lhsID= atomic DOMAIN expression -> ^( DOMAIN ^( EXPRESSION
    // $lhsID) ^( EXPRESSION expression ) ) | lhsID= atomic RANGE expression ->
    // ^( RANGE ^( EXPRESSION $lhsID) ^( EXPRESSION expression ) ) );
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.binaryAxiom_return
            binaryAxiom() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.binaryAxiom_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.binaryAxiom_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        Token SUBCLASS_OF20 = null;
        Token EQUIVALENT_TO21 = null;
        Token DISJOINT_WITH22 = null;
        Token SUB_PROPERTY_OF23 = null;
        Token INVERSE_OF24 = null;
        Token SAME_AS25 = null;
        Token DIFFERENT_FROM26 = null;
        Token DOMAIN27 = null;
        Token RANGE29 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.expression_return lhs = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.expression_return superClass = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.expression_return rhs = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.expression_return disjoint = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.propertyExpression_return superProperty = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.atomic_return lhsID = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.atomic_return rhsAtomic = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.atomic_return rhsID = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.expression_return expression28 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.expression_return expression30 = null;
        RewriteRuleTokenStream stream_RANGE = new RewriteRuleTokenStream(adaptor,
                "token RANGE");
        RewriteRuleTokenStream stream_DISJOINT_WITH = new RewriteRuleTokenStream(adaptor,
                "token DISJOINT_WITH");
        RewriteRuleTokenStream stream_SAME_AS = new RewriteRuleTokenStream(adaptor,
                "token SAME_AS");
        RewriteRuleTokenStream stream_SUBCLASS_OF = new RewriteRuleTokenStream(adaptor,
                "token SUBCLASS_OF");
        RewriteRuleTokenStream stream_DIFFERENT_FROM = new RewriteRuleTokenStream(
                adaptor, "token DIFFERENT_FROM");
        RewriteRuleTokenStream stream_INVERSE_OF = new RewriteRuleTokenStream(adaptor,
                "token INVERSE_OF");
        RewriteRuleTokenStream stream_EQUIVALENT_TO = new RewriteRuleTokenStream(adaptor,
                "token EQUIVALENT_TO");
        RewriteRuleTokenStream stream_DOMAIN = new RewriteRuleTokenStream(adaptor,
                "token DOMAIN");
        RewriteRuleTokenStream stream_SUB_PROPERTY_OF = new RewriteRuleTokenStream(
                adaptor, "token SUB_PROPERTY_OF");
        RewriteRuleSubtreeStream stream_propertyExpression = new RewriteRuleSubtreeStream(
                adaptor, "rule propertyExpression");
        RewriteRuleSubtreeStream stream_atomic = new RewriteRuleSubtreeStream(adaptor,
                "rule atomic");
        RewriteRuleSubtreeStream stream_expression = new RewriteRuleSubtreeStream(
                adaptor, "rule expression");
        try {
            // MOWLParser.g:103:26: (lhs= expression SUBCLASS_OF superClass=
            // expression -> ^( SUB_CLASS_AXIOM ^( EXPRESSION $lhs) ^(
            // EXPRESSION $superClass) ) | lhs= expression EQUIVALENT_TO rhs=
            // expression -> ^( EQUIVALENT_TO_AXIOM ^( EXPRESSION $lhs) ^(
            // EXPRESSION $rhs) ) | lhs= expression DISJOINT_WITH disjoint=
            // expression -> ^( DISJOINT_WITH_AXIOM ^( EXPRESSION $lhs) ^(
            // EXPRESSION $disjoint) ) | lhs= expression SUB_PROPERTY_OF
            // superProperty= propertyExpression -> ^( SUB_PROPERTY_AXIOM ^(
            // EXPRESSION $lhs) ^( EXPRESSION $superProperty) ) | lhsID= atomic
            // INVERSE_OF rhsAtomic= atomic -> ^( INVERSE_OF ^( EXPRESSION
            // $lhsID) ^( EXPRESSION $rhsAtomic) ) | lhsID= atomic SAME_AS
            // rhsID= atomic -> ^( SAME_AS_AXIOM ^( EXPRESSION $lhsID) ^(
            // EXPRESSION $rhsID) ) | lhsID= atomic DIFFERENT_FROM rhsID= atomic
            // -> ^( DIFFERENT_FROM_AXIOM ^( EXPRESSION $lhsID) ^( EXPRESSION
            // $rhsID) ) | lhsID= atomic DOMAIN expression -> ^( DOMAIN ^(
            // EXPRESSION $lhsID) ^( EXPRESSION expression ) ) | lhsID= atomic
            // RANGE expression -> ^( RANGE ^( EXPRESSION $lhsID) ^( EXPRESSION
            // expression ) ) )
            int alt6 = 9;
            alt6 = dfa6.predict(input);
            switch (alt6) {
                case 1:
                // MOWLParser.g:104:2: lhs= expression SUBCLASS_OF superClass=
                // expression
                {
                    pushFollow(FOLLOW_expression_in_binaryAxiom639);
                    lhs = expression();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_expression.add(lhs.getTree());
                    }
                    SUBCLASS_OF20 = (Token) match(input, SUBCLASS_OF,
                            FOLLOW_SUBCLASS_OF_in_binaryAxiom641);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_SUBCLASS_OF.add(SUBCLASS_OF20);
                    }
                    pushFollow(FOLLOW_expression_in_binaryAxiom648);
                    superClass = expression();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_expression.add(superClass.getTree());
                    }
                    // AST REWRITE
                    // elements: lhs, superClass
                    // token labels:
                    // rule labels: lhs, retval, superClass
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        RewriteRuleSubtreeStream stream_lhs = new RewriteRuleSubtreeStream(
                                adaptor, "rule lhs", lhs != null ? lhs.tree : null);
                        RewriteRuleSubtreeStream stream_superClass = new RewriteRuleSubtreeStream(
                                adaptor, "rule superClass",
                                superClass != null ? superClass.tree : null);
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 104:57: -> ^( SUB_CLASS_AXIOM ^( EXPRESSION $lhs) ^(
                        // EXPRESSION $superClass) )
                        {
                            // MOWLParser.g:104:60: ^( SUB_CLASS_AXIOM ^(
                            // EXPRESSION $lhs) ^( EXPRESSION $superClass) )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .becomeRoot(adaptor.create(SUB_CLASS_AXIOM,
                                                "SUB_CLASS_AXIOM"), root_1);
                                // MOWLParser.g:104:79: ^( EXPRESSION $lhs)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_lhs.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                // MOWLParser.g:104:98: ^( EXPRESSION
                                // $superClass)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_superClass.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 2:
                // MOWLParser.g:105:11: lhs= expression EQUIVALENT_TO rhs=
                // expression
                {
                    pushFollow(FOLLOW_expression_in_binaryAxiom686);
                    lhs = expression();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_expression.add(lhs.getTree());
                    }
                    EQUIVALENT_TO21 = (Token) match(input, EQUIVALENT_TO,
                            FOLLOW_EQUIVALENT_TO_in_binaryAxiom688);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_EQUIVALENT_TO.add(EQUIVALENT_TO21);
                    }
                    pushFollow(FOLLOW_expression_in_binaryAxiom694);
                    rhs = expression();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_expression.add(rhs.getTree());
                    }
                    // AST REWRITE
                    // elements: rhs, lhs
                    // token labels:
                    // rule labels: lhs, retval, rhs
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        RewriteRuleSubtreeStream stream_lhs = new RewriteRuleSubtreeStream(
                                adaptor, "rule lhs", lhs != null ? lhs.tree : null);
                        RewriteRuleSubtreeStream stream_rhs = new RewriteRuleSubtreeStream(
                                adaptor, "rule rhs", rhs != null ? rhs.tree : null);
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 105:60: -> ^( EQUIVALENT_TO_AXIOM ^( EXPRESSION $lhs)
                        // ^( EXPRESSION $rhs) )
                        {
                            // MOWLParser.g:105:63: ^( EQUIVALENT_TO_AXIOM ^(
                            // EXPRESSION $lhs) ^( EXPRESSION $rhs) )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        adaptor.create(EQUIVALENT_TO_AXIOM,
                                                "EQUIVALENT_TO_AXIOM"), root_1);
                                // MOWLParser.g:105:85: ^( EXPRESSION $lhs)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_lhs.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                // MOWLParser.g:105:104: ^( EXPRESSION $rhs)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_rhs.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 3:
                // MOWLParser.g:106:11: lhs= expression DISJOINT_WITH disjoint=
                // expression
                {
                    pushFollow(FOLLOW_expression_in_binaryAxiom731);
                    lhs = expression();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_expression.add(lhs.getTree());
                    }
                    DISJOINT_WITH22 = (Token) match(input, DISJOINT_WITH,
                            FOLLOW_DISJOINT_WITH_in_binaryAxiom733);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_DISJOINT_WITH.add(DISJOINT_WITH22);
                    }
                    pushFollow(FOLLOW_expression_in_binaryAxiom739);
                    disjoint = expression();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_expression.add(disjoint.getTree());
                    }
                    // AST REWRITE
                    // elements: lhs, disjoint
                    // token labels:
                    // rule labels: lhs, disjoint, retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        RewriteRuleSubtreeStream stream_lhs = new RewriteRuleSubtreeStream(
                                adaptor, "rule lhs", lhs != null ? lhs.tree : null);
                        RewriteRuleSubtreeStream stream_disjoint = new RewriteRuleSubtreeStream(
                                adaptor, "rule disjoint",
                                disjoint != null ? disjoint.tree : null);
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 106:65: -> ^( DISJOINT_WITH_AXIOM ^( EXPRESSION $lhs)
                        // ^( EXPRESSION $disjoint) )
                        {
                            // MOWLParser.g:106:68: ^( DISJOINT_WITH_AXIOM ^(
                            // EXPRESSION $lhs) ^( EXPRESSION $disjoint) )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        adaptor.create(DISJOINT_WITH_AXIOM,
                                                "DISJOINT_WITH_AXIOM"), root_1);
                                // MOWLParser.g:106:90: ^( EXPRESSION $lhs)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_lhs.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                // MOWLParser.g:106:109: ^( EXPRESSION
                                // $disjoint)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_disjoint.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 4:
                // MOWLParser.g:107:11: lhs= expression SUB_PROPERTY_OF
                // superProperty= propertyExpression
                {
                    pushFollow(FOLLOW_expression_in_binaryAxiom776);
                    lhs = expression();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_expression.add(lhs.getTree());
                    }
                    SUB_PROPERTY_OF23 = (Token) match(input, SUB_PROPERTY_OF,
                            FOLLOW_SUB_PROPERTY_OF_in_binaryAxiom778);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_SUB_PROPERTY_OF.add(SUB_PROPERTY_OF23);
                    }
                    pushFollow(FOLLOW_propertyExpression_in_binaryAxiom784);
                    superProperty = propertyExpression();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_propertyExpression.add(superProperty.getTree());
                    }
                    // AST REWRITE
                    // elements: lhs, superProperty
                    // token labels:
                    // rule labels: lhs, superProperty, retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        RewriteRuleSubtreeStream stream_lhs = new RewriteRuleSubtreeStream(
                                adaptor, "rule lhs", lhs != null ? lhs.tree : null);
                        RewriteRuleSubtreeStream stream_superProperty = new RewriteRuleSubtreeStream(
                                adaptor, "rule superProperty",
                                superProperty != null ? superProperty.tree : null);
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 107:80: -> ^( SUB_PROPERTY_AXIOM ^( EXPRESSION $lhs)
                        // ^( EXPRESSION $superProperty) )
                        {
                            // MOWLParser.g:107:83: ^( SUB_PROPERTY_AXIOM ^(
                            // EXPRESSION $lhs) ^( EXPRESSION $superProperty) )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        adaptor.create(SUB_PROPERTY_AXIOM,
                                                "SUB_PROPERTY_AXIOM"), root_1);
                                // MOWLParser.g:107:104: ^( EXPRESSION $lhs)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_lhs.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                // MOWLParser.g:107:123: ^( EXPRESSION
                                // $superProperty)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2,
                                            stream_superProperty.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 5:
                // MOWLParser.g:108:11: lhsID= atomic INVERSE_OF rhsAtomic=
                // atomic
                {
                    pushFollow(FOLLOW_atomic_in_binaryAxiom821);
                    lhsID = atomic();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_atomic.add(lhsID.getTree());
                    }
                    INVERSE_OF24 = (Token) match(input, INVERSE_OF,
                            FOLLOW_INVERSE_OF_in_binaryAxiom823);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_INVERSE_OF.add(INVERSE_OF24);
                    }
                    pushFollow(FOLLOW_atomic_in_binaryAxiom829);
                    rhsAtomic = atomic();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_atomic.add(rhsAtomic.getTree());
                    }
                    // AST REWRITE
                    // elements: lhsID, INVERSE_OF, rhsAtomic
                    // token labels:
                    // rule labels: lhsID, rhsAtomic, retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        RewriteRuleSubtreeStream stream_lhsID = new RewriteRuleSubtreeStream(
                                adaptor, "rule lhsID", lhsID != null ? lhsID.tree : null);
                        RewriteRuleSubtreeStream stream_rhsAtomic = new RewriteRuleSubtreeStream(
                                adaptor, "rule rhsAtomic",
                                rhsAtomic != null ? rhsAtomic.tree : null);
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 108:57: -> ^( INVERSE_OF ^( EXPRESSION $lhsID) ^(
                        // EXPRESSION $rhsAtomic) )
                        {
                            // MOWLParser.g:108:60: ^( INVERSE_OF ^( EXPRESSION
                            // $lhsID) ^( EXPRESSION $rhsAtomic) )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_INVERSE_OF.nextNode(), root_1);
                                // MOWLParser.g:108:73: ^( EXPRESSION $lhsID)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_lhsID.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                // MOWLParser.g:108:94: ^( EXPRESSION
                                // $rhsAtomic)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_rhsAtomic.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 6:
                // MOWLParser.g:109:3: lhsID= atomic SAME_AS rhsID= atomic
                {
                    pushFollow(FOLLOW_atomic_in_binaryAxiom860);
                    lhsID = atomic();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_atomic.add(lhsID.getTree());
                    }
                    SAME_AS25 = (Token) match(input, SAME_AS,
                            FOLLOW_SAME_AS_in_binaryAxiom862);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_SAME_AS.add(SAME_AS25);
                    }
                    pushFollow(FOLLOW_atomic_in_binaryAxiom869);
                    rhsID = atomic();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_atomic.add(rhsID.getTree());
                    }
                    // AST REWRITE
                    // elements: rhsID, lhsID
                    // token labels:
                    // rule labels: rhsID, lhsID, retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        RewriteRuleSubtreeStream stream_rhsID = new RewriteRuleSubtreeStream(
                                adaptor, "rule rhsID", rhsID != null ? rhsID.tree : null);
                        RewriteRuleSubtreeStream stream_lhsID = new RewriteRuleSubtreeStream(
                                adaptor, "rule lhsID", lhsID != null ? lhsID.tree : null);
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 109:43: -> ^( SAME_AS_AXIOM ^( EXPRESSION $lhsID) ^(
                        // EXPRESSION $rhsID) )
                        {
                            // MOWLParser.g:109:46: ^( SAME_AS_AXIOM ^(
                            // EXPRESSION $lhsID) ^( EXPRESSION $rhsID) )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        adaptor.create(SAME_AS_AXIOM, "SAME_AS_AXIOM"),
                                        root_1);
                                // MOWLParser.g:109:62: ^( EXPRESSION $lhsID)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_lhsID.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                // MOWLParser.g:109:84: ^( EXPRESSION $rhsID)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_rhsID.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 7:
                // MOWLParser.g:110:11: lhsID= atomic DIFFERENT_FROM rhsID=
                // atomic
                {
                    pushFollow(FOLLOW_atomic_in_binaryAxiom907);
                    lhsID = atomic();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_atomic.add(lhsID.getTree());
                    }
                    DIFFERENT_FROM26 = (Token) match(input, DIFFERENT_FROM,
                            FOLLOW_DIFFERENT_FROM_in_binaryAxiom909);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_DIFFERENT_FROM.add(DIFFERENT_FROM26);
                    }
                    pushFollow(FOLLOW_atomic_in_binaryAxiom916);
                    rhsID = atomic();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_atomic.add(rhsID.getTree());
                    }
                    // AST REWRITE
                    // elements: lhsID, rhsID
                    // token labels:
                    // rule labels: rhsID, lhsID, retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        RewriteRuleSubtreeStream stream_rhsID = new RewriteRuleSubtreeStream(
                                adaptor, "rule rhsID", rhsID != null ? rhsID.tree : null);
                        RewriteRuleSubtreeStream stream_lhsID = new RewriteRuleSubtreeStream(
                                adaptor, "rule lhsID", lhsID != null ? lhsID.tree : null);
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 110:58: -> ^( DIFFERENT_FROM_AXIOM ^( EXPRESSION
                        // $lhsID) ^( EXPRESSION $rhsID) )
                        {
                            // MOWLParser.g:110:61: ^( DIFFERENT_FROM_AXIOM ^(
                            // EXPRESSION $lhsID) ^( EXPRESSION $rhsID) )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        adaptor.create(DIFFERENT_FROM_AXIOM,
                                                "DIFFERENT_FROM_AXIOM"), root_1);
                                // MOWLParser.g:110:84: ^( EXPRESSION $lhsID)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_lhsID.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                // MOWLParser.g:110:105: ^( EXPRESSION $rhsID)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_rhsID.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 8:
                // MOWLParser.g:111:11: lhsID= atomic DOMAIN expression
                {
                    pushFollow(FOLLOW_atomic_in_binaryAxiom953);
                    lhsID = atomic();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_atomic.add(lhsID.getTree());
                    }
                    DOMAIN27 = (Token) match(input, DOMAIN,
                            FOLLOW_DOMAIN_in_binaryAxiom956);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_DOMAIN.add(DOMAIN27);
                    }
                    pushFollow(FOLLOW_expression_in_binaryAxiom958);
                    expression28 = expression();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_expression.add(expression28.getTree());
                    }
                    // AST REWRITE
                    // elements: DOMAIN, expression, lhsID
                    // token labels:
                    // rule labels: lhsID, retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        RewriteRuleSubtreeStream stream_lhsID = new RewriteRuleSubtreeStream(
                                adaptor, "rule lhsID", lhsID != null ? lhsID.tree : null);
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 111:46: -> ^( DOMAIN ^( EXPRESSION $lhsID) ^(
                        // EXPRESSION expression ) )
                        {
                            // MOWLParser.g:111:49: ^( DOMAIN ^( EXPRESSION
                            // $lhsID) ^( EXPRESSION expression ) )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_DOMAIN.nextNode(), root_1);
                                // MOWLParser.g:111:58: ^( EXPRESSION $lhsID)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_lhsID.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                // MOWLParser.g:111:79: ^( EXPRESSION expression
                                // )
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_expression.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 9:
                // MOWLParser.g:112:11: lhsID= atomic RANGE expression
                {
                    pushFollow(FOLLOW_atomic_in_binaryAxiom994);
                    lhsID = atomic();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_atomic.add(lhsID.getTree());
                    }
                    RANGE29 = (Token) match(input, RANGE, FOLLOW_RANGE_in_binaryAxiom996);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_RANGE.add(RANGE29);
                    }
                    pushFollow(FOLLOW_expression_in_binaryAxiom998);
                    expression30 = expression();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_expression.add(expression30.getTree());
                    }
                    // AST REWRITE
                    // elements: expression, lhsID, RANGE
                    // token labels:
                    // rule labels: lhsID, retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        RewriteRuleSubtreeStream stream_lhsID = new RewriteRuleSubtreeStream(
                                adaptor, "rule lhsID", lhsID != null ? lhsID.tree : null);
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 112:44: -> ^( RANGE ^( EXPRESSION $lhsID) ^(
                        // EXPRESSION expression ) )
                        {
                            // MOWLParser.g:112:47: ^( RANGE ^( EXPRESSION
                            // $lhsID) ^( EXPRESSION expression ) )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_RANGE.nextNode(), root_1);
                                // MOWLParser.g:112:55: ^( EXPRESSION $lhsID)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_lhsID.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                // MOWLParser.g:112:76: ^( EXPRESSION expression
                                // )
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(EXPRESSION,
                                                    "EXPRESSION"), root_2);
                                    adaptor.addChild(root_2, stream_expression.nextTree());
                                    adaptor.addChild(root_1, root_2);
                                }
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "binaryAxiom"
    public static class unaryAxiom_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "unaryAxiom"
    // MOWLParser.g:116:1: unaryAxiom : unaryCharacteristic unary -> ^(
    // UNARY_AXIOM unaryCharacteristic ^( EXPRESSION unary ) ) ;
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.unaryAxiom_return
            unaryAxiom() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.unaryAxiom_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.unaryAxiom_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.unaryCharacteristic_return unaryCharacteristic31 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.unary_return unary32 = null;
        RewriteRuleSubtreeStream stream_unaryCharacteristic = new RewriteRuleSubtreeStream(
                adaptor, "rule unaryCharacteristic");
        RewriteRuleSubtreeStream stream_unary = new RewriteRuleSubtreeStream(adaptor,
                "rule unary");
        try {
            // MOWLParser.g:116:13: ( unaryCharacteristic unary -> ^(
            // UNARY_AXIOM unaryCharacteristic ^( EXPRESSION unary ) ) )
            // MOWLParser.g:117:4: unaryCharacteristic unary
            {
                pushFollow(FOLLOW_unaryCharacteristic_in_unaryAxiom1072);
                unaryCharacteristic31 = unaryCharacteristic();
                state._fsp--;
                if (state.failed) {
                    return retval;
                }
                if (state.backtracking == 0) {
                    stream_unaryCharacteristic.add(unaryCharacteristic31.getTree());
                }
                pushFollow(FOLLOW_unary_in_unaryAxiom1076);
                unary32 = unary();
                state._fsp--;
                if (state.failed) {
                    return retval;
                }
                if (state.backtracking == 0) {
                    stream_unary.add(unary32.getTree());
                }
                // AST REWRITE
                // elements: unaryCharacteristic, unary
                // token labels:
                // rule labels: retval
                // token list labels:
                // rule list labels:
                // wildcard labels:
                if (state.backtracking == 0) {
                    retval.tree = root_0;
                    root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                    // 117:32: -> ^( UNARY_AXIOM unaryCharacteristic ^(
                    // EXPRESSION unary ) )
                    {
                        // MOWLParser.g:117:35: ^( UNARY_AXIOM
                        // unaryCharacteristic ^( EXPRESSION unary ) )
                        {
                            ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                    .nil();
                            root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                    adaptor.create(UNARY_AXIOM, "UNARY_AXIOM"), root_1);
                            adaptor.addChild(root_1,
                                    stream_unaryCharacteristic.nextTree());
                            // MOWLParser.g:117:69: ^( EXPRESSION unary )
                            {
                                ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_2 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        adaptor.create(EXPRESSION, "EXPRESSION"), root_2);
                                adaptor.addChild(root_2, stream_unary.nextTree());
                                adaptor.addChild(root_1, root_2);
                            }
                            adaptor.addChild(root_0, root_1);
                        }
                    }
                    retval.tree = root_0;
                }
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "unaryAxiom"
    public static class unaryCharacteristic_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "unaryCharacteristic"
    // MOWLParser.g:120:1: unaryCharacteristic : ( FUNCTIONAL -> ^( FUNCTIONAL )
    // | INVERSE_FUNCTIONAL -> ^( INVERSE_FUNCTIONAL ) | SYMMETRIC -> ^(
    // SYMMETRIC ) | ANTI_SYMMETRIC -> ^( ANTI_SYMMETRIC ) | REFLEXIVE -> ^(
    // REFLEXIVE ) | IRREFLEXIVE -> ^( IRREFLEXIVE ) | TRANSITIVE -> ^(
    // TRANSITIVE ) );
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.unaryCharacteristic_return
            unaryCharacteristic() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.unaryCharacteristic_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.unaryCharacteristic_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        Token FUNCTIONAL33 = null;
        Token INVERSE_FUNCTIONAL34 = null;
        Token SYMMETRIC35 = null;
        Token ANTI_SYMMETRIC36 = null;
        Token REFLEXIVE37 = null;
        Token IRREFLEXIVE38 = null;
        Token TRANSITIVE39 = null;
        RewriteRuleTokenStream stream_ANTI_SYMMETRIC = new RewriteRuleTokenStream(
                adaptor, "token ANTI_SYMMETRIC");
        RewriteRuleTokenStream stream_SYMMETRIC = new RewriteRuleTokenStream(adaptor,
                "token SYMMETRIC");
        RewriteRuleTokenStream stream_TRANSITIVE = new RewriteRuleTokenStream(adaptor,
                "token TRANSITIVE");
        RewriteRuleTokenStream stream_REFLEXIVE = new RewriteRuleTokenStream(adaptor,
                "token REFLEXIVE");
        RewriteRuleTokenStream stream_INVERSE_FUNCTIONAL = new RewriteRuleTokenStream(
                adaptor, "token INVERSE_FUNCTIONAL");
        RewriteRuleTokenStream stream_IRREFLEXIVE = new RewriteRuleTokenStream(adaptor,
                "token IRREFLEXIVE");
        RewriteRuleTokenStream stream_FUNCTIONAL = new RewriteRuleTokenStream(adaptor,
                "token FUNCTIONAL");
        try {
            // MOWLParser.g:120:21: ( FUNCTIONAL -> ^( FUNCTIONAL ) |
            // INVERSE_FUNCTIONAL -> ^( INVERSE_FUNCTIONAL ) | SYMMETRIC -> ^(
            // SYMMETRIC ) | ANTI_SYMMETRIC -> ^( ANTI_SYMMETRIC ) | REFLEXIVE
            // -> ^( REFLEXIVE ) | IRREFLEXIVE -> ^( IRREFLEXIVE ) | TRANSITIVE
            // -> ^( TRANSITIVE ) )
            int alt7 = 7;
            switch (input.LA(1)) {
                case FUNCTIONAL: {
                    alt7 = 1;
                }
                    break;
                case INVERSE_FUNCTIONAL: {
                    alt7 = 2;
                }
                    break;
                case SYMMETRIC: {
                    alt7 = 3;
                }
                    break;
                case ANTI_SYMMETRIC: {
                    alt7 = 4;
                }
                    break;
                case REFLEXIVE: {
                    alt7 = 5;
                }
                    break;
                case IRREFLEXIVE: {
                    alt7 = 6;
                }
                    break;
                case TRANSITIVE: {
                    alt7 = 7;
                }
                    break;
                default:
                    if (state.backtracking > 0) {
                        state.failed = true;
                        return retval;
                    }
                    NoViableAltException nvae = new NoViableAltException("", 7, 0, input);
                    throw nvae;
            }
            switch (alt7) {
                case 1:
                // MOWLParser.g:121:5: FUNCTIONAL
                {
                    FUNCTIONAL33 = (Token) match(input, FUNCTIONAL,
                            FOLLOW_FUNCTIONAL_in_unaryCharacteristic1121);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_FUNCTIONAL.add(FUNCTIONAL33);
                    }
                    // AST REWRITE
                    // elements: FUNCTIONAL
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 121:16: -> ^( FUNCTIONAL )
                        {
                            // MOWLParser.g:121:19: ^( FUNCTIONAL )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_FUNCTIONAL.nextNode(), root_1);
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 2:
                // MOWLParser.g:122:7: INVERSE_FUNCTIONAL
                {
                    INVERSE_FUNCTIONAL34 = (Token) match(input, INVERSE_FUNCTIONAL,
                            FOLLOW_INVERSE_FUNCTIONAL_in_unaryCharacteristic1135);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_INVERSE_FUNCTIONAL.add(INVERSE_FUNCTIONAL34);
                    }
                    // AST REWRITE
                    // elements: INVERSE_FUNCTIONAL
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 122:26: -> ^( INVERSE_FUNCTIONAL )
                        {
                            // MOWLParser.g:122:29: ^( INVERSE_FUNCTIONAL )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_INVERSE_FUNCTIONAL.nextNode(), root_1);
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 3:
                // MOWLParser.g:123:7: SYMMETRIC
                {
                    SYMMETRIC35 = (Token) match(input, SYMMETRIC,
                            FOLLOW_SYMMETRIC_in_unaryCharacteristic1149);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_SYMMETRIC.add(SYMMETRIC35);
                    }
                    // AST REWRITE
                    // elements: SYMMETRIC
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 123:17: -> ^( SYMMETRIC )
                        {
                            // MOWLParser.g:123:20: ^( SYMMETRIC )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_SYMMETRIC.nextNode(), root_1);
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 4:
                // MOWLParser.g:124:7: ANTI_SYMMETRIC
                {
                    ANTI_SYMMETRIC36 = (Token) match(input, ANTI_SYMMETRIC,
                            FOLLOW_ANTI_SYMMETRIC_in_unaryCharacteristic1163);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_ANTI_SYMMETRIC.add(ANTI_SYMMETRIC36);
                    }
                    // AST REWRITE
                    // elements: ANTI_SYMMETRIC
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 124:22: -> ^( ANTI_SYMMETRIC )
                        {
                            // MOWLParser.g:124:25: ^( ANTI_SYMMETRIC )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_ANTI_SYMMETRIC.nextNode(), root_1);
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 5:
                // MOWLParser.g:125:7: REFLEXIVE
                {
                    REFLEXIVE37 = (Token) match(input, REFLEXIVE,
                            FOLLOW_REFLEXIVE_in_unaryCharacteristic1177);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_REFLEXIVE.add(REFLEXIVE37);
                    }
                    // AST REWRITE
                    // elements: REFLEXIVE
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 125:17: -> ^( REFLEXIVE )
                        {
                            // MOWLParser.g:125:20: ^( REFLEXIVE )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_REFLEXIVE.nextNode(), root_1);
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 6:
                // MOWLParser.g:126:7: IRREFLEXIVE
                {
                    IRREFLEXIVE38 = (Token) match(input, IRREFLEXIVE,
                            FOLLOW_IRREFLEXIVE_in_unaryCharacteristic1191);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_IRREFLEXIVE.add(IRREFLEXIVE38);
                    }
                    // AST REWRITE
                    // elements: IRREFLEXIVE
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 126:19: -> ^( IRREFLEXIVE )
                        {
                            // MOWLParser.g:126:22: ^( IRREFLEXIVE )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_IRREFLEXIVE.nextNode(), root_1);
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 7:
                // MOWLParser.g:127:7: TRANSITIVE
                {
                    TRANSITIVE39 = (Token) match(input, TRANSITIVE,
                            FOLLOW_TRANSITIVE_in_unaryCharacteristic1205);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_TRANSITIVE.add(TRANSITIVE39);
                    }
                    // AST REWRITE
                    // elements: TRANSITIVE
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 127:18: -> ^( TRANSITIVE )
                        {
                            // MOWLParser.g:127:21: ^( TRANSITIVE )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_TRANSITIVE.nextNode(), root_1);
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "unaryCharacteristic"
    public static class expression_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "expression"
    // MOWLParser.g:130:1: expression : ( options {backtrack=true; } :
    // conjunction ( OR conjunction )* -> ^( DISJUNCTION ( conjunction )+ ) |
    // complexPropertyExpression -> ^( complexPropertyExpression ) |
    // OPEN_PARENTHESYS expression CLOSED_PARENTHESYS -> ^( expression ) ) ;
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.expression_return
            expression() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.expression_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.expression_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        Token OR41 = null;
        Token OPEN_PARENTHESYS44 = null;
        Token CLOSED_PARENTHESYS46 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.conjunction_return conjunction40 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.conjunction_return conjunction42 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.complexPropertyExpression_return complexPropertyExpression43 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.expression_return expression45 = null;
        RewriteRuleTokenStream stream_CLOSED_PARENTHESYS = new RewriteRuleTokenStream(
                adaptor, "token CLOSED_PARENTHESYS");
        RewriteRuleTokenStream stream_OPEN_PARENTHESYS = new RewriteRuleTokenStream(
                adaptor, "token OPEN_PARENTHESYS");
        RewriteRuleTokenStream stream_OR = new RewriteRuleTokenStream(adaptor, "token OR");
        RewriteRuleSubtreeStream stream_conjunction = new RewriteRuleSubtreeStream(
                adaptor, "rule conjunction");
        RewriteRuleSubtreeStream stream_complexPropertyExpression = new RewriteRuleSubtreeStream(
                adaptor, "rule complexPropertyExpression");
        RewriteRuleSubtreeStream stream_expression = new RewriteRuleSubtreeStream(
                adaptor, "rule expression");
        try {
            // MOWLParser.g:130:11: ( ( options {backtrack=true; } : conjunction
            // ( OR conjunction )* -> ^( DISJUNCTION ( conjunction )+ ) |
            // complexPropertyExpression -> ^( complexPropertyExpression ) |
            // OPEN_PARENTHESYS expression CLOSED_PARENTHESYS -> ^( expression )
            // ) )
            // MOWLParser.g:131:5: ( options {backtrack=true; } : conjunction (
            // OR conjunction )* -> ^( DISJUNCTION ( conjunction )+ ) |
            // complexPropertyExpression -> ^( complexPropertyExpression ) |
            // OPEN_PARENTHESYS expression CLOSED_PARENTHESYS -> ^( expression )
            // )
            {
                // MOWLParser.g:131:5: ( options {backtrack=true; } :
                // conjunction ( OR conjunction )* -> ^( DISJUNCTION (
                // conjunction )+ ) | complexPropertyExpression -> ^(
                // complexPropertyExpression ) | OPEN_PARENTHESYS expression
                // CLOSED_PARENTHESYS -> ^( expression ) )
                int alt9 = 3;
                switch (input.LA(1)) {
                    case OPEN_CURLY_BRACES:
                    case NOT:
                    case DBLQUOTE:
                    case IDENTIFIER:
                    case ENTITY_REFERENCE: {
                        alt9 = 1;
                    }
                        break;
                    case INVERSE: {
                        input.LA(2);
                        if (synpred17_MOWLParser()) {
                            alt9 = 1;
                        } else if (synpred18_MOWLParser()) {
                            alt9 = 2;
                        } else {
                            if (state.backtracking > 0) {
                                state.failed = true;
                                return retval;
                            }
                            NoViableAltException nvae = new NoViableAltException("", 9,
                                    3, input);
                            throw nvae;
                        }
                    }
                        break;
                    case OPEN_PARENTHESYS: {
                        alt9 = 3;
                    }
                        break;
                    default:
                        if (state.backtracking > 0) {
                            state.failed = true;
                            return retval;
                        }
                        NoViableAltException nvae = new NoViableAltException("", 9, 0,
                                input);
                        throw nvae;
                }
                switch (alt9) {
                    case 1:
                    // MOWLParser.g:133:5: conjunction ( OR conjunction )*
                    {
                        pushFollow(FOLLOW_conjunction_in_expression1247);
                        conjunction40 = conjunction();
                        state._fsp--;
                        if (state.failed) {
                            return retval;
                        }
                        if (state.backtracking == 0) {
                            stream_conjunction.add(conjunction40.getTree());
                        }
                        // MOWLParser.g:133:17: ( OR conjunction )*
                        loop8: do {
                            int alt8 = 2;
                            int LA8_0 = input.LA(1);
                            if (LA8_0 == OR) {
                                alt8 = 1;
                            }
                            switch (alt8) {
                                case 1:
                                // MOWLParser.g:133:18: OR conjunction
                                {
                                    OR41 = (Token) match(input, OR,
                                            FOLLOW_OR_in_expression1250);
                                    if (state.failed) {
                                        return retval;
                                    }
                                    if (state.backtracking == 0) {
                                        stream_OR.add(OR41);
                                    }
                                    pushFollow(FOLLOW_conjunction_in_expression1252);
                                    conjunction42 = conjunction();
                                    state._fsp--;
                                    if (state.failed) {
                                        return retval;
                                    }
                                    if (state.backtracking == 0) {
                                        stream_conjunction.add(conjunction42.getTree());
                                    }
                                }
                                    break;
                                default:
                                    break loop8;
                            }
                        } while (true);
                        // AST REWRITE
                        // elements: conjunction
                        // token labels:
                        // rule labels: retval
                        // token list labels:
                        // rule list labels:
                        // wildcard labels:
                        if (state.backtracking == 0) {
                            retval.tree = root_0;
                            root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                            // 133:35: -> ^( DISJUNCTION ( conjunction )+ )
                            {
                                // MOWLParser.g:133:38: ^( DISJUNCTION (
                                // conjunction )+ )
                                {
                                    ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_1 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(DISJUNCTION,
                                                    "DISJUNCTION"), root_1);
                                    if (!stream_conjunction.hasNext()) {
                                        throw new RewriteEarlyExitException();
                                    }
                                    while (stream_conjunction.hasNext()) {
                                        adaptor.addChild(root_1,
                                                stream_conjunction.nextTree());
                                    }
                                    stream_conjunction.reset();
                                    adaptor.addChild(root_0, root_1);
                                }
                            }
                            retval.tree = root_0;
                        }
                    }
                        break;
                    case 2:
                    // MOWLParser.g:134:6: complexPropertyExpression
                    {
                        pushFollow(FOLLOW_complexPropertyExpression_in_expression1271);
                        complexPropertyExpression43 = complexPropertyExpression();
                        state._fsp--;
                        if (state.failed) {
                            return retval;
                        }
                        if (state.backtracking == 0) {
                            stream_complexPropertyExpression
                                    .add(complexPropertyExpression43.getTree());
                        }
                        // AST REWRITE
                        // elements: complexPropertyExpression
                        // token labels:
                        // rule labels: retval
                        // token list labels:
                        // rule list labels:
                        // wildcard labels:
                        if (state.backtracking == 0) {
                            retval.tree = root_0;
                            root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                            // 134:32: -> ^( complexPropertyExpression )
                            {
                                // MOWLParser.g:134:35: ^(
                                // complexPropertyExpression )
                                {
                                    ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_1 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(stream_complexPropertyExpression
                                                    .nextNode(), root_1);
                                    adaptor.addChild(root_0, root_1);
                                }
                            }
                            retval.tree = root_0;
                        }
                    }
                        break;
                    case 3:
                    // MOWLParser.g:135:6: OPEN_PARENTHESYS expression
                    // CLOSED_PARENTHESYS
                    {
                        OPEN_PARENTHESYS44 = (Token) match(input, OPEN_PARENTHESYS,
                                FOLLOW_OPEN_PARENTHESYS_in_expression1284);
                        if (state.failed) {
                            return retval;
                        }
                        if (state.backtracking == 0) {
                            stream_OPEN_PARENTHESYS.add(OPEN_PARENTHESYS44);
                        }
                        pushFollow(FOLLOW_expression_in_expression1286);
                        expression45 = expression();
                        state._fsp--;
                        if (state.failed) {
                            return retval;
                        }
                        if (state.backtracking == 0) {
                            stream_expression.add(expression45.getTree());
                        }
                        CLOSED_PARENTHESYS46 = (Token) match(input, CLOSED_PARENTHESYS,
                                FOLLOW_CLOSED_PARENTHESYS_in_expression1288);
                        if (state.failed) {
                            return retval;
                        }
                        if (state.backtracking == 0) {
                            stream_CLOSED_PARENTHESYS.add(CLOSED_PARENTHESYS46);
                        }
                        // AST REWRITE
                        // elements: expression
                        // token labels:
                        // rule labels: retval
                        // token list labels:
                        // rule list labels:
                        // wildcard labels:
                        if (state.backtracking == 0) {
                            retval.tree = root_0;
                            root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                            // 135:53: -> ^( expression )
                            {
                                // MOWLParser.g:135:56: ^( expression )
                                {
                                    ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_1 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(stream_expression.nextNode(),
                                                    root_1);
                                    adaptor.addChild(root_0, root_1);
                                }
                            }
                            retval.tree = root_0;
                        }
                    }
                        break;
                }
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "expression"
    public static class conjunction_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "conjunction"
    // MOWLParser.g:143:1: conjunction : unary ( AND unary )* -> ^( CONJUNCTION
    // ( unary )+ ) ;
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.conjunction_return
            conjunction() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.conjunction_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.conjunction_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        Token AND48 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.unary_return unary47 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.unary_return unary49 = null;
        RewriteRuleTokenStream stream_AND = new RewriteRuleTokenStream(adaptor,
                "token AND");
        RewriteRuleSubtreeStream stream_unary = new RewriteRuleSubtreeStream(adaptor,
                "rule unary");
        try {
            // MOWLParser.g:143:13: ( unary ( AND unary )* -> ^( CONJUNCTION (
            // unary )+ ) )
            // MOWLParser.g:144:5: unary ( AND unary )*
            {
                pushFollow(FOLLOW_unary_in_conjunction1321);
                unary47 = unary();
                state._fsp--;
                if (state.failed) {
                    return retval;
                }
                if (state.backtracking == 0) {
                    stream_unary.add(unary47.getTree());
                }
                // MOWLParser.g:144:11: ( AND unary )*
                loop10: do {
                    int alt10 = 2;
                    int LA10_0 = input.LA(1);
                    if (LA10_0 == AND) {
                        alt10 = 1;
                    }
                    switch (alt10) {
                        case 1:
                        // MOWLParser.g:144:12: AND unary
                        {
                            AND48 = (Token) match(input, AND,
                                    FOLLOW_AND_in_conjunction1324);
                            if (state.failed) {
                                return retval;
                            }
                            if (state.backtracking == 0) {
                                stream_AND.add(AND48);
                            }
                            pushFollow(FOLLOW_unary_in_conjunction1326);
                            unary49 = unary();
                            state._fsp--;
                            if (state.failed) {
                                return retval;
                            }
                            if (state.backtracking == 0) {
                                stream_unary.add(unary49.getTree());
                            }
                        }
                            break;
                        default:
                            break loop10;
                    }
                } while (true);
                // AST REWRITE
                // elements: unary
                // token labels:
                // rule labels: retval
                // token list labels:
                // rule list labels:
                // wildcard labels:
                if (state.backtracking == 0) {
                    retval.tree = root_0;
                    root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                    // 144:24: -> ^( CONJUNCTION ( unary )+ )
                    {
                        // MOWLParser.g:144:27: ^( CONJUNCTION ( unary )+ )
                        {
                            ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                    .nil();
                            root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                    adaptor.create(CONJUNCTION, "CONJUNCTION"), root_1);
                            if (!stream_unary.hasNext()) {
                                throw new RewriteEarlyExitException();
                            }
                            while (stream_unary.hasNext()) {
                                adaptor.addChild(root_1, stream_unary.nextTree());
                            }
                            stream_unary.reset();
                            adaptor.addChild(root_0, root_1);
                        }
                    }
                    retval.tree = root_0;
                }
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "conjunction"
    public static class complexPropertyExpression_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "complexPropertyExpression"
    // MOWLParser.g:147:1: complexPropertyExpression : ( INVERSE
    // OPEN_PARENTHESYS complexPropertyExpression CLOSED_PARENTHESYS -> ^(
    // INVERSE_OBJECT_PROPERTY_EXPRESSION complexPropertyExpression ) | INVERSE
    // OPEN_PARENTHESYS atomic CLOSED_PARENTHESYS -> ^(
    // INVERSE_OBJECT_PROPERTY_EXPRESSION atomic ) );
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.complexPropertyExpression_return
            complexPropertyExpression() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.complexPropertyExpression_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.complexPropertyExpression_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        Token INVERSE50 = null;
        Token OPEN_PARENTHESYS51 = null;
        Token CLOSED_PARENTHESYS53 = null;
        Token INVERSE54 = null;
        Token OPEN_PARENTHESYS55 = null;
        Token CLOSED_PARENTHESYS57 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.complexPropertyExpression_return complexPropertyExpression52 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.atomic_return atomic56 = null;
        RewriteRuleTokenStream stream_INVERSE = new RewriteRuleTokenStream(adaptor,
                "token INVERSE");
        RewriteRuleTokenStream stream_CLOSED_PARENTHESYS = new RewriteRuleTokenStream(
                adaptor, "token CLOSED_PARENTHESYS");
        RewriteRuleTokenStream stream_OPEN_PARENTHESYS = new RewriteRuleTokenStream(
                adaptor, "token OPEN_PARENTHESYS");
        RewriteRuleSubtreeStream stream_complexPropertyExpression = new RewriteRuleSubtreeStream(
                adaptor, "rule complexPropertyExpression");
        RewriteRuleSubtreeStream stream_atomic = new RewriteRuleSubtreeStream(adaptor,
                "rule atomic");
        try {
            // MOWLParser.g:147:26: ( INVERSE OPEN_PARENTHESYS
            // complexPropertyExpression CLOSED_PARENTHESYS -> ^(
            // INVERSE_OBJECT_PROPERTY_EXPRESSION complexPropertyExpression ) |
            // INVERSE OPEN_PARENTHESYS atomic CLOSED_PARENTHESYS -> ^(
            // INVERSE_OBJECT_PROPERTY_EXPRESSION atomic ) )
            int alt11 = 2;
            int LA11_0 = input.LA(1);
            if (LA11_0 == INVERSE) {
                int LA11_1 = input.LA(2);
                if (LA11_1 == OPEN_PARENTHESYS) {
                    int LA11_2 = input.LA(3);
                    if (LA11_2 >= IDENTIFIER && LA11_2 <= ENTITY_REFERENCE) {
                        alt11 = 2;
                    } else if (LA11_2 == INVERSE) {
                        alt11 = 1;
                    } else {
                        if (state.backtracking > 0) {
                            state.failed = true;
                            return retval;
                        }
                        NoViableAltException nvae = new NoViableAltException("", 11, 2,
                                input);
                        throw nvae;
                    }
                } else {
                    if (state.backtracking > 0) {
                        state.failed = true;
                        return retval;
                    }
                    NoViableAltException nvae = new NoViableAltException("", 11, 1, input);
                    throw nvae;
                }
            } else {
                if (state.backtracking > 0) {
                    state.failed = true;
                    return retval;
                }
                NoViableAltException nvae = new NoViableAltException("", 11, 0, input);
                throw nvae;
            }
            switch (alt11) {
                case 1:
                // MOWLParser.g:148:2: INVERSE OPEN_PARENTHESYS
                // complexPropertyExpression CLOSED_PARENTHESYS
                {
                    INVERSE50 = (Token) match(input, INVERSE,
                            FOLLOW_INVERSE_in_complexPropertyExpression1347);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_INVERSE.add(INVERSE50);
                    }
                    OPEN_PARENTHESYS51 = (Token) match(input, OPEN_PARENTHESYS,
                            FOLLOW_OPEN_PARENTHESYS_in_complexPropertyExpression1349);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_OPEN_PARENTHESYS.add(OPEN_PARENTHESYS51);
                    }
                    pushFollow(FOLLOW_complexPropertyExpression_in_complexPropertyExpression1351);
                    complexPropertyExpression52 = complexPropertyExpression();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_complexPropertyExpression.add(complexPropertyExpression52
                                .getTree());
                    }
                    CLOSED_PARENTHESYS53 = (Token) match(input, CLOSED_PARENTHESYS,
                            FOLLOW_CLOSED_PARENTHESYS_in_complexPropertyExpression1353);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_CLOSED_PARENTHESYS.add(CLOSED_PARENTHESYS53);
                    }
                    // AST REWRITE
                    // elements: complexPropertyExpression
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 148:72: -> ^( INVERSE_OBJECT_PROPERTY_EXPRESSION
                        // complexPropertyExpression )
                        {
                            // MOWLParser.g:148:75: ^(
                            // INVERSE_OBJECT_PROPERTY_EXPRESSION
                            // complexPropertyExpression )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        adaptor.create(
                                                INVERSE_OBJECT_PROPERTY_EXPRESSION,
                                                "INVERSE_OBJECT_PROPERTY_EXPRESSION"),
                                        root_1);
                                adaptor.addChild(root_1,
                                        stream_complexPropertyExpression.nextTree());
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 2:
                // MOWLParser.g:149:4: INVERSE OPEN_PARENTHESYS atomic
                // CLOSED_PARENTHESYS
                {
                    INVERSE54 = (Token) match(input, INVERSE,
                            FOLLOW_INVERSE_in_complexPropertyExpression1366);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_INVERSE.add(INVERSE54);
                    }
                    OPEN_PARENTHESYS55 = (Token) match(input, OPEN_PARENTHESYS,
                            FOLLOW_OPEN_PARENTHESYS_in_complexPropertyExpression1368);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_OPEN_PARENTHESYS.add(OPEN_PARENTHESYS55);
                    }
                    pushFollow(FOLLOW_atomic_in_complexPropertyExpression1370);
                    atomic56 = atomic();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_atomic.add(atomic56.getTree());
                    }
                    CLOSED_PARENTHESYS57 = (Token) match(input, CLOSED_PARENTHESYS,
                            FOLLOW_CLOSED_PARENTHESYS_in_complexPropertyExpression1372);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_CLOSED_PARENTHESYS.add(CLOSED_PARENTHESYS57);
                    }
                    // AST REWRITE
                    // elements: atomic
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 149:54: -> ^( INVERSE_OBJECT_PROPERTY_EXPRESSION
                        // atomic )
                        {
                            // MOWLParser.g:149:57: ^(
                            // INVERSE_OBJECT_PROPERTY_EXPRESSION atomic )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        adaptor.create(
                                                INVERSE_OBJECT_PROPERTY_EXPRESSION,
                                                "INVERSE_OBJECT_PROPERTY_EXPRESSION"),
                                        root_1);
                                adaptor.addChild(root_1, stream_atomic.nextTree());
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "complexPropertyExpression"
    public static class unary_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "unary"
    // MOWLParser.g:152:1: unary options {backtrack=true; } : (head=
    // propertyExpression ( COMPOSITION rest+= propertyExpression )+ -> ^(
    // PROPERTY_CHAIN $head $rest) | NOT OPEN_PARENTHESYS expression
    // CLOSED_PARENTHESYS -> ^( NEGATED_EXPRESSION expression ) | NOT atomic ->
    // ^( NEGATED_EXPRESSION atomic ) | qualifiedRestriction -> ^(
    // qualifiedRestriction ) | dataRange | constant | atomic );
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.unary_return
            unary() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.unary_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.unary_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        Token COMPOSITION58 = null;
        Token NOT59 = null;
        Token OPEN_PARENTHESYS60 = null;
        Token CLOSED_PARENTHESYS62 = null;
        Token NOT63 = null;
        List list_rest = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.propertyExpression_return head = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.expression_return expression61 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.atomic_return atomic64 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.qualifiedRestriction_return qualifiedRestriction65 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.dataRange_return dataRange66 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.constant_return constant67 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.atomic_return atomic68 = null;
        RuleReturnScope rest = null;
        RewriteRuleTokenStream stream_NOT = new RewriteRuleTokenStream(adaptor,
                "token NOT");
        RewriteRuleTokenStream stream_CLOSED_PARENTHESYS = new RewriteRuleTokenStream(
                adaptor, "token CLOSED_PARENTHESYS");
        RewriteRuleTokenStream stream_COMPOSITION = new RewriteRuleTokenStream(adaptor,
                "token COMPOSITION");
        RewriteRuleTokenStream stream_OPEN_PARENTHESYS = new RewriteRuleTokenStream(
                adaptor, "token OPEN_PARENTHESYS");
        RewriteRuleSubtreeStream stream_propertyExpression = new RewriteRuleSubtreeStream(
                adaptor, "rule propertyExpression");
        RewriteRuleSubtreeStream stream_qualifiedRestriction = new RewriteRuleSubtreeStream(
                adaptor, "rule qualifiedRestriction");
        RewriteRuleSubtreeStream stream_atomic = new RewriteRuleSubtreeStream(adaptor,
                "rule atomic");
        RewriteRuleSubtreeStream stream_expression = new RewriteRuleSubtreeStream(
                adaptor, "rule expression");
        try {
            // MOWLParser.g:152:34: (head= propertyExpression ( COMPOSITION
            // rest+= propertyExpression )+ -> ^( PROPERTY_CHAIN $head $rest) |
            // NOT OPEN_PARENTHESYS expression CLOSED_PARENTHESYS -> ^(
            // NEGATED_EXPRESSION expression ) | NOT atomic -> ^(
            // NEGATED_EXPRESSION atomic ) | qualifiedRestriction -> ^(
            // qualifiedRestriction ) | dataRange | constant | atomic )
            int alt13 = 7;
            alt13 = dfa13.predict(input);
            switch (alt13) {
                case 1:
                // MOWLParser.g:154:4: head= propertyExpression ( COMPOSITION
                // rest+= propertyExpression )+
                {
                    pushFollow(FOLLOW_propertyExpression_in_unary1409);
                    head = propertyExpression();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_propertyExpression.add(head.getTree());
                    }
                    // MOWLParser.g:154:30: ( COMPOSITION rest+=
                    // propertyExpression )+
                    int cnt12 = 0;
                    loop12: do {
                        int alt12 = 2;
                        int LA12_0 = input.LA(1);
                        if (LA12_0 == COMPOSITION) {
                            alt12 = 1;
                        }
                        switch (alt12) {
                            case 1:
                            // MOWLParser.g:154:31: COMPOSITION rest+=
                            // propertyExpression
                            {
                                COMPOSITION58 = (Token) match(input, COMPOSITION,
                                        FOLLOW_COMPOSITION_in_unary1412);
                                if (state.failed) {
                                    return retval;
                                }
                                if (state.backtracking == 0) {
                                    stream_COMPOSITION.add(COMPOSITION58);
                                }
                                pushFollow(FOLLOW_propertyExpression_in_unary1416);
                                rest = propertyExpression();
                                state._fsp--;
                                if (state.failed) {
                                    return retval;
                                }
                                if (state.backtracking == 0) {
                                    stream_propertyExpression.add(rest.getTree());
                                }
                                if (list_rest == null) {
                                    list_rest = new ArrayList();
                                }
                                if (rest != null) {
                                    list_rest.add(rest.getTree());
                                }
                            }
                                break;
                            default:
                                if (cnt12 >= 1) {
                                    break loop12;
                                }
                                if (state.backtracking > 0) {
                                    state.failed = true;
                                    return retval;
                                }
                                EarlyExitException eee = new EarlyExitException(12, input);
                                throw eee;
                        }
                        cnt12++;
                    } while (true);
                    // AST REWRITE
                    // elements: rest, head
                    // token labels:
                    // rule labels: head, retval
                    // token list labels:
                    // rule list labels: rest
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        RewriteRuleSubtreeStream stream_head = new RewriteRuleSubtreeStream(
                                adaptor, "rule head", head != null ? head.tree : null);
                        RewriteRuleSubtreeStream stream_rest = new RewriteRuleSubtreeStream(
                                adaptor, "token rest", list_rest);
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 154:71: -> ^( PROPERTY_CHAIN $head $rest)
                        {
                            // MOWLParser.g:154:74: ^( PROPERTY_CHAIN $head
                            // $rest)
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        adaptor.create(PROPERTY_CHAIN, "PROPERTY_CHAIN"),
                                        root_1);
                                adaptor.addChild(root_1, stream_head.nextTree());
                                adaptor.addChild(root_1, stream_rest.nextTree());
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 2:
                // MOWLParser.g:155:5: NOT OPEN_PARENTHESYS expression
                // CLOSED_PARENTHESYS
                {
                    NOT59 = (Token) match(input, NOT, FOLLOW_NOT_in_unary1438);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_NOT.add(NOT59);
                    }
                    OPEN_PARENTHESYS60 = (Token) match(input, OPEN_PARENTHESYS,
                            FOLLOW_OPEN_PARENTHESYS_in_unary1440);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_OPEN_PARENTHESYS.add(OPEN_PARENTHESYS60);
                    }
                    pushFollow(FOLLOW_expression_in_unary1442);
                    expression61 = expression();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_expression.add(expression61.getTree());
                    }
                    CLOSED_PARENTHESYS62 = (Token) match(input, CLOSED_PARENTHESYS,
                            FOLLOW_CLOSED_PARENTHESYS_in_unary1444);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_CLOSED_PARENTHESYS.add(CLOSED_PARENTHESYS62);
                    }
                    // AST REWRITE
                    // elements: expression
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 155:56: -> ^( NEGATED_EXPRESSION expression )
                        {
                            // MOWLParser.g:155:59: ^( NEGATED_EXPRESSION
                            // expression )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        adaptor.create(NEGATED_EXPRESSION,
                                                "NEGATED_EXPRESSION"), root_1);
                                adaptor.addChild(root_1, stream_expression.nextTree());
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 3:
                // MOWLParser.g:156:5: NOT atomic
                {
                    NOT63 = (Token) match(input, NOT, FOLLOW_NOT_in_unary1458);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_NOT.add(NOT63);
                    }
                    pushFollow(FOLLOW_atomic_in_unary1460);
                    atomic64 = atomic();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_atomic.add(atomic64.getTree());
                    }
                    // AST REWRITE
                    // elements: atomic
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 156:16: -> ^( NEGATED_EXPRESSION atomic )
                        {
                            // MOWLParser.g:156:19: ^( NEGATED_EXPRESSION atomic
                            // )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        adaptor.create(NEGATED_EXPRESSION,
                                                "NEGATED_EXPRESSION"), root_1);
                                adaptor.addChild(root_1, stream_atomic.nextTree());
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 4:
                // MOWLParser.g:157:5: qualifiedRestriction
                {
                    pushFollow(FOLLOW_qualifiedRestriction_in_unary1483);
                    qualifiedRestriction65 = qualifiedRestriction();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_qualifiedRestriction.add(qualifiedRestriction65.getTree());
                    }
                    // AST REWRITE
                    // elements: qualifiedRestriction
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 157:26: -> ^( qualifiedRestriction )
                        {
                            // MOWLParser.g:157:29: ^( qualifiedRestriction )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_qualifiedRestriction.nextNode(), root_1);
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 5:
                // MOWLParser.g:158:5: dataRange
                {
                    root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                    pushFollow(FOLLOW_dataRange_in_unary1495);
                    dataRange66 = dataRange();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        adaptor.addChild(root_0, dataRange66.getTree());
                    }
                }
                    break;
                case 6:
                // MOWLParser.g:159:5: constant
                {
                    root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                    pushFollow(FOLLOW_constant_in_unary1501);
                    constant67 = constant();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        adaptor.addChild(root_0, constant67.getTree());
                    }
                }
                    break;
                case 7:
                // MOWLParser.g:160:5: atomic
                {
                    root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                    pushFollow(FOLLOW_atomic_in_unary1507);
                    atomic68 = atomic();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        adaptor.addChild(root_0, atomic68.getTree());
                    }
                }
                    break;
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "unary"
    public static class dataRange_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "dataRange"
    // MOWLParser.g:164:1: dataRange : IDENTIFIER OPEN_SQUARE_BRACKET
    // dataRangeFacet ( COMMA dataRangeFacet )* CLOSED_SQUARE_BRACKET -> ^(
    // DATA_RANGE IDENTIFIER ( dataRangeFacet )+ ) ;
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.dataRange_return
            dataRange() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.dataRange_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.dataRange_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        Token IDENTIFIER69 = null;
        Token OPEN_SQUARE_BRACKET70 = null;
        Token COMMA72 = null;
        Token CLOSED_SQUARE_BRACKET74 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.dataRangeFacet_return dataRangeFacet71 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.dataRangeFacet_return dataRangeFacet73 = null;
        RewriteRuleTokenStream stream_COMMA = new RewriteRuleTokenStream(adaptor,
                "token COMMA");
        RewriteRuleTokenStream stream_IDENTIFIER = new RewriteRuleTokenStream(adaptor,
                "token IDENTIFIER");
        RewriteRuleTokenStream stream_OPEN_SQUARE_BRACKET = new RewriteRuleTokenStream(
                adaptor, "token OPEN_SQUARE_BRACKET");
        RewriteRuleTokenStream stream_CLOSED_SQUARE_BRACKET = new RewriteRuleTokenStream(
                adaptor, "token CLOSED_SQUARE_BRACKET");
        RewriteRuleSubtreeStream stream_dataRangeFacet = new RewriteRuleSubtreeStream(
                adaptor, "rule dataRangeFacet");
        try {
            // MOWLParser.g:165:2: ( IDENTIFIER OPEN_SQUARE_BRACKET
            // dataRangeFacet ( COMMA dataRangeFacet )* CLOSED_SQUARE_BRACKET ->
            // ^( DATA_RANGE IDENTIFIER ( dataRangeFacet )+ ) )
            // MOWLParser.g:166:4: IDENTIFIER OPEN_SQUARE_BRACKET dataRangeFacet
            // ( COMMA dataRangeFacet )* CLOSED_SQUARE_BRACKET
            {
                IDENTIFIER69 = (Token) match(input, IDENTIFIER,
                        FOLLOW_IDENTIFIER_in_dataRange1524);
                if (state.failed) {
                    return retval;
                }
                if (state.backtracking == 0) {
                    stream_IDENTIFIER.add(IDENTIFIER69);
                }
                OPEN_SQUARE_BRACKET70 = (Token) match(input, OPEN_SQUARE_BRACKET,
                        FOLLOW_OPEN_SQUARE_BRACKET_in_dataRange1526);
                if (state.failed) {
                    return retval;
                }
                if (state.backtracking == 0) {
                    stream_OPEN_SQUARE_BRACKET.add(OPEN_SQUARE_BRACKET70);
                }
                pushFollow(FOLLOW_dataRangeFacet_in_dataRange1528);
                dataRangeFacet71 = dataRangeFacet();
                state._fsp--;
                if (state.failed) {
                    return retval;
                }
                if (state.backtracking == 0) {
                    stream_dataRangeFacet.add(dataRangeFacet71.getTree());
                }
                // MOWLParser.g:166:50: ( COMMA dataRangeFacet )*
                loop14: do {
                    int alt14 = 2;
                    int LA14_0 = input.LA(1);
                    if (LA14_0 == COMMA) {
                        alt14 = 1;
                    }
                    switch (alt14) {
                        case 1:
                        // MOWLParser.g:166:51: COMMA dataRangeFacet
                        {
                            COMMA72 = (Token) match(input, COMMA,
                                    FOLLOW_COMMA_in_dataRange1531);
                            if (state.failed) {
                                return retval;
                            }
                            if (state.backtracking == 0) {
                                stream_COMMA.add(COMMA72);
                            }
                            pushFollow(FOLLOW_dataRangeFacet_in_dataRange1533);
                            dataRangeFacet73 = dataRangeFacet();
                            state._fsp--;
                            if (state.failed) {
                                return retval;
                            }
                            if (state.backtracking == 0) {
                                stream_dataRangeFacet.add(dataRangeFacet73.getTree());
                            }
                        }
                            break;
                        default:
                            break loop14;
                    }
                } while (true);
                CLOSED_SQUARE_BRACKET74 = (Token) match(input, CLOSED_SQUARE_BRACKET,
                        FOLLOW_CLOSED_SQUARE_BRACKET_in_dataRange1537);
                if (state.failed) {
                    return retval;
                }
                if (state.backtracking == 0) {
                    stream_CLOSED_SQUARE_BRACKET.add(CLOSED_SQUARE_BRACKET74);
                }
                // AST REWRITE
                // elements: dataRangeFacet, IDENTIFIER
                // token labels:
                // rule labels: retval
                // token list labels:
                // rule list labels:
                // wildcard labels:
                if (state.backtracking == 0) {
                    retval.tree = root_0;
                    root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                    // 166:96: -> ^( DATA_RANGE IDENTIFIER ( dataRangeFacet )+ )
                    {
                        // MOWLParser.g:166:99: ^( DATA_RANGE IDENTIFIER (
                        // dataRangeFacet )+ )
                        {
                            ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                    .nil();
                            root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                    adaptor.create(DATA_RANGE, "DATA_RANGE"), root_1);
                            adaptor.addChild(root_1, stream_IDENTIFIER.nextNode());
                            if (!stream_dataRangeFacet.hasNext()) {
                                throw new RewriteEarlyExitException();
                            }
                            while (stream_dataRangeFacet.hasNext()) {
                                adaptor.addChild(root_1, stream_dataRangeFacet.nextTree());
                            }
                            stream_dataRangeFacet.reset();
                            adaptor.addChild(root_0, root_1);
                        }
                    }
                    retval.tree = root_0;
                }
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "dataRange"
    public static class dataRangeFacet_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "dataRangeFacet"
    // MOWLParser.g:169:1: dataRangeFacet : ( LESS_THAN constant -> ^( LESS_THAN
    // constant ) | LESS_THAN_EQUAL constant -> ^( LESS_THAN_EQUAL constant ) |
    // GREATER_THAN constant -> ^( GREATER_THAN constant ) | GREATER_THAN_EQUAL
    // constant -> ^( GREATER_THAN_EQUAL constant ) );
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.dataRangeFacet_return
            dataRangeFacet() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.dataRangeFacet_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.dataRangeFacet_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        Token LESS_THAN75 = null;
        Token LESS_THAN_EQUAL77 = null;
        Token GREATER_THAN79 = null;
        Token GREATER_THAN_EQUAL81 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.constant_return constant76 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.constant_return constant78 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.constant_return constant80 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.constant_return constant82 = null;
        RewriteRuleTokenStream stream_GREATER_THAN = new RewriteRuleTokenStream(adaptor,
                "token GREATER_THAN");
        RewriteRuleTokenStream stream_LESS_THAN_EQUAL = new RewriteRuleTokenStream(
                adaptor, "token LESS_THAN_EQUAL");
        RewriteRuleTokenStream stream_GREATER_THAN_EQUAL = new RewriteRuleTokenStream(
                adaptor, "token GREATER_THAN_EQUAL");
        RewriteRuleTokenStream stream_LESS_THAN = new RewriteRuleTokenStream(adaptor,
                "token LESS_THAN");
        RewriteRuleSubtreeStream stream_constant = new RewriteRuleSubtreeStream(adaptor,
                "rule constant");
        try {
            // MOWLParser.g:170:2: ( LESS_THAN constant -> ^( LESS_THAN constant
            // ) | LESS_THAN_EQUAL constant -> ^( LESS_THAN_EQUAL constant ) |
            // GREATER_THAN constant -> ^( GREATER_THAN constant ) |
            // GREATER_THAN_EQUAL constant -> ^( GREATER_THAN_EQUAL constant ) )
            int alt15 = 4;
            switch (input.LA(1)) {
                case LESS_THAN: {
                    alt15 = 1;
                }
                    break;
                case LESS_THAN_EQUAL: {
                    alt15 = 2;
                }
                    break;
                case GREATER_THAN: {
                    alt15 = 3;
                }
                    break;
                case GREATER_THAN_EQUAL: {
                    alt15 = 4;
                }
                    break;
                default:
                    if (state.backtracking > 0) {
                        state.failed = true;
                        return retval;
                    }
                    NoViableAltException nvae = new NoViableAltException("", 15, 0, input);
                    throw nvae;
            }
            switch (alt15) {
                case 1:
                // MOWLParser.g:171:3: LESS_THAN constant
                {
                    LESS_THAN75 = (Token) match(input, LESS_THAN,
                            FOLLOW_LESS_THAN_in_dataRangeFacet1563);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_LESS_THAN.add(LESS_THAN75);
                    }
                    pushFollow(FOLLOW_constant_in_dataRangeFacet1565);
                    constant76 = constant();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_constant.add(constant76.getTree());
                    }
                    // AST REWRITE
                    // elements: LESS_THAN, constant
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 171:22: -> ^( LESS_THAN constant )
                        {
                            // MOWLParser.g:171:25: ^( LESS_THAN constant )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_LESS_THAN.nextNode(), root_1);
                                adaptor.addChild(root_1, stream_constant.nextTree());
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 2:
                // MOWLParser.g:172:5: LESS_THAN_EQUAL constant
                {
                    LESS_THAN_EQUAL77 = (Token) match(input, LESS_THAN_EQUAL,
                            FOLLOW_LESS_THAN_EQUAL_in_dataRangeFacet1579);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_LESS_THAN_EQUAL.add(LESS_THAN_EQUAL77);
                    }
                    pushFollow(FOLLOW_constant_in_dataRangeFacet1581);
                    constant78 = constant();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_constant.add(constant78.getTree());
                    }
                    // AST REWRITE
                    // elements: LESS_THAN_EQUAL, constant
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 172:31: -> ^( LESS_THAN_EQUAL constant )
                        {
                            // MOWLParser.g:172:34: ^( LESS_THAN_EQUAL constant
                            // )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_LESS_THAN_EQUAL.nextNode(), root_1);
                                adaptor.addChild(root_1, stream_constant.nextTree());
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 3:
                // MOWLParser.g:173:5: GREATER_THAN constant
                {
                    GREATER_THAN79 = (Token) match(input, GREATER_THAN,
                            FOLLOW_GREATER_THAN_in_dataRangeFacet1596);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_GREATER_THAN.add(GREATER_THAN79);
                    }
                    pushFollow(FOLLOW_constant_in_dataRangeFacet1598);
                    constant80 = constant();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_constant.add(constant80.getTree());
                    }
                    // AST REWRITE
                    // elements: constant, GREATER_THAN
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 173:27: -> ^( GREATER_THAN constant )
                        {
                            // MOWLParser.g:173:30: ^( GREATER_THAN constant )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_GREATER_THAN.nextNode(), root_1);
                                adaptor.addChild(root_1, stream_constant.nextTree());
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 4:
                // MOWLParser.g:174:5: GREATER_THAN_EQUAL constant
                {
                    GREATER_THAN_EQUAL81 = (Token) match(input, GREATER_THAN_EQUAL,
                            FOLLOW_GREATER_THAN_EQUAL_in_dataRangeFacet1612);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_GREATER_THAN_EQUAL.add(GREATER_THAN_EQUAL81);
                    }
                    pushFollow(FOLLOW_constant_in_dataRangeFacet1614);
                    constant82 = constant();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_constant.add(constant82.getTree());
                    }
                    // AST REWRITE
                    // elements: GREATER_THAN_EQUAL, constant
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 174:33: -> ^( GREATER_THAN_EQUAL constant )
                        {
                            // MOWLParser.g:174:36: ^( GREATER_THAN_EQUAL
                            // constant )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_GREATER_THAN_EQUAL.nextNode(), root_1);
                                adaptor.addChild(root_1, stream_constant.nextTree());
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "dataRangeFacet"
    public static class atomic_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "atomic"
    // MOWLParser.g:177:1: atomic : ( IDENTIFIER | ENTITY_REFERENCE -> ^(
    // ENTITY_REFERENCE ) );
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.atomic_return
            atomic() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.atomic_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.atomic_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        Token IDENTIFIER83 = null;
        Token ENTITY_REFERENCE84 = null;
        ManchesterOWLSyntaxTree IDENTIFIER83_tree = null;
        RewriteRuleTokenStream stream_ENTITY_REFERENCE = new RewriteRuleTokenStream(
                adaptor, "token ENTITY_REFERENCE");
        try {
            // MOWLParser.g:177:8: ( IDENTIFIER | ENTITY_REFERENCE -> ^(
            // ENTITY_REFERENCE ) )
            int alt16 = 2;
            int LA16_0 = input.LA(1);
            if (LA16_0 == IDENTIFIER) {
                alt16 = 1;
            } else if (LA16_0 == ENTITY_REFERENCE) {
                alt16 = 2;
            } else {
                if (state.backtracking > 0) {
                    state.failed = true;
                    return retval;
                }
                NoViableAltException nvae = new NoViableAltException("", 16, 0, input);
                throw nvae;
            }
            switch (alt16) {
                case 1:
                // MOWLParser.g:178:3: IDENTIFIER
                {
                    root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                    IDENTIFIER83 = (Token) match(input, IDENTIFIER,
                            FOLLOW_IDENTIFIER_in_atomic1635);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        IDENTIFIER83_tree = (ManchesterOWLSyntaxTree) adaptor
                                .create(IDENTIFIER83);
                        adaptor.addChild(root_0, IDENTIFIER83_tree);
                    }
                }
                    break;
                case 2:
                // MOWLParser.g:179:5: ENTITY_REFERENCE
                {
                    ENTITY_REFERENCE84 = (Token) match(input, ENTITY_REFERENCE,
                            FOLLOW_ENTITY_REFERENCE_in_atomic1642);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_ENTITY_REFERENCE.add(ENTITY_REFERENCE84);
                    }
                    // AST REWRITE
                    // elements: ENTITY_REFERENCE
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 179:22: -> ^( ENTITY_REFERENCE )
                        {
                            // MOWLParser.g:179:25: ^( ENTITY_REFERENCE )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_ENTITY_REFERENCE.nextNode(), root_1);
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "atomic"
    public static class qualifiedRestriction_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "qualifiedRestriction"
    // MOWLParser.g:182:1: qualifiedRestriction : ( options {backtrack=true; } :
    // propertyExpression SOME expression -> ^( SOME_RESTRICTION
    // propertyExpression expression ) | propertyExpression ONLY expression ->
    // ^( ALL_RESTRICTION propertyExpression expression ) |
    // cardinalityRestriction -> ^( cardinalityRestriction ) | oneOf -> ^( oneOf
    // ) | valueRestriction -> ^( valueRestriction ) ) ;
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.qualifiedRestriction_return
            qualifiedRestriction() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.qualifiedRestriction_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.qualifiedRestriction_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        Token SOME86 = null;
        Token ONLY89 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.propertyExpression_return propertyExpression85 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.expression_return expression87 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.propertyExpression_return propertyExpression88 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.expression_return expression90 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.cardinalityRestriction_return cardinalityRestriction91 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.oneOf_return oneOf92 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.valueRestriction_return valueRestriction93 = null;
        RewriteRuleTokenStream stream_SOME = new RewriteRuleTokenStream(adaptor,
                "token SOME");
        RewriteRuleTokenStream stream_ONLY = new RewriteRuleTokenStream(adaptor,
                "token ONLY");
        RewriteRuleSubtreeStream stream_cardinalityRestriction = new RewriteRuleSubtreeStream(
                adaptor, "rule cardinalityRestriction");
        RewriteRuleSubtreeStream stream_propertyExpression = new RewriteRuleSubtreeStream(
                adaptor, "rule propertyExpression");
        RewriteRuleSubtreeStream stream_oneOf = new RewriteRuleSubtreeStream(adaptor,
                "rule oneOf");
        RewriteRuleSubtreeStream stream_expression = new RewriteRuleSubtreeStream(
                adaptor, "rule expression");
        RewriteRuleSubtreeStream stream_valueRestriction = new RewriteRuleSubtreeStream(
                adaptor, "rule valueRestriction");
        try {
            // MOWLParser.g:182:21: ( ( options {backtrack=true; } :
            // propertyExpression SOME expression -> ^( SOME_RESTRICTION
            // propertyExpression expression ) | propertyExpression ONLY
            // expression -> ^( ALL_RESTRICTION propertyExpression expression )
            // | cardinalityRestriction -> ^( cardinalityRestriction ) | oneOf
            // -> ^( oneOf ) | valueRestriction -> ^( valueRestriction ) ) )
            // MOWLParser.g:183:9: ( options {backtrack=true; } :
            // propertyExpression SOME expression -> ^( SOME_RESTRICTION
            // propertyExpression expression ) | propertyExpression ONLY
            // expression -> ^( ALL_RESTRICTION propertyExpression expression )
            // | cardinalityRestriction -> ^( cardinalityRestriction ) | oneOf
            // -> ^( oneOf ) | valueRestriction -> ^( valueRestriction ) )
            {
                // MOWLParser.g:183:9: ( options {backtrack=true; } :
                // propertyExpression SOME expression -> ^( SOME_RESTRICTION
                // propertyExpression expression ) | propertyExpression ONLY
                // expression -> ^( ALL_RESTRICTION propertyExpression
                // expression ) | cardinalityRestriction -> ^(
                // cardinalityRestriction ) | oneOf -> ^( oneOf ) |
                // valueRestriction -> ^( valueRestriction ) )
                int alt17 = 5;
                switch (input.LA(1)) {
                    case IDENTIFIER: {
                        input.LA(2);
                        if (synpred25_MOWLParser()) {
                            alt17 = 1;
                        } else if (synpred26_MOWLParser()) {
                            alt17 = 2;
                        } else if (synpred27_MOWLParser()) {
                            alt17 = 3;
                        } else {
                            alt17 = 5;
                        }
                    }
                        break;
                    case ENTITY_REFERENCE: {
                        input.LA(2);
                        if (synpred25_MOWLParser()) {
                            alt17 = 1;
                        } else if (synpred26_MOWLParser()) {
                            alt17 = 2;
                        } else if (synpred27_MOWLParser()) {
                            alt17 = 3;
                        } else {
                            alt17 = 5;
                        }
                    }
                        break;
                    case INVERSE: {
                        input.LA(2);
                        if (synpred25_MOWLParser()) {
                            alt17 = 1;
                        } else if (synpred26_MOWLParser()) {
                            alt17 = 2;
                        } else if (synpred27_MOWLParser()) {
                            alt17 = 3;
                        } else {
                            alt17 = 5;
                        }
                    }
                        break;
                    case OPEN_CURLY_BRACES: {
                        alt17 = 4;
                    }
                        break;
                    default:
                        if (state.backtracking > 0) {
                            state.failed = true;
                            return retval;
                        }
                        NoViableAltException nvae = new NoViableAltException("", 17, 0,
                                input);
                        throw nvae;
                }
                switch (alt17) {
                    case 1:
                    // MOWLParser.g:185:7: propertyExpression SOME expression
                    {
                        pushFollow(FOLLOW_propertyExpression_in_qualifiedRestriction1694);
                        propertyExpression85 = propertyExpression();
                        state._fsp--;
                        if (state.failed) {
                            return retval;
                        }
                        if (state.backtracking == 0) {
                            stream_propertyExpression.add(propertyExpression85.getTree());
                        }
                        SOME86 = (Token) match(input, SOME,
                                FOLLOW_SOME_in_qualifiedRestriction1697);
                        if (state.failed) {
                            return retval;
                        }
                        if (state.backtracking == 0) {
                            stream_SOME.add(SOME86);
                        }
                        pushFollow(FOLLOW_expression_in_qualifiedRestriction1701);
                        expression87 = expression();
                        state._fsp--;
                        if (state.failed) {
                            return retval;
                        }
                        if (state.backtracking == 0) {
                            stream_expression.add(expression87.getTree());
                        }
                        // AST REWRITE
                        // elements: expression, propertyExpression
                        // token labels:
                        // rule labels: retval
                        // token list labels:
                        // rule list labels:
                        // wildcard labels:
                        if (state.backtracking == 0) {
                            retval.tree = root_0;
                            root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                            // 185:46: -> ^( SOME_RESTRICTION propertyExpression
                            // expression )
                            {
                                // MOWLParser.g:185:49: ^( SOME_RESTRICTION
                                // propertyExpression expression )
                                {
                                    ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_1 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(SOME_RESTRICTION,
                                                    "SOME_RESTRICTION"), root_1);
                                    adaptor.addChild(root_1,
                                            stream_propertyExpression.nextTree());
                                    adaptor.addChild(root_1, stream_expression.nextTree());
                                    adaptor.addChild(root_0, root_1);
                                }
                            }
                            retval.tree = root_0;
                        }
                    }
                        break;
                    case 2:
                    // MOWLParser.g:186:7: propertyExpression ONLY expression
                    {
                        pushFollow(FOLLOW_propertyExpression_in_qualifiedRestriction1730);
                        propertyExpression88 = propertyExpression();
                        state._fsp--;
                        if (state.failed) {
                            return retval;
                        }
                        if (state.backtracking == 0) {
                            stream_propertyExpression.add(propertyExpression88.getTree());
                        }
                        ONLY89 = (Token) match(input, ONLY,
                                FOLLOW_ONLY_in_qualifiedRestriction1732);
                        if (state.failed) {
                            return retval;
                        }
                        if (state.backtracking == 0) {
                            stream_ONLY.add(ONLY89);
                        }
                        pushFollow(FOLLOW_expression_in_qualifiedRestriction1735);
                        expression90 = expression();
                        state._fsp--;
                        if (state.failed) {
                            return retval;
                        }
                        if (state.backtracking == 0) {
                            stream_expression.add(expression90.getTree());
                        }
                        // AST REWRITE
                        // elements: propertyExpression, expression
                        // token labels:
                        // rule labels: retval
                        // token list labels:
                        // rule list labels:
                        // wildcard labels:
                        if (state.backtracking == 0) {
                            retval.tree = root_0;
                            root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                            // 186:44: -> ^( ALL_RESTRICTION propertyExpression
                            // expression )
                            {
                                // MOWLParser.g:186:47: ^( ALL_RESTRICTION
                                // propertyExpression expression )
                                {
                                    ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_1 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(adaptor.create(ALL_RESTRICTION,
                                                    "ALL_RESTRICTION"), root_1);
                                    adaptor.addChild(root_1,
                                            stream_propertyExpression.nextTree());
                                    adaptor.addChild(root_1, stream_expression.nextTree());
                                    adaptor.addChild(root_0, root_1);
                                }
                            }
                            retval.tree = root_0;
                        }
                    }
                        break;
                    case 3:
                    // MOWLParser.g:187:7: cardinalityRestriction
                    {
                        pushFollow(FOLLOW_cardinalityRestriction_in_qualifiedRestriction1754);
                        cardinalityRestriction91 = cardinalityRestriction();
                        state._fsp--;
                        if (state.failed) {
                            return retval;
                        }
                        if (state.backtracking == 0) {
                            stream_cardinalityRestriction.add(cardinalityRestriction91
                                    .getTree());
                        }
                        // AST REWRITE
                        // elements: cardinalityRestriction
                        // token labels:
                        // rule labels: retval
                        // token list labels:
                        // rule list labels:
                        // wildcard labels:
                        if (state.backtracking == 0) {
                            retval.tree = root_0;
                            root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                            // 187:30: -> ^( cardinalityRestriction )
                            {
                                // MOWLParser.g:187:33: ^(
                                // cardinalityRestriction )
                                {
                                    ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_1 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(stream_cardinalityRestriction
                                                    .nextNode(), root_1);
                                    adaptor.addChild(root_0, root_1);
                                }
                            }
                            retval.tree = root_0;
                        }
                    }
                        break;
                    case 4:
                    // MOWLParser.g:188:7: oneOf
                    {
                        pushFollow(FOLLOW_oneOf_in_qualifiedRestriction1768);
                        oneOf92 = oneOf();
                        state._fsp--;
                        if (state.failed) {
                            return retval;
                        }
                        if (state.backtracking == 0) {
                            stream_oneOf.add(oneOf92.getTree());
                        }
                        // AST REWRITE
                        // elements: oneOf
                        // token labels:
                        // rule labels: retval
                        // token list labels:
                        // rule list labels:
                        // wildcard labels:
                        if (state.backtracking == 0) {
                            retval.tree = root_0;
                            root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                            // 188:13: -> ^( oneOf )
                            {
                                // MOWLParser.g:188:16: ^( oneOf )
                                {
                                    ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_1 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(stream_oneOf.nextNode(), root_1);
                                    adaptor.addChild(root_0, root_1);
                                }
                            }
                            retval.tree = root_0;
                        }
                    }
                        break;
                    case 5:
                    // MOWLParser.g:189:7: valueRestriction
                    {
                        pushFollow(FOLLOW_valueRestriction_in_qualifiedRestriction1782);
                        valueRestriction93 = valueRestriction();
                        state._fsp--;
                        if (state.failed) {
                            return retval;
                        }
                        if (state.backtracking == 0) {
                            stream_valueRestriction.add(valueRestriction93.getTree());
                        }
                        // AST REWRITE
                        // elements: valueRestriction
                        // token labels:
                        // rule labels: retval
                        // token list labels:
                        // rule list labels:
                        // wildcard labels:
                        if (state.backtracking == 0) {
                            retval.tree = root_0;
                            root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                            // 189:24: -> ^( valueRestriction )
                            {
                                // MOWLParser.g:189:27: ^( valueRestriction )
                                {
                                    ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_1 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(
                                                    stream_valueRestriction.nextNode(),
                                                    root_1);
                                    adaptor.addChild(root_0, root_1);
                                }
                            }
                            retval.tree = root_0;
                        }
                    }
                        break;
                }
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "qualifiedRestriction"
    public static class propertyExpression_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "propertyExpression"
    // MOWLParser.g:193:1: propertyExpression : ( atomic -> ^( atomic ) |
    // complexPropertyExpression -> ^( complexPropertyExpression ) );
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.propertyExpression_return
            propertyExpression() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.propertyExpression_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.propertyExpression_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.atomic_return atomic94 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.complexPropertyExpression_return complexPropertyExpression95 = null;
        RewriteRuleSubtreeStream stream_complexPropertyExpression = new RewriteRuleSubtreeStream(
                adaptor, "rule complexPropertyExpression");
        RewriteRuleSubtreeStream stream_atomic = new RewriteRuleSubtreeStream(adaptor,
                "rule atomic");
        try {
            // MOWLParser.g:193:21: ( atomic -> ^( atomic ) |
            // complexPropertyExpression -> ^( complexPropertyExpression ) )
            int alt18 = 2;
            int LA18_0 = input.LA(1);
            if (LA18_0 >= IDENTIFIER && LA18_0 <= ENTITY_REFERENCE) {
                alt18 = 1;
            } else if (LA18_0 == INVERSE) {
                alt18 = 2;
            } else {
                if (state.backtracking > 0) {
                    state.failed = true;
                    return retval;
                }
                NoViableAltException nvae = new NoViableAltException("", 18, 0, input);
                throw nvae;
            }
            switch (alt18) {
                case 1:
                // MOWLParser.g:194:7: atomic
                {
                    pushFollow(FOLLOW_atomic_in_propertyExpression1814);
                    atomic94 = atomic();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_atomic.add(atomic94.getTree());
                    }
                    // AST REWRITE
                    // elements: atomic
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 194:14: -> ^( atomic )
                        {
                            // MOWLParser.g:194:17: ^( atomic )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_atomic.nextNode(), root_1);
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 2:
                // MOWLParser.g:195:7: complexPropertyExpression
                {
                    pushFollow(FOLLOW_complexPropertyExpression_in_propertyExpression1828);
                    complexPropertyExpression95 = complexPropertyExpression();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_complexPropertyExpression.add(complexPropertyExpression95
                                .getTree());
                    }
                    // AST REWRITE
                    // elements: complexPropertyExpression
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 195:33: -> ^( complexPropertyExpression )
                        {
                            // MOWLParser.g:195:36: ^( complexPropertyExpression
                            // )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_complexPropertyExpression.nextNode(),
                                        root_1);
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "propertyExpression"
    public static class cardinalityRestriction_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "cardinalityRestriction"
    // MOWLParser.g:198:1: cardinalityRestriction options {backtrack=true; } :
    // propertyExpression restrictionKind INTEGER ( unary )? -> ^(
    // CARDINALITY_RESTRICTION restrictionKind INTEGER propertyExpression (
    // unary )? ) ;
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.cardinalityRestriction_return
            cardinalityRestriction() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.cardinalityRestriction_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.cardinalityRestriction_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        Token INTEGER98 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.propertyExpression_return propertyExpression96 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.restrictionKind_return restrictionKind97 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.unary_return unary99 = null;
        RewriteRuleTokenStream stream_INTEGER = new RewriteRuleTokenStream(adaptor,
                "token INTEGER");
        RewriteRuleSubtreeStream stream_propertyExpression = new RewriteRuleSubtreeStream(
                adaptor, "rule propertyExpression");
        RewriteRuleSubtreeStream stream_restrictionKind = new RewriteRuleSubtreeStream(
                adaptor, "rule restrictionKind");
        RewriteRuleSubtreeStream stream_unary = new RewriteRuleSubtreeStream(adaptor,
                "rule unary");
        try {
            // MOWLParser.g:199:28: ( propertyExpression restrictionKind INTEGER
            // ( unary )? -> ^( CARDINALITY_RESTRICTION restrictionKind INTEGER
            // propertyExpression ( unary )? ) )
            // MOWLParser.g:200:2: propertyExpression restrictionKind INTEGER (
            // unary )?
            {
                pushFollow(FOLLOW_propertyExpression_in_cardinalityRestriction1870);
                propertyExpression96 = propertyExpression();
                state._fsp--;
                if (state.failed) {
                    return retval;
                }
                if (state.backtracking == 0) {
                    stream_propertyExpression.add(propertyExpression96.getTree());
                }
                pushFollow(FOLLOW_restrictionKind_in_cardinalityRestriction1873);
                restrictionKind97 = restrictionKind();
                state._fsp--;
                if (state.failed) {
                    return retval;
                }
                if (state.backtracking == 0) {
                    stream_restrictionKind.add(restrictionKind97.getTree());
                }
                INTEGER98 = (Token) match(input, INTEGER,
                        FOLLOW_INTEGER_in_cardinalityRestriction1875);
                if (state.failed) {
                    return retval;
                }
                if (state.backtracking == 0) {
                    stream_INTEGER.add(INTEGER98);
                }
                // MOWLParser.g:200:46: ( unary )?
                int alt19 = 2;
                int LA19_0 = input.LA(1);
                if (LA19_0 == OPEN_CURLY_BRACES || LA19_0 == NOT || LA19_0 == INVERSE
                        || LA19_0 == DBLQUOTE || LA19_0 >= IDENTIFIER
                        && LA19_0 <= ENTITY_REFERENCE) {
                    alt19 = 1;
                }
                switch (alt19) {
                    case 1:
                    // MOWLParser.g:200:46: unary
                    {
                        pushFollow(FOLLOW_unary_in_cardinalityRestriction1877);
                        unary99 = unary();
                        state._fsp--;
                        if (state.failed) {
                            return retval;
                        }
                        if (state.backtracking == 0) {
                            stream_unary.add(unary99.getTree());
                        }
                    }
                        break;
                }
                // AST REWRITE
                // elements: propertyExpression, restrictionKind, INTEGER, unary
                // token labels:
                // rule labels: retval
                // token list labels:
                // rule list labels:
                // wildcard labels:
                if (state.backtracking == 0) {
                    retval.tree = root_0;
                    root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                    // 200:53: -> ^( CARDINALITY_RESTRICTION restrictionKind
                    // INTEGER propertyExpression ( unary )? )
                    {
                        // MOWLParser.g:200:56: ^( CARDINALITY_RESTRICTION
                        // restrictionKind INTEGER propertyExpression ( unary )?
                        // )
                        {
                            ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                    .nil();
                            root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(adaptor
                                    .create(CARDINALITY_RESTRICTION,
                                            "CARDINALITY_RESTRICTION"), root_1);
                            adaptor.addChild(root_1, stream_restrictionKind.nextTree());
                            adaptor.addChild(root_1, stream_INTEGER.nextNode());
                            adaptor.addChild(root_1, stream_propertyExpression.nextTree());
                            // MOWLParser.g:200:127: ( unary )?
                            if (stream_unary.hasNext()) {
                                adaptor.addChild(root_1, stream_unary.nextTree());
                            }
                            stream_unary.reset();
                            adaptor.addChild(root_0, root_1);
                        }
                    }
                    retval.tree = root_0;
                }
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "cardinalityRestriction"
    public static class restrictionKind_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "restrictionKind"
    // MOWLParser.g:203:1: restrictionKind : ( MIN -> ^( MIN ) | MAX -> ^( MAX )
    // | EXACTLY -> ^( EXACTLY ) );
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.restrictionKind_return
            restrictionKind() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.restrictionKind_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.restrictionKind_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        Token MIN100 = null;
        Token MAX101 = null;
        Token EXACTLY102 = null;
        RewriteRuleTokenStream stream_MAX = new RewriteRuleTokenStream(adaptor,
                "token MAX");
        RewriteRuleTokenStream stream_MIN = new RewriteRuleTokenStream(adaptor,
                "token MIN");
        RewriteRuleTokenStream stream_EXACTLY = new RewriteRuleTokenStream(adaptor,
                "token EXACTLY");
        try {
            // MOWLParser.g:203:17: ( MIN -> ^( MIN ) | MAX -> ^( MAX ) |
            // EXACTLY -> ^( EXACTLY ) )
            int alt20 = 3;
            switch (input.LA(1)) {
                case MIN: {
                    alt20 = 1;
                }
                    break;
                case MAX: {
                    alt20 = 2;
                }
                    break;
                case EXACTLY: {
                    alt20 = 3;
                }
                    break;
                default:
                    if (state.backtracking > 0) {
                        state.failed = true;
                        return retval;
                    }
                    NoViableAltException nvae = new NoViableAltException("", 20, 0, input);
                    throw nvae;
            }
            switch (alt20) {
                case 1:
                // MOWLParser.g:204:5: MIN
                {
                    MIN100 = (Token) match(input, MIN, FOLLOW_MIN_in_restrictionKind1910);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_MIN.add(MIN100);
                    }
                    // AST REWRITE
                    // elements: MIN
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 204:9: -> ^( MIN )
                        {
                            // MOWLParser.g:204:12: ^( MIN )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_MIN.nextNode(), root_1);
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 2:
                // MOWLParser.g:205:7: MAX
                {
                    MAX101 = (Token) match(input, MAX, FOLLOW_MAX_in_restrictionKind1924);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_MAX.add(MAX101);
                    }
                    // AST REWRITE
                    // elements: MAX
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 205:11: -> ^( MAX )
                        {
                            // MOWLParser.g:205:14: ^( MAX )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_MAX.nextNode(), root_1);
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 3:
                // MOWLParser.g:206:7: EXACTLY
                {
                    EXACTLY102 = (Token) match(input, EXACTLY,
                            FOLLOW_EXACTLY_in_restrictionKind1938);
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_EXACTLY.add(EXACTLY102);
                    }
                    // AST REWRITE
                    // elements: EXACTLY
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 206:15: -> ^( EXACTLY )
                        {
                            // MOWLParser.g:206:18: ^( EXACTLY )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_EXACTLY.nextNode(), root_1);
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "restrictionKind"
    public static class oneOf_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "oneOf"
    // MOWLParser.g:210:1: oneOf : OPEN_CURLY_BRACES IDENTIFIER ( COMMA
    // IDENTIFIER )* CLOSED_CURLY_BRACES -> ^( ONE_OF ( IDENTIFIER )+ ) ;
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.oneOf_return
            oneOf() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.oneOf_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.oneOf_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        Token OPEN_CURLY_BRACES103 = null;
        Token IDENTIFIER104 = null;
        Token COMMA105 = null;
        Token IDENTIFIER106 = null;
        Token CLOSED_CURLY_BRACES107 = null;
        RewriteRuleTokenStream stream_COMMA = new RewriteRuleTokenStream(adaptor,
                "token COMMA");
        RewriteRuleTokenStream stream_OPEN_CURLY_BRACES = new RewriteRuleTokenStream(
                adaptor, "token OPEN_CURLY_BRACES");
        RewriteRuleTokenStream stream_CLOSED_CURLY_BRACES = new RewriteRuleTokenStream(
                adaptor, "token CLOSED_CURLY_BRACES");
        RewriteRuleTokenStream stream_IDENTIFIER = new RewriteRuleTokenStream(adaptor,
                "token IDENTIFIER");
        try {
            // MOWLParser.g:210:7: ( OPEN_CURLY_BRACES IDENTIFIER ( COMMA
            // IDENTIFIER )* CLOSED_CURLY_BRACES -> ^( ONE_OF ( IDENTIFIER )+ )
            // )
            // MOWLParser.g:211:3: OPEN_CURLY_BRACES IDENTIFIER ( COMMA
            // IDENTIFIER )* CLOSED_CURLY_BRACES
            {
                OPEN_CURLY_BRACES103 = (Token) match(input, OPEN_CURLY_BRACES,
                        FOLLOW_OPEN_CURLY_BRACES_in_oneOf1960);
                if (state.failed) {
                    return retval;
                }
                if (state.backtracking == 0) {
                    stream_OPEN_CURLY_BRACES.add(OPEN_CURLY_BRACES103);
                }
                IDENTIFIER104 = (Token) match(input, IDENTIFIER,
                        FOLLOW_IDENTIFIER_in_oneOf1962);
                if (state.failed) {
                    return retval;
                }
                if (state.backtracking == 0) {
                    stream_IDENTIFIER.add(IDENTIFIER104);
                }
                // MOWLParser.g:211:32: ( COMMA IDENTIFIER )*
                loop21: do {
                    int alt21 = 2;
                    int LA21_0 = input.LA(1);
                    if (LA21_0 == COMMA) {
                        alt21 = 1;
                    }
                    switch (alt21) {
                        case 1:
                        // MOWLParser.g:211:33: COMMA IDENTIFIER
                        {
                            COMMA105 = (Token) match(input, COMMA,
                                    FOLLOW_COMMA_in_oneOf1965);
                            if (state.failed) {
                                return retval;
                            }
                            if (state.backtracking == 0) {
                                stream_COMMA.add(COMMA105);
                            }
                            IDENTIFIER106 = (Token) match(input, IDENTIFIER,
                                    FOLLOW_IDENTIFIER_in_oneOf1967);
                            if (state.failed) {
                                return retval;
                            }
                            if (state.backtracking == 0) {
                                stream_IDENTIFIER.add(IDENTIFIER106);
                            }
                        }
                            break;
                        default:
                            break loop21;
                    }
                } while (true);
                CLOSED_CURLY_BRACES107 = (Token) match(input, CLOSED_CURLY_BRACES,
                        FOLLOW_CLOSED_CURLY_BRACES_in_oneOf1971);
                if (state.failed) {
                    return retval;
                }
                if (state.backtracking == 0) {
                    stream_CLOSED_CURLY_BRACES.add(CLOSED_CURLY_BRACES107);
                }
                // AST REWRITE
                // elements: IDENTIFIER
                // token labels:
                // rule labels: retval
                // token list labels:
                // rule list labels:
                // wildcard labels:
                if (state.backtracking == 0) {
                    retval.tree = root_0;
                    root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                    // 211:72: -> ^( ONE_OF ( IDENTIFIER )+ )
                    {
                        // MOWLParser.g:211:75: ^( ONE_OF ( IDENTIFIER )+ )
                        {
                            ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                    .nil();
                            root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                    adaptor.create(ONE_OF, "ONE_OF"), root_1);
                            if (!stream_IDENTIFIER.hasNext()) {
                                throw new RewriteEarlyExitException();
                            }
                            while (stream_IDENTIFIER.hasNext()) {
                                adaptor.addChild(root_1, stream_IDENTIFIER.nextNode());
                            }
                            stream_IDENTIFIER.reset();
                            adaptor.addChild(root_0, root_1);
                        }
                    }
                    retval.tree = root_0;
                }
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "oneOf"
    public static class valueRestriction_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "valueRestriction"
    // MOWLParser.g:214:1: valueRestriction : propertyExpression VALUE value ->
    // ^( VALUE_RESTRICTION propertyExpression value ) ;
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.valueRestriction_return
            valueRestriction() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.valueRestriction_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.valueRestriction_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        Token VALUE109 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.propertyExpression_return propertyExpression108 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.value_return value110 = null;
        RewriteRuleTokenStream stream_VALUE = new RewriteRuleTokenStream(adaptor,
                "token VALUE");
        RewriteRuleSubtreeStream stream_propertyExpression = new RewriteRuleSubtreeStream(
                adaptor, "rule propertyExpression");
        RewriteRuleSubtreeStream stream_value = new RewriteRuleSubtreeStream(adaptor,
                "rule value");
        try {
            // MOWLParser.g:214:18: ( propertyExpression VALUE value -> ^(
            // VALUE_RESTRICTION propertyExpression value ) )
            // MOWLParser.g:214:20: propertyExpression VALUE value
            {
                pushFollow(FOLLOW_propertyExpression_in_valueRestriction1991);
                propertyExpression108 = propertyExpression();
                state._fsp--;
                if (state.failed) {
                    return retval;
                }
                if (state.backtracking == 0) {
                    stream_propertyExpression.add(propertyExpression108.getTree());
                }
                VALUE109 = (Token) match(input, VALUE,
                        FOLLOW_VALUE_in_valueRestriction1993);
                if (state.failed) {
                    return retval;
                }
                if (state.backtracking == 0) {
                    stream_VALUE.add(VALUE109);
                }
                pushFollow(FOLLOW_value_in_valueRestriction1995);
                value110 = value();
                state._fsp--;
                if (state.failed) {
                    return retval;
                }
                if (state.backtracking == 0) {
                    stream_value.add(value110.getTree());
                }
                // AST REWRITE
                // elements: propertyExpression, value
                // token labels:
                // rule labels: retval
                // token list labels:
                // rule list labels:
                // wildcard labels:
                if (state.backtracking == 0) {
                    retval.tree = root_0;
                    root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                    // 214:51: -> ^( VALUE_RESTRICTION propertyExpression value
                    // )
                    {
                        // MOWLParser.g:214:54: ^( VALUE_RESTRICTION
                        // propertyExpression value )
                        {
                            ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                    .nil();
                            root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(adaptor
                                    .create(VALUE_RESTRICTION, "VALUE_RESTRICTION"),
                                    root_1);
                            adaptor.addChild(root_1, stream_propertyExpression.nextTree());
                            adaptor.addChild(root_1, stream_value.nextTree());
                            adaptor.addChild(root_0, root_1);
                        }
                    }
                    retval.tree = root_0;
                }
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "valueRestriction"
    public static class value_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "value"
    // MOWLParser.g:217:1: value : ( atomic -> ^( atomic ) | constant -> ^(
    // constant ) );
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.value_return
            value() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.value_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.value_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.atomic_return atomic111 = null;
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.constant_return constant112 = null;
        RewriteRuleSubtreeStream stream_atomic = new RewriteRuleSubtreeStream(adaptor,
                "rule atomic");
        RewriteRuleSubtreeStream stream_constant = new RewriteRuleSubtreeStream(adaptor,
                "rule constant");
        try {
            // MOWLParser.g:217:6: ( atomic -> ^( atomic ) | constant -> ^(
            // constant ) )
            int alt22 = 2;
            int LA22_0 = input.LA(1);
            if (LA22_0 >= IDENTIFIER && LA22_0 <= ENTITY_REFERENCE) {
                alt22 = 1;
            } else if (LA22_0 == DBLQUOTE) {
                alt22 = 2;
            } else {
                if (state.backtracking > 0) {
                    state.failed = true;
                    return retval;
                }
                NoViableAltException nvae = new NoViableAltException("", 22, 0, input);
                throw nvae;
            }
            switch (alt22) {
                case 1:
                // MOWLParser.g:218:7: atomic
                {
                    pushFollow(FOLLOW_atomic_in_value2020);
                    atomic111 = atomic();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_atomic.add(atomic111.getTree());
                    }
                    // AST REWRITE
                    // elements: atomic
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 218:14: -> ^( atomic )
                        {
                            // MOWLParser.g:218:17: ^( atomic )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_atomic.nextNode(), root_1);
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
                case 2:
                // MOWLParser.g:219:7: constant
                {
                    pushFollow(FOLLOW_constant_in_value2035);
                    constant112 = constant();
                    state._fsp--;
                    if (state.failed) {
                        return retval;
                    }
                    if (state.backtracking == 0) {
                        stream_constant.add(constant112.getTree());
                    }
                    // AST REWRITE
                    // elements: constant
                    // token labels:
                    // rule labels: retval
                    // token list labels:
                    // rule list labels:
                    // wildcard labels:
                    if (state.backtracking == 0) {
                        retval.tree = root_0;
                        root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                        // 219:16: -> ^( constant )
                        {
                            // MOWLParser.g:219:19: ^( constant )
                            {
                                ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                        .nil();
                                root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                        stream_constant.nextNode(), root_1);
                                adaptor.addChild(root_0, root_1);
                            }
                        }
                        retval.tree = root_0;
                    }
                }
                    break;
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "value"
    public static class constant_return extends ParserRuleReturnScope {
        ManchesterOWLSyntaxTree tree;

        @Override
        public Object getTree() {
            return tree;
        }
    }

    // $ANTLR start "constant"
    // MOWLParser.g:222:1: constant : constantValue= DBLQUOTE ( AT language=
    // IDENTIFIER )? ( POW type= IDENTIFIER )? -> ^( CONSTANT $constantValue (
    // ^( AT $language) )? ( $type)? ) ;
    public final
            ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.constant_return
            constant() throws RecognitionException {
        ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.constant_return retval = new ManchesterOWLSyntaxAutoCompleteCombined_ManchesterOWLSyntaxAutoCompleteBase_MOWLParser.constant_return();
        retval.start = input.LT(1);
        ManchesterOWLSyntaxTree root_0 = null;
        Token constantValue = null;
        Token language = null;
        Token type = null;
        Token AT113 = null;
        Token POW114 = null;
        RewriteRuleTokenStream stream_DBLQUOTE = new RewriteRuleTokenStream(adaptor,
                "token DBLQUOTE");
        RewriteRuleTokenStream stream_POW = new RewriteRuleTokenStream(adaptor,
                "token POW");
        RewriteRuleTokenStream stream_IDENTIFIER = new RewriteRuleTokenStream(adaptor,
                "token IDENTIFIER");
        RewriteRuleTokenStream stream_AT = new RewriteRuleTokenStream(adaptor, "token AT");
        try {
            // MOWLParser.g:222:11: (constantValue= DBLQUOTE ( AT language=
            // IDENTIFIER )? ( POW type= IDENTIFIER )? -> ^( CONSTANT
            // $constantValue ( ^( AT $language) )? ( $type)? ) )
            // MOWLParser.g:222:14: constantValue= DBLQUOTE ( AT language=
            // IDENTIFIER )? ( POW type= IDENTIFIER )?
            {
                constantValue = (Token) match(input, DBLQUOTE,
                        FOLLOW_DBLQUOTE_in_constant2060);
                if (state.failed) {
                    return retval;
                }
                if (state.backtracking == 0) {
                    stream_DBLQUOTE.add(constantValue);
                }
                // MOWLParser.g:222:39: ( AT language= IDENTIFIER )?
                int alt23 = 2;
                int LA23_0 = input.LA(1);
                if (LA23_0 == AT) {
                    alt23 = 1;
                }
                switch (alt23) {
                    case 1:
                    // MOWLParser.g:222:40: AT language= IDENTIFIER
                    {
                        AT113 = (Token) match(input, AT, FOLLOW_AT_in_constant2063);
                        if (state.failed) {
                            return retval;
                        }
                        if (state.backtracking == 0) {
                            stream_AT.add(AT113);
                        }
                        language = (Token) match(input, IDENTIFIER,
                                FOLLOW_IDENTIFIER_in_constant2069);
                        if (state.failed) {
                            return retval;
                        }
                        if (state.backtracking == 0) {
                            stream_IDENTIFIER.add(language);
                        }
                    }
                        break;
                }
                // MOWLParser.g:222:67: ( POW type= IDENTIFIER )?
                int alt24 = 2;
                int LA24_0 = input.LA(1);
                if (LA24_0 == POW) {
                    alt24 = 1;
                }
                switch (alt24) {
                    case 1:
                    // MOWLParser.g:222:69: POW type= IDENTIFIER
                    {
                        POW114 = (Token) match(input, POW, FOLLOW_POW_in_constant2075);
                        if (state.failed) {
                            return retval;
                        }
                        if (state.backtracking == 0) {
                            stream_POW.add(POW114);
                        }
                        type = (Token) match(input, IDENTIFIER,
                                FOLLOW_IDENTIFIER_in_constant2081);
                        if (state.failed) {
                            return retval;
                        }
                        if (state.backtracking == 0) {
                            stream_IDENTIFIER.add(type);
                        }
                    }
                        break;
                }
                // AST REWRITE
                // elements: type, language, constantValue, AT
                // token labels: type, constantValue, language
                // rule labels: retval
                // token list labels:
                // rule list labels:
                // wildcard labels:
                if (state.backtracking == 0) {
                    retval.tree = root_0;
                    RewriteRuleTokenStream stream_type = new RewriteRuleTokenStream(
                            adaptor, "token type", type);
                    RewriteRuleTokenStream stream_constantValue = new RewriteRuleTokenStream(
                            adaptor, "token constantValue", constantValue);
                    RewriteRuleTokenStream stream_language = new RewriteRuleTokenStream(
                            adaptor, "token language", language);
                    root_0 = (ManchesterOWLSyntaxTree) adaptor.nil();
                    // 222:93: -> ^( CONSTANT $constantValue ( ^( AT $language)
                    // )? ( $type)? )
                    {
                        // MOWLParser.g:222:95: ^( CONSTANT $constantValue ( ^(
                        // AT $language) )? ( $type)? )
                        {
                            ManchesterOWLSyntaxTree root_1 = (ManchesterOWLSyntaxTree) adaptor
                                    .nil();
                            root_1 = (ManchesterOWLSyntaxTree) adaptor.becomeRoot(
                                    adaptor.create(CONSTANT, "CONSTANT"), root_1);
                            adaptor.addChild(root_1, stream_constantValue.nextNode());
                            // MOWLParser.g:222:121: ( ^( AT $language) )?
                            if (stream_language.hasNext() || stream_AT.hasNext()) {
                                // MOWLParser.g:222:122: ^( AT $language)
                                {
                                    ManchesterOWLSyntaxTree root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .nil();
                                    root_2 = (ManchesterOWLSyntaxTree) adaptor
                                            .becomeRoot(stream_AT.nextNode(), root_2);
                                    adaptor.addChild(root_2, stream_language.nextNode());
                                    adaptor.addChild(root_1, root_2);
                                }
                            }
                            stream_language.reset();
                            stream_AT.reset();
                            // MOWLParser.g:222:140: ( $type)?
                            if (stream_type.hasNext()) {
                                adaptor.addChild(root_1, stream_type.nextNode());
                            }
                            stream_type.reset();
                            adaptor.addChild(root_0, root_1);
                        }
                    }
                    retval.tree = root_0;
                }
            }
            retval.stop = input.LT(-1);
            if (state.backtracking == 0) {
                retval.tree = (ManchesterOWLSyntaxTree) adaptor
                        .rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        } catch (RecognitionException e) {
            throw e;
        } catch (RewriteEmptyStreamException e) {
            throw e;
        } finally {}
        return retval;
    }

    // $ANTLR end "constant"
    // $ANTLR start synpred1_MOWLParser
    public final void synpred1_MOWLParser_fragment() throws RecognitionException {
        // MOWLParser.g:65:3: ( binaryAxiom )
        // MOWLParser.g:65:3: binaryAxiom
        {
            pushFollow(FOLLOW_binaryAxiom_in_synpred1_MOWLParser232);
            binaryAxiom();
            state._fsp--;
            if (state.failed) {
                return;
            }
        }
    }

    // $ANTLR end synpred1_MOWLParser
    // $ANTLR start synpred3_MOWLParser
    public final void synpred3_MOWLParser_fragment() throws RecognitionException {
        // MOWLParser.g:67:5: ( assertionAxiom )
        // MOWLParser.g:67:5: assertionAxiom
        {
            pushFollow(FOLLOW_assertionAxiom_in_synpred3_MOWLParser256);
            assertionAxiom();
            state._fsp--;
            if (state.failed) {
                return;
            }
        }
    }

    // $ANTLR end synpred3_MOWLParser
    // $ANTLR start synpred4_MOWLParser
    public final void synpred4_MOWLParser_fragment() throws RecognitionException {
        // MOWLParser.g:68:5: ( hasKeyAxiom )
        // MOWLParser.g:68:5: hasKeyAxiom
        {
            pushFollow(FOLLOW_hasKeyAxiom_in_synpred4_MOWLParser268);
            hasKeyAxiom();
            state._fsp--;
            if (state.failed) {
                return;
            }
        }
    }

    // $ANTLR end synpred4_MOWLParser
    // $ANTLR start synpred9_MOWLParser
    public final void synpred9_MOWLParser_fragment() throws RecognitionException {
        // MOWLParser.g:104:2: (lhs= expression SUBCLASS_OF superClass=
        // expression )
        // MOWLParser.g:104:2: lhs= expression SUBCLASS_OF superClass=
        // expression
        {
            pushFollow(FOLLOW_expression_in_synpred9_MOWLParser639);
            expression();
            state._fsp--;
            if (state.failed) {
                return;
            }
            match(input, SUBCLASS_OF, FOLLOW_SUBCLASS_OF_in_synpred9_MOWLParser641);
            if (state.failed) {
                return;
            }
            pushFollow(FOLLOW_expression_in_synpred9_MOWLParser648);
            expression();
            state._fsp--;
            if (state.failed) {
                return;
            }
        }
    }

    // $ANTLR end synpred9_MOWLParser
    // $ANTLR start synpred10_MOWLParser
    public final void synpred10_MOWLParser_fragment() throws RecognitionException {
        // MOWLParser.g:105:11: (lhs= expression EQUIVALENT_TO rhs= expression )
        // MOWLParser.g:105:11: lhs= expression EQUIVALENT_TO rhs= expression
        {
            pushFollow(FOLLOW_expression_in_synpred10_MOWLParser686);
            expression();
            state._fsp--;
            if (state.failed) {
                return;
            }
            match(input, EQUIVALENT_TO, FOLLOW_EQUIVALENT_TO_in_synpred10_MOWLParser688);
            if (state.failed) {
                return;
            }
            pushFollow(FOLLOW_expression_in_synpred10_MOWLParser694);
            expression();
            state._fsp--;
            if (state.failed) {
                return;
            }
        }
    }

    // $ANTLR end synpred10_MOWLParser
    // $ANTLR start synpred11_MOWLParser
    public final void synpred11_MOWLParser_fragment() throws RecognitionException {
        // MOWLParser.g:106:11: (lhs= expression DISJOINT_WITH disjoint=
        // expression )
        // MOWLParser.g:106:11: lhs= expression DISJOINT_WITH disjoint=
        // expression
        {
            pushFollow(FOLLOW_expression_in_synpred11_MOWLParser731);
            expression();
            state._fsp--;
            if (state.failed) {
                return;
            }
            match(input, DISJOINT_WITH, FOLLOW_DISJOINT_WITH_in_synpred11_MOWLParser733);
            if (state.failed) {
                return;
            }
            pushFollow(FOLLOW_expression_in_synpred11_MOWLParser739);
            expression();
            state._fsp--;
            if (state.failed) {
                return;
            }
        }
    }

    // $ANTLR end synpred11_MOWLParser
    // $ANTLR start synpred12_MOWLParser
    public final void synpred12_MOWLParser_fragment() throws RecognitionException {
        // MOWLParser.g:107:11: (lhs= expression SUB_PROPERTY_OF superProperty=
        // propertyExpression )
        // MOWLParser.g:107:11: lhs= expression SUB_PROPERTY_OF superProperty=
        // propertyExpression
        {
            pushFollow(FOLLOW_expression_in_synpred12_MOWLParser776);
            expression();
            state._fsp--;
            if (state.failed) {
                return;
            }
            match(input, SUB_PROPERTY_OF,
                    FOLLOW_SUB_PROPERTY_OF_in_synpred12_MOWLParser778);
            if (state.failed) {
                return;
            }
            pushFollow(FOLLOW_propertyExpression_in_synpred12_MOWLParser784);
            propertyExpression();
            state._fsp--;
            if (state.failed) {
                return;
            }
        }
    }

    // $ANTLR end synpred12_MOWLParser
    // $ANTLR start synpred13_MOWLParser
    public final void synpred13_MOWLParser_fragment() throws RecognitionException {
        // MOWLParser.g:108:11: (lhsID= atomic INVERSE_OF rhsAtomic= atomic )
        // MOWLParser.g:108:11: lhsID= atomic INVERSE_OF rhsAtomic= atomic
        {
            pushFollow(FOLLOW_atomic_in_synpred13_MOWLParser821);
            atomic();
            state._fsp--;
            if (state.failed) {
                return;
            }
            match(input, INVERSE_OF, FOLLOW_INVERSE_OF_in_synpred13_MOWLParser823);
            if (state.failed) {
                return;
            }
            pushFollow(FOLLOW_atomic_in_synpred13_MOWLParser829);
            atomic();
            state._fsp--;
            if (state.failed) {
                return;
            }
        }
    }

    // $ANTLR end synpred13_MOWLParser
    // $ANTLR start synpred14_MOWLParser
    public final void synpred14_MOWLParser_fragment() throws RecognitionException {
        // MOWLParser.g:109:3: (lhsID= atomic SAME_AS rhsID= atomic )
        // MOWLParser.g:109:3: lhsID= atomic SAME_AS rhsID= atomic
        {
            pushFollow(FOLLOW_atomic_in_synpred14_MOWLParser860);
            atomic();
            state._fsp--;
            if (state.failed) {
                return;
            }
            match(input, SAME_AS, FOLLOW_SAME_AS_in_synpred14_MOWLParser862);
            if (state.failed) {
                return;
            }
            pushFollow(FOLLOW_atomic_in_synpred14_MOWLParser869);
            atomic();
            state._fsp--;
            if (state.failed) {
                return;
            }
        }
    }

    // $ANTLR end synpred14_MOWLParser
    // $ANTLR start synpred15_MOWLParser
    public final void synpred15_MOWLParser_fragment() throws RecognitionException {
        // MOWLParser.g:110:11: (lhsID= atomic DIFFERENT_FROM rhsID= atomic )
        // MOWLParser.g:110:11: lhsID= atomic DIFFERENT_FROM rhsID= atomic
        {
            pushFollow(FOLLOW_atomic_in_synpred15_MOWLParser907);
            atomic();
            state._fsp--;
            if (state.failed) {
                return;
            }
            match(input, DIFFERENT_FROM, FOLLOW_DIFFERENT_FROM_in_synpred15_MOWLParser909);
            if (state.failed) {
                return;
            }
            pushFollow(FOLLOW_atomic_in_synpred15_MOWLParser916);
            atomic();
            state._fsp--;
            if (state.failed) {
                return;
            }
        }
    }

    // $ANTLR end synpred15_MOWLParser
    // $ANTLR start synpred16_MOWLParser
    public final void synpred16_MOWLParser_fragment() throws RecognitionException {
        // MOWLParser.g:111:11: (lhsID= atomic DOMAIN expression )
        // MOWLParser.g:111:11: lhsID= atomic DOMAIN expression
        {
            pushFollow(FOLLOW_atomic_in_synpred16_MOWLParser953);
            atomic();
            state._fsp--;
            if (state.failed) {
                return;
            }
            match(input, DOMAIN, FOLLOW_DOMAIN_in_synpred16_MOWLParser956);
            if (state.failed) {
                return;
            }
            pushFollow(FOLLOW_expression_in_synpred16_MOWLParser958);
            expression();
            state._fsp--;
            if (state.failed) {
                return;
            }
        }
    }

    // $ANTLR end synpred16_MOWLParser
    // $ANTLR start synpred17_MOWLParser
    public final void synpred17_MOWLParser_fragment() throws RecognitionException {
        // MOWLParser.g:133:5: ( conjunction ( OR conjunction )* )
        // MOWLParser.g:133:5: conjunction ( OR conjunction )*
        {
            pushFollow(FOLLOW_conjunction_in_synpred17_MOWLParser1247);
            conjunction();
            state._fsp--;
            if (state.failed) {
                return;
            }
            // MOWLParser.g:133:17: ( OR conjunction )*
            loop25: do {
                int alt25 = 2;
                int LA25_0 = input.LA(1);
                if (LA25_0 == OR) {
                    alt25 = 1;
                }
                switch (alt25) {
                    case 1:
                    // MOWLParser.g:133:18: OR conjunction
                    {
                        match(input, OR, FOLLOW_OR_in_synpred17_MOWLParser1250);
                        if (state.failed) {
                            return;
                        }
                        pushFollow(FOLLOW_conjunction_in_synpred17_MOWLParser1252);
                        conjunction();
                        state._fsp--;
                        if (state.failed) {
                            return;
                        }
                    }
                        break;
                    default:
                        break loop25;
                }
            } while (true);
        }
    }

    // $ANTLR end synpred17_MOWLParser
    // $ANTLR start synpred18_MOWLParser
    public final void synpred18_MOWLParser_fragment() throws RecognitionException {
        // MOWLParser.g:134:6: ( complexPropertyExpression )
        // MOWLParser.g:134:6: complexPropertyExpression
        {
            pushFollow(FOLLOW_complexPropertyExpression_in_synpred18_MOWLParser1271);
            complexPropertyExpression();
            state._fsp--;
            if (state.failed) {
                return;
            }
        }
    }

    // $ANTLR end synpred18_MOWLParser
    // $ANTLR start synpred19_MOWLParser
    public final void synpred19_MOWLParser_fragment() throws RecognitionException {
        List list_rest = null;
        RuleReturnScope rest = null;
        // MOWLParser.g:154:4: (head= propertyExpression ( COMPOSITION rest+=
        // propertyExpression )+ )
        // MOWLParser.g:154:4: head= propertyExpression ( COMPOSITION rest+=
        // propertyExpression )+
        {
            pushFollow(FOLLOW_propertyExpression_in_synpred19_MOWLParser1409);
            propertyExpression();
            state._fsp--;
            if (state.failed) {
                return;
            }
            // MOWLParser.g:154:30: ( COMPOSITION rest+= propertyExpression )+
            int cnt26 = 0;
            loop26: do {
                int alt26 = 2;
                int LA26_0 = input.LA(1);
                if (LA26_0 == COMPOSITION) {
                    alt26 = 1;
                }
                switch (alt26) {
                    case 1:
                    // MOWLParser.g:154:31: COMPOSITION rest+=
                    // propertyExpression
                    {
                        match(input, COMPOSITION,
                                FOLLOW_COMPOSITION_in_synpred19_MOWLParser1412);
                        if (state.failed) {
                            return;
                        }
                        pushFollow(FOLLOW_propertyExpression_in_synpred19_MOWLParser1416);
                        rest = propertyExpression();
                        state._fsp--;
                        if (state.failed) {
                            return;
                        }
                        if (list_rest == null) {
                            list_rest = new ArrayList();
                        }
                        list_rest.add(rest);
                    }
                        break;
                    default:
                        if (cnt26 >= 1) {
                            break loop26;
                        }
                        if (state.backtracking > 0) {
                            state.failed = true;
                            return;
                        }
                        EarlyExitException eee = new EarlyExitException(26, input);
                        throw eee;
                }
                cnt26++;
            } while (true);
        }
    }

    // $ANTLR end synpred19_MOWLParser
    // $ANTLR start synpred20_MOWLParser
    public final void synpred20_MOWLParser_fragment() throws RecognitionException {
        // MOWLParser.g:155:5: ( NOT OPEN_PARENTHESYS expression
        // CLOSED_PARENTHESYS )
        // MOWLParser.g:155:5: NOT OPEN_PARENTHESYS expression
        // CLOSED_PARENTHESYS
        {
            match(input, NOT, FOLLOW_NOT_in_synpred20_MOWLParser1438);
            if (state.failed) {
                return;
            }
            match(input, OPEN_PARENTHESYS,
                    FOLLOW_OPEN_PARENTHESYS_in_synpred20_MOWLParser1440);
            if (state.failed) {
                return;
            }
            pushFollow(FOLLOW_expression_in_synpred20_MOWLParser1442);
            expression();
            state._fsp--;
            if (state.failed) {
                return;
            }
            match(input, CLOSED_PARENTHESYS,
                    FOLLOW_CLOSED_PARENTHESYS_in_synpred20_MOWLParser1444);
            if (state.failed) {
                return;
            }
        }
    }

    // $ANTLR end synpred20_MOWLParser
    // $ANTLR start synpred21_MOWLParser
    public final void synpred21_MOWLParser_fragment() throws RecognitionException {
        // MOWLParser.g:156:5: ( NOT atomic )
        // MOWLParser.g:156:5: NOT atomic
        {
            match(input, NOT, FOLLOW_NOT_in_synpred21_MOWLParser1458);
            if (state.failed) {
                return;
            }
            pushFollow(FOLLOW_atomic_in_synpred21_MOWLParser1460);
            atomic();
            state._fsp--;
            if (state.failed) {
                return;
            }
        }
    }

    // $ANTLR end synpred21_MOWLParser
    // $ANTLR start synpred22_MOWLParser
    public final void synpred22_MOWLParser_fragment() throws RecognitionException {
        // MOWLParser.g:157:5: ( qualifiedRestriction )
        // MOWLParser.g:157:5: qualifiedRestriction
        {
            pushFollow(FOLLOW_qualifiedRestriction_in_synpred22_MOWLParser1483);
            qualifiedRestriction();
            state._fsp--;
            if (state.failed) {
                return;
            }
        }
    }

    // $ANTLR end synpred22_MOWLParser
    // $ANTLR start synpred23_MOWLParser
    public final void synpred23_MOWLParser_fragment() throws RecognitionException {
        // MOWLParser.g:158:5: ( dataRange )
        // MOWLParser.g:158:5: dataRange
        {
            pushFollow(FOLLOW_dataRange_in_synpred23_MOWLParser1495);
            dataRange();
            state._fsp--;
            if (state.failed) {
                return;
            }
        }
    }

    // $ANTLR end synpred23_MOWLParser
    // $ANTLR start synpred25_MOWLParser
    public final void synpred25_MOWLParser_fragment() throws RecognitionException {
        // MOWLParser.g:185:7: ( propertyExpression SOME expression )
        // MOWLParser.g:185:7: propertyExpression SOME expression
        {
            pushFollow(FOLLOW_propertyExpression_in_synpred25_MOWLParser1694);
            propertyExpression();
            state._fsp--;
            if (state.failed) {
                return;
            }
            match(input, SOME, FOLLOW_SOME_in_synpred25_MOWLParser1697);
            if (state.failed) {
                return;
            }
            pushFollow(FOLLOW_expression_in_synpred25_MOWLParser1701);
            expression();
            state._fsp--;
            if (state.failed) {
                return;
            }
        }
    }

    // $ANTLR end synpred25_MOWLParser
    // $ANTLR start synpred26_MOWLParser
    public final void synpred26_MOWLParser_fragment() throws RecognitionException {
        // MOWLParser.g:186:7: ( propertyExpression ONLY expression )
        // MOWLParser.g:186:7: propertyExpression ONLY expression
        {
            pushFollow(FOLLOW_propertyExpression_in_synpred26_MOWLParser1730);
            propertyExpression();
            state._fsp--;
            if (state.failed) {
                return;
            }
            match(input, ONLY, FOLLOW_ONLY_in_synpred26_MOWLParser1732);
            if (state.failed) {
                return;
            }
            pushFollow(FOLLOW_expression_in_synpred26_MOWLParser1735);
            expression();
            state._fsp--;
            if (state.failed) {
                return;
            }
        }
    }

    // $ANTLR end synpred26_MOWLParser
    // $ANTLR start synpred27_MOWLParser
    public final void synpred27_MOWLParser_fragment() throws RecognitionException {
        // MOWLParser.g:187:7: ( cardinalityRestriction )
        // MOWLParser.g:187:7: cardinalityRestriction
        {
            pushFollow(FOLLOW_cardinalityRestriction_in_synpred27_MOWLParser1754);
            cardinalityRestriction();
            state._fsp--;
            if (state.failed) {
                return;
            }
        }
    }

    Logger logger = Logging.getParseLogging();

    // $ANTLR end synpred27_MOWLParser
    // Delegated rules
    public final boolean synpred22_MOWLParser() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred22_MOWLParser_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            logger.info("impossible: ", re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed = false;
        return success;
    }

    public final boolean synpred1_MOWLParser() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred1_MOWLParser_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            logger.info("impossible: ", re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed = false;
        return success;
    }

    public final boolean synpred9_MOWLParser() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred9_MOWLParser_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            logger.info("impossible: ", re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed = false;
        return success;
    }

    public final boolean synpred26_MOWLParser() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred26_MOWLParser_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            logger.info("impossible: ", re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed = false;
        return success;
    }

    public final boolean synpred25_MOWLParser() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred25_MOWLParser_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            logger.info("impossible: ", re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed = false;
        return success;
    }

    public final boolean synpred14_MOWLParser() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred14_MOWLParser_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            logger.info("impossible: ", re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed = false;
        return success;
    }

    public final boolean synpred10_MOWLParser() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred10_MOWLParser_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            logger.info("impossible: ", re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed = false;
        return success;
    }

    public final boolean synpred16_MOWLParser() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred16_MOWLParser_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            logger.info("impossible: ", re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed = false;
        return success;
    }

    public final boolean synpred3_MOWLParser() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred3_MOWLParser_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            logger.info("impossible: ", re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed = false;
        return success;
    }

    public final boolean synpred12_MOWLParser() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred12_MOWLParser_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            logger.info("impossible: ", re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed = false;
        return success;
    }

    public final boolean synpred20_MOWLParser() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred20_MOWLParser_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            logger.info("impossible: ", re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed = false;
        return success;
    }

    public final boolean synpred4_MOWLParser() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred4_MOWLParser_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            logger.info("impossible: ", re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed = false;
        return success;
    }

    public final boolean synpred11_MOWLParser() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred11_MOWLParser_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            logger.info("impossible: ", re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed = false;
        return success;
    }

    public final boolean synpred15_MOWLParser() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred15_MOWLParser_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            logger.info("impossible: ", re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed = false;
        return success;
    }

    public final boolean synpred13_MOWLParser() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred13_MOWLParser_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            logger.info("impossible: ", re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed = false;
        return success;
    }

    public final boolean synpred19_MOWLParser() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred19_MOWLParser_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            logger.info("impossible: ", re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed = false;
        return success;
    }

    public final boolean synpred18_MOWLParser() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred18_MOWLParser_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            logger.info("impossible: ", re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed = false;
        return success;
    }

    public final boolean synpred27_MOWLParser() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred27_MOWLParser_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            logger.info("impossible: ", re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed = false;
        return success;
    }

    public final boolean synpred17_MOWLParser() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred17_MOWLParser_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            logger.info("impossible: ", re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed = false;
        return success;
    }

    public final boolean synpred21_MOWLParser() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred21_MOWLParser_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            logger.info("impossible: ", re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed = false;
        return success;
    }

    public final boolean synpred23_MOWLParser() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred23_MOWLParser_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            logger.info("impossible: ", re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed = false;
        return success;
    }

    protected DFA1 dfa1 = new DFA1(this);
    protected DFA6 dfa6 = new DFA6(this);
    protected DFA13 dfa13 = new DFA13(this);
    static final String DFA1_eotS = "\23\uffff";
    static final String DFA1_eofS = "\23\uffff";
    static final String DFA1_minS = "\1\5\7\0\13\uffff";
    static final String DFA1_maxS = "\1\156\7\0\13\uffff";
    static final String DFA1_acceptS = "\10\uffff\1\2\6\uffff\1\5\1\1\1\3\1\4";
    static final String DFA1_specialS = "\1\uffff\1\0\1\1\1\2\1\3\1\4\1\5\1\6\13\uffff}>";
    static final String[] DFA1_transitionS = {
            "\1\7\1\5\5\uffff\1\4\6\uffff\1\3\11\uffff\7\10\4\uffff\1\6\3"
                    + "\uffff\1\1\1\2\100\uffff\1\17", "\1\uffff", "\1\uffff",
            "\1\uffff", "\1\uffff", "\1\uffff", "\1\uffff", "\1\uffff", "", "", "", "",
            "", "", "", "", "", "", "" };
    static final short[] DFA1_eot = DFA.unpackEncodedString(DFA1_eotS);
    static final short[] DFA1_eof = DFA.unpackEncodedString(DFA1_eofS);
    static final char[] DFA1_min = DFA.unpackEncodedStringToUnsignedChars(DFA1_minS);
    static final char[] DFA1_max = DFA.unpackEncodedStringToUnsignedChars(DFA1_maxS);
    static final short[] DFA1_accept = DFA.unpackEncodedString(DFA1_acceptS);
    static final short[] DFA1_special = DFA.unpackEncodedString(DFA1_specialS);
    static final short[][] DFA1_transition;
    static {
        int numStates = DFA1_transitionS.length;
        DFA1_transition = new short[numStates][];
        for (int i = 0; i < numStates; i++) {
            DFA1_transition[i] = DFA.unpackEncodedString(DFA1_transitionS[i]);
        }
    }

    class DFA1 extends DFA {
        public DFA1(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            decisionNumber = 1;
            eot = DFA1_eot;
            eof = DFA1_eof;
            min = DFA1_min;
            max = DFA1_max;
            accept = DFA1_accept;
            special = DFA1_special;
            transition = DFA1_transition;
        }

        @Override
        public String getDescription() {
            return "64:1: axiom options {backtrack=true; } : ( binaryAxiom -> ^( binaryAxiom ) | unaryAxiom -> ^( unaryAxiom ) | assertionAxiom -> ^( assertionAxiom ) | hasKeyAxiom -> ^( hasKeyAxiom ) | annotationAssertionAxiom -> ^( annotationAssertionAxiom ) );";
        }

        @Override
        public int specialStateTransition(int __s, IntStream _input)
                throws NoViableAltException {
            TokenStream in = (TokenStream) _input;
            int s = __s;
            int _s = s;
            switch (s) {
                case 0:
                    in.LA(1);
                    int index1_1 = in.index();
                    in.rewind();
                    s = -1;
                    if (synpred1_MOWLParser()) {
                        s = 16;
                    } else if (synpred3_MOWLParser()) {
                        s = 17;
                    } else if (synpred4_MOWLParser()) {
                        s = 18;
                    }
                    in.seek(index1_1);
                    if (s >= 0) {
                        return s;
                    }
                    break;
                case 1:
                    in.LA(1);
                    int index1_2 = in.index();
                    in.rewind();
                    s = -1;
                    if (synpred1_MOWLParser()) {
                        s = 16;
                    } else if (synpred3_MOWLParser()) {
                        s = 17;
                    } else if (synpred4_MOWLParser()) {
                        s = 18;
                    }
                    in.seek(index1_2);
                    if (s >= 0) {
                        return s;
                    }
                    break;
                case 2:
                    in.LA(1);
                    int index1_3 = in.index();
                    in.rewind();
                    s = -1;
                    if (synpred1_MOWLParser()) {
                        s = 16;
                    } else if (synpred4_MOWLParser()) {
                        s = 18;
                    }
                    in.seek(index1_3);
                    if (s >= 0) {
                        return s;
                    }
                    break;
                case 3:
                    in.LA(1);
                    int index1_4 = in.index();
                    in.rewind();
                    s = -1;
                    if (synpred1_MOWLParser()) {
                        s = 16;
                    } else if (synpred3_MOWLParser()) {
                        s = 17;
                    } else if (synpred4_MOWLParser()) {
                        s = 18;
                    }
                    in.seek(index1_4);
                    if (s >= 0) {
                        return s;
                    }
                    break;
                case 4:
                    in.LA(1);
                    int index1_5 = in.index();
                    in.rewind();
                    s = -1;
                    if (synpred1_MOWLParser()) {
                        s = 16;
                    } else if (synpred4_MOWLParser()) {
                        s = 18;
                    }
                    in.seek(index1_5);
                    if (s >= 0) {
                        return s;
                    }
                    break;
                case 5:
                    in.LA(1);
                    int index1_6 = in.index();
                    in.rewind();
                    s = -1;
                    if (synpred1_MOWLParser()) {
                        s = 16;
                    } else if (synpred4_MOWLParser()) {
                        s = 18;
                    }
                    in.seek(index1_6);
                    if (s >= 0) {
                        return s;
                    }
                    break;
                case 6:
                    in.LA(1);
                    int index1_7 = in.index();
                    in.rewind();
                    s = -1;
                    if (synpred1_MOWLParser()) {
                        s = 16;
                    } else if (synpred4_MOWLParser()) {
                        s = 18;
                    }
                    in.seek(index1_7);
                    if (s >= 0) {
                        return s;
                    }
                    break;
            }
            if (state.backtracking > 0) {
                state.failed = true;
                return -1;
            }
            NoViableAltException nvae = new NoViableAltException(getDescription(), 1, _s,
                    in);
            error(nvae);
            throw nvae;
        }
    }

    static final String DFA6_eotS = "\21\uffff";
    static final String DFA6_eofS = "\21\uffff";
    static final String DFA6_minS = "\1\5\7\0\11\uffff";
    static final String DFA6_maxS = "\1\55\7\0\11\uffff";
    static final String DFA6_acceptS = "\10\uffff\1\1\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\11";
    static final String DFA6_specialS = "\1\uffff\1\0\1\1\1\2\1\3\1\4\1\5\1\6\11\uffff}>";
    static final String[] DFA6_transitionS = {
            "\1\7\1\5\5\uffff\1\4\6\uffff\1\3\24\uffff\1\6\3\uffff\1\1\1" + "\2",
            "\1\uffff", "\1\uffff", "\1\uffff", "\1\uffff", "\1\uffff", "\1\uffff",
            "\1\uffff", "", "", "", "", "", "", "", "", "" };
    static final short[] DFA6_eot = DFA.unpackEncodedString(DFA6_eotS);
    static final short[] DFA6_eof = DFA.unpackEncodedString(DFA6_eofS);
    static final char[] DFA6_min = DFA.unpackEncodedStringToUnsignedChars(DFA6_minS);
    static final char[] DFA6_max = DFA.unpackEncodedStringToUnsignedChars(DFA6_maxS);
    static final short[] DFA6_accept = DFA.unpackEncodedString(DFA6_acceptS);
    static final short[] DFA6_special = DFA.unpackEncodedString(DFA6_specialS);
    static final short[][] DFA6_transition;
    static {
        int numStates = DFA6_transitionS.length;
        DFA6_transition = new short[numStates][];
        for (int i = 0; i < numStates; i++) {
            DFA6_transition[i] = DFA.unpackEncodedString(DFA6_transitionS[i]);
        }
    }

    class DFA6 extends DFA {
        public DFA6(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            decisionNumber = 6;
            eot = DFA6_eot;
            eof = DFA6_eof;
            min = DFA6_min;
            max = DFA6_max;
            accept = DFA6_accept;
            special = DFA6_special;
            transition = DFA6_transition;
        }

        @Override
        public String getDescription() {
            return "101:1: binaryAxiom options {backtrack=true; } : (lhs= expression SUBCLASS_OF superClass= expression -> ^( SUB_CLASS_AXIOM ^( EXPRESSION $lhs) ^( EXPRESSION $superClass) ) | lhs= expression EQUIVALENT_TO rhs= expression -> ^( EQUIVALENT_TO_AXIOM ^( EXPRESSION $lhs) ^( EXPRESSION $rhs) ) | lhs= expression DISJOINT_WITH disjoint= expression -> ^( DISJOINT_WITH_AXIOM ^( EXPRESSION $lhs) ^( EXPRESSION $disjoint) ) | lhs= expression SUB_PROPERTY_OF superProperty= propertyExpression -> ^( SUB_PROPERTY_AXIOM ^( EXPRESSION $lhs) ^( EXPRESSION $superProperty) ) | lhsID= atomic INVERSE_OF rhsAtomic= atomic -> ^( INVERSE_OF ^( EXPRESSION $lhsID) ^( EXPRESSION $rhsAtomic) ) | lhsID= atomic SAME_AS rhsID= atomic -> ^( SAME_AS_AXIOM ^( EXPRESSION $lhsID) ^( EXPRESSION $rhsID) ) | lhsID= atomic DIFFERENT_FROM rhsID= atomic -> ^( DIFFERENT_FROM_AXIOM ^( EXPRESSION $lhsID) ^( EXPRESSION $rhsID) ) | lhsID= atomic DOMAIN expression -> ^( DOMAIN ^( EXPRESSION $lhsID) ^( EXPRESSION expression ) ) | lhsID= atomic RANGE expression -> ^( RANGE ^( EXPRESSION $lhsID) ^( EXPRESSION expression ) ) );";
        }

        @Override
        public int specialStateTransition(int __s, IntStream _input)
                throws NoViableAltException {
            TokenStream in = (TokenStream) _input;
            int s = __s;
            int _s = s;
            switch (s) {
                case 0:
                    in.LA(1);
                    int index6_1 = in.index();
                    in.rewind();
                    s = -1;
                    if (synpred9_MOWLParser()) {
                        s = 8;
                    } else if (synpred10_MOWLParser()) {
                        s = 9;
                    } else if (synpred11_MOWLParser()) {
                        s = 10;
                    } else if (synpred12_MOWLParser()) {
                        s = 11;
                    } else if (synpred13_MOWLParser()) {
                        s = 12;
                    } else if (synpred14_MOWLParser()) {
                        s = 13;
                    } else if (synpred15_MOWLParser()) {
                        s = 14;
                    } else if (synpred16_MOWLParser()) {
                        s = 15;
                    } else {
                        s = 16;
                    }
                    in.seek(index6_1);
                    if (s >= 0) {
                        return s;
                    }
                    break;
                case 1:
                    in.LA(1);
                    int index6_2 = in.index();
                    in.rewind();
                    s = -1;
                    if (synpred9_MOWLParser()) {
                        s = 8;
                    } else if (synpred10_MOWLParser()) {
                        s = 9;
                    } else if (synpred11_MOWLParser()) {
                        s = 10;
                    } else if (synpred12_MOWLParser()) {
                        s = 11;
                    } else if (synpred13_MOWLParser()) {
                        s = 12;
                    } else if (synpred14_MOWLParser()) {
                        s = 13;
                    } else if (synpred15_MOWLParser()) {
                        s = 14;
                    } else if (synpred16_MOWLParser()) {
                        s = 15;
                    } else {
                        s = 16;
                    }
                    in.seek(index6_2);
                    if (s >= 0) {
                        return s;
                    }
                    break;
                case 2:
                    in.LA(1);
                    int index6_3 = in.index();
                    in.rewind();
                    s = -1;
                    if (synpred9_MOWLParser()) {
                        s = 8;
                    } else if (synpred10_MOWLParser()) {
                        s = 9;
                    } else if (synpred11_MOWLParser()) {
                        s = 10;
                    } else if (synpred12_MOWLParser()) {
                        s = 11;
                    }
                    in.seek(index6_3);
                    if (s >= 0) {
                        return s;
                    }
                    break;
                case 3:
                    in.LA(1);
                    int index6_4 = in.index();
                    in.rewind();
                    s = -1;
                    if (synpred9_MOWLParser()) {
                        s = 8;
                    } else if (synpred10_MOWLParser()) {
                        s = 9;
                    } else if (synpred11_MOWLParser()) {
                        s = 10;
                    } else if (synpred12_MOWLParser()) {
                        s = 11;
                    }
                    in.seek(index6_4);
                    if (s >= 0) {
                        return s;
                    }
                    break;
                case 4:
                    in.LA(1);
                    int index6_5 = in.index();
                    in.rewind();
                    s = -1;
                    if (synpred9_MOWLParser()) {
                        s = 8;
                    } else if (synpred10_MOWLParser()) {
                        s = 9;
                    } else if (synpred11_MOWLParser()) {
                        s = 10;
                    } else if (synpred12_MOWLParser()) {
                        s = 11;
                    }
                    in.seek(index6_5);
                    if (s >= 0) {
                        return s;
                    }
                    break;
                case 5:
                    in.LA(1);
                    int index6_6 = in.index();
                    in.rewind();
                    s = -1;
                    if (synpred9_MOWLParser()) {
                        s = 8;
                    } else if (synpred10_MOWLParser()) {
                        s = 9;
                    } else if (synpred11_MOWLParser()) {
                        s = 10;
                    } else if (synpred12_MOWLParser()) {
                        s = 11;
                    }
                    in.seek(index6_6);
                    if (s >= 0) {
                        return s;
                    }
                    break;
                case 6:
                    in.LA(1);
                    int index6_7 = in.index();
                    in.rewind();
                    s = -1;
                    if (synpred9_MOWLParser()) {
                        s = 8;
                    } else if (synpred10_MOWLParser()) {
                        s = 9;
                    } else if (synpred11_MOWLParser()) {
                        s = 10;
                    } else if (synpred12_MOWLParser()) {
                        s = 11;
                    }
                    in.seek(index6_7);
                    if (s >= 0) {
                        return s;
                    }
                    break;
            }
            if (state.backtracking > 0) {
                state.failed = true;
                return -1;
            }
            NoViableAltException nvae = new NoViableAltException(getDescription(), 6, _s,
                    in);
            error(nvae);
            throw nvae;
        }
    }

    static final String DFA13_eotS = "\14\uffff";
    static final String DFA13_eofS = "\14\uffff";
    static final String DFA13_minS = "\1\6\4\0\7\uffff";
    static final String DFA13_maxS = "\1\55\4\0\7\uffff";
    static final String DFA13_acceptS = "\5\uffff\1\4\1\6\1\1\1\5\1\7\1\2\1\3";
    static final String DFA13_specialS = "\1\uffff\1\0\1\1\1\2\1\3\7\uffff}>";
    static final String[] DFA13_transitionS = {
            "\1\5\5\uffff\1\4\6\uffff\1\3\24\uffff\1\6\3\uffff\1\1\1\2", "\1\uffff",
            "\1\uffff", "\1\uffff", "\1\uffff", "", "", "", "", "", "", "" };
    static final short[] DFA13_eot = DFA.unpackEncodedString(DFA13_eotS);
    static final short[] DFA13_eof = DFA.unpackEncodedString(DFA13_eofS);
    static final char[] DFA13_min = DFA.unpackEncodedStringToUnsignedChars(DFA13_minS);
    static final char[] DFA13_max = DFA.unpackEncodedStringToUnsignedChars(DFA13_maxS);
    static final short[] DFA13_accept = DFA.unpackEncodedString(DFA13_acceptS);
    static final short[] DFA13_special = DFA.unpackEncodedString(DFA13_specialS);
    static final short[][] DFA13_transition;
    static {
        int numStates = DFA13_transitionS.length;
        DFA13_transition = new short[numStates][];
        for (int i = 0; i < numStates; i++) {
            DFA13_transition[i] = DFA.unpackEncodedString(DFA13_transitionS[i]);
        }
    }

    class DFA13 extends DFA {
        public DFA13(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            decisionNumber = 13;
            eot = DFA13_eot;
            eof = DFA13_eof;
            min = DFA13_min;
            max = DFA13_max;
            accept = DFA13_accept;
            special = DFA13_special;
            transition = DFA13_transition;
        }

        @Override
        public String getDescription() {
            return "152:1: unary options {backtrack=true; } : (head= propertyExpression ( COMPOSITION rest+= propertyExpression )+ -> ^( PROPERTY_CHAIN $head $rest) | NOT OPEN_PARENTHESYS expression CLOSED_PARENTHESYS -> ^( NEGATED_EXPRESSION expression ) | NOT atomic -> ^( NEGATED_EXPRESSION atomic ) | qualifiedRestriction -> ^( qualifiedRestriction ) | dataRange | constant | atomic );";
        }

        @Override
        public int specialStateTransition(int __s, IntStream _input)
                throws NoViableAltException {
            TokenStream in = (TokenStream) _input;
            int s = __s;
            int _s = s;
            switch (s) {
                case 0:
                    in.LA(1);
                    int index13_1 = in.index();
                    in.rewind();
                    s = -1;
                    if (synpred19_MOWLParser()) {
                        s = 7;
                    } else if (synpred22_MOWLParser()) {
                        s = 5;
                    } else if (synpred23_MOWLParser()) {
                        s = 8;
                    } else {
                        s = 9;
                    }
                    in.seek(index13_1);
                    if (s >= 0) {
                        return s;
                    }
                    break;
                case 1:
                    in.LA(1);
                    int index13_2 = in.index();
                    in.rewind();
                    s = -1;
                    if (synpred19_MOWLParser()) {
                        s = 7;
                    } else if (synpred22_MOWLParser()) {
                        s = 5;
                    } else {
                        s = 9;
                    }
                    in.seek(index13_2);
                    if (s >= 0) {
                        return s;
                    }
                    break;
                case 2:
                    in.LA(1);
                    int index13_3 = in.index();
                    in.rewind();
                    s = -1;
                    if (synpred19_MOWLParser()) {
                        s = 7;
                    } else if (synpred22_MOWLParser()) {
                        s = 5;
                    }
                    in.seek(index13_3);
                    if (s >= 0) {
                        return s;
                    }
                    break;
                case 3:
                    in.LA(1);
                    int index13_4 = in.index();
                    in.rewind();
                    s = -1;
                    if (synpred20_MOWLParser()) {
                        s = 10;
                    } else if (synpred21_MOWLParser()) {
                        s = 11;
                    }
                    in.seek(index13_4);
                    if (s >= 0) {
                        return s;
                    }
                    break;
            }
            if (state.backtracking > 0) {
                state.failed = true;
                return -1;
            }
            NoViableAltException nvae = new NoViableAltException(getDescription(), 13,
                    _s, in);
            error(nvae);
            throw nvae;
        }
    }

    public static final BitSet FOLLOW_binaryAxiom_in_axiom232 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_unaryAxiom_in_axiom244 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_assertionAxiom_in_axiom256 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_hasKeyAxiom_in_axiom268 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_annotationAssertionAxiom_in_axiom279 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_iri_in_annotationAssertionAxiom311 = new BitSet(
            new long[] { 0x0000300000000000L });
    public static final BitSet FOLLOW_atomic_in_annotationAssertionAxiom316 = new BitSet(
            new long[] { 0x0000010000000000L });
    public static final BitSet FOLLOW_constant_in_annotationAssertionAxiom322 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_iri_in_annotationAssertionAxiom350 = new BitSet(
            new long[] { 0x0000300000000000L });
    public static final BitSet FOLLOW_atomic_in_annotationAssertionAxiom355 = new BitSet(
            new long[] { 0x0000300000000000L });
    public static final BitSet FOLLOW_atomic_in_annotationAssertionAxiom361 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_iri_in_annotationAssertionAxiom393 = new BitSet(
            new long[] { 0x0000300000000000L });
    public static final BitSet FOLLOW_atomic_in_annotationAssertionAxiom398 = new BitSet(
            new long[] { 0x0000000000000000L, 0x0000400000000000L });
    public static final BitSet FOLLOW_iri_in_annotationAssertionAxiom404 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_IRI_in_iri440 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_expression_in_hasKeyAxiom461 = new BitSet(
            new long[] { 0x0000000000000000L, 0x0000200000000000L });
    public static final BitSet FOLLOW_HAS_KEY_in_hasKeyAxiom463 = new BitSet(
            new long[] { 0x0000300000080000L });
    public static final BitSet FOLLOW_propertyExpression_in_hasKeyAxiom465 = new BitSet(
            new long[] { 0x0000002000000002L });
    public static final BitSet FOLLOW_COMMA_in_hasKeyAxiom468 = new BitSet(
            new long[] { 0x0000300000080000L });
    public static final BitSet FOLLOW_propertyExpression_in_hasKeyAxiom470 = new BitSet(
            new long[] { 0x0000002000000002L });
    public static final BitSet FOLLOW_atomic_in_assertionAxiom518 = new BitSet(
            new long[] { 0x000000C000000000L });
    public static final BitSet FOLLOW_INSTANCE_OF_in_assertionAxiom521 = new BitSet(
            new long[] { 0x0000310000081060L });
    public static final BitSet FOLLOW_TYPES_in_assertionAxiom525 = new BitSet(
            new long[] { 0x0000310000081060L });
    public static final BitSet FOLLOW_expression_in_assertionAxiom528 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_atomic_in_assertionAxiom559 = new BitSet(
            new long[] { 0x0000300000080000L });
    public static final BitSet FOLLOW_propertyExpression_in_assertionAxiom561 = new BitSet(
            new long[] { 0x0000310000000000L });
    public static final BitSet FOLLOW_value_in_assertionAxiom564 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_NOT_in_assertionAxiom598 = new BitSet(
            new long[] { 0x0000300000001000L });
    public static final BitSet FOLLOW_assertionAxiom_in_assertionAxiom600 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_expression_in_binaryAxiom639 = new BitSet(
            new long[] { 0x0000000000100000L });
    public static final BitSet FOLLOW_SUBCLASS_OF_in_binaryAxiom641 = new BitSet(
            new long[] { 0x0000310000081060L });
    public static final BitSet FOLLOW_expression_in_binaryAxiom648 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_expression_in_binaryAxiom686 = new BitSet(
            new long[] { 0x0000000000400000L });
    public static final BitSet FOLLOW_EQUIVALENT_TO_in_binaryAxiom688 = new BitSet(
            new long[] { 0x0000310000081060L });
    public static final BitSet FOLLOW_expression_in_binaryAxiom694 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_expression_in_binaryAxiom731 = new BitSet(
            new long[] { 0x0000000004000000L });
    public static final BitSet FOLLOW_DISJOINT_WITH_in_binaryAxiom733 = new BitSet(
            new long[] { 0x0000310000081060L });
    public static final BitSet FOLLOW_expression_in_binaryAxiom739 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_expression_in_binaryAxiom776 = new BitSet(
            new long[] { 0x0000000000200000L });
    public static final BitSet FOLLOW_SUB_PROPERTY_OF_in_binaryAxiom778 = new BitSet(
            new long[] { 0x0000300000080000L });
    public static final BitSet FOLLOW_propertyExpression_in_binaryAxiom784 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_atomic_in_binaryAxiom821 = new BitSet(
            new long[] { 0x0000000002000000L });
    public static final BitSet FOLLOW_INVERSE_OF_in_binaryAxiom823 = new BitSet(
            new long[] { 0x0000300000000000L });
    public static final BitSet FOLLOW_atomic_in_binaryAxiom829 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_atomic_in_binaryAxiom860 = new BitSet(
            new long[] { 0x0000000000800000L });
    public static final BitSet FOLLOW_SAME_AS_in_binaryAxiom862 = new BitSet(
            new long[] { 0x0000300000000000L });
    public static final BitSet FOLLOW_atomic_in_binaryAxiom869 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_atomic_in_binaryAxiom907 = new BitSet(
            new long[] { 0x0000000001000000L });
    public static final BitSet FOLLOW_DIFFERENT_FROM_in_binaryAxiom909 = new BitSet(
            new long[] { 0x0000300000000000L });
    public static final BitSet FOLLOW_atomic_in_binaryAxiom916 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_atomic_in_binaryAxiom953 = new BitSet(
            new long[] { 0x0000000008000000L });
    public static final BitSet FOLLOW_DOMAIN_in_binaryAxiom956 = new BitSet(
            new long[] { 0x0000310000081060L });
    public static final BitSet FOLLOW_expression_in_binaryAxiom958 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_atomic_in_binaryAxiom994 = new BitSet(
            new long[] { 0x0000000010000000L });
    public static final BitSet FOLLOW_RANGE_in_binaryAxiom996 = new BitSet(
            new long[] { 0x0000310000081060L });
    public static final BitSet FOLLOW_expression_in_binaryAxiom998 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_unaryCharacteristic_in_unaryAxiom1072 = new BitSet(
            new long[] { 0x0000310000081040L });
    public static final BitSet FOLLOW_unary_in_unaryAxiom1076 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_FUNCTIONAL_in_unaryCharacteristic1121 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_INVERSE_FUNCTIONAL_in_unaryCharacteristic1135 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_SYMMETRIC_in_unaryCharacteristic1149 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_ANTI_SYMMETRIC_in_unaryCharacteristic1163 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_REFLEXIVE_in_unaryCharacteristic1177 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_IRREFLEXIVE_in_unaryCharacteristic1191 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_TRANSITIVE_in_unaryCharacteristic1205 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_conjunction_in_expression1247 = new BitSet(
            new long[] { 0x0000000000000802L });
    public static final BitSet FOLLOW_OR_in_expression1250 = new BitSet(
            new long[] { 0x0000310000081040L });
    public static final BitSet FOLLOW_conjunction_in_expression1252 = new BitSet(
            new long[] { 0x0000000000000802L });
    public static final BitSet FOLLOW_complexPropertyExpression_in_expression1271 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_OPEN_PARENTHESYS_in_expression1284 = new BitSet(
            new long[] { 0x0000310000081060L });
    public static final BitSet FOLLOW_expression_in_expression1286 = new BitSet(
            new long[] { 0x0000000000000100L });
    public static final BitSet FOLLOW_CLOSED_PARENTHESYS_in_expression1288 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_unary_in_conjunction1321 = new BitSet(
            new long[] { 0x0000000000000402L });
    public static final BitSet FOLLOW_AND_in_conjunction1324 = new BitSet(
            new long[] { 0x0000310000081040L });
    public static final BitSet FOLLOW_unary_in_conjunction1326 = new BitSet(
            new long[] { 0x0000000000000402L });
    public static final BitSet FOLLOW_INVERSE_in_complexPropertyExpression1347 = new BitSet(
            new long[] { 0x0000000000000020L });
    public static final BitSet FOLLOW_OPEN_PARENTHESYS_in_complexPropertyExpression1349 = new BitSet(
            new long[] { 0x0000300000080000L });
    public static final BitSet FOLLOW_complexPropertyExpression_in_complexPropertyExpression1351 = new BitSet(
            new long[] { 0x0000000000000100L });
    public static final BitSet FOLLOW_CLOSED_PARENTHESYS_in_complexPropertyExpression1353 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_INVERSE_in_complexPropertyExpression1366 = new BitSet(
            new long[] { 0x0000000000000020L });
    public static final BitSet FOLLOW_OPEN_PARENTHESYS_in_complexPropertyExpression1368 = new BitSet(
            new long[] { 0x0000300000000000L });
    public static final BitSet FOLLOW_atomic_in_complexPropertyExpression1370 = new BitSet(
            new long[] { 0x0000000000000100L });
    public static final BitSet FOLLOW_CLOSED_PARENTHESYS_in_complexPropertyExpression1372 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_propertyExpression_in_unary1409 = new BitSet(
            new long[] { 0x0000000000000010L });
    public static final BitSet FOLLOW_COMPOSITION_in_unary1412 = new BitSet(
            new long[] { 0x0000300000080000L });
    public static final BitSet FOLLOW_propertyExpression_in_unary1416 = new BitSet(
            new long[] { 0x0000000000000012L });
    public static final BitSet FOLLOW_NOT_in_unary1438 = new BitSet(
            new long[] { 0x0000000000000020L });
    public static final BitSet FOLLOW_OPEN_PARENTHESYS_in_unary1440 = new BitSet(
            new long[] { 0x0000310000081060L });
    public static final BitSet FOLLOW_expression_in_unary1442 = new BitSet(
            new long[] { 0x0000000000000100L });
    public static final BitSet FOLLOW_CLOSED_PARENTHESYS_in_unary1444 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_NOT_in_unary1458 = new BitSet(
            new long[] { 0x0000300000000000L });
    public static final BitSet FOLLOW_atomic_in_unary1460 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_qualifiedRestriction_in_unary1483 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_dataRange_in_unary1495 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_constant_in_unary1501 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_atomic_in_unary1507 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_IDENTIFIER_in_dataRange1524 = new BitSet(
            new long[] { 0x0000000000000000L, 0x0000000000000000L, 0x0000000000000000L,
                    0x0000000000000000L, 0x0000000000000000L, 0x0000000000000000L,
                    0x0000000000000000L, 0x0000000000000000L, 0x0000000000000000L,
                    0x0000000000000000L, 0x0000000000400000L });
    public static final BitSet FOLLOW_OPEN_SQUARE_BRACKET_in_dataRange1526 = new BitSet(
            new long[] { 0x0000000000000000L, 0x0000000000000000L, 0x0000000000000000L,
                    0x0000000000000000L, 0x0000000000000000L, 0x0000000000000000L,
                    0x0000000000000000L, 0x0000000000000000L, 0x0000000000000000L,
                    0x0000000000000000L, 0x000000001E000000L });
    public static final BitSet FOLLOW_dataRangeFacet_in_dataRange1528 = new BitSet(
            new long[] { 0x0000002000000000L, 0x0000000000000000L, 0x0000000000000000L,
                    0x0000000000000000L, 0x0000000000000000L, 0x0000000000000000L,
                    0x0000000000000000L, 0x0000000000000000L, 0x0000000000000000L,
                    0x0000000000000000L, 0x0000000000800000L });
    public static final BitSet FOLLOW_COMMA_in_dataRange1531 = new BitSet(new long[] {
            0x0000000000000000L, 0x0000000000000000L, 0x0000000000000000L,
            0x0000000000000000L, 0x0000000000000000L, 0x0000000000000000L,
            0x0000000000000000L, 0x0000000000000000L, 0x0000000000000000L,
            0x0000000000000000L, 0x000000001E000000L });
    public static final BitSet FOLLOW_dataRangeFacet_in_dataRange1533 = new BitSet(
            new long[] { 0x0000002000000000L, 0x0000000000000000L, 0x0000000000000000L,
                    0x0000000000000000L, 0x0000000000000000L, 0x0000000000000000L,
                    0x0000000000000000L, 0x0000000000000000L, 0x0000000000000000L,
                    0x0000000000000000L, 0x0000000000800000L });
    public static final BitSet FOLLOW_CLOSED_SQUARE_BRACKET_in_dataRange1537 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_LESS_THAN_in_dataRangeFacet1563 = new BitSet(
            new long[] { 0x0000010000000000L });
    public static final BitSet FOLLOW_constant_in_dataRangeFacet1565 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_LESS_THAN_EQUAL_in_dataRangeFacet1579 = new BitSet(
            new long[] { 0x0000010000000000L });
    public static final BitSet FOLLOW_constant_in_dataRangeFacet1581 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_GREATER_THAN_in_dataRangeFacet1596 = new BitSet(
            new long[] { 0x0000010000000000L });
    public static final BitSet FOLLOW_constant_in_dataRangeFacet1598 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_GREATER_THAN_EQUAL_in_dataRangeFacet1612 = new BitSet(
            new long[] { 0x0000010000000000L });
    public static final BitSet FOLLOW_constant_in_dataRangeFacet1614 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_IDENTIFIER_in_atomic1635 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_ENTITY_REFERENCE_in_atomic1642 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_propertyExpression_in_qualifiedRestriction1694 = new BitSet(
            new long[] { 0x0000000000002000L });
    public static final BitSet FOLLOW_SOME_in_qualifiedRestriction1697 = new BitSet(
            new long[] { 0x0000310000081060L });
    public static final BitSet FOLLOW_expression_in_qualifiedRestriction1701 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_propertyExpression_in_qualifiedRestriction1730 = new BitSet(
            new long[] { 0x0000000000004000L });
    public static final BitSet FOLLOW_ONLY_in_qualifiedRestriction1732 = new BitSet(
            new long[] { 0x0000310000081060L });
    public static final BitSet FOLLOW_expression_in_qualifiedRestriction1735 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_cardinalityRestriction_in_qualifiedRestriction1754 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_oneOf_in_qualifiedRestriction1768 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_valueRestriction_in_qualifiedRestriction1782 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_atomic_in_propertyExpression1814 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_complexPropertyExpression_in_propertyExpression1828 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_propertyExpression_in_cardinalityRestriction1870 = new BitSet(
            new long[] { 0x0000000000038000L });
    public static final BitSet FOLLOW_restrictionKind_in_cardinalityRestriction1873 = new BitSet(
            new long[] { 0x0000040000000000L });
    public static final BitSet FOLLOW_INTEGER_in_cardinalityRestriction1875 = new BitSet(
            new long[] { 0x0000310000081042L });
    public static final BitSet FOLLOW_unary_in_cardinalityRestriction1877 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_MIN_in_restrictionKind1910 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_MAX_in_restrictionKind1924 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_EXACTLY_in_restrictionKind1938 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_OPEN_CURLY_BRACES_in_oneOf1960 = new BitSet(
            new long[] { 0x0000100000000000L });
    public static final BitSet FOLLOW_IDENTIFIER_in_oneOf1962 = new BitSet(
            new long[] { 0x0000002000000080L });
    public static final BitSet FOLLOW_COMMA_in_oneOf1965 = new BitSet(
            new long[] { 0x0000100000000000L });
    public static final BitSet FOLLOW_IDENTIFIER_in_oneOf1967 = new BitSet(
            new long[] { 0x0000002000000080L });
    public static final BitSet FOLLOW_CLOSED_CURLY_BRACES_in_oneOf1971 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_propertyExpression_in_valueRestriction1991 = new BitSet(
            new long[] { 0x0000000000040000L });
    public static final BitSet FOLLOW_VALUE_in_valueRestriction1993 = new BitSet(
            new long[] { 0x0000310000000000L });
    public static final BitSet FOLLOW_value_in_valueRestriction1995 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_atomic_in_value2020 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_constant_in_value2035 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_DBLQUOTE_in_constant2060 = new BitSet(new long[] {
            0x0000001000000002L, 0x0000000000000000L, 0x0000000000000000L,
            0x0000000000000000L, 0x0000000000000000L, 0x0000000000000000L,
            0x0000000000000000L, 0x0000000000000000L, 0x0000000000000000L,
            0x0020000000000000L });
    public static final BitSet FOLLOW_AT_in_constant2063 = new BitSet(
            new long[] { 0x0000100000000000L });
    public static final BitSet FOLLOW_IDENTIFIER_in_constant2069 = new BitSet(
            new long[] { 0x0000001000000002L });
    public static final BitSet FOLLOW_POW_in_constant2075 = new BitSet(
            new long[] { 0x0000100000000000L });
    public static final BitSet FOLLOW_IDENTIFIER_in_constant2081 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_binaryAxiom_in_synpred1_MOWLParser232 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_assertionAxiom_in_synpred3_MOWLParser256 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_hasKeyAxiom_in_synpred4_MOWLParser268 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_expression_in_synpred9_MOWLParser639 = new BitSet(
            new long[] { 0x0000000000100000L });
    public static final BitSet FOLLOW_SUBCLASS_OF_in_synpred9_MOWLParser641 = new BitSet(
            new long[] { 0x0000310000081060L });
    public static final BitSet FOLLOW_expression_in_synpred9_MOWLParser648 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_expression_in_synpred10_MOWLParser686 = new BitSet(
            new long[] { 0x0000000000400000L });
    public static final BitSet FOLLOW_EQUIVALENT_TO_in_synpred10_MOWLParser688 = new BitSet(
            new long[] { 0x0000310000081060L });
    public static final BitSet FOLLOW_expression_in_synpred10_MOWLParser694 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_expression_in_synpred11_MOWLParser731 = new BitSet(
            new long[] { 0x0000000004000000L });
    public static final BitSet FOLLOW_DISJOINT_WITH_in_synpred11_MOWLParser733 = new BitSet(
            new long[] { 0x0000310000081060L });
    public static final BitSet FOLLOW_expression_in_synpred11_MOWLParser739 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_expression_in_synpred12_MOWLParser776 = new BitSet(
            new long[] { 0x0000000000200000L });
    public static final BitSet FOLLOW_SUB_PROPERTY_OF_in_synpred12_MOWLParser778 = new BitSet(
            new long[] { 0x0000300000080000L });
    public static final BitSet FOLLOW_propertyExpression_in_synpred12_MOWLParser784 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_atomic_in_synpred13_MOWLParser821 = new BitSet(
            new long[] { 0x0000000002000000L });
    public static final BitSet FOLLOW_INVERSE_OF_in_synpred13_MOWLParser823 = new BitSet(
            new long[] { 0x0000300000000000L });
    public static final BitSet FOLLOW_atomic_in_synpred13_MOWLParser829 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_atomic_in_synpred14_MOWLParser860 = new BitSet(
            new long[] { 0x0000000000800000L });
    public static final BitSet FOLLOW_SAME_AS_in_synpred14_MOWLParser862 = new BitSet(
            new long[] { 0x0000300000000000L });
    public static final BitSet FOLLOW_atomic_in_synpred14_MOWLParser869 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_atomic_in_synpred15_MOWLParser907 = new BitSet(
            new long[] { 0x0000000001000000L });
    public static final BitSet FOLLOW_DIFFERENT_FROM_in_synpred15_MOWLParser909 = new BitSet(
            new long[] { 0x0000300000000000L });
    public static final BitSet FOLLOW_atomic_in_synpred15_MOWLParser916 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_atomic_in_synpred16_MOWLParser953 = new BitSet(
            new long[] { 0x0000000008000000L });
    public static final BitSet FOLLOW_DOMAIN_in_synpred16_MOWLParser956 = new BitSet(
            new long[] { 0x0000310000081060L });
    public static final BitSet FOLLOW_expression_in_synpred16_MOWLParser958 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_conjunction_in_synpred17_MOWLParser1247 = new BitSet(
            new long[] { 0x0000000000000802L });
    public static final BitSet FOLLOW_OR_in_synpred17_MOWLParser1250 = new BitSet(
            new long[] { 0x0000310000081040L });
    public static final BitSet FOLLOW_conjunction_in_synpred17_MOWLParser1252 = new BitSet(
            new long[] { 0x0000000000000802L });
    public static final BitSet FOLLOW_complexPropertyExpression_in_synpred18_MOWLParser1271 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_propertyExpression_in_synpred19_MOWLParser1409 = new BitSet(
            new long[] { 0x0000000000000010L });
    public static final BitSet FOLLOW_COMPOSITION_in_synpred19_MOWLParser1412 = new BitSet(
            new long[] { 0x0000300000080000L });
    public static final BitSet FOLLOW_propertyExpression_in_synpred19_MOWLParser1416 = new BitSet(
            new long[] { 0x0000000000000012L });
    public static final BitSet FOLLOW_NOT_in_synpred20_MOWLParser1438 = new BitSet(
            new long[] { 0x0000000000000020L });
    public static final BitSet FOLLOW_OPEN_PARENTHESYS_in_synpred20_MOWLParser1440 = new BitSet(
            new long[] { 0x0000310000081060L });
    public static final BitSet FOLLOW_expression_in_synpred20_MOWLParser1442 = new BitSet(
            new long[] { 0x0000000000000100L });
    public static final BitSet FOLLOW_CLOSED_PARENTHESYS_in_synpred20_MOWLParser1444 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_NOT_in_synpred21_MOWLParser1458 = new BitSet(
            new long[] { 0x0000300000000000L });
    public static final BitSet FOLLOW_atomic_in_synpred21_MOWLParser1460 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_qualifiedRestriction_in_synpred22_MOWLParser1483 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_dataRange_in_synpred23_MOWLParser1495 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_propertyExpression_in_synpred25_MOWLParser1694 = new BitSet(
            new long[] { 0x0000000000002000L });
    public static final BitSet FOLLOW_SOME_in_synpred25_MOWLParser1697 = new BitSet(
            new long[] { 0x0000310000081060L });
    public static final BitSet FOLLOW_expression_in_synpred25_MOWLParser1701 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_propertyExpression_in_synpred26_MOWLParser1730 = new BitSet(
            new long[] { 0x0000000000004000L });
    public static final BitSet FOLLOW_ONLY_in_synpred26_MOWLParser1732 = new BitSet(
            new long[] { 0x0000310000081060L });
    public static final BitSet FOLLOW_expression_in_synpred26_MOWLParser1735 = new BitSet(
            new long[] { 0x0000000000000002L });
    public static final BitSet FOLLOW_cardinalityRestriction_in_synpred27_MOWLParser1754 = new BitSet(
            new long[] { 0x0000000000000002L });
}