/* Generated By:JJTree&JavaCC: Do not edit this line. SyntaxTreeBuilder.java */ package org.openrdf.query.parser.sparql.ast; import java.io.StringReader; import org.openrdf.model.URI; import org.openrdf.model.vocabulary.RDF; import org.openrdf.model.vocabulary.XMLSchema; import org.openrdf.query.algebra.Compare.CompareOp; import org.openrdf.query.algebra.MathExpr.MathOp; public class SyntaxTreeBuilder/*@bgen(jjtree)*/implements SyntaxTreeBuilderTreeConstants, SyntaxTreeBuilderConstants {/*@bgen(jjtree)*/ protected JJTSyntaxTreeBuilderState jjtree = new JJTSyntaxTreeBuilderState(); /** * Parses the supplied SPARQL query and builds a syntax tree from it. * * @param query A SPARQL query string. * @return The root of the syntax tree. * @throws TokenMgrError If the query was syntactically incorrect. * @throws ParseException If the query was syntactically incorrect. */ public static ASTQueryContainer parseQuery(String query) throws TokenMgrError, ParseException { SyntaxTreeBuilder stb = new SyntaxTreeBuilder( new StringReader(query) ); return stb.QueryContainer(); } /** * Trims <tt>n</tt> character from the start and end of the supplied string. */ private static String _trimString(String s, int n) { if (s.length() >= 2) { s = s.substring(n, s.length() - n); } return s; } // // grammar // final public ASTQueryContainer QueryContainer() throws ParseException { /*@bgen(jjtree) QueryContainer */ ASTQueryContainer jjtn000 = new ASTQueryContainer(JJTQUERYCONTAINER); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { Prolog(); Query(); jj_consume_token(0); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; {if (true) return jjtn000;} } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } throw new Error("Missing return statement in function"); } final public void Prolog() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BASE: BaseDecl(); break; default: jj_la1[0] = jj_gen; ; } label_1: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PREFIX: ; break; default: jj_la1[1] = jj_gen; break label_1; } PrefixDecl(); } } final public void BaseDecl() throws ParseException { /*@bgen(jjtree) BaseDecl */ ASTBaseDecl jjtn000 = new ASTBaseDecl(JJTBASEDECL); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);Token t; try { jj_consume_token(BASE); t = jj_consume_token(Q_IRI_REF); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setIRI(_trimString(t.image, 1)); } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void PrefixDecl() throws ParseException { /*@bgen(jjtree) PrefixDecl */ ASTPrefixDecl jjtn000 = new ASTPrefixDecl(JJTPREFIXDECL); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);Token prefix; try { jj_consume_token(PREFIX); prefix = jj_consume_token(PNAME_NS); IRI(); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; // Remove trailing colon from prefix String prefixStr = prefix.image; prefixStr = prefixStr.substring(0, prefixStr.length() - 1); jjtn000.setPrefix(prefixStr); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void Query() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SELECT: SelectQuery(); break; case CONSTRUCT: ConstructQuery(); break; case DESCRIBE: DescribeQuery(); break; case ASK: AskQuery(); break; default: jj_la1[2] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void SelectQuery() throws ParseException { /*@bgen(jjtree) SelectQuery */ ASTSelectQuery jjtn000 = new ASTSelectQuery(JJTSELECTQUERY); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { Select(); label_2: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FROM: ; break; default: jj_la1[3] = jj_gen; break label_2; } DatasetClause(); } WhereClause(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ORDER: OrderClause(); break; default: jj_la1[4] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LIMIT: case OFFSET: LimitOffsetClauses(); break; default: jj_la1[5] = jj_gen; ; } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void Select() throws ParseException { /*@bgen(jjtree) Select */ ASTSelect jjtn000 = new ASTSelect(JJTSELECT); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(SELECT); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DISTINCT: case REDUCED: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DISTINCT: jj_consume_token(DISTINCT); jjtn000.setDistinct(true); break; case REDUCED: jj_consume_token(REDUCED); jjtn000.setReduced(true); break; default: jj_la1[6] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: jj_la1[7] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STAR: jj_consume_token(STAR); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setWildcard(true); break; case VAR1: case VAR2: label_3: while (true) { Var(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VAR1: case VAR2: ; break; default: jj_la1[8] = jj_gen; break label_3; } } break; default: jj_la1[9] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void ConstructQuery() throws ParseException { /*@bgen(jjtree) ConstructQuery */ ASTConstructQuery jjtn000 = new ASTConstructQuery(JJTCONSTRUCTQUERY); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { Construct(); label_4: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FROM: ; break; default: jj_la1[10] = jj_gen; break label_4; } DatasetClause(); } WhereClause(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ORDER: OrderClause(); break; default: jj_la1[11] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LIMIT: case OFFSET: LimitOffsetClauses(); break; default: jj_la1[12] = jj_gen; ; } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void Construct() throws ParseException { /*@bgen(jjtree) Construct */ ASTConstruct jjtn000 = new ASTConstruct(JJTCONSTRUCT); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(CONSTRUCT); jj_consume_token(LBRACE); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: case LBRACK: case NIL: case ANON: case TRUE: case FALSE: case Q_IRI_REF: case PNAME_NS: case PNAME_LN: case BLANK_NODE_LABEL: case VAR1: case VAR2: case INTEGER: case INTEGER_POSITIVE: case INTEGER_NEGATIVE: case DECIMAL: case DECIMAL_POSITIVE: case DECIMAL_NEGATIVE: case DOUBLE: case DOUBLE_POSITIVE: case DOUBLE_NEGATIVE: case STRING_LITERAL1: case STRING_LITERAL2: case STRING_LITERAL_LONG1: case STRING_LITERAL_LONG2: TriplesBlock(); break; default: jj_la1[13] = jj_gen; ; } jj_consume_token(RBRACE); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void DescribeQuery() throws ParseException { /*@bgen(jjtree) DescribeQuery */ ASTDescribeQuery jjtn000 = new ASTDescribeQuery(JJTDESCRIBEQUERY); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { Describe(); label_5: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FROM: ; break; default: jj_la1[14] = jj_gen; break label_5; } DatasetClause(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: case WHERE: WhereClause(); break; default: jj_la1[15] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ORDER: OrderClause(); break; default: jj_la1[16] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LIMIT: case OFFSET: LimitOffsetClauses(); break; default: jj_la1[17] = jj_gen; ; } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void Describe() throws ParseException { /*@bgen(jjtree) Describe */ ASTDescribe jjtn000 = new ASTDescribe(JJTDESCRIBE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(DESCRIBE); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STAR: jj_consume_token(STAR); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setWildcard(true); break; case Q_IRI_REF: case PNAME_NS: case PNAME_LN: case VAR1: case VAR2: label_6: while (true) { VarOrIRIref(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case Q_IRI_REF: case PNAME_NS: case PNAME_LN: case VAR1: case VAR2: ; break; default: jj_la1[18] = jj_gen; break label_6; } } break; default: jj_la1[19] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void AskQuery() throws ParseException { /*@bgen(jjtree) AskQuery */ ASTAskQuery jjtn000 = new ASTAskQuery(JJTASKQUERY); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(ASK); label_7: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FROM: ; break; default: jj_la1[20] = jj_gen; break label_7; } DatasetClause(); } WhereClause(); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void DatasetClause() throws ParseException { /*@bgen(jjtree) DatasetClause */ ASTDatasetClause jjtn000 = new ASTDatasetClause(JJTDATASETCLAUSE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(FROM); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case NAMED: jj_consume_token(NAMED); jjtn000.setNamed(true); break; default: jj_la1[21] = jj_gen; ; } IRIref(); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void WhereClause() throws ParseException { /*@bgen(jjtree) WhereClause */ ASTWhereClause jjtn000 = new ASTWhereClause(JJTWHERECLAUSE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WHERE: jj_consume_token(WHERE); break; default: jj_la1[22] = jj_gen; ; } GroupGraphPattern(); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void OrderClause() throws ParseException { /*@bgen(jjtree) OrderClause */ ASTOrderClause jjtn000 = new ASTOrderClause(JJTORDERCLAUSE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(ORDER); jj_consume_token(BY); label_8: while (true) { OrderCondition(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: case ASC: case DESC: case STR: case LANG: case LANGMATCHES: case DATATYPE: case BOUND: case SAMETERM: case IS_IRI: case IS_BLANK: case IS_LITERAL: case REGEX: case Q_IRI_REF: case PNAME_NS: case PNAME_LN: case VAR1: case VAR2: ; break; default: jj_la1[23] = jj_gen; break label_8; } } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void OrderCondition() throws ParseException { /*@bgen(jjtree) OrderCondition */ ASTOrderCondition jjtn000 = new ASTOrderCondition(JJTORDERCONDITION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: case ASC: case DESC: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASC: case DESC: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASC: jj_consume_token(ASC); break; case DESC: jj_consume_token(DESC); jjtn000.setAscending(false); break; default: jj_la1[24] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: jj_la1[25] = jj_gen; ; } BrackettedExpression(); break; case Q_IRI_REF: case PNAME_NS: case PNAME_LN: FunctionCall(); break; case STR: case LANG: case LANGMATCHES: case DATATYPE: case BOUND: case SAMETERM: case IS_IRI: case IS_BLANK: case IS_LITERAL: case REGEX: BuiltInCall(); break; case VAR1: case VAR2: Var(); break; default: jj_la1[26] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void LimitOffsetClauses() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LIMIT: Limit(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OFFSET: Offset(); break; default: jj_la1[27] = jj_gen; ; } break; case OFFSET: Offset(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LIMIT: Limit(); break; default: jj_la1[28] = jj_gen; ; } break; default: jj_la1[29] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void Limit() throws ParseException { /*@bgen(jjtree) Limit */ ASTLimit jjtn000 = new ASTLimit(JJTLIMIT); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);Token t; try { jj_consume_token(LIMIT); t = jj_consume_token(INTEGER); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setValue(Integer.parseInt(t.image)); } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void Offset() throws ParseException { /*@bgen(jjtree) Offset */ ASTOffset jjtn000 = new ASTOffset(JJTOFFSET); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);Token t; try { jj_consume_token(OFFSET); t = jj_consume_token(INTEGER); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setValue(Integer.parseInt(t.image)); } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void GroupGraphPattern() throws ParseException { /*@bgen(jjtree) GraphPatternGroup */ ASTGraphPatternGroup jjtn000 = new ASTGraphPatternGroup(JJTGRAPHPATTERNGROUP); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(LBRACE); GraphPattern(); jj_consume_token(RBRACE); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void GraphPattern() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: case LBRACK: case NIL: case ANON: case FILTER: case TRUE: case FALSE: case Q_IRI_REF: case PNAME_NS: case PNAME_LN: case BLANK_NODE_LABEL: case VAR1: case VAR2: case INTEGER: case INTEGER_POSITIVE: case INTEGER_NEGATIVE: case DECIMAL: case DECIMAL_POSITIVE: case DECIMAL_NEGATIVE: case DOUBLE: case DOUBLE_POSITIVE: case DOUBLE_NEGATIVE: case STRING_LITERAL1: case STRING_LITERAL2: case STRING_LITERAL_LONG1: case STRING_LITERAL_LONG2: BasicGraphPattern(); break; default: jj_la1[30] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: case OPTIONAL: case GRAPH: GraphPatternNotTriples(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOT: jj_consume_token(DOT); break; default: jj_la1[31] = jj_gen; ; } GraphPattern(); break; default: jj_la1[32] = jj_gen; ; } } final public void BasicGraphPattern() throws ParseException { /*@bgen(jjtree) BasicGraphPattern */ ASTBasicGraphPattern jjtn000 = new ASTBasicGraphPattern(JJTBASICGRAPHPATTERN); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: case LBRACK: case NIL: case ANON: case TRUE: case FALSE: case Q_IRI_REF: case PNAME_NS: case PNAME_LN: case BLANK_NODE_LABEL: case VAR1: case VAR2: case INTEGER: case INTEGER_POSITIVE: case INTEGER_NEGATIVE: case DECIMAL: case DECIMAL_POSITIVE: case DECIMAL_NEGATIVE: case DOUBLE: case DOUBLE_POSITIVE: case DOUBLE_NEGATIVE: case STRING_LITERAL1: case STRING_LITERAL2: case STRING_LITERAL_LONG1: case STRING_LITERAL_LONG2: TriplesBlock(); label_9: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FILTER: ; break; default: jj_la1[33] = jj_gen; break label_9; } Filter(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOT: jj_consume_token(DOT); break; default: jj_la1[34] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: case LBRACK: case NIL: case ANON: case TRUE: case FALSE: case Q_IRI_REF: case PNAME_NS: case PNAME_LN: case BLANK_NODE_LABEL: case VAR1: case VAR2: case INTEGER: case INTEGER_POSITIVE: case INTEGER_NEGATIVE: case DECIMAL: case DECIMAL_POSITIVE: case DECIMAL_NEGATIVE: case DOUBLE: case DOUBLE_POSITIVE: case DOUBLE_NEGATIVE: case STRING_LITERAL1: case STRING_LITERAL2: case STRING_LITERAL_LONG1: case STRING_LITERAL_LONG2: TriplesBlock(); break; default: jj_la1[35] = jj_gen; ; } } break; case FILTER: label_10: while (true) { Filter(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOT: jj_consume_token(DOT); break; default: jj_la1[36] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: case LBRACK: case NIL: case ANON: case TRUE: case FALSE: case Q_IRI_REF: case PNAME_NS: case PNAME_LN: case BLANK_NODE_LABEL: case VAR1: case VAR2: case INTEGER: case INTEGER_POSITIVE: case INTEGER_NEGATIVE: case DECIMAL: case DECIMAL_POSITIVE: case DECIMAL_NEGATIVE: case DOUBLE: case DOUBLE_POSITIVE: case DOUBLE_NEGATIVE: case STRING_LITERAL1: case STRING_LITERAL2: case STRING_LITERAL_LONG1: case STRING_LITERAL_LONG2: TriplesBlock(); break; default: jj_la1[37] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FILTER: ; break; default: jj_la1[38] = jj_gen; break label_10; } } break; default: jj_la1[39] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void TriplesBlock() throws ParseException { TriplesSameSubject(); label_11: while (true) { if (jj_2_1(2)) { ; } else { break label_11; } jj_consume_token(DOT); TriplesSameSubject(); } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOT: jj_consume_token(DOT); break; default: jj_la1[40] = jj_gen; ; } } final public void GraphPatternNotTriples() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OPTIONAL: OptionalGraphPattern(); break; case LBRACE: GroupOrUnionGraphPattern(); break; case GRAPH: GraphGraphPattern(); break; default: jj_la1[41] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void OptionalGraphPattern() throws ParseException { /*@bgen(jjtree) OptionalGraphPattern */ ASTOptionalGraphPattern jjtn000 = new ASTOptionalGraphPattern(JJTOPTIONALGRAPHPATTERN); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(OPTIONAL); jj_consume_token(LBRACE); GraphPattern(); jj_consume_token(RBRACE); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void GraphGraphPattern() throws ParseException { /*@bgen(jjtree) GraphGraphPattern */ ASTGraphGraphPattern jjtn000 = new ASTGraphGraphPattern(JJTGRAPHGRAPHPATTERN); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(GRAPH); VarOrIRIref(); GroupGraphPattern(); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void GroupOrUnionGraphPattern() throws ParseException { GroupGraphPattern(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case UNION: jj_consume_token(UNION); ASTUnionGraphPattern jjtn001 = new ASTUnionGraphPattern(JJTUNIONGRAPHPATTERN); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); try { GroupOrUnionGraphPattern(); } catch (Throwable jjte001) { if (jjtc001) { jjtree.clearNodeScope(jjtn001); jjtc001 = false; } else { jjtree.popNode(); } if (jjte001 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte001;} } if (jjte001 instanceof ParseException) { {if (true) throw (ParseException)jjte001;} } {if (true) throw (Error)jjte001;} } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, 2); } } break; default: jj_la1[42] = jj_gen; ; } } final public void Filter() throws ParseException { jj_consume_token(FILTER); Constraint(); } final public void Constraint() throws ParseException { /*@bgen(jjtree) Constraint */ ASTConstraint jjtn000 = new ASTConstraint(JJTCONSTRAINT); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: BrackettedExpression(); break; case STR: case LANG: case LANGMATCHES: case DATATYPE: case BOUND: case SAMETERM: case IS_IRI: case IS_BLANK: case IS_LITERAL: case REGEX: BuiltInCall(); break; case Q_IRI_REF: case PNAME_NS: case PNAME_LN: FunctionCall(); break; default: jj_la1[43] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void FunctionCall() throws ParseException { /*@bgen(jjtree) FunctionCall */ ASTFunctionCall jjtn000 = new ASTFunctionCall(JJTFUNCTIONCALL); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { IRIref(); ArgList(); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void ArgList() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case NIL: jj_consume_token(NIL); break; case LPAREN: jj_consume_token(LPAREN); Expression(); label_12: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[44] = jj_gen; break label_12; } jj_consume_token(COMMA); Expression(); } jj_consume_token(RPAREN); break; default: jj_la1[45] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void TriplesSameSubject() throws ParseException { /*@bgen(jjtree) TriplesSameSubject */ ASTTriplesSameSubject jjtn000 = new ASTTriplesSameSubject(JJTTRIPLESSAMESUBJECT); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case NIL: case ANON: case TRUE: case FALSE: case Q_IRI_REF: case PNAME_NS: case PNAME_LN: case BLANK_NODE_LABEL: case VAR1: case VAR2: case INTEGER: case INTEGER_POSITIVE: case INTEGER_NEGATIVE: case DECIMAL: case DECIMAL_POSITIVE: case DECIMAL_NEGATIVE: case DOUBLE: case DOUBLE_POSITIVE: case DOUBLE_NEGATIVE: case STRING_LITERAL1: case STRING_LITERAL2: case STRING_LITERAL_LONG1: case STRING_LITERAL_LONG2: VarOrTerm(); PropertyList(); break; case LPAREN: case LBRACK: TriplesNode(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IS_A: case Q_IRI_REF: case PNAME_NS: case PNAME_LN: case VAR1: case VAR2: PropertyList(); break; default: jj_la1[46] = jj_gen; ; } break; default: jj_la1[47] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void PropertyList() throws ParseException { /*@bgen(jjtree) PropertyList */ ASTPropertyList jjtn000 = new ASTPropertyList(JJTPROPERTYLIST); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { Verb(); ObjectList(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SEMICOLON: jj_consume_token(SEMICOLON); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IS_A: case Q_IRI_REF: case PNAME_NS: case PNAME_LN: case VAR1: case VAR2: PropertyList(); break; default: jj_la1[48] = jj_gen; ; } break; default: jj_la1[49] = jj_gen; ; } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void ObjectList() throws ParseException { /*@bgen(jjtree) ObjectList */ ASTObjectList jjtn000 = new ASTObjectList(JJTOBJECTLIST); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { Object(); label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[50] = jj_gen; break label_13; } jj_consume_token(COMMA); Object(); } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void Object() throws ParseException { GraphNode(); } final public void Verb() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case Q_IRI_REF: case PNAME_NS: case PNAME_LN: case VAR1: case VAR2: VarOrIRIref(); break; case IS_A: jj_consume_token(IS_A); ASTIRI jjtn001 = new ASTIRI(JJTIRI); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); try { jjtree.closeNodeScope(jjtn001, true); jjtc001 = false; jjtn001.setValue(RDF.TYPE.toString()); } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, true); } } break; default: jj_la1[51] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void TriplesNode() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: Collection(); break; case LBRACK: BlankNodePropertyList(); break; default: jj_la1[52] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void BlankNodePropertyList() throws ParseException { /*@bgen(jjtree) BlankNodePropertyList */ ASTBlankNodePropertyList jjtn000 = new ASTBlankNodePropertyList(JJTBLANKNODEPROPERTYLIST); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(LBRACK); PropertyList(); jj_consume_token(RBRACK); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void Collection() throws ParseException { /*@bgen(jjtree) Collection */ ASTCollection jjtn000 = new ASTCollection(JJTCOLLECTION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(LPAREN); label_14: while (true) { GraphNode(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: case LBRACK: case NIL: case ANON: case TRUE: case FALSE: case Q_IRI_REF: case PNAME_NS: case PNAME_LN: case BLANK_NODE_LABEL: case VAR1: case VAR2: case INTEGER: case INTEGER_POSITIVE: case INTEGER_NEGATIVE: case DECIMAL: case DECIMAL_POSITIVE: case DECIMAL_NEGATIVE: case DOUBLE: case DOUBLE_POSITIVE: case DOUBLE_NEGATIVE: case STRING_LITERAL1: case STRING_LITERAL2: case STRING_LITERAL_LONG1: case STRING_LITERAL_LONG2: ; break; default: jj_la1[53] = jj_gen; break label_14; } } jj_consume_token(RPAREN); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void GraphNode() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case NIL: case ANON: case TRUE: case FALSE: case Q_IRI_REF: case PNAME_NS: case PNAME_LN: case BLANK_NODE_LABEL: case VAR1: case VAR2: case INTEGER: case INTEGER_POSITIVE: case INTEGER_NEGATIVE: case DECIMAL: case DECIMAL_POSITIVE: case DECIMAL_NEGATIVE: case DOUBLE: case DOUBLE_POSITIVE: case DOUBLE_NEGATIVE: case STRING_LITERAL1: case STRING_LITERAL2: case STRING_LITERAL_LONG1: case STRING_LITERAL_LONG2: VarOrTerm(); break; case LPAREN: case LBRACK: TriplesNode(); break; default: jj_la1[54] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void VarOrTerm() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VAR1: case VAR2: Var(); break; case NIL: case ANON: case TRUE: case FALSE: case Q_IRI_REF: case PNAME_NS: case PNAME_LN: case BLANK_NODE_LABEL: case INTEGER: case INTEGER_POSITIVE: case INTEGER_NEGATIVE: case DECIMAL: case DECIMAL_POSITIVE: case DECIMAL_NEGATIVE: case DOUBLE: case DOUBLE_POSITIVE: case DOUBLE_NEGATIVE: case STRING_LITERAL1: case STRING_LITERAL2: case STRING_LITERAL_LONG1: case STRING_LITERAL_LONG2: GraphTerm(); break; default: jj_la1[55] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void VarOrIRIref() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VAR1: case VAR2: Var(); break; case Q_IRI_REF: case PNAME_NS: case PNAME_LN: IRIref(); break; default: jj_la1[56] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void Var() throws ParseException { /*@bgen(jjtree) Var */ ASTVar jjtn000 = new ASTVar(JJTVAR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);Token t; try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VAR1: t = jj_consume_token(VAR1); break; case VAR2: t = jj_consume_token(VAR2); break; default: jj_la1[57] = jj_gen; jj_consume_token(-1); throw new ParseException(); } jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setName(t.image.substring(1)); } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void GraphTerm() throws ParseException { boolean positive = true; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case Q_IRI_REF: case PNAME_NS: case PNAME_LN: IRIref(); break; case STRING_LITERAL1: case STRING_LITERAL2: case STRING_LITERAL_LONG1: case STRING_LITERAL_LONG2: RDFLiteral(); break; case INTEGER: case INTEGER_POSITIVE: case INTEGER_NEGATIVE: case DECIMAL: case DECIMAL_POSITIVE: case DECIMAL_NEGATIVE: case DOUBLE: case DOUBLE_POSITIVE: case DOUBLE_NEGATIVE: NumericLiteral(); break; case TRUE: case FALSE: BooleanLiteral(); break; case ANON: case BLANK_NODE_LABEL: BlankNode(); break; case NIL: jj_consume_token(NIL); ASTIRI jjtn001 = new ASTIRI(JJTIRI); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); try { jjtree.closeNodeScope(jjtn001, true); jjtc001 = false; jjtn001.setValue(RDF.NIL.toString()); } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, true); } } break; default: jj_la1[58] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void Expression() throws ParseException { ConditionalOrExpression(); } final public void ConditionalOrExpression() throws ParseException { ConditionalAndExpression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OR: jj_consume_token(OR); ASTOr jjtn001 = new ASTOr(JJTOR); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); try { ConditionalOrExpression(); } catch (Throwable jjte001) { if (jjtc001) { jjtree.clearNodeScope(jjtn001); jjtc001 = false; } else { jjtree.popNode(); } if (jjte001 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte001;} } if (jjte001 instanceof ParseException) { {if (true) throw (ParseException)jjte001;} } {if (true) throw (Error)jjte001;} } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, 2); } } break; default: jj_la1[59] = jj_gen; ; } } final public void ConditionalAndExpression() throws ParseException { ValueLogical(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AND: jj_consume_token(AND); ASTAnd jjtn001 = new ASTAnd(JJTAND); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); try { ConditionalAndExpression(); } catch (Throwable jjte001) { if (jjtc001) { jjtree.clearNodeScope(jjtn001); jjtc001 = false; } else { jjtree.popNode(); } if (jjte001 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte001;} } if (jjte001 instanceof ParseException) { {if (true) throw (ParseException)jjte001;} } {if (true) throw (Error)jjte001;} } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, 2); } } break; default: jj_la1[60] = jj_gen; ; } } final public void ValueLogical() throws ParseException { RelationalExpression(); } final public void RelationalExpression() throws ParseException { NumericExpression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EQ: case NE: case GT: case LT: case LE: case GE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EQ: jj_consume_token(EQ); NumericExpression(); ASTCompare jjtn001 = new ASTCompare(JJTCOMPARE); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); try { jjtree.closeNodeScope(jjtn001, 2); jjtc001 = false; jjtn001.setOperator(CompareOp.EQ); } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, 2); } } break; case NE: jj_consume_token(NE); NumericExpression(); ASTCompare jjtn002 = new ASTCompare(JJTCOMPARE); boolean jjtc002 = true; jjtree.openNodeScope(jjtn002); try { jjtree.closeNodeScope(jjtn002, 2); jjtc002 = false; jjtn002.setOperator(CompareOp.NE); } finally { if (jjtc002) { jjtree.closeNodeScope(jjtn002, 2); } } break; case LT: jj_consume_token(LT); NumericExpression(); ASTCompare jjtn003 = new ASTCompare(JJTCOMPARE); boolean jjtc003 = true; jjtree.openNodeScope(jjtn003); try { jjtree.closeNodeScope(jjtn003, 2); jjtc003 = false; jjtn003.setOperator(CompareOp.LT); } finally { if (jjtc003) { jjtree.closeNodeScope(jjtn003, 2); } } break; case LE: jj_consume_token(LE); NumericExpression(); ASTCompare jjtn004 = new ASTCompare(JJTCOMPARE); boolean jjtc004 = true; jjtree.openNodeScope(jjtn004); try { jjtree.closeNodeScope(jjtn004, 2); jjtc004 = false; jjtn004.setOperator(CompareOp.LE); } finally { if (jjtc004) { jjtree.closeNodeScope(jjtn004, 2); } } break; case GE: jj_consume_token(GE); NumericExpression(); ASTCompare jjtn005 = new ASTCompare(JJTCOMPARE); boolean jjtc005 = true; jjtree.openNodeScope(jjtn005); try { jjtree.closeNodeScope(jjtn005, 2); jjtc005 = false; jjtn005.setOperator(CompareOp.GE); } finally { if (jjtc005) { jjtree.closeNodeScope(jjtn005, 2); } } break; case GT: jj_consume_token(GT); NumericExpression(); ASTCompare jjtn006 = new ASTCompare(JJTCOMPARE); boolean jjtc006 = true; jjtree.openNodeScope(jjtn006); try { jjtree.closeNodeScope(jjtn006, 2); jjtc006 = false; jjtn006.setOperator(CompareOp.GT); } finally { if (jjtc006) { jjtree.closeNodeScope(jjtn006, 2); } } break; default: jj_la1[61] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: jj_la1[62] = jj_gen; ; } } final public void NumericExpression() throws ParseException { AdditiveExpression(); } final public void AdditiveExpression() throws ParseException { MultiplicativeExpression(); label_15: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: case MINUS: case INTEGER_POSITIVE: case INTEGER_NEGATIVE: case DECIMAL_POSITIVE: case DECIMAL_NEGATIVE: case DOUBLE_POSITIVE: case DOUBLE_NEGATIVE: ; break; default: jj_la1[63] = jj_gen; break label_15; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: jj_consume_token(PLUS); MultiplicativeExpression(); ASTMath jjtn001 = new ASTMath(JJTMATH); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); try { jjtree.closeNodeScope(jjtn001, 2); jjtc001 = false; jjtn001.setOperator(MathOp.PLUS); } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, 2); } } break; case MINUS: jj_consume_token(MINUS); MultiplicativeExpression(); ASTMath jjtn002 = new ASTMath(JJTMATH); boolean jjtc002 = true; jjtree.openNodeScope(jjtn002); try { jjtree.closeNodeScope(jjtn002, 2); jjtc002 = false; jjtn002.setOperator(MathOp.MINUS); } finally { if (jjtc002) { jjtree.closeNodeScope(jjtn002, 2); } } break; case INTEGER_POSITIVE: case DECIMAL_POSITIVE: case DOUBLE_POSITIVE: NumericLiteralPositive(); ASTMath jjtn003 = new ASTMath(JJTMATH); boolean jjtc003 = true; jjtree.openNodeScope(jjtn003); try { jjtree.closeNodeScope(jjtn003, 2); jjtc003 = false; jjtn003.setOperator(MathOp.PLUS); } finally { if (jjtc003) { jjtree.closeNodeScope(jjtn003, 2); } } break; case INTEGER_NEGATIVE: case DECIMAL_NEGATIVE: case DOUBLE_NEGATIVE: NumericLiteralNegative(); ASTMath jjtn004 = new ASTMath(JJTMATH); boolean jjtc004 = true; jjtree.openNodeScope(jjtn004); try { jjtree.closeNodeScope(jjtn004, 2); jjtc004 = false; jjtn004.setOperator(MathOp.PLUS); } finally { if (jjtc004) { jjtree.closeNodeScope(jjtn004, 2); } } break; default: jj_la1[64] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } final public void MultiplicativeExpression() throws ParseException { UnaryExpression(); label_16: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STAR: case SLASH: ; break; default: jj_la1[65] = jj_gen; break label_16; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STAR: jj_consume_token(STAR); UnaryExpression(); ASTMath jjtn001 = new ASTMath(JJTMATH); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); try { jjtree.closeNodeScope(jjtn001, 2); jjtc001 = false; jjtn001.setOperator(MathOp.MULTIPLY); } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, 2); } } break; case SLASH: jj_consume_token(SLASH); UnaryExpression(); ASTMath jjtn002 = new ASTMath(JJTMATH); boolean jjtc002 = true; jjtree.openNodeScope(jjtn002); try { jjtree.closeNodeScope(jjtn002, 2); jjtc002 = false; jjtn002.setOperator(MathOp.DIVIDE); } finally { if (jjtc002) { jjtree.closeNodeScope(jjtn002, 2); } } break; default: jj_la1[66] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } final public void UnaryExpression() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case NOT: jj_consume_token(NOT); ASTNot jjtn001 = new ASTNot(JJTNOT); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); try { PrimaryExpression(); } catch (Throwable jjte001) { if (jjtc001) { jjtree.clearNodeScope(jjtn001); jjtc001 = false; } else { jjtree.popNode(); } if (jjte001 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte001;} } if (jjte001 instanceof ParseException) { {if (true) throw (ParseException)jjte001;} } {if (true) throw (Error)jjte001;} } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, true); } } break; case LPAREN: case PLUS: case STR: case LANG: case LANGMATCHES: case DATATYPE: case BOUND: case SAMETERM: case IS_IRI: case IS_BLANK: case IS_LITERAL: case REGEX: case TRUE: case FALSE: case Q_IRI_REF: case PNAME_NS: case PNAME_LN: case VAR1: case VAR2: case INTEGER: case INTEGER_POSITIVE: case INTEGER_NEGATIVE: case DECIMAL: case DECIMAL_POSITIVE: case DECIMAL_NEGATIVE: case DOUBLE: case DOUBLE_POSITIVE: case DOUBLE_NEGATIVE: case STRING_LITERAL1: case STRING_LITERAL2: case STRING_LITERAL_LONG1: case STRING_LITERAL_LONG2: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: jj_consume_token(PLUS); break; default: jj_la1[67] = jj_gen; ; } PrimaryExpression(); break; case MINUS: UnaryMinus(); PrimaryExpression(); ASTMath jjtn002 = new ASTMath(JJTMATH); boolean jjtc002 = true; jjtree.openNodeScope(jjtn002); try { jjtree.closeNodeScope(jjtn002, 2); jjtc002 = false; jjtn002.setOperator(MathOp.MULTIPLY); } finally { if (jjtc002) { jjtree.closeNodeScope(jjtn002, 2); } } break; default: jj_la1[68] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void UnaryMinus() throws ParseException { /*@bgen(jjtree) NumericLiteral */ ASTNumericLiteral jjtn000 = new ASTNumericLiteral(JJTNUMERICLITERAL); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(MINUS); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setValue("-1"); jjtn000.setDatatype(XMLSchema.INTEGER); } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void PrimaryExpression() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: BrackettedExpression(); break; case STR: case LANG: case LANGMATCHES: case DATATYPE: case BOUND: case SAMETERM: case IS_IRI: case IS_BLANK: case IS_LITERAL: case REGEX: BuiltInCall(); break; default: jj_la1[69] = jj_gen; if (jj_2_2(2)) { FunctionCall(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case Q_IRI_REF: case PNAME_NS: case PNAME_LN: IRIref(); break; case STRING_LITERAL1: case STRING_LITERAL2: case STRING_LITERAL_LONG1: case STRING_LITERAL_LONG2: RDFLiteral(); break; case INTEGER: case INTEGER_POSITIVE: case INTEGER_NEGATIVE: case DECIMAL: case DECIMAL_POSITIVE: case DECIMAL_NEGATIVE: case DOUBLE: case DOUBLE_POSITIVE: case DOUBLE_NEGATIVE: NumericLiteral(); break; case TRUE: case FALSE: BooleanLiteral(); break; case VAR1: case VAR2: Var(); break; default: jj_la1[70] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } } final public void BrackettedExpression() throws ParseException { jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); } final public void BuiltInCall() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STR: Str(); break; case LANG: Lang(); break; case LANGMATCHES: LangMatches(); break; case DATATYPE: Datatype(); break; case BOUND: Bound(); break; case SAMETERM: SameTerm(); break; case IS_IRI: IsIRI(); break; case IS_BLANK: IsBlank(); break; case IS_LITERAL: IsLiteral(); break; case REGEX: RegexExpression(); break; default: jj_la1[71] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void Str() throws ParseException { /*@bgen(jjtree) Str */ ASTStr jjtn000 = new ASTStr(JJTSTR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(STR); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void Lang() throws ParseException { /*@bgen(jjtree) Lang */ ASTLang jjtn000 = new ASTLang(JJTLANG); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(LANG); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void LangMatches() throws ParseException { /*@bgen(jjtree) LangMatches */ ASTLangMatches jjtn000 = new ASTLangMatches(JJTLANGMATCHES); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(LANGMATCHES); jj_consume_token(LPAREN); Expression(); jj_consume_token(COMMA); Expression(); jj_consume_token(RPAREN); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void Datatype() throws ParseException { /*@bgen(jjtree) Datatype */ ASTDatatype jjtn000 = new ASTDatatype(JJTDATATYPE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(DATATYPE); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void Bound() throws ParseException { /*@bgen(jjtree) Bound */ ASTBound jjtn000 = new ASTBound(JJTBOUND); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(BOUND); jj_consume_token(LPAREN); Var(); jj_consume_token(RPAREN); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void SameTerm() throws ParseException { /*@bgen(jjtree) SameTerm */ ASTSameTerm jjtn000 = new ASTSameTerm(JJTSAMETERM); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(SAMETERM); jj_consume_token(LPAREN); Expression(); jj_consume_token(COMMA); Expression(); jj_consume_token(RPAREN); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void IsIRI() throws ParseException { /*@bgen(jjtree) IsIRI */ ASTIsIRI jjtn000 = new ASTIsIRI(JJTISIRI); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(IS_IRI); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void IsBlank() throws ParseException { /*@bgen(jjtree) IsBlank */ ASTIsBlank jjtn000 = new ASTIsBlank(JJTISBLANK); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(IS_BLANK); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void IsLiteral() throws ParseException { /*@bgen(jjtree) IsLiteral */ ASTIsLiteral jjtn000 = new ASTIsLiteral(JJTISLITERAL); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(IS_LITERAL); jj_consume_token(LPAREN); Expression(); jj_consume_token(RPAREN); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void RegexExpression() throws ParseException { /*@bgen(jjtree) RegexExpression */ ASTRegexExpression jjtn000 = new ASTRegexExpression(JJTREGEXEXPRESSION); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(REGEX); jj_consume_token(LPAREN); Expression(); jj_consume_token(COMMA); Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: jj_consume_token(COMMA); Expression(); break; default: jj_la1[72] = jj_gen; ; } jj_consume_token(RPAREN); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void RDFLiteral() throws ParseException { /*@bgen(jjtree) RDFLiteral */ ASTRDFLiteral jjtn000 = new ASTRDFLiteral(JJTRDFLITERAL); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);Token t; try { String(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DT_PREFIX: case LANGTAG: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LANGTAG: t = jj_consume_token(LANGTAG); jjtn000.setLang(t.image.substring(1)); break; case DT_PREFIX: jj_consume_token(DT_PREFIX); IRIref(); break; default: jj_la1[73] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: jj_la1[74] = jj_gen; ; } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (Error)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void NumericLiteral() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INTEGER: case DECIMAL: case DOUBLE: NumericLiteralUnsigned(); break; case INTEGER_POSITIVE: case DECIMAL_POSITIVE: case DOUBLE_POSITIVE: NumericLiteralPositive(); break; case INTEGER_NEGATIVE: case DECIMAL_NEGATIVE: case DOUBLE_NEGATIVE: NumericLiteralNegative(); break; default: jj_la1[75] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void NumericLiteralUnsigned() throws ParseException { /*@bgen(jjtree) NumericLiteral */ ASTNumericLiteral jjtn000 = new ASTNumericLiteral(JJTNUMERICLITERAL); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);Token t; URI datatype; try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INTEGER: t = jj_consume_token(INTEGER); datatype = XMLSchema.INTEGER; break; case DECIMAL: t = jj_consume_token(DECIMAL); datatype = XMLSchema.DECIMAL; break; case DOUBLE: t = jj_consume_token(DOUBLE); datatype = XMLSchema.DOUBLE; break; default: jj_la1[76] = jj_gen; jj_consume_token(-1); throw new ParseException(); } jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setValue(t.image); jjtn000.setDatatype(datatype); } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void NumericLiteralPositive() throws ParseException { /*@bgen(jjtree) NumericLiteral */ ASTNumericLiteral jjtn000 = new ASTNumericLiteral(JJTNUMERICLITERAL); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);Token t; URI datatype; try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INTEGER_POSITIVE: t = jj_consume_token(INTEGER_POSITIVE); datatype = XMLSchema.INTEGER; break; case DECIMAL_POSITIVE: t = jj_consume_token(DECIMAL_POSITIVE); datatype = XMLSchema.DECIMAL; break; case DOUBLE_POSITIVE: t = jj_consume_token(DOUBLE_POSITIVE); datatype = XMLSchema.DOUBLE; break; default: jj_la1[77] = jj_gen; jj_consume_token(-1); throw new ParseException(); } jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setValue(t.image); jjtn000.setDatatype(datatype); } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void NumericLiteralNegative() throws ParseException { /*@bgen(jjtree) NumericLiteral */ ASTNumericLiteral jjtn000 = new ASTNumericLiteral(JJTNUMERICLITERAL); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);Token t; URI datatype; try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INTEGER_NEGATIVE: t = jj_consume_token(INTEGER_NEGATIVE); datatype = XMLSchema.INTEGER; break; case DECIMAL_NEGATIVE: t = jj_consume_token(DECIMAL_NEGATIVE); datatype = XMLSchema.DECIMAL; break; case DOUBLE_NEGATIVE: t = jj_consume_token(DOUBLE_NEGATIVE); datatype = XMLSchema.DOUBLE; break; default: jj_la1[78] = jj_gen; jj_consume_token(-1); throw new ParseException(); } jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setValue(t.image); jjtn000.setDatatype(datatype); } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void BooleanLiteral() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TRUE: ASTTrue jjtn001 = new ASTTrue(JJTTRUE); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); try { jj_consume_token(TRUE); } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, true); } } break; case FALSE: ASTFalse jjtn002 = new ASTFalse(JJTFALSE); boolean jjtc002 = true; jjtree.openNodeScope(jjtn002); try { jj_consume_token(FALSE); } finally { if (jjtc002) { jjtree.closeNodeScope(jjtn002, true); } } break; default: jj_la1[79] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void String() throws ParseException { /*@bgen(jjtree) String */ ASTString jjtn000 = new ASTString(JJTSTRING); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);Token t; try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STRING_LITERAL1: case STRING_LITERAL2: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STRING_LITERAL1: t = jj_consume_token(STRING_LITERAL1); break; case STRING_LITERAL2: t = jj_consume_token(STRING_LITERAL2); break; default: jj_la1[80] = jj_gen; jj_consume_token(-1); throw new ParseException(); } jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setValue(_trimString(t.image, 1)); break; case STRING_LITERAL_LONG1: case STRING_LITERAL_LONG2: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STRING_LITERAL_LONG1: t = jj_consume_token(STRING_LITERAL_LONG1); break; case STRING_LITERAL_LONG2: t = jj_consume_token(STRING_LITERAL_LONG2); break; default: jj_la1[81] = jj_gen; jj_consume_token(-1); throw new ParseException(); } jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setValue(_trimString(t.image, 3)); break; default: jj_la1[82] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void IRIref() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case Q_IRI_REF: IRI(); break; case PNAME_NS: case PNAME_LN: PrefixedName(); break; default: jj_la1[83] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void PrefixedName() throws ParseException { /*@bgen(jjtree) QName */ ASTQName jjtn000 = new ASTQName(JJTQNAME); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);Token t; try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PNAME_LN: t = jj_consume_token(PNAME_LN); break; case PNAME_NS: t = jj_consume_token(PNAME_NS); break; default: jj_la1[84] = jj_gen; jj_consume_token(-1); throw new ParseException(); } jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setValue(t.image); } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void BlankNode() throws ParseException { /*@bgen(jjtree) BlankNode */ ASTBlankNode jjtn000 = new ASTBlankNode(JJTBLANKNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);Token t; try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BLANK_NODE_LABEL: t = jj_consume_token(BLANK_NODE_LABEL); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setID(t.image.substring(2)); break; case ANON: jj_consume_token(ANON); break; default: jj_la1[85] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final public void IRI() throws ParseException { /*@bgen(jjtree) IRI */ ASTIRI jjtn000 = new ASTIRI(JJTIRI); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);Token t; try { t = jj_consume_token(Q_IRI_REF); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setValue(_trimString(t.image, 1)); } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } final private boolean jj_2_1(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_1(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(0, xla); } } final private boolean jj_2_2(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_2(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(1, xla); } } final private boolean jj_3R_41() { if (jj_3R_46()) return true; return false; } final private boolean jj_3R_44() { if (jj_3R_48()) return true; return false; } final private boolean jj_3R_40() { if (jj_3R_45()) return true; return false; } final private boolean jj_3R_27() { if (jj_scan_token(LPAREN)) return true; return false; } final private boolean jj_3R_39() { if (jj_3R_44()) return true; return false; } final private boolean jj_3R_33() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(65)) { jj_scanpos = xsp; if (jj_scan_token(64)) return true; } return false; } final private boolean jj_3R_22() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(27)) { jj_scanpos = xsp; if (jj_3R_27()) return true; } return false; } final private boolean jj_3R_35() { Token xsp; xsp = jj_scanpos; if (jj_3R_38()) { jj_scanpos = xsp; if (jj_3R_39()) { jj_scanpos = xsp; if (jj_3R_40()) { jj_scanpos = xsp; if (jj_3R_41()) { jj_scanpos = xsp; if (jj_3R_42()) { jj_scanpos = xsp; if (jj_3R_43()) return true; } } } } } return false; } final private boolean jj_3R_38() { if (jj_3R_21()) return true; return false; } final private boolean jj_3R_26() { if (jj_3R_33()) return true; return false; } final private boolean jj_3R_18() { if (jj_3R_21()) return true; if (jj_3R_22()) return true; return false; } final private boolean jj_3R_25() { if (jj_3R_32()) return true; return false; } final private boolean jj_3R_21() { Token xsp; xsp = jj_scanpos; if (jj_3R_25()) { jj_scanpos = xsp; if (jj_3R_26()) return true; } return false; } final private boolean jj_3R_34() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(67)) { jj_scanpos = xsp; if (jj_scan_token(68)) return true; } return false; } final private boolean jj_3R_56() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(87)) { jj_scanpos = xsp; if (jj_scan_token(88)) return true; } return false; } final private boolean jj_3R_55() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(85)) { jj_scanpos = xsp; if (jj_scan_token(86)) return true; } return false; } final private boolean jj_3R_48() { Token xsp; xsp = jj_scanpos; if (jj_3R_55()) { jj_scanpos = xsp; if (jj_3R_56()) return true; } return false; } final private boolean jj_3R_53() { if (jj_scan_token(FALSE)) return true; return false; } final private boolean jj_3R_52() { if (jj_scan_token(TRUE)) return true; return false; } final private boolean jj_3R_29() { if (jj_3R_35()) return true; return false; } final private boolean jj_3R_46() { Token xsp; xsp = jj_scanpos; if (jj_3R_52()) { jj_scanpos = xsp; if (jj_3R_53()) return true; } return false; } final private boolean jj_3R_28() { if (jj_3R_34()) return true; return false; } final private boolean jj_3R_23() { Token xsp; xsp = jj_scanpos; if (jj_3R_28()) { jj_scanpos = xsp; if (jj_3R_29()) return true; } return false; } final private boolean jj_3R_68() { if (jj_scan_token(DOUBLE_NEGATIVE)) return true; return false; } final private boolean jj_3R_67() { if (jj_scan_token(DECIMAL_NEGATIVE)) return true; return false; } final private boolean jj_3R_66() { if (jj_scan_token(INTEGER_NEGATIVE)) return true; return false; } final private boolean jj_3_1() { if (jj_scan_token(DOT)) return true; if (jj_3R_17()) return true; return false; } final private boolean jj_3R_59() { Token xsp; xsp = jj_scanpos; if (jj_3R_66()) { jj_scanpos = xsp; if (jj_3R_67()) { jj_scanpos = xsp; if (jj_3R_68()) return true; } } return false; } final private boolean jj_3R_36() { if (jj_scan_token(LPAREN)) return true; return false; } final private boolean jj_3R_65() { if (jj_scan_token(DOUBLE_POSITIVE)) return true; return false; } final private boolean jj_3R_64() { if (jj_scan_token(DECIMAL_POSITIVE)) return true; return false; } final private boolean jj_3R_63() { if (jj_scan_token(INTEGER_POSITIVE)) return true; return false; } final private boolean jj_3R_37() { if (jj_scan_token(LBRACK)) return true; return false; } final private boolean jj_3R_31() { if (jj_3R_37()) return true; return false; } final private boolean jj_3R_58() { Token xsp; xsp = jj_scanpos; if (jj_3R_63()) { jj_scanpos = xsp; if (jj_3R_64()) { jj_scanpos = xsp; if (jj_3R_65()) return true; } } return false; } final private boolean jj_3R_30() { if (jj_3R_36()) return true; return false; } final private boolean jj_3R_24() { Token xsp; xsp = jj_scanpos; if (jj_3R_30()) { jj_scanpos = xsp; if (jj_3R_31()) return true; } return false; } final private boolean jj_3R_62() { if (jj_scan_token(DOUBLE)) return true; return false; } final private boolean jj_3R_61() { if (jj_scan_token(DECIMAL)) return true; return false; } final private boolean jj_3R_60() { if (jj_scan_token(INTEGER)) return true; return false; } final private boolean jj_3R_51() { if (jj_3R_59()) return true; return false; } final private boolean jj_3R_57() { Token xsp; xsp = jj_scanpos; if (jj_3R_60()) { jj_scanpos = xsp; if (jj_3R_61()) { jj_scanpos = xsp; if (jj_3R_62()) return true; } } return false; } final private boolean jj_3R_50() { if (jj_3R_58()) return true; return false; } final private boolean jj_3R_49() { if (jj_3R_57()) return true; return false; } final private boolean jj_3R_45() { Token xsp; xsp = jj_scanpos; if (jj_3R_49()) { jj_scanpos = xsp; if (jj_3R_50()) { jj_scanpos = xsp; if (jj_3R_51()) return true; } } return false; } final private boolean jj_3R_32() { if (jj_scan_token(Q_IRI_REF)) return true; return false; } final private boolean jj_3R_20() { if (jj_3R_24()) return true; return false; } final private boolean jj_3R_43() { if (jj_scan_token(NIL)) return true; return false; } final private boolean jj_3R_54() { if (jj_scan_token(BLANK_NODE_LABEL)) return true; return false; } final private boolean jj_3_2() { if (jj_3R_18()) return true; return false; } final private boolean jj_3R_47() { Token xsp; xsp = jj_scanpos; if (jj_3R_54()) { jj_scanpos = xsp; if (jj_scan_token(28)) return true; } return false; } final private boolean jj_3R_17() { Token xsp; xsp = jj_scanpos; if (jj_3R_19()) { jj_scanpos = xsp; if (jj_3R_20()) return true; } return false; } final private boolean jj_3R_19() { if (jj_3R_23()) return true; return false; } final private boolean jj_3R_42() { if (jj_3R_47()) return true; return false; } public SyntaxTreeBuilderTokenManager token_source; JavaCharStream jj_input_stream; public Token token, jj_nt; private int jj_ntk; private Token jj_scanpos, jj_lastpos; private int jj_la; public boolean lookingAhead = false; private boolean jj_semLA; private int jj_gen; final private int[] jj_la1 = new int[86]; static private int[] jj_la1_0; static private int[] jj_la1_1; static private int[] jj_la1_2; static private int[] jj_la1_3; static { jj_la1_0(); jj_la1_1(); jj_la1_2(); jj_la1_3(); } private static void jj_la1_0() { jj_la1_0 = new int[] {0x40000000,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x0,0x0,0x0,0x18000110,0x0,0x40,0x0,0x0,0x0,0x1000000,0x0,0x0,0x0,0x10,0x0,0x0,0x10,0x0,0x0,0x0,0x18000110,0x1000,0x40,0x0,0x1000,0x18000110,0x1000,0x18000110,0x0,0x18000110,0x1000,0x40,0x0,0x10,0x800,0x8000010,0x20000000,0x18000110,0x20000000,0x400,0x800,0x20000000,0x110,0x18000110,0x18000110,0x18000000,0x0,0x0,0x18000000,0x100000,0x200000,0x7e000,0x7e000,0xc00000,0xc00000,0x3000000,0x3000000,0x400000,0xc80010,0x10,0x0,0x0,0x800,0x4000000,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10000000,}; } private static void jj_la1_1() { jj_la1_1 = new int[] {0x0,0x0,0xf,0x40,0x200,0x6000,0x30,0x30,0x0,0x0,0x40,0x200,0x6000,0xe0000000,0x40,0x100,0x200,0x6000,0x80000000,0x80000000,0x40,0x80,0x100,0x9ff81800,0x1800,0x1800,0x9ff81800,0x4000,0x2000,0x6000,0xe0040000,0x0,0x18000,0x40000,0x0,0xe0000000,0x0,0xe0000000,0x40000,0xe0040000,0x0,0x18000,0x20000,0x9ff80000,0x0,0x0,0x80000000,0xe0000000,0x80000000,0x0,0x0,0x80000000,0x0,0xe0000000,0xe0000000,0xe0000000,0x80000000,0x0,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfff80000,0x1ff80000,0xe0000000,0x1ff80000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x60000000,0x0,0x0,0x0,0x80000000,0x0,0x0,}; } private static void jj_la1_2() { jj_la1_2 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18,0x18,0x0,0x0,0x0,0x1f873df,0x0,0x0,0x0,0x0,0x1b,0x1b,0x0,0x0,0x0,0x1b,0x0,0x0,0x1b,0x0,0x0,0x0,0x1f873df,0x0,0x0,0x0,0x0,0x1f873df,0x0,0x1f873df,0x0,0x1f873df,0x0,0x0,0x0,0x3,0x0,0x0,0x1b,0x1f873df,0x1b,0x0,0x0,0x1b,0x0,0x1f873df,0x1f873df,0x1f873df,0x1b,0x18,0x1f873c7,0x0,0x0,0x0,0x0,0x183180,0x183180,0x0,0x0,0x0,0x1f873db,0x0,0x1f873db,0x0,0x0,0x20,0x20,0x1873c0,0x4240,0x81080,0x102100,0x0,0x600000,0x1800000,0x1e00000,0x3,0x3,0x4,}; } private static void jj_la1_3() { jj_la1_3 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; } final private JJCalls[] jj_2_rtns = new JJCalls[2]; private boolean jj_rescan = false; private int jj_gc = 0; public SyntaxTreeBuilder(java.io.InputStream stream) { this(stream, null); } public SyntaxTreeBuilder(java.io.InputStream stream, String encoding) { try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } token_source = new SyntaxTreeBuilderTokenManager(jj_input_stream); token = new Token(); jj_ntk = -1; jj_gen = 0; for (int i = 0; i < 86; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } public void ReInit(java.io.InputStream stream) { ReInit(stream, null); } public void ReInit(java.io.InputStream stream, String encoding) { try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } token_source.ReInit(jj_input_stream); token = new Token(); jj_ntk = -1; jjtree.reset(); jj_gen = 0; for (int i = 0; i < 86; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } public SyntaxTreeBuilder(java.io.Reader stream) { jj_input_stream = new JavaCharStream(stream, 1, 1); token_source = new SyntaxTreeBuilderTokenManager(jj_input_stream); token = new Token(); jj_ntk = -1; jj_gen = 0; for (int i = 0; i < 86; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } public void ReInit(java.io.Reader stream) { jj_input_stream.ReInit(stream, 1, 1); token_source.ReInit(jj_input_stream); token = new Token(); jj_ntk = -1; jjtree.reset(); jj_gen = 0; for (int i = 0; i < 86; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } public SyntaxTreeBuilder(SyntaxTreeBuilderTokenManager tm) { token_source = tm; token = new Token(); jj_ntk = -1; jj_gen = 0; for (int i = 0; i < 86; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } public void ReInit(SyntaxTreeBuilderTokenManager tm) { token_source = tm; token = new Token(); jj_ntk = -1; jjtree.reset(); jj_gen = 0; for (int i = 0; i < 86; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } final private Token jj_consume_token(int kind) throws ParseException { Token oldToken; if ((oldToken = token).next != null) token = token.next; else token = token.next = token_source.getNextToken(); jj_ntk = -1; if (token.kind == kind) { jj_gen++; if (++jj_gc > 100) { jj_gc = 0; for (int i = 0; i < jj_2_rtns.length; i++) { JJCalls c = jj_2_rtns[i]; while (c != null) { if (c.gen < jj_gen) c.first = null; c = c.next; } } } return token; } token = oldToken; jj_kind = kind; throw generateParseException(); } static private final class LookaheadSuccess extends java.lang.Error { } final private LookaheadSuccess jj_ls = new LookaheadSuccess(); final private boolean jj_scan_token(int kind) { if (jj_scanpos == jj_lastpos) { jj_la--; if (jj_scanpos.next == null) { jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); } else { jj_lastpos = jj_scanpos = jj_scanpos.next; } } else { jj_scanpos = jj_scanpos.next; } if (jj_rescan) { int i = 0; Token tok = token; while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } if (tok != null) jj_add_error_token(kind, i); } if (jj_scanpos.kind != kind) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; return false; } final public Token getNextToken() { if (token.next != null) token = token.next; else token = token.next = token_source.getNextToken(); jj_ntk = -1; jj_gen++; return token; } final public Token getToken(int index) { Token t = lookingAhead ? jj_scanpos : token; for (int i = 0; i < index; i++) { if (t.next != null) t = t.next; else t = t.next = token_source.getNextToken(); } return t; } final private int jj_ntk() { if ((jj_nt=token.next) == null) return (jj_ntk = (token.next=token_source.getNextToken()).kind); else return (jj_ntk = jj_nt.kind); } private java.util.Vector jj_expentries = new java.util.Vector(); private int[] jj_expentry; private int jj_kind = -1; private int[] jj_lasttokens = new int[100]; private int jj_endpos; private void jj_add_error_token(int kind, int pos) { if (pos >= 100) return; if (pos == jj_endpos + 1) { jj_lasttokens[jj_endpos++] = kind; } else if (jj_endpos != 0) { jj_expentry = new int[jj_endpos]; for (int i = 0; i < jj_endpos; i++) { jj_expentry[i] = jj_lasttokens[i]; } boolean exists = false; for (java.util.Enumeration e = jj_expentries.elements(); e.hasMoreElements();) { int[] oldentry = (int[])(e.nextElement()); if (oldentry.length == jj_expentry.length) { exists = true; for (int i = 0; i < jj_expentry.length; i++) { if (oldentry[i] != jj_expentry[i]) { exists = false; break; } } if (exists) break; } } if (!exists) jj_expentries.addElement(jj_expentry); if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; } } public ParseException generateParseException() { jj_expentries.removeAllElements(); boolean[] la1tokens = new boolean[106]; if (jj_kind >= 0) { la1tokens[jj_kind] = true; jj_kind = -1; } for (int i = 0; i < 86; i++) { if (jj_la1[i] == jj_gen) { for (int j = 0; j < 32; j++) { if ((jj_la1_0[i] & (1<<j)) != 0) { la1tokens[j] = true; } if ((jj_la1_1[i] & (1<<j)) != 0) { la1tokens[32+j] = true; } if ((jj_la1_2[i] & (1<<j)) != 0) { la1tokens[64+j] = true; } if ((jj_la1_3[i] & (1<<j)) != 0) { la1tokens[96+j] = true; } } } } for (int i = 0; i < 106; i++) { if (la1tokens[i]) { jj_expentry = new int[1]; jj_expentry[0] = i; jj_expentries.addElement(jj_expentry); } } jj_endpos = 0; jj_rescan_token(); jj_add_error_token(0, 0); int[][] exptokseq = new int[jj_expentries.size()][]; for (int i = 0; i < jj_expentries.size(); i++) { exptokseq[i] = (int[])jj_expentries.elementAt(i); } return new ParseException(token, exptokseq, tokenImage); } final public void enable_tracing() { } final public void disable_tracing() { } final private void jj_rescan_token() { jj_rescan = true; for (int i = 0; i < 2; i++) { try { JJCalls p = jj_2_rtns[i]; do { if (p.gen > jj_gen) { jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; switch (i) { case 0: jj_3_1(); break; case 1: jj_3_2(); break; } } p = p.next; } while (p != null); } catch(LookaheadSuccess ls) { } } jj_rescan = false; } final private void jj_save(int index, int xla) { JJCalls p = jj_2_rtns[index]; while (p.gen > jj_gen) { if (p.next == null) { p = p.next = new JJCalls(); break; } p = p.next; } p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; } static final class JJCalls { int gen; Token first; int arg; JJCalls next; } }