final public Path PathAlternative() throws ParseException { Path p1 , p2 ; p1 = PathSequence(); label_26: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VBAR: ; break; default: jj_la1[102] = jj_gen; break label_26; } jj_consume_token(VBAR); p2 = PathSequence(); p1 = PathFactory.pathAlt(p1, p2) ; } {if (true) return p1 ;} throw new Error("Missing return statement in function"); }
case QMARK: jj_consume_token(QMARK); {if (true) return PathFactory.pathZeroOrOne(p) ;} break; case STAR: jj_consume_token(STAR); {if (true) return PathFactory.pathZeroOrMore1(p) ;} break; case PLUS: jj_consume_token(PLUS); {if (true) return PathFactory.pathOneOrMore1(p) ;} break; case LBRACE: jj_consume_token(STAR); jj_consume_token(RBRACE); {if (true) return PathFactory.pathZeroOrMoreN(p) ;} break; case PLUS: jj_consume_token(PLUS); jj_consume_token(RBRACE); {if (true) return PathFactory.pathOneOrMoreN(p) ;} break; case INTEGER: case RBRACE: jj_consume_token(RBRACE); {if (true) return PathFactory.pathMod(p, i1, PathFactory.UNSET) ;} break;
final public Path PathSequence() throws ParseException { Path p1 , p2 ; p1 = PathEltOrInverse(); label_25: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SLASH: ; break; default: jj_la1[99] = jj_gen; break label_25; } jj_consume_token(SLASH); p2 = PathEltOrInverse(); p1 = PathFactory.pathSeq(p1, p2) ; } {if (true) return p1;} throw new Error("Missing return statement in function"); }
final public Path PathMod(Path p) throws ParseException { long i1 ; long i2 ; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case QMARK: jj_consume_token(QMARK); {if (true) return PathFactory.pathZeroOrOne(p) ;} break; case STAR: jj_consume_token(STAR); {if (true) return PathFactory.pathZeroOrMore1(p) ;} break; case PLUS: jj_consume_token(PLUS); {if (true) return PathFactory.pathOneOrMore1(p) ;} break; default: jj_la1[106] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); }
case STAR: jj_consume_token(STAR); {if (true) return PathFactory.pathZeroOrMore(p) ;} break; case QMARK: jj_consume_token(QMARK); {if (true) return PathFactory.pathZeroOrOne(p) ;} break; case PLUS: jj_consume_token(PLUS); {if (true) return PathFactory.pathOneOrMore(p) ;} break; case LBRACE: case RBRACE: jj_consume_token(RBRACE); {if (true) return PathFactory.pathMod(p, i1, PathFactory.UNSET) ;} break; case INTEGER: {if (true) return PathFactory.pathMod(p, i1, i2) ;} break; default: case RBRACE: jj_consume_token(RBRACE); {if (true) return PathFactory.pathFixedLength(p, i1) ;} break; default:
case PNAME_LN: str = iri(); n = createNode(str) ; p = PathFactory.pathLink(n) ; break; case KW_A: jj_consume_token(KW_A); p = PathFactory.pathLink(nRDFtype) ; break; case BANG: jj_consume_token(LPAREN); p = Path(); p = PathFactory.pathDistinct(p) ; jj_consume_token(RPAREN); break; jj_consume_token(LPAREN); p = Path(); p = PathFactory.pathShortest(p) ; jj_consume_token(RPAREN); break; jj_consume_token(LPAREN); p = Path(); p = PathFactory.pathMulti(p) ; jj_consume_token(RPAREN); break;
Path p1 = PathFactory.pathFixedLength(pMod.getSubPath(), pMod.getMin()) ; Path p2 ; p2 = PathFactory.pathZeroOrMore(pMod.getSubPath()) ; else p2 = PathFactory.pathMod(pMod.getSubPath(),0, len2) ;
Path p1 = PathFactory.pathFixedLength(pMod.getSubPath(), pMod.getMin()) ; Path p2 ; p2 = PathFactory.pathZeroOrMoreN(pMod.getSubPath()) ; else p2 = PathFactory.pathMod(pMod.getSubPath(),0, len2) ;
final public Path PathEltOrInverse() throws ParseException { String str ; Node n ; Path p ; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: case KW_A: case DISTINCT: case MULTI: case SHORTEST: case LPAREN: case BANG: p = PathElt(); break; case CARAT: jj_consume_token(CARAT); p = PathElt(); p = PathFactory.pathInverse(p) ; break; default: jj_la1[106] = jj_gen; jj_consume_token(-1); throw new ParseException(); } {if (true) return p ;} throw new Error("Missing return statement in function"); }
final public Path PathPrimary() throws ParseException { String str ; Path p ; Node n ; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: str = iri(); n = createNode(str) ; p = PathFactory.pathLink(n) ; break; case KW_A: jj_consume_token(KW_A); p = PathFactory.pathLink(nRDFtype) ; break; case BANG: jj_consume_token(BANG); p = PathNegatedPropertySet(); break; case LPAREN: jj_consume_token(LPAREN); p = Path(); jj_consume_token(RPAREN); break; default: jj_la1[107] = jj_gen; jj_consume_token(-1); throw new ParseException(); } {if (true) return p ;} throw new Error("Missing return statement in function"); }
@Override public void visit(P_Mod pathMod) { if ( pathMod.getMin() > pathMod.getMax() ) throw new ARQException("Bad path: "+pathMod) ; Op op = null ; for ( long i = pathMod.getMin() ; i <= pathMod.getMax() ; i++ ) { Path p = PathFactory.pathFixedLength(pathMod.getSubPath(), i) ; Op sub = transformPath(null, subject, p, object) ; op = union(op, sub) ; } result = op ; }
case STAR: jj_consume_token(STAR); {if (true) return PathFactory.pathZeroOrMore(p) ;} break; case QMARK: jj_consume_token(QMARK); {if (true) return PathFactory.pathZeroOrOne(p) ;} break; case PLUS: jj_consume_token(PLUS); {if (true) return PathFactory.pathOneOrMore(p) ;} break; case LBRACE: case RBRACE: jj_consume_token(RBRACE); {if (true) return PathFactory.pathMod(p, i1, PathFactory.UNSET) ;} break; case INTEGER: {if (true) return PathFactory.pathMod(p, i1, i2) ;} break; default: case RBRACE: jj_consume_token(RBRACE); {if (true) return PathFactory.pathFixedLength(p, i1) ;} break; default:
final public Path PathEltOrInverse() throws ParseException { String str ; Node n ; Path p ; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: case KW_A: case LPAREN: case BANG: p = PathElt(); break; case CARAT: jj_consume_token(CARAT); p = PathElt(); p = PathFactory.pathInverse(p) ; break; default: jj_la1[114] = jj_gen; jj_consume_token(-1); throw new ParseException(); } {if (true) return p ;} throw new Error("Missing return statement in function"); }
final public Path PathPrimary() throws ParseException { String str ; Path p ; Node n ; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: str = IRIref(); n = createNode(str) ; p = PathFactory.pathLink(n) ; break; case KW_A: jj_consume_token(KW_A); p = PathFactory.pathLink(nRDFtype) ; break; case BANG: jj_consume_token(BANG); p = PathNegatedPropertySet(); break; case LPAREN: jj_consume_token(LPAREN); p = Path(); jj_consume_token(RPAREN); break; default: jj_la1[119] = jj_gen; jj_consume_token(-1); throw new ParseException(); } {if (true) return p ;} throw new Error("Missing return statement in function"); }
final public Path PathAlternative() throws ParseException { Path p1 , p2 ; p1 = PathSequence(); label_28: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VBAR: ; break; default: jj_la1[110] = jj_gen; break label_28; } jj_consume_token(VBAR); p2 = PathSequence(); p1 = PathFactory.pathAlt(p1, p2) ; } {if (true) return p1 ;} throw new Error("Missing return statement in function"); }
final public Path PathSequence() throws ParseException { Path p1 , p2 ; p1 = PathEltOrInverse(); label_27: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SLASH: ; break; default: jj_la1[103] = jj_gen; break label_27; } jj_consume_token(SLASH); p2 = PathEltOrInverse(); p1 = PathFactory.pathSeq(p1, p2) ; } {if (true) return p1;} throw new Error("Missing return statement in function"); }
final public Path PathEltOrInverse() throws ParseException { String str ; Node n ; Path p ; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: case KW_A: case LPAREN: case BANG: p = PathElt(); break; case CARAT: jj_consume_token(CARAT); p = PathElt(); p = PathFactory.pathInverse(p) ; break; default: jj_la1[101] = jj_gen; jj_consume_token(-1); throw new ParseException(); } {if (true) return p ;} throw new Error("Missing return statement in function"); }
final public Path PathPrimary() throws ParseException { String str ; Path p ; Node n ; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: str = IRIref(); n = createNode(str) ; p = PathFactory.pathLink(n) ; break; case KW_A: jj_consume_token(KW_A); p = PathFactory.pathLink(nRDFtype) ; break; case BANG: jj_consume_token(BANG); p = PathNegatedPropertySet(); break; case LPAREN: jj_consume_token(LPAREN); p = Path(); jj_consume_token(RPAREN); break; default: jj_la1[106] = jj_gen; jj_consume_token(-1); throw new ParseException(); } {if (true) return p ;} throw new Error("Missing return statement in function"); }
final public Path PathAlternative() throws ParseException { Path p1 , p2 ; p1 = PathSequence(); label_24: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VBAR: ; break; default: jj_la1[98] = jj_gen; break label_24; } jj_consume_token(VBAR); p2 = PathSequence(); p1 = PathFactory.pathAlt(p1, p2) ; } {if (true) return p1 ;} throw new Error("Missing return statement in function"); }