diff --git a/agrest-cayenne/src/main/java/io/agrest/cayenne/exp/CayenneExpPostProcessor.java b/agrest-cayenne/src/main/java/io/agrest/cayenne/exp/CayenneExpPostProcessor.java index 6defef97d..3fa40c366 100644 --- a/agrest-cayenne/src/main/java/io/agrest/cayenne/exp/CayenneExpPostProcessor.java +++ b/agrest-cayenne/src/main/java/io/agrest/cayenne/exp/CayenneExpPostProcessor.java @@ -11,24 +11,38 @@ import io.agrest.converter.jsonvalue.SqlTimeConverter; import io.agrest.converter.jsonvalue.SqlTimestampConverter; import io.agrest.converter.jsonvalue.UtilDateConverter; +import org.apache.cayenne.Persistent; import org.apache.cayenne.di.Inject; import org.apache.cayenne.exp.Expression; +import org.apache.cayenne.exp.ExpressionFactory; import org.apache.cayenne.exp.TraversalHelper; import org.apache.cayenne.exp.parser.ASTDbPath; +import org.apache.cayenne.exp.parser.ASTExists; +import org.apache.cayenne.exp.parser.ASTNotExists; import org.apache.cayenne.exp.parser.ASTObjPath; import org.apache.cayenne.exp.parser.ASTPath; +import org.apache.cayenne.exp.parser.ASTSubquery; import org.apache.cayenne.exp.parser.ConditionNode; +import org.apache.cayenne.exp.parser.Node; import org.apache.cayenne.exp.parser.SimpleNode; +import org.apache.cayenne.map.DbJoin; +import org.apache.cayenne.map.DbRelationship; import org.apache.cayenne.map.EntityResolver; import org.apache.cayenne.map.ObjEntity; +import org.apache.cayenne.map.ObjRelationship; +import org.apache.cayenne.query.FluentSelect; +import org.apache.cayenne.query.ObjectSelect; import java.util.Date; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; public class CayenneExpPostProcessor implements ICayenneExpPostProcessor { + private static final String EMPTY_PATH = ""; + private final EntityResolver entityResolver; private final IPathResolver pathCache; private final Map> converters; @@ -73,6 +87,11 @@ private Expression validateAndCleanup(ObjEntity entity, Expression exp) { exp = pathCache.resolve(entity.getName(), ((ASTObjPath) exp).getPath()).getPathExp(); } + // process root ASTExits|ASTNotExists that can't be properly handled by ExpressionProcessor. + if (exp instanceof ASTExists || exp instanceof ASTNotExists) { + return optimizeExistsExp(exp); + } + return exp; } @@ -80,6 +99,16 @@ private ExpressionProcessor getOrCreateExpressionProcessor(ObjEntity entity) { return postProcessors.computeIfAbsent(entity.getName(), e -> new ExpressionProcessor(entity)); } + private static Expression optimizeExistsExp(Expression exp) { + Expression pathExistExp = ((Expression) exp.getOperand(0)); + if (pathExistExp instanceof ASTSubquery) { + return exp; + } + return exp instanceof ASTExists + ? pathExistExp + : pathExistExp.notExp(); + } + private class ExpressionProcessor extends TraversalHelper { private final ObjEntity entity; @@ -96,7 +125,6 @@ public void startNode(Expression node, Expression parentNode) { "Expression contains a DB_PATH expression that is not allowed here: %s", parentNode); } - } @Override @@ -113,6 +141,22 @@ public void finishedChild(Expression parentNode, int childIndex, boolean hasMore parentNode.setOperand(childIndex, replacement); } } + if (parentNode instanceof ASTExists || parentNode instanceof ASTNotExists) { + if (!(childNode instanceof ASTPath)) { + throw AgException.badRequest("%s only supports path value", parentNode.expName()); + } + ObjPathMarker marker = createPathMarker(entity, (ASTPath) childNode); + Expression pathExistExp = markerToExpression(marker); + ((ConditionNode) parentNode).jjtAddChild( + marker.relationship != null + ? new ASTSubquery(subquery(marker.relationship, pathExistExp)) + : (Node) pathExistExp, + childIndex + ); + } + if (childNode instanceof ASTExists || childNode instanceof ASTNotExists) { + parentNode.setOperand(childIndex, optimizeExistsExp((Expression) childNode)); + } } @Override @@ -167,6 +211,53 @@ private Object convert(SimpleNode parentExp, JsonNode node) { return node.asText(); } + private ObjPathMarker createPathMarker(ObjEntity entity, ASTPath o) { + String path = o.getPath(); + String newPath; + String firstSegment; + int dotIndex = path.indexOf("."); + if (dotIndex == -1) { + firstSegment = path; + newPath = EMPTY_PATH; + } else { + firstSegment = path.substring(0, dotIndex); + newPath = path.substring(dotIndex + 1); + } + // mark relationship that this path relates to and transform path + ObjRelationship relationship = entity.getRelationship(firstSegment); + if (relationship == null) { + newPath = path; + } + return new ObjPathMarker(newPath, relationship); + } + + private Expression markerToExpression(ObjPathMarker marker) { + // special case for an empty path + // we don't need additional qualifier, just plain exists subquery + if (marker.getPath().equals(EMPTY_PATH)) { + return null; + } + return ExpressionFactory.noMatchExp(marker, null); + } + + private FluentSelect subquery(ObjRelationship relationship, Expression exp) { + List dbRelationships = relationship.getDbRelationships(); + for (DbRelationship dbRelationship : dbRelationships) { + for (DbJoin join : dbRelationship.getJoins()) { + Expression joinMatchExp = ExpressionFactory.matchDbExp(join.getTargetName(), + ExpressionFactory.enclosingObjectExp(ExpressionFactory.dbPathExp(join.getSourceName()))); + if (exp == null) { + exp = joinMatchExp; + } else { + exp = exp.andExp(joinMatchExp); + } + } + } + return ObjectSelect.query(Persistent.class) + .dbEntityName(dbRelationships.get(0).getTargetEntityName()) + .where(exp); + } + private String findPeerPath(SimpleNode exp, Object child) { if (exp == null) { @@ -215,4 +306,14 @@ private String findChildPath(Expression exp) { return null; } } + + static class ObjPathMarker extends ASTObjPath { + + final ObjRelationship relationship; + + ObjPathMarker(String path, ObjRelationship relationship) { + super(path); + this.relationship = relationship; + } + } } diff --git a/agrest-cayenne/src/main/java/io/agrest/cayenne/exp/CayenneExpressionVisitor.java b/agrest-cayenne/src/main/java/io/agrest/cayenne/exp/CayenneExpressionVisitor.java index f0720c906..97b85569e 100644 --- a/agrest-cayenne/src/main/java/io/agrest/cayenne/exp/CayenneExpressionVisitor.java +++ b/agrest-cayenne/src/main/java/io/agrest/cayenne/exp/CayenneExpressionVisitor.java @@ -1,9 +1,11 @@ package io.agrest.cayenne.exp; import io.agrest.cayenne.path.PathOps; +import io.agrest.exp.AgExpressionException; import io.agrest.exp.parser.SimpleNode; import io.agrest.exp.parser.*; import org.apache.cayenne.exp.Expression; +import org.apache.cayenne.exp.ExpressionException; import org.apache.cayenne.exp.ExpressionParameter; import org.apache.cayenne.exp.parser.*; @@ -48,11 +50,21 @@ public Expression visit(ExpEqual node, Expression parent) { return process(node, parent, new ASTEqual()); } + @Override + public Expression visit(ExpExists node, Expression parent) { + return process(node, parent, constructExpression(ASTExists.class)); + } + @Override public Expression visit(ExpNotEqual node, Expression data) { return process(node, data, new ASTNotEqual()); } + @Override + public Expression visit(ExpNotExists node, Expression parent) { + return process(node, parent, constructExpression(ASTNotExists.class)); + } + @Override public Expression visit(ExpLessOrEqual node, Expression data) { return process(node, data, new ASTLessOrEqual()); @@ -313,7 +325,11 @@ BiFunction getMergerForNode(Expression node) } private Expression addToParent(Expression parent, Expression child) { - parent.setOperand(parent.getOperandCount(), child); + try { + parent.setOperand(parent.getOperandCount(), child); + } catch (ExpressionException e) { + throw new AgExpressionException(e); + } return parent; } @@ -340,10 +356,10 @@ private Expression addToLikeNode(Expression parent, Expression child) { // A hack - must use reflection to create Cayenne expressions, as the common int constructor is not public // in any of them. // TODO: refactor this in Cayenne to provide public constructors - private Expression constructExpression(Class expClass) { - Expression exp; + private T constructExpression(Class expClass) { + T exp; try { - Constructor constructor = expClass.getDeclaredConstructor(int.class); + Constructor constructor = expClass.getDeclaredConstructor(int.class); constructor.setAccessible(true); exp = constructor.newInstance(0); } catch (Exception e) { diff --git a/agrest-cayenne/src/test/java/io/agrest/cayenne/GET/ExpIT.java b/agrest-cayenne/src/test/java/io/agrest/cayenne/GET/ExpIT.java index 5a385452c..10e64fc59 100644 --- a/agrest-cayenne/src/test/java/io/agrest/cayenne/GET/ExpIT.java +++ b/agrest-cayenne/src/test/java/io/agrest/cayenne/GET/ExpIT.java @@ -16,6 +16,7 @@ import jakarta.ws.rs.core.Configuration; import jakarta.ws.rs.core.Context; import jakarta.ws.rs.core.UriInfo; + import java.time.LocalDateTime; public class ExpIT extends MainDbTest { @@ -379,6 +380,53 @@ public void like_SingleChar_Pattern_Escape() { .wasOk().bodyEquals(1, "{\"id\":4}"); } + @Test + public void exists_Path_Relationship() { + + tester.e2().insertColumns("id_", "name") + .values(1, "qwe") + .values(2, "try") + .exec(); + + tester.e3().insertColumns("id_", "name", "e2_id") + .values(1, "xxx", 1) + .values(2, "yxy", 2) + .values(3, "y_y", 2) + .values(4, "y_ay", null) + .exec(); + + tester.target("/e3") + .queryParam("include", "id") + .queryParam("exp", "exists e2") + .queryParam("sort", "id") + .get() + .wasOk() + .bodyEquals(3, "{\"id\":1}", "{\"id\":2}", "{\"id\":3}"); + } + + @Test + public void exists_Path_NoRelationship() { + + tester.e2().insertColumns("id_", "name") + .values(1, "qwe") + .values(2, "try") + .exec(); + + tester.e3().insertColumns("id_", "name") + .values(1, "xxx") + .values(2, "yxy") + .values(3, null) + .exec(); + + tester.target("/e3") + .queryParam("include", "id") + .queryParam("exp", "exists name") + .queryParam("sort", "id") + .get() + .wasOk() + .bodyEquals(2, "{\"id\":1}", "{\"id\":2}"); + } + @Test public void like_MultiChar_Pattern_Escape() { diff --git a/agrest-cayenne/src/test/java/io/agrest/cayenne/exp/CayenneExpressionVisitorTest.java b/agrest-cayenne/src/test/java/io/agrest/cayenne/exp/CayenneExpressionVisitorTest.java index 8d675ff85..26841ed5d 100644 --- a/agrest-cayenne/src/test/java/io/agrest/cayenne/exp/CayenneExpressionVisitorTest.java +++ b/agrest-cayenne/src/test/java/io/agrest/cayenne/exp/CayenneExpressionVisitorTest.java @@ -8,7 +8,8 @@ import org.junit.jupiter.params.provider.ValueSource; import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; + public class CayenneExpressionVisitorTest { @@ -32,6 +33,7 @@ public class CayenneExpressionVisitorTest { "currentTimestamp()_|org.apache.cayenne.exp.parser.ASTCurrentTimestamp", "t.value / 2_|org.apache.cayenne.exp.parser.ASTDivide", "t.v1 = t.v2_|org.apache.cayenne.exp.parser.ASTEqual", + "exists details_|org.apache.cayenne.exp.parser.ASTExists", "day(t.dateTime)_|org.apache.cayenne.exp.parser.ASTExtract", "false_|org.apache.cayenne.exp.parser.ASTFalse", "t.v > 0_|org.apache.cayenne.exp.parser.ASTGreater", @@ -51,6 +53,7 @@ public class CayenneExpressionVisitorTest { "!(t.a = 1 and t.b = 3)_|org.apache.cayenne.exp.parser.ASTNot", "t.value !between 10 and 20_|org.apache.cayenne.exp.parser.ASTNotBetween", "t.v1 != t.v2_|org.apache.cayenne.exp.parser.ASTNotEqual", + "not exists details_|org.apache.cayenne.exp.parser.ASTNotExists", "t.v !in (0, 5)_|org.apache.cayenne.exp.parser.ASTNotIn", "t.name !like '%s'_|org.apache.cayenne.exp.parser.ASTNotLike", "t.name !likeIgnoreCase '%s'_|org.apache.cayenne.exp.parser.ASTNotLikeIgnoreCase", @@ -86,7 +89,7 @@ public void accept_ReturnedType(String agrestExp, Class ca "a not likeIgnoreCase 'bcd' escape '$'"}) public void accept_escapeChar(String agrestExp) { Expression cayenneExp = Exp.parse(agrestExp).accept(visitor, null); - assertTrue(cayenneExp instanceof PatternMatchNode); + assertInstanceOf(PatternMatchNode.class, cayenneExp); PatternMatchNode matchNode = (PatternMatchNode) cayenneExp; assertEquals('$', matchNode.getEscapeChar()); } diff --git a/agrest-cayenne/src/test/java/io/agrest/cayenne/processor/CayenneQueryAssemblerTest.java b/agrest-cayenne/src/test/java/io/agrest/cayenne/processor/CayenneQueryAssemblerTest.java index d74912784..d51b7a1d7 100644 --- a/agrest-cayenne/src/test/java/io/agrest/cayenne/processor/CayenneQueryAssemblerTest.java +++ b/agrest-cayenne/src/test/java/io/agrest/cayenne/processor/CayenneQueryAssemblerTest.java @@ -1,6 +1,8 @@ package io.agrest.cayenne.processor; import io.agrest.access.PathChecker; +import io.agrest.cayenne.cayenne.main.E3; +import io.agrest.exp.AgExpressionException; import io.agrest.id.AgObjectId; import io.agrest.AgRequestBuilder; import io.agrest.RootResourceEntity; @@ -13,6 +15,8 @@ import io.agrest.runtime.meta.RequestSchema; import io.agrest.runtime.processor.select.SelectContext; import org.apache.cayenne.di.Injector; +import org.apache.cayenne.exp.Expression; +import org.apache.cayenne.exp.ExpressionFactory; import org.apache.cayenne.query.ObjectSelect; import org.junit.jupiter.api.Test; @@ -103,6 +107,46 @@ public void createRootQuery_Qualifier() { assertEquals(E1.NAME.eq("X").andExp(E1.NAME.in("a", "b")), q2.getWhere()); } + @Test + public void createRootQuery_Qualifier_Exists() { + RootResourceEntity entity = getResourceEntity(E3.class); + + SelectContext c = new SelectContext<>( + E3.class, + new RequestSchema(mock(AgSchema.class)), + mock(AgRequestBuilder.class), + PathChecker.ofDefault(), + mock(Injector.class)); + + c.setEntity(entity); + + entity.andExp(Exp.parse("exists e2")); + ObjectSelect q1 = queryAssembler.createRootQuery(c); + Expression expectedQ1 = ExpressionFactory.exists(ObjectSelect.query(E3.class).column(E3.E2)); + assertEquals(expectedQ1, q1.getWhere()); + + entity.andExp(Exp.parse("not exists e5")); + ObjectSelect q2 = queryAssembler.createRootQuery(c); + assertEquals(expectedQ1.andExp(ExpressionFactory.notExists(ObjectSelect.query(E3.class).column(E3.E5))), q2.getWhere()); + } + + @Test + public void createRootQuery_Qualifier_Exists_Invalid_Condition() { + RootResourceEntity entity = getResourceEntity(E3.class); + + SelectContext c = new SelectContext<>( + E3.class, + new RequestSchema(mock(AgSchema.class)), + mock(AgRequestBuilder.class), + PathChecker.ofDefault(), + mock(Injector.class)); + + c.setEntity(entity); + + entity.andExp(Exp.exists("name = 'test1'")); + assertThrows(AgExpressionException.class, () -> queryAssembler.createRootQuery(c)); + } + @Test public void createRootQuery_ById() { diff --git a/agrest-engine/src/main/java/io/agrest/exp/parser/AgExpressionParser.java b/agrest-engine/src/main/java/io/agrest/exp/parser/AgExpressionParser.java index 732133362..40fb708f3 100644 --- a/agrest-engine/src/main/java/io/agrest/exp/parser/AgExpressionParser.java +++ b/agrest-engine/src/main/java/io/agrest/exp/parser/AgExpressionParser.java @@ -119,29 +119,32 @@ final public void andCondition() throws ParseException { } final public void notCondition() throws ParseException { - switch (jj_nt.kind) { - case 3: - case 4:{ + if (jj_2_1(2147483647)) { + notExists(); + } else { switch (jj_nt.kind) { - case 3:{ - jj_consume_token(3); - break; - } + case 3: case 4:{ - jj_consume_token(4); - break; + switch (jj_nt.kind) { + case 3:{ + jj_consume_token(3); + break; + } + case 4:{ + jj_consume_token(4); + break; + } + default: + jj_la1[2] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); } - default: - jj_la1[2] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } ExpNot jjtn001 = new ExpNot(JJTNOT); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); - try { - simpleCondition(); - } catch (Throwable jjte001) { + try { + simpleCondition(); + } catch (Throwable jjte001) { if (jjtc001) { jjtree.clearNodeScope(jjtn001); jjtc001 = false; @@ -155,56 +158,57 @@ final public void notCondition() throws ParseException { {if (true) throw (ParseException)jjte001;} } {if (true) throw (Error)jjte001;} - } finally { + } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, 1); } + } + break; + } + case 18: + case 27: + case 28: + case 31: + case NULL: + case TRUE: + case FALSE: + case CONCAT: + case SUBSTRING: + case TRIM: + case LOWER: + case UPPER: + case LENGTH: + case LOCATE: + case ABS: + case SQRT: + case MOD: + case CURRENT_DATE: + case CURRENT_TIME: + case CURRENT_TIMESTAMP: + case YEAR: + case MONTH: + case WEEK: + case DAY_OF_YEAR: + case DAY: + case DAY_OF_MONTH: + case DAY_OF_WEEK: + case HOUR: + case MINUTE: + case SECOND: + case NAMED_PARAMETER: + case PROPERTY_PATH: + case SINGLE_QUOTED_STRING: + case DOUBLE_QUOTED_STRING: + case INT_LITERAL: + case FLOAT_LITERAL:{ + simpleCondition(); + break; + } + default: + jj_la1[3] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); } - break; - } - case 17: - case 26: - case 27: - case 30: - case NULL: - case TRUE: - case FALSE: - case CONCAT: - case SUBSTRING: - case TRIM: - case LOWER: - case UPPER: - case LENGTH: - case LOCATE: - case ABS: - case SQRT: - case MOD: - case CURRENT_DATE: - case CURRENT_TIME: - case CURRENT_TIMESTAMP: - case YEAR: - case MONTH: - case WEEK: - case DAY_OF_YEAR: - case DAY: - case DAY_OF_MONTH: - case DAY_OF_WEEK: - case HOUR: - case MINUTE: - case SECOND: - case NAMED_PARAMETER: - case PROPERTY_PATH: - case SINGLE_QUOTED_STRING: - case DOUBLE_QUOTED_STRING: - case INT_LITERAL: - case FLOAT_LITERAL:{ - simpleCondition(); - break; - } - default: - jj_la1[3] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); } } @@ -237,10 +241,10 @@ final public void simpleCondition() throws ParseException {// variable arity for } break; } - case 17: - case 26: + case 18: case 27: - case 30: + case 28: + case 31: case NULL: case CONCAT: case SUBSTRING: @@ -275,7 +279,6 @@ final public void simpleCondition() throws ParseException {// variable arity for switch (jj_nt.kind) { case 3: case 4: - case 5: case 6: case 7: case 8: @@ -284,21 +287,22 @@ final public void simpleCondition() throws ParseException {// variable arity for case 11: case 12: case 13: - case 15: + case 14: case 16: - case 19:{ + case 17: + case 20:{ switch (jj_nt.kind) { - case 5: - case 6:{ + case 6: + case 7:{ switch (jj_nt.kind) { - case 5:{ - jj_consume_token(5); - break; - } case 6:{ jj_consume_token(6); break; } + case 7:{ + jj_consume_token(7); + break; + } default: jj_la1[4] = jj_gen; jj_consume_token(-1); @@ -330,17 +334,17 @@ final public void simpleCondition() throws ParseException {// variable arity for } break; } - case 7: - case 8:{ + case 8: + case 9:{ switch (jj_nt.kind) { - case 7:{ - jj_consume_token(7); - break; - } case 8:{ jj_consume_token(8); break; } + case 9:{ + jj_consume_token(9); + break; + } default: jj_la1[5] = jj_gen; jj_consume_token(-1); @@ -372,8 +376,8 @@ final public void simpleCondition() throws ParseException {// variable arity for } break; } - case 9:{ - jj_consume_token(9); + case 10:{ + jj_consume_token(10); ExpLessOrEqual jjtn005 = new ExpLessOrEqual(JJTLESSOREQUAL); boolean jjtc005 = true; jjtree.openNodeScope(jjtn005); @@ -400,8 +404,8 @@ final public void simpleCondition() throws ParseException {// variable arity for } break; } - case 10:{ - jj_consume_token(10); + case 11:{ + jj_consume_token(11); ExpLess jjtn006 = new ExpLess(JJTLESS); boolean jjtc006 = true; jjtree.openNodeScope(jjtn006); @@ -428,8 +432,8 @@ final public void simpleCondition() throws ParseException {// variable arity for } break; } - case 11:{ - jj_consume_token(11); + case 12:{ + jj_consume_token(12); ExpGreater jjtn007 = new ExpGreater(JJTGREATER); boolean jjtc007 = true; jjtree.openNodeScope(jjtn007); @@ -456,8 +460,8 @@ final public void simpleCondition() throws ParseException {// variable arity for } break; } - case 12:{ - jj_consume_token(12); + case 13:{ + jj_consume_token(13); ExpGreaterOrEqual jjtn008 = new ExpGreaterOrEqual(JJTGREATEROREQUAL); boolean jjtc008 = true; jjtree.openNodeScope(jjtn008); @@ -484,16 +488,16 @@ final public void simpleCondition() throws ParseException {// variable arity for } break; } - case 13:{ - jj_consume_token(13); + case 14:{ + jj_consume_token(14); scalarExpression(); ExpLike jjtn009 = new ExpLike(JJTLIKE); boolean jjtc009 = true; jjtree.openNodeScope(jjtn009); try { switch (jj_nt.kind) { - case 14:{ - jj_consume_token(14); + case 15:{ + jj_consume_token(15); stringLiteral(); arity = 3; break; @@ -523,16 +527,16 @@ final public void simpleCondition() throws ParseException {// variable arity for } break; } - case 15:{ - jj_consume_token(15); + case 16:{ + jj_consume_token(16); scalarExpression(); ExpLikeIgnoreCase jjtn010 = new ExpLikeIgnoreCase(JJTLIKEIGNORECASE); boolean jjtc010 = true; jjtree.openNodeScope(jjtn010); try { switch (jj_nt.kind) { - case 14:{ - jj_consume_token(14); + case 15:{ + jj_consume_token(15); stringLiteral(); arity = 3; break; @@ -562,8 +566,8 @@ final public void simpleCondition() throws ParseException {// variable arity for } break; } - case 16:{ - jj_consume_token(16); + case 17:{ + jj_consume_token(17); ExpIn jjtn011 = new ExpIn(JJTIN); boolean jjtc011 = true; jjtree.openNodeScope(jjtn011); @@ -573,10 +577,10 @@ final public void simpleCondition() throws ParseException {// variable arity for namedParameter(); break; } - case 17:{ - jj_consume_token(17); - scalarCommaList(); + case 18:{ jj_consume_token(18); + scalarCommaList(); + jj_consume_token(19); break; } default: @@ -605,8 +609,8 @@ final public void simpleCondition() throws ParseException {// variable arity for } break; } - case 19:{ - jj_consume_token(19); + case 20:{ + jj_consume_token(20); scalarExpression(); jj_consume_token(2); ExpBetween jjtn012 = new ExpBetween(JJTBETWEEN); @@ -660,6 +664,89 @@ final public void simpleCondition() throws ParseException {// variable arity for } } + final public void notExists() throws ParseException { + switch (jj_nt.kind) { + case 3: + case 4:{ + switch (jj_nt.kind) { + case 3:{ + jj_consume_token(3); + break; + } + case 4:{ + jj_consume_token(4); + break; + } + default: + jj_la1[12] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +ExpNotExists jjtn001 = new ExpNotExists(JJTNOTEXISTS); + boolean jjtc001 = true; + jjtree.openNodeScope(jjtn001); + try { + exists(); + } 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, 1); + } + } + break; + } + case 5:{ +ExpExists jjtn002 = new ExpExists(JJTEXISTS); + boolean jjtc002 = true; + jjtree.openNodeScope(jjtn002); + try { + exists(); + } catch (Throwable jjte002) { +if (jjtc002) { + jjtree.clearNodeScope(jjtn002); + jjtc002 = false; + } else { + jjtree.popNode(); + } + if (jjte002 instanceof RuntimeException) { + {if (true) throw (RuntimeException)jjte002;} + } + if (jjte002 instanceof ParseException) { + {if (true) throw (ParseException)jjte002;} + } + {if (true) throw (Error)jjte002;} + } finally { +if (jjtc002) { + jjtree.closeNodeScope(jjtn002, 1); + } + } + break; + } + default: + jj_la1[13] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +} + + final public void exists() throws ParseException { + jj_consume_token(5); + pathExpression(); +} + final public void simpleNotCondition() throws ParseException {// variable arity for the Like nodes int arity = 2; switch (jj_nt.kind) { @@ -672,27 +759,27 @@ final public void simpleNotCondition() throws ParseException {// variable arity break; } default: - jj_la1[12] = jj_gen; + jj_la1[14] = jj_gen; jj_consume_token(-1); throw new ParseException(); } switch (jj_nt.kind) { - case 13:{ - jj_consume_token(13); + case 14:{ + jj_consume_token(14); scalarExpression(); ExpNotLike jjtn001 = new ExpNotLike(JJTNOTLIKE); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); try { switch (jj_nt.kind) { - case 14:{ - jj_consume_token(14); + case 15:{ + jj_consume_token(15); stringLiteral(); arity=3; break; } default: - jj_la1[13] = jj_gen; + jj_la1[15] = jj_gen; ; } } catch (Throwable jjte001) { @@ -716,22 +803,22 @@ final public void simpleNotCondition() throws ParseException {// variable arity } break; } - case 15:{ - jj_consume_token(15); + case 16:{ + jj_consume_token(16); scalarExpression(); ExpNotLikeIgnoreCase jjtn002 = new ExpNotLikeIgnoreCase(JJTNOTLIKEIGNORECASE); boolean jjtc002 = true; jjtree.openNodeScope(jjtn002); try { switch (jj_nt.kind) { - case 14:{ - jj_consume_token(14); + case 15:{ + jj_consume_token(15); stringLiteral(); arity=3; break; } default: - jj_la1[14] = jj_gen; + jj_la1[16] = jj_gen; ; } } catch (Throwable jjte002) { @@ -755,8 +842,8 @@ final public void simpleNotCondition() throws ParseException {// variable arity } break; } - case 16:{ - jj_consume_token(16); + case 17:{ + jj_consume_token(17); ExpNotIn jjtn003 = new ExpNotIn(JJTNOTIN); boolean jjtc003 = true; jjtree.openNodeScope(jjtn003); @@ -766,14 +853,14 @@ final public void simpleNotCondition() throws ParseException {// variable arity namedParameter(); break; } - case 17:{ - jj_consume_token(17); - scalarCommaList(); + case 18:{ jj_consume_token(18); + scalarCommaList(); + jj_consume_token(19); break; } default: - jj_la1[15] = jj_gen; + jj_la1[17] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -798,8 +885,8 @@ final public void simpleNotCondition() throws ParseException {// variable arity } break; } - case 19:{ - jj_consume_token(19); + case 20:{ + jj_consume_token(20); scalarExpression(); jj_consume_token(2); ExpNotBetween jjtn004 = new ExpNotBetween(JJTNOTBETWEEN); @@ -829,7 +916,7 @@ final public void simpleNotCondition() throws ParseException {// variable arity break; } default: - jj_la1[16] = jj_gen; + jj_la1[18] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -844,15 +931,15 @@ final public void scalarCommaList() throws ParseException { label_3: while (true) { switch (jj_nt.kind) { - case 20:{ + case 21:{ ; break; } default: - jj_la1[17] = jj_gen; + jj_la1[19] = jj_gen; break label_3; } - jj_consume_token(20); + jj_consume_token(21); scalarConstExpression(); } } catch (Throwable jjte001) { @@ -877,9 +964,9 @@ final public void scalarCommaList() throws ParseException { } final public void conditionExpression() throws ParseException { - if (jj_2_1(2147483647)) { + if (jj_2_2(2147483647)) { stringExpression(); - } else if (jj_2_2(2147483647)) { + } else if (jj_2_3(2147483647)) { dateTimeFunction(); } else { switch (jj_nt.kind) { @@ -896,10 +983,10 @@ final public void conditionExpression() throws ParseException { } break; } - case 17: - case 26: + case 18: case 27: - case 30: + case 28: + case 31: case CONCAT: case SUBSTRING: case TRIM: @@ -931,7 +1018,7 @@ final public void conditionExpression() throws ParseException { break; } default: - jj_la1[18] = jj_gen; + jj_la1[20] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -939,7 +1026,7 @@ final public void conditionExpression() throws ParseException { } final public void stringParameter() throws ParseException { - if (jj_2_3(2147483647)) { + if (jj_2_4(2147483647)) { stringExpression(); } else { switch (jj_nt.kind) { @@ -971,7 +1058,7 @@ final public void stringParameter() throws ParseException { break; } default: - jj_la1[19] = jj_gen; + jj_la1[21] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1013,7 +1100,7 @@ final public void stringLiteral() throws ParseException { break; } default: - jj_la1[20] = jj_gen; + jj_la1[22] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1035,7 +1122,7 @@ final public void stringExpression() throws ParseException { break; } default: - jj_la1[21] = jj_gen; + jj_la1[23] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1043,10 +1130,10 @@ final public void stringExpression() throws ParseException { final public void scalarExpression() throws ParseException { switch (jj_nt.kind) { - case 17: - case 26: + case 18: case 27: - case 30: + case 28: + case 31: case NULL: case CONCAT: case SUBSTRING: @@ -1113,7 +1200,7 @@ final public void scalarExpression() throws ParseException { break; } default: - jj_la1[22] = jj_gen; + jj_la1[24] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1198,7 +1285,7 @@ final public void scalarConstExpression() throws ParseException { break; } default: - jj_la1[23] = jj_gen; + jj_la1[25] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1213,15 +1300,15 @@ final public void bitwiseOr() throws ParseException { label_4: while (true) { switch (jj_nt.kind) { - case 21:{ + case 22:{ ; break; } default: - jj_la1[24] = jj_gen; + jj_la1[26] = jj_gen; break label_4; } - jj_consume_token(21); + jj_consume_token(22); ExpBitwiseOr jjtn001 = new ExpBitwiseOr(JJTBITWISEOR); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); @@ -1254,15 +1341,15 @@ final public void bitwiseXor() throws ParseException { label_5: while (true) { switch (jj_nt.kind) { - case 22:{ + case 23:{ ; break; } default: - jj_la1[25] = jj_gen; + jj_la1[27] = jj_gen; break label_5; } - jj_consume_token(22); + jj_consume_token(23); ExpBitwiseXor jjtn001 = new ExpBitwiseXor(JJTBITWISEXOR); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); @@ -1295,15 +1382,15 @@ final public void bitwiseAnd() throws ParseException { label_6: while (true) { switch (jj_nt.kind) { - case 23:{ + case 24:{ ; break; } default: - jj_la1[26] = jj_gen; + jj_la1[28] = jj_gen; break label_6; } - jj_consume_token(23); + jj_consume_token(24); ExpBitwiseAnd jjtn001 = new ExpBitwiseAnd(JJTBITWISEAND); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); @@ -1336,18 +1423,18 @@ final public void bitwiseShift() throws ParseException { label_7: while (true) { switch (jj_nt.kind) { - case 24: - case 25:{ + case 25: + case 26:{ ; break; } default: - jj_la1[27] = jj_gen; + jj_la1[29] = jj_gen; break label_7; } switch (jj_nt.kind) { - case 24:{ - jj_consume_token(24); + case 25:{ + jj_consume_token(25); ExpBitwiseLeftShift jjtn001 = new ExpBitwiseLeftShift(JJTBITWISELEFTSHIFT); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); @@ -1374,8 +1461,8 @@ final public void bitwiseShift() throws ParseException { } break; } - case 25:{ - jj_consume_token(25); + case 26:{ + jj_consume_token(26); ExpBitwiseRightShift jjtn002 = new ExpBitwiseRightShift(JJTBITWISERIGHTSHIFT); boolean jjtc002 = true; jjtree.openNodeScope(jjtn002); @@ -1403,7 +1490,7 @@ final public void bitwiseShift() throws ParseException { break; } default: - jj_la1[28] = jj_gen; + jj_la1[30] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1415,18 +1502,18 @@ final public void arithmeticExp() throws ParseException { label_8: while (true) { switch (jj_nt.kind) { - case 26: - case 27:{ + case 27: + case 28:{ ; break; } default: - jj_la1[29] = jj_gen; + jj_la1[31] = jj_gen; break label_8; } switch (jj_nt.kind) { - case 26:{ - jj_consume_token(26); + case 27:{ + jj_consume_token(27); ExpAdd jjtn001 = new ExpAdd(JJTADD); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); @@ -1453,8 +1540,8 @@ final public void arithmeticExp() throws ParseException { } break; } - case 27:{ - jj_consume_token(27); + case 28:{ + jj_consume_token(28); ExpSubtract jjtn002 = new ExpSubtract(JJTSUBTRACT); boolean jjtc002 = true; jjtree.openNodeScope(jjtn002); @@ -1482,7 +1569,7 @@ final public void arithmeticExp() throws ParseException { break; } default: - jj_la1[30] = jj_gen; + jj_la1[32] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1494,18 +1581,18 @@ final public void multiplySubtractExp() throws ParseException { label_9: while (true) { switch (jj_nt.kind) { - case 28: - case 29:{ + case 29: + case 30:{ ; break; } default: - jj_la1[31] = jj_gen; + jj_la1[33] = jj_gen; break label_9; } switch (jj_nt.kind) { - case 28:{ - jj_consume_token(28); + case 29:{ + jj_consume_token(29); ExpMultiply jjtn001 = new ExpMultiply(JJTMULTIPLY); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); @@ -1532,8 +1619,8 @@ final public void multiplySubtractExp() throws ParseException { } break; } - case 29:{ - jj_consume_token(29); + case 30:{ + jj_consume_token(30); ExpDivide jjtn002 = new ExpDivide(JJTDIVIDE); boolean jjtc002 = true; jjtree.openNodeScope(jjtn002); @@ -1561,7 +1648,7 @@ final public void multiplySubtractExp() throws ParseException { break; } default: - jj_la1[32] = jj_gen; + jj_la1[34] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1570,9 +1657,9 @@ final public void multiplySubtractExp() throws ParseException { final public void numericTermExt() throws ParseException { switch (jj_nt.kind) { - case 17: - case 26: + case 18: case 27: + case 28: case CONCAT: case SUBSTRING: case TRIM: @@ -1603,8 +1690,8 @@ final public void numericTermExt() throws ParseException { numericTerm(); break; } - case 30:{ - jj_consume_token(30); + case 31:{ + jj_consume_token(31); ExpBitwiseNot jjtn001 = new ExpBitwiseNot(JJTBITWISENOT); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); @@ -1632,7 +1719,7 @@ final public void numericTermExt() throws ParseException { break; } default: - jj_la1[33] = jj_gen; + jj_la1[35] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1640,8 +1727,8 @@ final public void numericTermExt() throws ParseException { final public void numericTerm() throws ParseException { switch (jj_nt.kind) { - case 17: - case 26: + case 18: + case 27: case CONCAT: case SUBSTRING: case TRIM: @@ -1670,19 +1757,19 @@ final public void numericTerm() throws ParseException { case INT_LITERAL: case FLOAT_LITERAL:{ switch (jj_nt.kind) { - case 26:{ - jj_consume_token(26); + case 27:{ + jj_consume_token(27); break; } default: - jj_la1[34] = jj_gen; + jj_la1[36] = jj_gen; ; } numericPrimary(); break; } - case 27:{ - jj_consume_token(27); + case 28:{ + jj_consume_token(28); ExpNegate jjtn001 = new ExpNegate(JJTNEGATE); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); @@ -1710,7 +1797,7 @@ final public void numericTerm() throws ParseException { break; } default: - jj_la1[35] = jj_gen; + jj_la1[37] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1718,10 +1805,10 @@ final public void numericTerm() throws ParseException { final public void numericPrimary() throws ParseException { switch (jj_nt.kind) { - case 17:{ - jj_consume_token(17); - orCondition(); + case 18:{ jj_consume_token(18); + orCondition(); + jj_consume_token(19); break; } case INT_LITERAL:{ @@ -1737,8 +1824,8 @@ final public void numericPrimary() throws ParseException { break; } default: - jj_la1[36] = jj_gen; - if (jj_2_4(2147483647)) { + jj_la1[38] = jj_gen; + if (jj_2_5(2147483647)) { functionsReturningNumerics(); } else { switch (jj_nt.kind) { @@ -1770,7 +1857,7 @@ final public void numericPrimary() throws ParseException { break; } default: - jj_la1[37] = jj_gen; + jj_la1[39] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1833,7 +1920,7 @@ final public void functionsReturningStrings() throws ParseException { break; } default: - jj_la1[38] = jj_gen; + jj_la1[40] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -1845,23 +1932,23 @@ final public void concat() throws ParseException {/*@bgen(jjtree) Concat */ jjtree.openNodeScope(jjtn000); try { jj_consume_token(CONCAT); - jj_consume_token(17); + jj_consume_token(18); stringParameter(); label_10: while (true) { switch (jj_nt.kind) { - case 20:{ + case 21:{ ; break; } default: - jj_la1[39] = jj_gen; + jj_la1[41] = jj_gen; break label_10; } - jj_consume_token(20); + jj_consume_token(21); stringParameter(); } - jj_consume_token(18); + jj_consume_token(19); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); @@ -1889,21 +1976,21 @@ final public void substring() throws ParseException {/*@bgen(jjtree) Substring * jjtree.openNodeScope(jjtn000); try { jj_consume_token(SUBSTRING); - jj_consume_token(17); + jj_consume_token(18); stringParameter(); - jj_consume_token(20); + jj_consume_token(21); numericExpression(); switch (jj_nt.kind) { - case 20:{ - jj_consume_token(20); + case 21:{ + jj_consume_token(21); numericExpression(); break; } default: - jj_la1[40] = jj_gen; + jj_la1[42] = jj_gen; ; } - jj_consume_token(18); + jj_consume_token(19); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); @@ -1931,9 +2018,9 @@ final public void trim() throws ParseException {/*@bgen(jjtree) Trim */ jjtree.openNodeScope(jjtn000); try { jj_consume_token(TRIM); - jj_consume_token(17); - stringParameter(); jj_consume_token(18); + stringParameter(); + jj_consume_token(19); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); @@ -1961,9 +2048,9 @@ final public void lower() throws ParseException {/*@bgen(jjtree) Lower */ jjtree.openNodeScope(jjtn000); try { jj_consume_token(LOWER); - jj_consume_token(17); - stringParameter(); jj_consume_token(18); + stringParameter(); + jj_consume_token(19); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); @@ -1991,9 +2078,9 @@ final public void upper() throws ParseException {/*@bgen(jjtree) Upper */ jjtree.openNodeScope(jjtn000); try { jj_consume_token(UPPER); - jj_consume_token(17); - stringParameter(); jj_consume_token(18); + stringParameter(); + jj_consume_token(19); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); @@ -2051,7 +2138,7 @@ final public void functionsReturningNumerics() throws ParseException { break; } default: - jj_la1[41] = jj_gen; + jj_la1[43] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -2063,9 +2150,9 @@ final public void length() throws ParseException {/*@bgen(jjtree) Length */ jjtree.openNodeScope(jjtn000); try { jj_consume_token(LENGTH); - jj_consume_token(17); - stringParameter(); jj_consume_token(18); + stringParameter(); + jj_consume_token(19); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); @@ -2093,21 +2180,21 @@ final public void locate() throws ParseException {/*@bgen(jjtree) Locate */ jjtree.openNodeScope(jjtn000); try { jj_consume_token(LOCATE); - jj_consume_token(17); + jj_consume_token(18); stringParameter(); - jj_consume_token(20); + jj_consume_token(21); stringParameter(); switch (jj_nt.kind) { - case 20:{ - jj_consume_token(20); + case 21:{ + jj_consume_token(21); numericExpression(); break; } default: - jj_la1[42] = jj_gen; + jj_la1[44] = jj_gen; ; } - jj_consume_token(18); + jj_consume_token(19); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); @@ -2135,9 +2222,9 @@ final public void abs() throws ParseException {/*@bgen(jjtree) Abs */ jjtree.openNodeScope(jjtn000); try { jj_consume_token(ABS); - jj_consume_token(17); - numericExpression(); jj_consume_token(18); + numericExpression(); + jj_consume_token(19); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); @@ -2165,9 +2252,9 @@ final public void sqrt() throws ParseException {/*@bgen(jjtree) Sqrt */ jjtree.openNodeScope(jjtn000); try { jj_consume_token(SQRT); - jj_consume_token(17); - numericExpression(); jj_consume_token(18); + numericExpression(); + jj_consume_token(19); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); @@ -2195,11 +2282,11 @@ final public void mod() throws ParseException {/*@bgen(jjtree) Mod */ jjtree.openNodeScope(jjtn000); try { jj_consume_token(MOD); - jj_consume_token(17); + jj_consume_token(18); numericExpression(); - jj_consume_token(20); + jj_consume_token(21); numericExpression(); - jj_consume_token(18); + jj_consume_token(19); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); @@ -2236,7 +2323,7 @@ final public void dateTimeFunction() throws ParseException { break; } default: - jj_la1[43] = jj_gen; + jj_la1[45] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -2248,8 +2335,8 @@ final public void currentDate() throws ParseException {/*@bgen(jjtree) CurrentDa jjtree.openNodeScope(jjtn000); try { jj_consume_token(CURRENT_DATE); - jj_consume_token(17); jj_consume_token(18); + jj_consume_token(19); } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); @@ -2263,8 +2350,8 @@ final public void currentTime() throws ParseException {/*@bgen(jjtree) CurrentTi jjtree.openNodeScope(jjtn000); try { jj_consume_token(CURRENT_TIME); - jj_consume_token(17); jj_consume_token(18); + jj_consume_token(19); } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); @@ -2278,8 +2365,8 @@ final public void currentTimestamp() throws ParseException {/*@bgen(jjtree) Curr jjtree.openNodeScope(jjtn000); try { jj_consume_token(CURRENT_TIMESTAMP); - jj_consume_token(17); jj_consume_token(18); + jj_consume_token(19); } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); @@ -2295,9 +2382,9 @@ final public void dateTimeExtractingFunction() throws ParseException {/*@bgen(jj try { t = dateTimePartFuncName(); jjtn000.jjtSetValue(t.image); - jj_consume_token(17); - pathExpression(); jj_consume_token(18); + pathExpression(); + jj_consume_token(19); } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); @@ -2342,7 +2429,7 @@ final public void dateTimeExtractingFunction() throws ParseException {/*@bgen(jj break; } default: - jj_la1[44] = jj_gen; + jj_la1[46] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -2372,7 +2459,7 @@ final public void dateTimeExtractingFunction() throws ParseException {/*@bgen(jj break; } default: - jj_la1[45] = jj_gen; + jj_la1[47] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -2394,7 +2481,7 @@ final public void dateTimeExtractingFunction() throws ParseException {/*@bgen(jj break; } default: - jj_la1[46] = jj_gen; + jj_la1[48] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -2444,7 +2531,7 @@ final public void dateTimeExtractingFunction() throws ParseException {/*@bgen(jj break; } default: - jj_la1[47] = jj_gen; + jj_la1[49] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -2509,7 +2596,7 @@ final public void dateTimeExtractingFunction() throws ParseException {/*@bgen(jj break; } default: - jj_la1[48] = jj_gen; + jj_la1[50] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -2559,61 +2646,83 @@ private boolean jj_2_4(int xla) finally { jj_save(3, xla); } } - private boolean jj_3_2() + private boolean jj_2_5(int xla) { - if (jj_3R_datetimeFuncName_445_5_12()) return true; - if (jj_scan_token(17)) return true; - return false; + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return (!jj_3_5()); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(4, xla); } } - private boolean jj_3_1() + private boolean jj_3_5() { Token xsp; xsp = jj_scanpos; - if (jj_3R_null_160_20_11()) { - jj_scanpos = xsp; - if (jj_scan_token(71)) { + if (jj_3R_null_323_22_15()) { jj_scanpos = xsp; - if (jj_scan_token(74)) return true; - } + if (jj_3R_null_323_47_16()) return true; } + if (jj_scan_token(18)) return true; return false; } - private boolean jj_3R_null_160_20_11() + private boolean jj_3_1() { - if (jj_3R_stringFuncName_419_5_16()) return true; - if (jj_scan_token(17)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_null_93_22_11()) jj_scanpos = xsp; + if (jj_scan_token(5)) return true; return false; } - private boolean jj_3R_datetimeFuncName_445_5_12() + private boolean jj_3R_dateTimePartFuncName_471_5_18() { Token xsp; xsp = jj_scanpos; - if (jj_scan_token(48)) { + if (jj_scan_token(52)) { jj_scanpos = xsp; - if (jj_scan_token(49)) { + if (jj_scan_token(53)) { + jj_scanpos = xsp; + if (jj_scan_token(54)) { + jj_scanpos = xsp; + if (jj_scan_token(55)) { + jj_scanpos = xsp; + if (jj_scan_token(56)) { + jj_scanpos = xsp; + if (jj_scan_token(57)) { + jj_scanpos = xsp; + if (jj_scan_token(58)) { + jj_scanpos = xsp; + if (jj_scan_token(59)) { + jj_scanpos = xsp; + if (jj_scan_token(60)) { jj_scanpos = xsp; - if (jj_scan_token(50)) return true; + if (jj_scan_token(61)) return true; + } + } + } + } + } + } + } } } return false; } - private boolean jj_3R_stringFuncName_419_5_16() + private boolean jj_3R_numericFuncName_447_5_19() { Token xsp; xsp = jj_scanpos; - if (jj_scan_token(38)) { + if (jj_scan_token(44)) { jj_scanpos = xsp; - if (jj_scan_token(39)) { + if (jj_scan_token(45)) { jj_scanpos = xsp; - if (jj_scan_token(40)) { + if (jj_scan_token(46)) { jj_scanpos = xsp; - if (jj_scan_token(41)) { + if (jj_scan_token(47)) { jj_scanpos = xsp; - if (jj_scan_token(42)) return true; + if (jj_scan_token(48)) return true; } } } @@ -2621,79 +2730,61 @@ private boolean jj_3R_stringFuncName_419_5_16() return false; } - private boolean jj_3R_null_308_47_15() + private boolean jj_3_3() { - if (jj_3R_numericFuncName_432_5_18()) return true; + if (jj_3R_datetimeFuncName_460_5_13()) return true; + if (jj_scan_token(18)) return true; return false; } - private boolean jj_3_3() + private boolean jj_3_2() { Token xsp; xsp = jj_scanpos; - if (jj_3R_null_173_20_13()) { + if (jj_3R_null_175_20_12()) { jj_scanpos = xsp; - if (jj_scan_token(71)) { + if (jj_scan_token(72)) { jj_scanpos = xsp; - if (jj_scan_token(74)) return true; + if (jj_scan_token(75)) return true; } } return false; } - private boolean jj_3R_null_173_20_13() + private boolean jj_3R_null_175_20_12() { - if (jj_3R_stringFuncName_419_5_16()) return true; - if (jj_scan_token(17)) return true; + if (jj_3R_stringFuncName_434_5_17()) return true; + if (jj_scan_token(18)) return true; return false; } - private boolean jj_3R_null_308_22_14() - { - if (jj_3R_dateTimePartFuncName_456_5_17()) return true; - return false; - } - - private boolean jj_3_4() + private boolean jj_3R_datetimeFuncName_460_5_13() { Token xsp; xsp = jj_scanpos; - if (jj_3R_null_308_22_14()) { + if (jj_scan_token(49)) { + jj_scanpos = xsp; + if (jj_scan_token(50)) { jj_scanpos = xsp; - if (jj_3R_null_308_47_15()) return true; + if (jj_scan_token(51)) return true; + } } - if (jj_scan_token(17)) return true; return false; } - private boolean jj_3R_dateTimePartFuncName_456_5_17() + private boolean jj_3R_stringFuncName_434_5_17() { Token xsp; xsp = jj_scanpos; - if (jj_scan_token(51)) { - jj_scanpos = xsp; - if (jj_scan_token(52)) { - jj_scanpos = xsp; - if (jj_scan_token(53)) { - jj_scanpos = xsp; - if (jj_scan_token(54)) { - jj_scanpos = xsp; - if (jj_scan_token(55)) { - jj_scanpos = xsp; - if (jj_scan_token(56)) { + if (jj_scan_token(39)) { jj_scanpos = xsp; - if (jj_scan_token(57)) { + if (jj_scan_token(40)) { jj_scanpos = xsp; - if (jj_scan_token(58)) { + if (jj_scan_token(41)) { jj_scanpos = xsp; - if (jj_scan_token(59)) { + if (jj_scan_token(42)) { jj_scanpos = xsp; - if (jj_scan_token(60)) return true; - } - } - } - } - } + if (jj_scan_token(43)) return true; } } } @@ -2701,22 +2792,46 @@ private boolean jj_3R_dateTimePartFuncName_456_5_17() return false; } - private boolean jj_3R_numericFuncName_432_5_18() + private boolean jj_3R_null_323_47_16() + { + if (jj_3R_numericFuncName_447_5_19()) return true; + return false; + } + + private boolean jj_3R_null_188_20_14() + { + if (jj_3R_stringFuncName_434_5_17()) return true; + if (jj_scan_token(18)) return true; + return false; + } + + private boolean jj_3_4() { Token xsp; xsp = jj_scanpos; - if (jj_scan_token(43)) { - jj_scanpos = xsp; - if (jj_scan_token(44)) { + if (jj_3R_null_188_20_14()) { jj_scanpos = xsp; - if (jj_scan_token(45)) { - jj_scanpos = xsp; - if (jj_scan_token(46)) { + if (jj_scan_token(72)) { jj_scanpos = xsp; - if (jj_scan_token(47)) return true; - } + if (jj_scan_token(75)) return true; } } + return false; + } + + private boolean jj_3R_null_323_22_15() + { + if (jj_3R_dateTimePartFuncName_471_5_18()) return true; + return false; + } + + private boolean jj_3R_null_93_22_11() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(3)) { + jj_scanpos = xsp; + if (jj_scan_token(4)) return true; } return false; } @@ -2731,7 +2846,7 @@ private boolean jj_3R_numericFuncName_432_5_18() private Token jj_scanpos, jj_lastpos; private int jj_la; private int jj_gen; - final private int[] jj_la1 = new int[49]; + final private int[] jj_la1 = new int[51]; static private int[] jj_la1_0; static private int[] jj_la1_1; static private int[] jj_la1_2; @@ -2741,15 +2856,15 @@ private boolean jj_3R_numericFuncName_432_5_18() jj_la1_init_2(); } private static void jj_la1_init_0() { - jj_la1_0 = new int[] {0x2,0x4,0x18,0x4c020018,0x60,0x180,0x4000,0x4000,0x20000,0x9bff8,0x9bff8,0x4c020000,0x18,0x4000,0x4000,0x20000,0x9a000,0x100000,0x4c020000,0x0,0x0,0x0,0x4c020000,0x0,0x200000,0x400000,0x800000,0x3000000,0x3000000,0xc000000,0xc000000,0x30000000,0x30000000,0x4c020000,0x4000000,0xc020000,0x20000,0x0,0x0,0x100000,0x100000,0x0,0x100000,0x0,0x0,0x0,0x0,0x0,0x0,}; + jj_la1_0 = new int[] {0x2,0x4,0x18,0x98040018,0xc0,0x300,0x8000,0x8000,0x40000,0x137fd8,0x137fd8,0x98040000,0x18,0x38,0x18,0x8000,0x8000,0x40000,0x134000,0x200000,0x98040000,0x0,0x0,0x0,0x98040000,0x0,0x400000,0x800000,0x1000000,0x6000000,0x6000000,0x18000000,0x18000000,0x60000000,0x60000000,0x98040000,0x8000000,0x18040000,0x40000,0x0,0x0,0x200000,0x200000,0x0,0x200000,0x0,0x0,0x0,0x0,0x0,0x0,}; } private static void jj_la1_init_1() { - jj_la1_1 = new int[] {0x0,0x0,0x0,0x7ffffff8,0x0,0x0,0x0,0x0,0x20000000,0x0,0x0,0x7ffffff8,0x0,0x0,0x0,0x20000000,0x0,0x0,0x7fffffc8,0x5fffffc0,0x0,0x7c0,0x7ffffff8,0x20000030,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7fffffc0,0x0,0x7fffffc0,0x20000000,0x5fffffc0,0x7c0,0x0,0x0,0x1ff8f800,0x0,0x70000,0x7c0,0xf800,0x70000,0x1ff80000,0x5fffffc0,}; + jj_la1_1 = new int[] {0x0,0x0,0x0,0xfffffff0,0x0,0x0,0x0,0x0,0x40000000,0x0,0x0,0xfffffff0,0x0,0x0,0x0,0x0,0x0,0x40000000,0x0,0x0,0xffffff90,0xbfffff80,0x0,0xf80,0xfffffff0,0x40000060,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xffffff80,0x0,0xffffff80,0x40000000,0xbfffff80,0xf80,0x0,0x0,0x3ff1f000,0x0,0xe0000,0xf80,0x1f000,0xe0000,0x3ff00000,0xbfffff80,}; } private static void jj_la1_init_2() { - jj_la1_2 = new int[] {0x0,0x0,0x0,0x1c80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c80,0x0,0x0,0x0,0x0,0x0,0x0,0x1800,0x0,0x480,0x480,0x1c80,0x1c80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1800,0x0,0x1800,0x1800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; + jj_la1_2 = new int[] {0x0,0x0,0x0,0x3900,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3900,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3000,0x0,0x900,0x900,0x3900,0x3900,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3000,0x0,0x3000,0x3000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; } - final private JJCalls[] jj_2_rtns = new JJCalls[4]; + final private JJCalls[] jj_2_rtns = new JJCalls[5]; private boolean jj_rescan = false; private int jj_gc = 0; @@ -2760,7 +2875,7 @@ public AgExpressionParser(Provider stream) { token = new Token(); token.next = jj_nt = token_source.getNextToken(); jj_gen = 0; - for (int i = 0; i < 49; i++) jj_la1[i] = -1; + for (int i = 0; i < 51; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -2788,7 +2903,7 @@ public void ReInit(Provider stream) { token.next = jj_nt = token_source.getNextToken(); jjtree.reset(); jj_gen = 0; - for (int i = 0; i < 49; i++) jj_la1[i] = -1; + for (int i = 0; i < 51; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -2798,7 +2913,7 @@ public AgExpressionParser(AgExpressionParserTokenManager tm) { token = new Token(); token.next = jj_nt = token_source.getNextToken(); jj_gen = 0; - for (int i = 0; i < 49; i++) jj_la1[i] = -1; + for (int i = 0; i < 51; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -2809,7 +2924,7 @@ public void ReInit(AgExpressionParserTokenManager tm) { token.next = jj_nt = token_source.getNextToken(); jjtree.reset(); jj_gen = 0; - for (int i = 0; i < 49; i++) jj_la1[i] = -1; + for (int i = 0; i < 51; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -2932,12 +3047,12 @@ private void jj_add_error_token(int kind, int pos) { /** Generate ParseException. */ public ParseException generateParseException() { jj_expentries.clear(); - boolean[] la1tokens = new boolean[88]; + boolean[] la1tokens = new boolean[89]; if (jj_kind >= 0) { la1tokens[jj_kind] = true; jj_kind = -1; } - for (int i = 0; i < 49; i++) { + for (int i = 0; i < 51; i++) { if (jj_la1[i] == jj_gen) { for (int j = 0; j < 32; j++) { if ((jj_la1_0[i] & (1<", - "", + "", "\"\\\'\"", "", - "", + "", "\"\\\"\"", "", "", diff --git a/agrest-engine/src/main/java/io/agrest/exp/parser/AgExpressionParserDefaultVisitor.java b/agrest-engine/src/main/java/io/agrest/exp/parser/AgExpressionParserDefaultVisitor.java index 78f9930a5..47377bd62 100644 --- a/agrest-engine/src/main/java/io/agrest/exp/parser/AgExpressionParserDefaultVisitor.java +++ b/agrest-engine/src/main/java/io/agrest/exp/parser/AgExpressionParserDefaultVisitor.java @@ -54,6 +54,12 @@ public T visit(ExpIn node, T data){ public T visit(ExpBetween node, T data){ return defaultVisit(node, data); } + public T visit(ExpNotExists node, T data){ + return defaultVisit(node, data); + } + public T visit(ExpExists node, T data){ + return defaultVisit(node, data); + } public T visit(ExpNotLike node, T data){ return defaultVisit(node, data); } @@ -154,4 +160,4 @@ public T visit(ExpPath node, T data){ return defaultVisit(node, data); } } -/* JavaCC - OriginalChecksum=7842ba2f7866318b36a9aa9c5ff4efa3 (do not edit this line) */ +/* JavaCC - OriginalChecksum=513ab353add5aa50faf9e7386eee6c00 (do not edit this line) */ diff --git a/agrest-engine/src/main/java/io/agrest/exp/parser/AgExpressionParserTokenManager.java b/agrest-engine/src/main/java/io/agrest/exp/parser/AgExpressionParserTokenManager.java index 5091539fb..7bc07fa22 100644 --- a/agrest-engine/src/main/java/io/agrest/exp/parser/AgExpressionParserTokenManager.java +++ b/agrest-engine/src/main/java/io/agrest/exp/parser/AgExpressionParserTokenManager.java @@ -109,217 +109,217 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1){ switch (pos) { case 0: - if ((active0 & 0x3004000000000L) != 0L) + if ((active0 & 0x3ff1fd000013c026L) != 0L) { - jjmatchedKind = 62; - return 36; + jjmatchedKind = 63; + return 123; } - if ((active0 & 0x1ff8fe800009e006L) != 0L) + if ((active0 & 0x8L) != 0L) { - jjmatchedKind = 62; - return 123; + jjmatchedKind = 63; + return 103; } - if ((active0 & 0x10000000000L) != 0L) + if ((active0 & 0x20000000000L) != 0L) { - jjmatchedKind = 62; + jjmatchedKind = 63; return 6; } - if ((active0 & 0x8L) != 0L) + if ((active0 & 0x6008000000000L) != 0L) { - jjmatchedKind = 62; - return 103; + jjmatchedKind = 63; + return 36; } return -1; case 1: - if ((active0 & 0x3000000000000L) != 0L) + if ((active0 & 0x3ff1fd800011c024L) != 0L) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 1; - return 35; + return 123; } - if ((active0 & 0x10000000000L) != 0L) + if ((active0 & 0x6000000000000L) != 0L) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 1; - return 5; + return 35; } - if ((active0 & 0x1ff8fec00008e004L) != 0L) + if ((active0 & 0x8L) != 0L) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 1; - return 123; + return 104; } - if ((active0 & 0x10002L) != 0L) + if ((active0 & 0x20002L) != 0L) return 123; - if ((active0 & 0x8L) != 0L) + if ((active0 & 0x20000000000L) != 0L) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 1; - return 104; + return 5; } return -1; case 2: - if ((active0 & 0x1c385fc00008e000L) != 0L) + if ((active0 & 0x3870bf800011c020L) != 0L) { if (jjmatchedPos != 2) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 2; } return 123; } - if ((active0 & 0x3c0a0000000000cL) != 0L) - return 123; - if ((active0 & 0x3000000000000L) != 0L) + if ((active0 & 0x6000000000000L) != 0L) { if (jjmatchedPos != 2) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 2; } return 34; } + if ((active0 & 0x78140000000000cL) != 0L) + return 123; return -1; case 3: - if ((active0 & 0x1b501ec000084000L) != 0L) + if ((active0 & 0x6000000000000L) != 0L) { if (jjmatchedPos != 3) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 3; } - return 123; + return 33; } - if ((active0 & 0x42841000000a000L) != 0L) + if ((active0 & 0x850820000014000L) != 0L) return 123; - if ((active0 & 0x3000000000000L) != 0L) + if ((active0 & 0x36a03d8000108020L) != 0L) { if (jjmatchedPos != 3) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 3; } - return 33; + return 123; } return -1; case 4: - if ((active0 & 0x1b4018c00008c000L) != 0L) - { - jjmatchedKind = 62; - jjmatchedPos = 4; + if ((active0 & 0x200c0000000000L) != 0L) return 123; - } - if ((active0 & 0x3000000000000L) != 0L) + if ((active0 & 0x6000000000000L) != 0L) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 4; return 32; } - if ((active0 & 0x10060000000000L) != 0L) + if ((active0 & 0x3680318000118020L) != 0L) + { + jjmatchedKind = 63; + jjmatchedPos = 4; return 123; + } return -1; case 5: - if ((active0 & 0x340008000088000L) != 0L) + if ((active0 & 0x6000000000000L) != 0L) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 5; - return 123; + return 31; } - if ((active0 & 0x3000000000000L) != 0L) + if ((active0 & 0x3000308000008020L) != 0L) + return 123; + if ((active0 & 0x680010000110000L) != 0L) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 5; - return 31; - } - if ((active0 & 0x1800184000004000L) != 0L) return 123; + } return -1; case 6: - if ((active0 & 0x3000000000000L) != 0L) + if ((active0 & 0x6000000000000L) != 0L) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 6; return 30; } - if ((active0 & 0x340008000008000L) != 0L) + if ((active0 & 0x100000L) != 0L) + return 123; + if ((active0 & 0x680010000010000L) != 0L) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 6; return 123; } - if ((active0 & 0x80000L) != 0L) - return 123; return -1; case 7: - if ((active0 & 0x2000000000000L) != 0L) + if ((active0 & 0x4000000000000L) != 0L) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 7; return 29; } - if ((active0 & 0x341008000008000L) != 0L) + if ((active0 & 0x682010000010000L) != 0L) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 7; return 123; } return -1; case 8: - if ((active0 & 0x240008000000000L) != 0L) - return 123; - if ((active0 & 0x101000000008000L) != 0L) + if ((active0 & 0x4000000000000L) != 0L) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 8; - return 123; + return 28; } - if ((active0 & 0x2000000000000L) != 0L) + if ((active0 & 0x480010000000000L) != 0L) + return 123; + if ((active0 & 0x202000000010000L) != 0L) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 8; - return 28; + return 123; } return -1; case 9: - if ((active0 & 0x100000000000000L) != 0L) - return 123; - if ((active0 & 0x2000000000000L) != 0L) + if ((active0 & 0x4000000000000L) != 0L) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 9; return 27; } - if ((active0 & 0x1000000008000L) != 0L) + if ((active0 & 0x200000000000000L) != 0L) + return 123; + if ((active0 & 0x2000000010000L) != 0L) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 9; return 123; } return -1; case 10: - if ((active0 & 0x1000000000000L) != 0L) - return 123; if ((active0 & 0x2000000000000L) != 0L) + return 123; + if ((active0 & 0x4000000000000L) != 0L) return 26; - if ((active0 & 0x8000L) != 0L) + if ((active0 & 0x10000L) != 0L) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 10; return 123; } return -1; case 11: - if ((active0 & 0x8000L) != 0L) + if ((active0 & 0x10000L) != 0L) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 11; return 123; } return -1; case 12: - if ((active0 & 0x8000L) != 0L) + if ((active0 & 0x10000L) != 0L) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 12; return 123; } @@ -342,74 +342,74 @@ private int jjMoveStringLiteralDfa0_0(){ { case 33: jjmatchedKind = 4; - return jjMoveStringLiteralDfa1_0(0x80L); + return jjMoveStringLiteralDfa1_0(0x100L); case 34: - return jjStopAtPos(0, 68); + return jjStopAtPos(0, 69); case 38: - return jjStopAtPos(0, 23); + return jjStopAtPos(0, 24); case 39: - return jjStopAtPos(0, 67); + return jjStopAtPos(0, 68); case 40: - return jjStopAtPos(0, 17); - case 41: return jjStopAtPos(0, 18); + case 41: + return jjStopAtPos(0, 19); case 42: - return jjStopAtPos(0, 28); + return jjStopAtPos(0, 29); case 43: - return jjStopAtPos(0, 26); + return jjStopAtPos(0, 27); case 44: - return jjStopAtPos(0, 20); + return jjStopAtPos(0, 21); case 45: - return jjStopAtPos(0, 27); + return jjStopAtPos(0, 28); case 47: - return jjStopAtPos(0, 29); + return jjStopAtPos(0, 30); case 60: - jjmatchedKind = 10; - return jjMoveStringLiteralDfa1_0(0x1000300L); + jjmatchedKind = 11; + return jjMoveStringLiteralDfa1_0(0x2000600L); case 61: - jjmatchedKind = 5; - return jjMoveStringLiteralDfa1_0(0x40L); + jjmatchedKind = 6; + return jjMoveStringLiteralDfa1_0(0x80L); case 62: - jjmatchedKind = 11; - return jjMoveStringLiteralDfa1_0(0x2001000L); + jjmatchedKind = 12; + return jjMoveStringLiteralDfa1_0(0x4002000L); case 94: - return jjStopAtPos(0, 22); + return jjStopAtPos(0, 23); case 97: - return jjMoveStringLiteralDfa1_0(0x200000000004L); + return jjMoveStringLiteralDfa1_0(0x400000000004L); case 98: - return jjMoveStringLiteralDfa1_0(0x80000L); + return jjMoveStringLiteralDfa1_0(0x100000L); case 99: - return jjMoveStringLiteralDfa1_0(0x3004000000000L); + return jjMoveStringLiteralDfa1_0(0x6008000000000L); case 100: - return jjMoveStringLiteralDfa1_0(0x3c0000000000000L); + return jjMoveStringLiteralDfa1_0(0x780000000000000L); case 101: - return jjMoveStringLiteralDfa1_0(0x4000L); + return jjMoveStringLiteralDfa1_0(0x8020L); case 104: - return jjMoveStringLiteralDfa1_0(0x400000000000000L); + return jjMoveStringLiteralDfa1_0(0x800000000000000L); case 105: - return jjMoveStringLiteralDfa1_0(0x10000L); + return jjMoveStringLiteralDfa1_0(0x20000L); case 108: - return jjMoveStringLiteralDfa1_0(0x1a000000a000L); + return jjMoveStringLiteralDfa1_0(0x340000014000L); case 109: - return jjMoveStringLiteralDfa1_0(0x810800000000000L); + return jjMoveStringLiteralDfa1_0(0x1021000000000000L); case 110: return jjMoveStringLiteralDfa1_0(0x8L); case 111: return jjMoveStringLiteralDfa1_0(0x2L); case 115: - return jjMoveStringLiteralDfa1_0(0x1000408000000000L); + return jjMoveStringLiteralDfa1_0(0x2000810000000000L); case 116: - return jjMoveStringLiteralDfa1_0(0x10000000000L); + return jjMoveStringLiteralDfa1_0(0x20000000000L); case 117: - return jjMoveStringLiteralDfa1_0(0x40000000000L); + return jjMoveStringLiteralDfa1_0(0x80000000000L); case 119: - return jjMoveStringLiteralDfa1_0(0x20000000000000L); + return jjMoveStringLiteralDfa1_0(0x40000000000000L); case 121: - return jjMoveStringLiteralDfa1_0(0x8000000000000L); + return jjMoveStringLiteralDfa1_0(0x10000000000000L); case 124: - return jjStopAtPos(0, 21); + return jjStopAtPos(0, 22); case 126: - return jjStopAtPos(0, 30); + return jjStopAtPos(0, 31); default : return jjMoveNfa_0(3, 0); } @@ -423,51 +423,53 @@ private int jjMoveStringLiteralDfa1_0(long active0){ switch(curChar) { case 60: - if ((active0 & 0x1000000L) != 0L) - return jjStopAtPos(1, 24); + if ((active0 & 0x2000000L) != 0L) + return jjStopAtPos(1, 25); break; case 61: - if ((active0 & 0x40L) != 0L) - return jjStopAtPos(1, 6); - else if ((active0 & 0x80L) != 0L) + if ((active0 & 0x80L) != 0L) return jjStopAtPos(1, 7); - else if ((active0 & 0x200L) != 0L) - return jjStopAtPos(1, 9); - else if ((active0 & 0x1000L) != 0L) - return jjStopAtPos(1, 12); + else if ((active0 & 0x100L) != 0L) + return jjStopAtPos(1, 8); + else if ((active0 & 0x400L) != 0L) + return jjStopAtPos(1, 10); + else if ((active0 & 0x2000L) != 0L) + return jjStopAtPos(1, 13); break; case 62: - if ((active0 & 0x100L) != 0L) - return jjStopAtPos(1, 8); - else if ((active0 & 0x2000000L) != 0L) - return jjStopAtPos(1, 25); + if ((active0 & 0x200L) != 0L) + return jjStopAtPos(1, 9); + else if ((active0 & 0x4000000L) != 0L) + return jjStopAtPos(1, 26); break; case 97: - return jjMoveStringLiteralDfa2_0(active0, 0x3c0000000000000L); + return jjMoveStringLiteralDfa2_0(active0, 0x780000000000000L); case 98: - return jjMoveStringLiteralDfa2_0(active0, 0x200000000000L); + return jjMoveStringLiteralDfa2_0(active0, 0x400000000000L); case 101: - return jjMoveStringLiteralDfa2_0(active0, 0x1028080000080000L); + return jjMoveStringLiteralDfa2_0(active0, 0x2050100000100000L); case 105: - return jjMoveStringLiteralDfa2_0(active0, 0x80000000000a000L); + return jjMoveStringLiteralDfa2_0(active0, 0x1000000000014000L); case 110: - if ((active0 & 0x10000L) != 0L) - return jjStartNfaWithStates_0(1, 16, 123); + if ((active0 & 0x20000L) != 0L) + return jjStartNfaWithStates_0(1, 17, 123); return jjMoveStringLiteralDfa2_0(active0, 0x4L); case 111: - return jjMoveStringLiteralDfa2_0(active0, 0x410924000000008L); + return jjMoveStringLiteralDfa2_0(active0, 0x821248000000008L); case 112: - return jjMoveStringLiteralDfa2_0(active0, 0x40000000000L); + return jjMoveStringLiteralDfa2_0(active0, 0x80000000000L); case 113: - return jjMoveStringLiteralDfa2_0(active0, 0x400000000000L); + return jjMoveStringLiteralDfa2_0(active0, 0x800000000000L); case 114: if ((active0 & 0x2L) != 0L) return jjStartNfaWithStates_0(1, 1, 123); - return jjMoveStringLiteralDfa2_0(active0, 0x10000000000L); + return jjMoveStringLiteralDfa2_0(active0, 0x20000000000L); case 115: - return jjMoveStringLiteralDfa2_0(active0, 0x4000L); + return jjMoveStringLiteralDfa2_0(active0, 0x8000L); case 117: - return jjMoveStringLiteralDfa2_0(active0, 0x3008000000000L); + return jjMoveStringLiteralDfa2_0(active0, 0x6010000000000L); + case 120: + return jjMoveStringLiteralDfa2_0(active0, 0x20L); default : break; } @@ -484,48 +486,48 @@ private int jjMoveStringLiteralDfa2_0(long old0, long active0){ switch(curChar) { case 97: - return jjMoveStringLiteralDfa3_0(active0, 0x8000000000000L); + return jjMoveStringLiteralDfa3_0(active0, 0x10000000000000L); case 98: - return jjMoveStringLiteralDfa3_0(active0, 0x8000000000L); + return jjMoveStringLiteralDfa3_0(active0, 0x10000000000L); case 99: - return jjMoveStringLiteralDfa3_0(active0, 0x1000100000004000L); + return jjMoveStringLiteralDfa3_0(active0, 0x2000200000008000L); case 100: if ((active0 & 0x4L) != 0L) return jjStartNfaWithStates_0(2, 2, 123); - else if ((active0 & 0x800000000000L) != 0L) - return jjStartNfaWithStates_0(2, 47, 123); + else if ((active0 & 0x1000000000000L) != 0L) + return jjStartNfaWithStates_0(2, 48, 123); break; case 101: - return jjMoveStringLiteralDfa3_0(active0, 0x20000000000000L); + return jjMoveStringLiteralDfa3_0(active0, 0x40000000000000L); case 105: - return jjMoveStringLiteralDfa3_0(active0, 0x10000000000L); + return jjMoveStringLiteralDfa3_0(active0, 0x20000000020L); case 107: - return jjMoveStringLiteralDfa3_0(active0, 0xa000L); + return jjMoveStringLiteralDfa3_0(active0, 0x14000L); case 110: - return jjMoveStringLiteralDfa3_0(active0, 0x810084000000000L); + return jjMoveStringLiteralDfa3_0(active0, 0x1020108000000000L); case 112: - return jjMoveStringLiteralDfa3_0(active0, 0x40000000000L); + return jjMoveStringLiteralDfa3_0(active0, 0x80000000000L); case 114: - return jjMoveStringLiteralDfa3_0(active0, 0x3400000000000L); + return jjMoveStringLiteralDfa3_0(active0, 0x6800000000000L); case 115: - if ((active0 & 0x200000000000L) != 0L) - return jjStartNfaWithStates_0(2, 45, 123); + if ((active0 & 0x400000000000L) != 0L) + return jjStartNfaWithStates_0(2, 46, 123); break; case 116: if ((active0 & 0x8L) != 0L) return jjStartNfaWithStates_0(2, 3, 123); - return jjMoveStringLiteralDfa3_0(active0, 0x80000L); + return jjMoveStringLiteralDfa3_0(active0, 0x100000L); case 117: - return jjMoveStringLiteralDfa3_0(active0, 0x400000000000000L); + return jjMoveStringLiteralDfa3_0(active0, 0x800000000000000L); case 119: - return jjMoveStringLiteralDfa3_0(active0, 0x20000000000L); + return jjMoveStringLiteralDfa3_0(active0, 0x40000000000L); case 121: - if ((active0 & 0x80000000000000L) != 0L) + if ((active0 & 0x100000000000000L) != 0L) { - jjmatchedKind = 55; + jjmatchedKind = 56; jjmatchedPos = 2; } - return jjMoveStringLiteralDfa3_0(active0, 0x340000000000000L); + return jjMoveStringLiteralDfa3_0(active0, 0x680000000000000L); default : break; } @@ -542,46 +544,46 @@ private int jjMoveStringLiteralDfa3_0(long old0, long active0){ switch(curChar) { case 79: - return jjMoveStringLiteralDfa4_0(active0, 0x340000000000000L); + return jjMoveStringLiteralDfa4_0(active0, 0x680000000000000L); case 97: - return jjMoveStringLiteralDfa4_0(active0, 0x100000004000L); + return jjMoveStringLiteralDfa4_0(active0, 0x200000008000L); case 99: - return jjMoveStringLiteralDfa4_0(active0, 0x4000000000L); + return jjMoveStringLiteralDfa4_0(active0, 0x8000000000L); case 101: - if ((active0 & 0x2000L) != 0L) + if ((active0 & 0x4000L) != 0L) { - jjmatchedKind = 13; + jjmatchedKind = 14; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0x60000008000L); + return jjMoveStringLiteralDfa4_0(active0, 0xc0000010000L); case 103: - return jjMoveStringLiteralDfa4_0(active0, 0x80000000000L); + return jjMoveStringLiteralDfa4_0(active0, 0x100000000000L); case 107: - if ((active0 & 0x20000000000000L) != 0L) - return jjStartNfaWithStates_0(3, 53, 123); + if ((active0 & 0x40000000000000L) != 0L) + return jjStartNfaWithStates_0(3, 54, 123); break; case 109: - if ((active0 & 0x10000000000L) != 0L) - return jjStartNfaWithStates_0(3, 40, 123); + if ((active0 & 0x20000000000L) != 0L) + return jjStartNfaWithStates_0(3, 41, 123); break; case 111: - return jjMoveStringLiteralDfa4_0(active0, 0x1000000000000000L); + return jjMoveStringLiteralDfa4_0(active0, 0x2000000000000000L); case 114: - if ((active0 & 0x8000000000000L) != 0L) - return jjStartNfaWithStates_0(3, 51, 123); - else if ((active0 & 0x400000000000000L) != 0L) - return jjStartNfaWithStates_0(3, 58, 123); - return jjMoveStringLiteralDfa4_0(active0, 0x3000000000000L); + if ((active0 & 0x10000000000000L) != 0L) + return jjStartNfaWithStates_0(3, 52, 123); + else if ((active0 & 0x800000000000000L) != 0L) + return jjStartNfaWithStates_0(3, 59, 123); + return jjMoveStringLiteralDfa4_0(active0, 0x6000000000000L); case 115: - return jjMoveStringLiteralDfa4_0(active0, 0x8000000000L); + return jjMoveStringLiteralDfa4_0(active0, 0x10000000020L); case 116: - if ((active0 & 0x400000000000L) != 0L) - return jjStartNfaWithStates_0(3, 46, 123); - return jjMoveStringLiteralDfa4_0(active0, 0x10000000000000L); + if ((active0 & 0x800000000000L) != 0L) + return jjStartNfaWithStates_0(3, 47, 123); + return jjMoveStringLiteralDfa4_0(active0, 0x20000000000000L); case 117: - return jjMoveStringLiteralDfa4_0(active0, 0x800000000000000L); + return jjMoveStringLiteralDfa4_0(active0, 0x1000000000000000L); case 119: - return jjMoveStringLiteralDfa4_0(active0, 0x80000L); + return jjMoveStringLiteralDfa4_0(active0, 0x100000L); default : break; } @@ -598,29 +600,29 @@ private int jjMoveStringLiteralDfa4_0(long old0, long active0){ switch(curChar) { case 73: - return jjMoveStringLiteralDfa5_0(active0, 0x8000L); + return jjMoveStringLiteralDfa5_0(active0, 0x10000L); case 97: - return jjMoveStringLiteralDfa5_0(active0, 0x4000000000L); + return jjMoveStringLiteralDfa5_0(active0, 0x8000000000L); case 101: - return jjMoveStringLiteralDfa5_0(active0, 0x3000000080000L); + return jjMoveStringLiteralDfa5_0(active0, 0x6000000100000L); case 102: - return jjMoveStringLiteralDfa5_0(active0, 0x340000000000000L); + return jjMoveStringLiteralDfa5_0(active0, 0x680000000000000L); case 104: - if ((active0 & 0x10000000000000L) != 0L) - return jjStartNfaWithStates_0(4, 52, 123); + if ((active0 & 0x20000000000000L) != 0L) + return jjStartNfaWithStates_0(4, 53, 123); break; case 110: - return jjMoveStringLiteralDfa5_0(active0, 0x1000000000000000L); + return jjMoveStringLiteralDfa5_0(active0, 0x2000000000000000L); case 112: - return jjMoveStringLiteralDfa5_0(active0, 0x4000L); + return jjMoveStringLiteralDfa5_0(active0, 0x8000L); case 114: - if ((active0 & 0x20000000000L) != 0L) - return jjStartNfaWithStates_0(4, 41, 123); - else if ((active0 & 0x40000000000L) != 0L) + if ((active0 & 0x40000000000L) != 0L) return jjStartNfaWithStates_0(4, 42, 123); + else if ((active0 & 0x80000000000L) != 0L) + return jjStartNfaWithStates_0(4, 43, 123); break; case 116: - return jjMoveStringLiteralDfa5_0(active0, 0x800188000000000L); + return jjMoveStringLiteralDfa5_0(active0, 0x1000310000000020L); default : break; } @@ -637,36 +639,40 @@ private int jjMoveStringLiteralDfa5_0(long old0, long active0){ switch(curChar) { case 77: - return jjMoveStringLiteralDfa6_0(active0, 0x100000000000000L); - case 87: return jjMoveStringLiteralDfa6_0(active0, 0x200000000000000L); + case 87: + return jjMoveStringLiteralDfa6_0(active0, 0x400000000000000L); case 89: - return jjMoveStringLiteralDfa6_0(active0, 0x40000000000000L); + return jjMoveStringLiteralDfa6_0(active0, 0x80000000000000L); case 100: - if ((active0 & 0x1000000000000000L) != 0L) - return jjStartNfaWithStates_0(5, 60, 123); + if ((active0 & 0x2000000000000000L) != 0L) + return jjStartNfaWithStates_0(5, 61, 123); break; case 101: - if ((active0 & 0x4000L) != 0L) - return jjStartNfaWithStates_0(5, 14, 123); - else if ((active0 & 0x100000000000L) != 0L) - return jjStartNfaWithStates_0(5, 44, 123); - else if ((active0 & 0x800000000000000L) != 0L) - return jjStartNfaWithStates_0(5, 59, 123); - return jjMoveStringLiteralDfa6_0(active0, 0x80000L); + if ((active0 & 0x8000L) != 0L) + return jjStartNfaWithStates_0(5, 15, 123); + else if ((active0 & 0x200000000000L) != 0L) + return jjStartNfaWithStates_0(5, 45, 123); + else if ((active0 & 0x1000000000000000L) != 0L) + return jjStartNfaWithStates_0(5, 60, 123); + return jjMoveStringLiteralDfa6_0(active0, 0x100000L); case 103: - return jjMoveStringLiteralDfa6_0(active0, 0x8000L); + return jjMoveStringLiteralDfa6_0(active0, 0x10000L); case 104: - if ((active0 & 0x80000000000L) != 0L) - return jjStartNfaWithStates_0(5, 43, 123); + if ((active0 & 0x100000000000L) != 0L) + return jjStartNfaWithStates_0(5, 44, 123); break; case 110: - return jjMoveStringLiteralDfa6_0(active0, 0x3000000000000L); + return jjMoveStringLiteralDfa6_0(active0, 0x6000000000000L); case 114: - return jjMoveStringLiteralDfa6_0(active0, 0x8000000000L); + return jjMoveStringLiteralDfa6_0(active0, 0x10000000000L); + case 115: + if ((active0 & 0x20L) != 0L) + return jjStartNfaWithStates_0(5, 5, 123); + break; case 116: - if ((active0 & 0x4000000000L) != 0L) - return jjStartNfaWithStates_0(5, 38, 123); + if ((active0 & 0x8000000000L) != 0L) + return jjStartNfaWithStates_0(5, 39, 123); break; default : break; @@ -684,17 +690,17 @@ private int jjMoveStringLiteralDfa6_0(long old0, long active0){ switch(curChar) { case 101: - return jjMoveStringLiteralDfa7_0(active0, 0x240000000000000L); + return jjMoveStringLiteralDfa7_0(active0, 0x480000000000000L); case 105: - return jjMoveStringLiteralDfa7_0(active0, 0x8000000000L); + return jjMoveStringLiteralDfa7_0(active0, 0x10000000000L); case 110: - if ((active0 & 0x80000L) != 0L) - return jjStartNfaWithStates_0(6, 19, 123); - return jjMoveStringLiteralDfa7_0(active0, 0x8000L); + if ((active0 & 0x100000L) != 0L) + return jjStartNfaWithStates_0(6, 20, 123); + return jjMoveStringLiteralDfa7_0(active0, 0x10000L); case 111: - return jjMoveStringLiteralDfa7_0(active0, 0x100000000000000L); + return jjMoveStringLiteralDfa7_0(active0, 0x200000000000000L); case 116: - return jjMoveStringLiteralDfa7_0(active0, 0x3000000000000L); + return jjMoveStringLiteralDfa7_0(active0, 0x6000000000000L); default : break; } @@ -711,17 +717,17 @@ private int jjMoveStringLiteralDfa7_0(long old0, long active0){ switch(curChar) { case 68: - return jjMoveStringLiteralDfa8_0(active0, 0x1000000000000L); - case 84: return jjMoveStringLiteralDfa8_0(active0, 0x2000000000000L); + case 84: + return jjMoveStringLiteralDfa8_0(active0, 0x4000000000000L); case 97: - return jjMoveStringLiteralDfa8_0(active0, 0x40000000000000L); + return jjMoveStringLiteralDfa8_0(active0, 0x80000000000000L); case 101: - return jjMoveStringLiteralDfa8_0(active0, 0x200000000000000L); + return jjMoveStringLiteralDfa8_0(active0, 0x400000000000000L); case 110: - return jjMoveStringLiteralDfa8_0(active0, 0x100008000000000L); + return jjMoveStringLiteralDfa8_0(active0, 0x200010000000000L); case 111: - return jjMoveStringLiteralDfa8_0(active0, 0x8000L); + return jjMoveStringLiteralDfa8_0(active0, 0x10000L); default : break; } @@ -738,23 +744,23 @@ private int jjMoveStringLiteralDfa8_0(long old0, long active0){ switch(curChar) { case 97: - return jjMoveStringLiteralDfa9_0(active0, 0x1000000000000L); + return jjMoveStringLiteralDfa9_0(active0, 0x2000000000000L); case 103: - if ((active0 & 0x8000000000L) != 0L) - return jjStartNfaWithStates_0(8, 39, 123); + if ((active0 & 0x10000000000L) != 0L) + return jjStartNfaWithStates_0(8, 40, 123); break; case 105: - return jjMoveStringLiteralDfa9_0(active0, 0x2000000000000L); + return jjMoveStringLiteralDfa9_0(active0, 0x4000000000000L); case 107: - if ((active0 & 0x200000000000000L) != 0L) - return jjStartNfaWithStates_0(8, 57, 123); + if ((active0 & 0x400000000000000L) != 0L) + return jjStartNfaWithStates_0(8, 58, 123); break; case 114: - if ((active0 & 0x40000000000000L) != 0L) - return jjStartNfaWithStates_0(8, 54, 123); - return jjMoveStringLiteralDfa9_0(active0, 0x8000L); + if ((active0 & 0x80000000000000L) != 0L) + return jjStartNfaWithStates_0(8, 55, 123); + return jjMoveStringLiteralDfa9_0(active0, 0x10000L); case 116: - return jjMoveStringLiteralDfa9_0(active0, 0x100000000000000L); + return jjMoveStringLiteralDfa9_0(active0, 0x200000000000000L); default : break; } @@ -771,15 +777,15 @@ private int jjMoveStringLiteralDfa9_0(long old0, long active0){ switch(curChar) { case 101: - return jjMoveStringLiteralDfa10_0(active0, 0x8000L); + return jjMoveStringLiteralDfa10_0(active0, 0x10000L); case 104: - if ((active0 & 0x100000000000000L) != 0L) - return jjStartNfaWithStates_0(9, 56, 123); + if ((active0 & 0x200000000000000L) != 0L) + return jjStartNfaWithStates_0(9, 57, 123); break; case 109: - return jjMoveStringLiteralDfa10_0(active0, 0x2000000000000L); + return jjMoveStringLiteralDfa10_0(active0, 0x4000000000000L); case 116: - return jjMoveStringLiteralDfa10_0(active0, 0x1000000000000L); + return jjMoveStringLiteralDfa10_0(active0, 0x2000000000000L); default : break; } @@ -796,12 +802,12 @@ private int jjMoveStringLiteralDfa10_0(long old0, long active0){ switch(curChar) { case 67: - return jjMoveStringLiteralDfa11_0(active0, 0x8000L); + return jjMoveStringLiteralDfa11_0(active0, 0x10000L); case 101: - if ((active0 & 0x1000000000000L) != 0L) - return jjStartNfaWithStates_0(10, 48, 123); - else if ((active0 & 0x2000000000000L) != 0L) - return jjStartNfaWithStates_0(10, 49, 26); + if ((active0 & 0x2000000000000L) != 0L) + return jjStartNfaWithStates_0(10, 49, 123); + else if ((active0 & 0x4000000000000L) != 0L) + return jjStartNfaWithStates_0(10, 50, 26); break; default : break; @@ -819,7 +825,7 @@ private int jjMoveStringLiteralDfa11_0(long old0, long active0){ switch(curChar) { case 97: - return jjMoveStringLiteralDfa12_0(active0, 0x8000L); + return jjMoveStringLiteralDfa12_0(active0, 0x10000L); default : break; } @@ -836,7 +842,7 @@ private int jjMoveStringLiteralDfa12_0(long old0, long active0){ switch(curChar) { case 115: - return jjMoveStringLiteralDfa13_0(active0, 0x8000L); + return jjMoveStringLiteralDfa13_0(active0, 0x10000L); default : break; } @@ -853,8 +859,8 @@ private int jjMoveStringLiteralDfa13_0(long old0, long active0){ switch(curChar) { case 101: - if ((active0 & 0x8000L) != 0L) - return jjStartNfaWithStates_0(13, 15, 123); + if ((active0 & 0x10000L) != 0L) + return jjStartNfaWithStates_0(13, 16, 123); break; default : break; @@ -890,14 +896,14 @@ private int jjMoveNfa_0(int startState, int curPos) case 36: if ((0x3ff001000000000L & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } else if (curChar == 43) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; } else if (curChar == 35) jjstateSet[jjnewStateCnt++] = 120; @@ -905,14 +911,14 @@ else if (curChar == 46) jjstateSet[jjnewStateCnt++] = 113; if ((0x3ff001000000000L & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } else if (curChar == 43) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAdd(112); } } else if (curChar == 35) @@ -921,14 +927,14 @@ else if (curChar == 35) case 6: if ((0x3ff001000000000L & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } else if (curChar == 43) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; } else if (curChar == 35) jjstateSet[jjnewStateCnt++] = 120; @@ -936,14 +942,14 @@ else if (curChar == 46) jjstateSet[jjnewStateCnt++] = 113; if ((0x3ff001000000000L & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } else if (curChar == 43) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAdd(112); } } else if (curChar == 35) @@ -952,14 +958,14 @@ else if (curChar == 35) case 123: if ((0x3ff001000000000L & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } else if (curChar == 43) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; } else if (curChar == 35) jjstateSet[jjnewStateCnt++] = 120; @@ -967,14 +973,14 @@ else if (curChar == 46) jjstateSet[jjnewStateCnt++] = 113; if ((0x3ff001000000000L & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } else if (curChar == 43) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAdd(112); } } else if (curChar == 35) @@ -983,14 +989,14 @@ else if (curChar == 35) case 32: if ((0x3ff001000000000L & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } else if (curChar == 43) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; } else if (curChar == 35) jjstateSet[jjnewStateCnt++] = 120; @@ -998,14 +1004,14 @@ else if (curChar == 46) jjstateSet[jjnewStateCnt++] = 113; if ((0x3ff001000000000L & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } else if (curChar == 43) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAdd(112); } } else if (curChar == 35) @@ -1014,14 +1020,14 @@ else if (curChar == 35) case 35: if ((0x3ff001000000000L & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } else if (curChar == 43) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; } else if (curChar == 35) jjstateSet[jjnewStateCnt++] = 120; @@ -1029,14 +1035,14 @@ else if (curChar == 46) jjstateSet[jjnewStateCnt++] = 113; if ((0x3ff001000000000L & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } else if (curChar == 43) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAdd(112); } } else if (curChar == 35) @@ -1045,14 +1051,14 @@ else if (curChar == 35) case 5: if ((0x3ff001000000000L & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } else if (curChar == 43) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; } else if (curChar == 35) jjstateSet[jjnewStateCnt++] = 120; @@ -1060,14 +1066,14 @@ else if (curChar == 46) jjstateSet[jjnewStateCnt++] = 113; if ((0x3ff001000000000L & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } else if (curChar == 43) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAdd(112); } } else if (curChar == 35) @@ -1076,14 +1082,14 @@ else if (curChar == 35) case 103: if ((0x3ff001000000000L & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } else if (curChar == 43) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; } else if (curChar == 35) jjstateSet[jjnewStateCnt++] = 120; @@ -1091,14 +1097,14 @@ else if (curChar == 46) jjstateSet[jjnewStateCnt++] = 113; if ((0x3ff001000000000L & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } else if (curChar == 43) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAdd(112); } } else if (curChar == 35) @@ -1107,14 +1113,14 @@ else if (curChar == 35) case 26: if ((0x3ff001000000000L & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } else if (curChar == 43) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; } else if (curChar == 35) jjstateSet[jjnewStateCnt++] = 120; @@ -1122,14 +1128,14 @@ else if (curChar == 46) jjstateSet[jjnewStateCnt++] = 113; if ((0x3ff001000000000L & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } else if (curChar == 43) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAdd(112); } } else if (curChar == 35) @@ -1138,14 +1144,14 @@ else if (curChar == 35) case 31: if ((0x3ff001000000000L & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } else if (curChar == 43) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; } else if (curChar == 35) jjstateSet[jjnewStateCnt++] = 120; @@ -1153,14 +1159,14 @@ else if (curChar == 46) jjstateSet[jjnewStateCnt++] = 113; if ((0x3ff001000000000L & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } else if (curChar == 43) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAdd(112); } } else if (curChar == 35) @@ -1169,14 +1175,14 @@ else if (curChar == 35) case 29: if ((0x3ff001000000000L & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } else if (curChar == 43) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; } else if (curChar == 35) jjstateSet[jjnewStateCnt++] = 120; @@ -1184,14 +1190,14 @@ else if (curChar == 46) jjstateSet[jjnewStateCnt++] = 113; if ((0x3ff001000000000L & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } else if (curChar == 43) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAdd(112); } } else if (curChar == 35) @@ -1200,14 +1206,14 @@ else if (curChar == 35) case 34: if ((0x3ff001000000000L & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } else if (curChar == 43) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; } else if (curChar == 35) jjstateSet[jjnewStateCnt++] = 120; @@ -1215,14 +1221,14 @@ else if (curChar == 46) jjstateSet[jjnewStateCnt++] = 113; if ((0x3ff001000000000L & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } else if (curChar == 43) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAdd(112); } } else if (curChar == 35) @@ -1237,28 +1243,28 @@ else if (curChar == 36) { jjAddStates(14, 16); } if ((0x3fe000000000000L & l) != 0L) { - if (kind > 75) - kind = 75; + if (kind > 76) + kind = 76; { jjCheckNAddStates(17, 19); } } else if (curChar == 48) { - if (kind > 75) - kind = 75; + if (kind > 76) + kind = 76; { jjCheckNAddStates(20, 22); } } break; case 28: if ((0x3ff001000000000L & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } else if (curChar == 43) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; } else if (curChar == 35) jjstateSet[jjnewStateCnt++] = 120; @@ -1266,14 +1272,14 @@ else if (curChar == 46) jjstateSet[jjnewStateCnt++] = 113; if ((0x3ff001000000000L & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } else if (curChar == 43) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAdd(112); } } else if (curChar == 35) @@ -1282,14 +1288,14 @@ else if (curChar == 35) case 104: if ((0x3ff001000000000L & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } else if (curChar == 43) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; } else if (curChar == 35) jjstateSet[jjnewStateCnt++] = 120; @@ -1297,14 +1303,14 @@ else if (curChar == 46) jjstateSet[jjnewStateCnt++] = 113; if ((0x3ff001000000000L & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } else if (curChar == 43) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAdd(112); } } else if (curChar == 35) @@ -1313,14 +1319,14 @@ else if (curChar == 35) case 30: if ((0x3ff001000000000L & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } else if (curChar == 43) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; } else if (curChar == 35) jjstateSet[jjnewStateCnt++] = 120; @@ -1328,14 +1334,14 @@ else if (curChar == 46) jjstateSet[jjnewStateCnt++] = 113; if ((0x3ff001000000000L & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } else if (curChar == 43) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAdd(112); } } else if (curChar == 35) @@ -1344,14 +1350,14 @@ else if (curChar == 35) case 27: if ((0x3ff001000000000L & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } else if (curChar == 43) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; } else if (curChar == 35) jjstateSet[jjnewStateCnt++] = 120; @@ -1359,14 +1365,14 @@ else if (curChar == 46) jjstateSet[jjnewStateCnt++] = 113; if ((0x3ff001000000000L & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } else if (curChar == 43) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAdd(112); } } else if (curChar == 35) @@ -1375,14 +1381,14 @@ else if (curChar == 35) case 33: if ((0x3ff001000000000L & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } else if (curChar == 43) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; } else if (curChar == 35) jjstateSet[jjnewStateCnt++] = 120; @@ -1390,14 +1396,14 @@ else if (curChar == 46) jjstateSet[jjnewStateCnt++] = 113; if ((0x3ff001000000000L & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } else if (curChar == 43) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAdd(112); } } else if (curChar == 35) @@ -1410,8 +1416,8 @@ else if (curChar == 35) case 40: if ((0x3ff001000000000L & l) == 0L) break; - if (kind > 61) - kind = 61; + if (kind > 62) + kind = 62; { jjCheckNAddStates(23, 26); } break; case 41: @@ -1421,15 +1427,15 @@ else if (curChar == 35) case 43: if ((0x3ff001000000000L & l) == 0L) break; - if (kind > 61) - kind = 61; + if (kind > 62) + kind = 62; { jjCheckNAddStates(27, 29); } break; case 44: if (curChar != 43) break; - if (kind > 61) - kind = 61; + if (kind > 62) + kind = 62; { jjCheckNAdd(45); } break; case 45: @@ -1439,8 +1445,8 @@ else if (curChar == 35) case 47: if ((0x3ff001000000000L & l) == 0L) break; - if (kind > 61) - kind = 61; + if (kind > 62) + kind = 62; { jjCheckNAddStates(30, 33); } break; case 48: @@ -1450,15 +1456,15 @@ else if (curChar == 35) case 50: if ((0x3ff001000000000L & l) == 0L) break; - if (kind > 61) - kind = 61; + if (kind > 62) + kind = 62; { jjCheckNAddStates(34, 36); } break; case 51: if ((0x3fe000000000000L & l) == 0L) break; - if (kind > 61) - kind = 61; + if (kind > 62) + kind = 62; { jjCheckNAddStates(37, 39); } break; case 52: @@ -1469,15 +1475,15 @@ else if (curChar == 35) case 62: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 61) - kind = 61; + if (kind > 62) + kind = 62; { jjCheckNAdd(54); } break; case 55: if (curChar != 48) break; - if (kind > 61) - kind = 61; + if (kind > 62) + kind = 62; { jjCheckNAddStates(40, 42); } break; case 56: @@ -1491,15 +1497,15 @@ else if (curChar == 35) case 58: if ((0xff000000000000L & l) == 0L) break; - if (kind > 61) - kind = 61; + if (kind > 62) + kind = 62; { jjCheckNAdd(54); } break; case 60: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 61) - kind = 61; + if (kind > 62) + kind = 62; { jjCheckNAddStates(43, 45); } break; case 61: @@ -1509,8 +1515,8 @@ else if (curChar == 35) case 63: if ((0x3fe000000000000L & l) == 0L) break; - if (kind > 75) - kind = 75; + if (kind > 76) + kind = 76; { jjCheckNAddStates(17, 19); } break; case 64: @@ -1521,8 +1527,8 @@ else if (curChar == 35) case 99: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 75) - kind = 75; + if (kind > 76) + kind = 76; { jjCheckNAdd(66); } break; case 67: @@ -1532,8 +1538,8 @@ else if (curChar == 35) case 68: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 76) - kind = 76; + if (kind > 77) + kind = 77; { jjCheckNAddStates(46, 49); } break; case 69: @@ -1543,8 +1549,8 @@ else if (curChar == 35) case 70: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 76) - kind = 76; + if (kind > 77) + kind = 77; { jjCheckNAddTwoStates(71, 76); } break; case 72: @@ -1554,8 +1560,8 @@ else if (curChar == 35) case 73: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 76) - kind = 76; + if (kind > 77) + kind = 77; { jjCheckNAddStates(50, 52); } break; case 74: @@ -1565,15 +1571,15 @@ else if (curChar == 35) case 75: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 76) - kind = 76; + if (kind > 77) + kind = 77; { jjCheckNAddTwoStates(73, 76); } break; case 77: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 76) - kind = 76; + if (kind > 77) + kind = 77; { jjCheckNAddStates(53, 56); } break; case 78: @@ -1591,15 +1597,15 @@ else if (curChar == 35) case 81: if (curChar != 46) break; - if (kind > 76) - kind = 76; + if (kind > 77) + kind = 77; { jjCheckNAddStates(57, 59); } break; case 82: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 76) - kind = 76; + if (kind > 77) + kind = 77; { jjCheckNAddStates(60, 63); } break; case 83: @@ -1617,8 +1623,8 @@ else if (curChar == 35) case 87: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 76) - kind = 76; + if (kind > 77) + kind = 77; { jjCheckNAddStates(64, 66); } break; case 88: @@ -1628,15 +1634,15 @@ else if (curChar == 35) case 89: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 76) - kind = 76; + if (kind > 77) + kind = 77; { jjCheckNAddTwoStates(87, 76); } break; case 90: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 76) - kind = 76; + if (kind > 77) + kind = 77; { jjCheckNAddStates(67, 70); } break; case 91: @@ -1646,8 +1652,8 @@ else if (curChar == 35) case 92: if (curChar != 48) break; - if (kind > 75) - kind = 75; + if (kind > 76) + kind = 76; { jjCheckNAddStates(20, 22); } break; case 93: @@ -1661,15 +1667,15 @@ else if (curChar == 35) case 95: if ((0xff000000000000L & l) == 0L) break; - if (kind > 75) - kind = 75; + if (kind > 76) + kind = 76; { jjCheckNAdd(66); } break; case 97: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 75) - kind = 75; + if (kind > 76) + kind = 76; { jjCheckNAddStates(71, 73); } break; case 98: @@ -1679,8 +1685,8 @@ else if (curChar == 35) case 107: if ((0x3ff001000000000L & l) == 0L) break; - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } break; case 108: @@ -1690,15 +1696,15 @@ else if (curChar == 35) case 110: if ((0x3ff001000000000L & l) == 0L) break; - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(74, 76); } break; case 111: if (curChar != 43) break; - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAdd(112); } break; case 112: @@ -1708,8 +1714,8 @@ else if (curChar == 35) case 114: if ((0x3ff001000000000L & l) == 0L) break; - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(77, 80); } break; case 115: @@ -1719,15 +1725,15 @@ else if (curChar == 35) case 117: if ((0x3ff001000000000L & l) == 0L) break; - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(81, 83); } break; case 118: if ((0x3ff001000000000L & l) == 0L) break; - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } break; case 119: @@ -1737,13 +1743,13 @@ else if (curChar == 35) case 121: if ((0x3ff001000000000L & l) == 0L) break; - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddTwoStates(121, 122); } break; case 122: - if (curChar == 43 && kind > 63) - kind = 63; + if (curChar == 43 && kind > 64) + kind = 64; break; default : break; } @@ -1759,14 +1765,14 @@ else if (curChar < 128) case 36: if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } if (curChar == 117) @@ -1775,14 +1781,14 @@ else if (curChar < 128) case 6: if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } if (curChar == 114) @@ -1791,28 +1797,28 @@ else if (curChar < 128) case 123: if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } break; case 32: if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } if (curChar == 110) @@ -1821,14 +1827,14 @@ else if (curChar < 128) case 35: if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } if (curChar == 114) @@ -1837,14 +1843,14 @@ else if (curChar < 128) case 5: if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } if (curChar == 117) @@ -1853,14 +1859,14 @@ else if (curChar < 128) case 103: if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } if (curChar == 111) @@ -1871,14 +1877,14 @@ else if (curChar == 117) case 26: if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } if (curChar == 115) @@ -1887,14 +1893,14 @@ else if (curChar == 117) case 31: if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } if (curChar == 116) @@ -1903,14 +1909,14 @@ else if (curChar == 117) case 29: if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } if (curChar == 105) @@ -1919,14 +1925,14 @@ else if (curChar == 117) case 34: if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } if (curChar == 114) @@ -1935,8 +1941,8 @@ else if (curChar == 117) case 3: if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(84, 90); } } if (curChar == 110) @@ -1957,14 +1963,14 @@ else if (curChar == 78) case 28: if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } if (curChar == 109) @@ -1973,33 +1979,33 @@ else if (curChar == 78) case 104: if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } if (curChar == 119) { - if (kind > 50) - kind = 50; + if (kind > 51) + kind = 51; } break; case 30: if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } if (curChar == 84) @@ -2008,14 +2014,14 @@ else if (curChar == 78) case 27: if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } if (curChar == 101) @@ -2024,22 +2030,22 @@ else if (curChar == 78) case 33: if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } } if ((0x7fffffe87fffffeL & l) != 0L) { - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } } if (curChar == 101) jjstateSet[jjnewStateCnt++] = 32; break; case 0: - if (curChar == 76 && kind > 35) - kind = 35; + if (curChar == 76 && kind > 36) + kind = 36; break; case 1: if (curChar == 76) @@ -2050,16 +2056,16 @@ else if (curChar == 78) jjstateSet[jjnewStateCnt++] = 1; break; case 4: - if (curChar == 101 && kind > 36) - kind = 36; + if (curChar == 101 && kind > 37) + kind = 37; break; case 7: if (curChar == 116) jjstateSet[jjnewStateCnt++] = 6; break; case 8: - if (curChar == 69 && kind > 36) - kind = 36; + if (curChar == 69 && kind > 37) + kind = 37; break; case 9: if (curChar == 85) @@ -2074,8 +2080,8 @@ else if (curChar == 78) jjstateSet[jjnewStateCnt++] = 10; break; case 12: - if (curChar == 101 && kind > 37) - kind = 37; + if (curChar == 101 && kind > 38) + kind = 38; break; case 13: if (curChar == 115) @@ -2094,8 +2100,8 @@ else if (curChar == 78) jjstateSet[jjnewStateCnt++] = 15; break; case 17: - if (curChar == 69 && kind > 37) - kind = 37; + if (curChar == 69 && kind > 38) + kind = 38; break; case 18: if (curChar == 83) @@ -2114,8 +2120,8 @@ else if (curChar == 78) jjstateSet[jjnewStateCnt++] = 20; break; case 22: - if (curChar == 112 && kind > 50) - kind = 50; + if (curChar == 112 && kind > 51) + kind = 51; break; case 23: if (curChar == 109) @@ -2137,32 +2143,32 @@ else if (curChar == 78) case 40: if ((0x7fffffe87fffffeL & l) == 0L) break; - if (kind > 61) - kind = 61; + if (kind > 62) + kind = 62; { jjCheckNAddStates(23, 26); } break; case 42: case 43: if ((0x7fffffe87fffffeL & l) == 0L) break; - if (kind > 61) - kind = 61; + if (kind > 62) + kind = 62; { jjCheckNAddStates(27, 29); } break; case 46: case 47: if ((0x7fffffe87fffffeL & l) == 0L) break; - if (kind > 61) - kind = 61; + if (kind > 62) + kind = 62; { jjCheckNAddStates(30, 33); } break; case 49: case 50: if ((0x7fffffe87fffffeL & l) == 0L) break; - if (kind > 61) - kind = 61; + if (kind > 62) + kind = 62; { jjCheckNAddStates(34, 36); } break; case 52: @@ -2170,8 +2176,8 @@ else if (curChar == 78) { jjAddStates(93, 94); } break; case 54: - if ((0x110000001100L & l) != 0L && kind > 61) - kind = 61; + if ((0x110000001100L & l) != 0L && kind > 62) + kind = 62; break; case 57: if (curChar == 95) @@ -2184,8 +2190,8 @@ else if (curChar == 78) case 60: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 61) - kind = 61; + if (kind > 62) + kind = 62; { jjCheckNAddStates(43, 45); } break; case 61: @@ -2195,8 +2201,8 @@ else if (curChar == 78) case 62: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 61) - kind = 61; + if (kind > 62) + kind = 62; { jjCheckNAdd(54); } break; case 64: @@ -2204,8 +2210,8 @@ else if (curChar == 78) { jjAddStates(97, 98); } break; case 66: - if ((0x110000001100L & l) != 0L && kind > 75) - kind = 75; + if ((0x110000001100L & l) != 0L && kind > 76) + kind = 76; break; case 69: if (curChar == 95) @@ -2220,8 +2226,8 @@ else if (curChar == 78) { jjAddStates(101, 102); } break; case 76: - if ((0x5400000054L & l) != 0L && kind > 76) - kind = 76; + if ((0x5400000054L & l) != 0L && kind > 77) + kind = 77; break; case 79: if (curChar == 95) @@ -2250,8 +2256,8 @@ else if (curChar == 78) case 97: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 75) - kind = 75; + if (kind > 76) + kind = 76; { jjCheckNAddStates(71, 73); } break; case 98: @@ -2261,8 +2267,8 @@ else if (curChar == 78) case 99: if ((0x7e0000007eL & l) == 0L) break; - if (kind > 75) - kind = 75; + if (kind > 76) + kind = 76; { jjCheckNAdd(66); } break; case 100: @@ -2270,8 +2276,8 @@ else if (curChar == 78) { jjAddStates(91, 92); } break; case 101: - if (curChar == 108 && kind > 35) - kind = 35; + if (curChar == 108 && kind > 36) + kind = 36; break; case 102: if (curChar == 108) @@ -2284,54 +2290,54 @@ else if (curChar == 78) case 106: if ((0x7fffffe87fffffeL & l) == 0L) break; - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(84, 90); } break; case 107: if ((0x7fffffe87fffffeL & l) == 0L) break; - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(3, 6); } break; case 109: case 110: if ((0x7fffffe87fffffeL & l) == 0L) break; - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(74, 76); } break; case 113: case 114: if ((0x7fffffe87fffffeL & l) == 0L) break; - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(77, 80); } break; case 116: case 117: if ((0x7fffffe87fffffeL & l) == 0L) break; - if (kind > 62) - kind = 62; + if (kind > 63) + kind = 63; { jjCheckNAddStates(81, 83); } break; case 118: if ((0x7fffffe87fffffeL & l) == 0L) break; - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddStates(0, 2); } break; case 120: case 121: if ((0x7fffffe87fffffeL & l) == 0L) break; - if (kind > 63) - kind = 63; + if (kind > 64) + kind = 64; { jjCheckNAddTwoStates(121, 122); } break; default : break; @@ -2380,7 +2386,7 @@ private int jjMoveStringLiteralDfa0_1(){ switch(curChar) { case 39: - return jjStopAtPos(0, 71); + return jjStopAtPos(0, 72); default : return jjMoveNfa_1(0, 0); } @@ -2410,12 +2416,12 @@ private int jjMoveNfa_1(int startState, int curPos) switch(jjstateSet[--i]) { case 0: - if ((0xffffff7fffffffffL & l) != 0L && kind > 70) - kind = 70; + if ((0xffffff7fffffffffL & l) != 0L && kind > 71) + kind = 71; break; case 1: - if ((0x8400000000L & l) != 0L && kind > 69) - kind = 69; + if ((0x8400000000L & l) != 0L && kind > 70) + kind = 70; break; case 2: if ((0xf000000000000L & l) != 0L) @@ -2424,13 +2430,13 @@ private int jjMoveNfa_1(int startState, int curPos) case 3: if ((0xff000000000000L & l) == 0L) break; - if (kind > 69) - kind = 69; + if (kind > 70) + kind = 70; jjstateSet[jjnewStateCnt++] = 4; break; case 4: - if ((0xff000000000000L & l) != 0L && kind > 69) - kind = 69; + if ((0xff000000000000L & l) != 0L && kind > 70) + kind = 70; break; default : break; } @@ -2446,19 +2452,19 @@ else if (curChar < 128) case 0: if ((0xffffffffefffffffL & l) != 0L) { - if (kind > 70) - kind = 70; + if (kind > 71) + kind = 71; } else if (curChar == 92) { jjAddStates(111, 113); } break; case 1: - if ((0x14404510000000L & l) != 0L && kind > 69) - kind = 69; + if ((0x14404510000000L & l) != 0L && kind > 70) + kind = 70; break; case 5: - if ((0xffffffffefffffffL & l) != 0L && kind > 70) - kind = 70; + if ((0xffffffffefffffffL & l) != 0L && kind > 71) + kind = 71; break; default : break; } @@ -2476,8 +2482,8 @@ else if (curChar == 92) switch(jjstateSet[--i]) { case 0: - if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 70) - kind = 70; + if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 71) + kind = 71; break; default : if (i1 == 0 || l1 == 0 || i2 == 0 || l2 == 0) break; else break; } @@ -2510,7 +2516,7 @@ private int jjMoveStringLiteralDfa0_2(){ switch(curChar) { case 34: - return jjStopAtPos(0, 74); + return jjStopAtPos(0, 75); default : return jjMoveNfa_2(0, 0); } @@ -2534,12 +2540,12 @@ private int jjMoveNfa_2(int startState, int curPos) switch(jjstateSet[--i]) { case 0: - if ((0xfffffffbffffffffL & l) != 0L && kind > 73) - kind = 73; + if ((0xfffffffbffffffffL & l) != 0L && kind > 74) + kind = 74; break; case 1: - if ((0x8400000000L & l) != 0L && kind > 72) - kind = 72; + if ((0x8400000000L & l) != 0L && kind > 73) + kind = 73; break; case 2: if ((0xf000000000000L & l) != 0L) @@ -2548,13 +2554,13 @@ private int jjMoveNfa_2(int startState, int curPos) case 3: if ((0xff000000000000L & l) == 0L) break; - if (kind > 72) - kind = 72; + if (kind > 73) + kind = 73; jjstateSet[jjnewStateCnt++] = 4; break; case 4: - if ((0xff000000000000L & l) != 0L && kind > 72) - kind = 72; + if ((0xff000000000000L & l) != 0L && kind > 73) + kind = 73; break; default : break; } @@ -2570,19 +2576,19 @@ else if (curChar < 128) case 0: if ((0xffffffffefffffffL & l) != 0L) { - if (kind > 73) - kind = 73; + if (kind > 74) + kind = 74; } else if (curChar == 92) { jjAddStates(111, 113); } break; case 1: - if ((0x14404510000000L & l) != 0L && kind > 72) - kind = 72; + if ((0x14404510000000L & l) != 0L && kind > 73) + kind = 73; break; case 5: - if ((0xffffffffefffffffL & l) != 0L && kind > 73) - kind = 73; + if ((0xffffffffefffffffL & l) != 0L && kind > 74) + kind = 74; break; default : break; } @@ -2600,8 +2606,8 @@ else if (curChar == 92) switch(jjstateSet[--i]) { case 0: - if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 73) - kind = 73; + if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 74) + kind = 74; break; default : if (i1 == 0 || l1 == 0 || i2 == 0 || l2 == 0) break; else break; } @@ -2623,20 +2629,20 @@ else if (curChar == 92) /** Token literal values. */ public static final String[] jjstrLiteralImages = { -"", "\157\162", "\141\156\144", "\156\157\164", "\41", "\75", "\75\75", -"\41\75", "\74\76", "\74\75", "\74", "\76", "\76\75", "\154\151\153\145", -"\145\163\143\141\160\145", "\154\151\153\145\111\147\156\157\162\145\103\141\163\145", "\151\156", "\50", -"\51", "\142\145\164\167\145\145\156", "\54", "\174", "\136", "\46", "\74\74", -"\76\76", "\53", "\55", "\52", "\57", "\176", null, null, null, null, null, null, null, -"\143\157\156\143\141\164", "\163\165\142\163\164\162\151\156\147", "\164\162\151\155", -"\154\157\167\145\162", "\165\160\160\145\162", "\154\145\156\147\164\150", -"\154\157\143\141\164\145", "\141\142\163", "\163\161\162\164", "\155\157\144", -"\143\165\162\162\145\156\164\104\141\164\145", "\143\165\162\162\145\156\164\124\151\155\145", null, "\171\145\141\162", -"\155\157\156\164\150", "\167\145\145\153", "\144\141\171\117\146\131\145\141\162", "\144\141\171", -"\144\141\171\117\146\115\157\156\164\150", "\144\141\171\117\146\127\145\145\153", "\150\157\165\162", -"\155\151\156\165\164\145", "\163\145\143\157\156\144", null, null, null, null, null, null, null, null, +"", "\157\162", "\141\156\144", "\156\157\164", "\41", +"\145\170\151\163\164\163", "\75", "\75\75", "\41\75", "\74\76", "\74\75", "\74", "\76", "\76\75", +"\154\151\153\145", "\145\163\143\141\160\145", +"\154\151\153\145\111\147\156\157\162\145\103\141\163\145", "\151\156", "\50", "\51", "\142\145\164\167\145\145\156", "\54", "\174", +"\136", "\46", "\74\74", "\76\76", "\53", "\55", "\52", "\57", "\176", null, null, +null, null, null, null, null, "\143\157\156\143\141\164", +"\163\165\142\163\164\162\151\156\147", "\164\162\151\155", "\154\157\167\145\162", "\165\160\160\145\162", +"\154\145\156\147\164\150", "\154\157\143\141\164\145", "\141\142\163", "\163\161\162\164", +"\155\157\144", "\143\165\162\162\145\156\164\104\141\164\145", +"\143\165\162\162\145\156\164\124\151\155\145", null, "\171\145\141\162", "\155\157\156\164\150", "\167\145\145\153", +"\144\141\171\117\146\131\145\141\162", "\144\141\171", "\144\141\171\117\146\115\157\156\164\150", +"\144\141\171\117\146\127\145\145\153", "\150\157\165\162", "\155\151\156\165\164\145", "\163\145\143\157\156\144", null, null, null, null, null, null, null, null, null, null, null, null, null, null, -null, null, null, null, null, }; +null, null, null, null, null, null, null, null, null, null, null, null, null, }; protected Token jjFillToken() { final Token t; @@ -2805,32 +2811,32 @@ void MoreLexicalActions() jjimageLen += (lengthOfMatch = jjmatchedPos + 1); switch(jjmatchedKind) { - case 67 : + case 68 : image.append(input_stream.GetSuffix(jjimageLen)); jjimageLen = 0; stringBuffer = new StringBuffer(); break; - case 68 : + case 69 : image.append(input_stream.GetSuffix(jjimageLen)); jjimageLen = 0; stringBuffer = new StringBuffer(); break; - case 69 : + case 70 : image.append(input_stream.GetSuffix(jjimageLen)); jjimageLen = 0; stringBuffer.append( escapeChar() ); break; - case 70 : + case 71 : image.append(input_stream.GetSuffix(jjimageLen)); jjimageLen = 0; stringBuffer.append( image.charAt(image.length()-1) ); break; - case 72 : + case 73 : image.append(input_stream.GetSuffix(jjimageLen)); jjimageLen = 0; stringBuffer.append( escapeChar() ); break; - case 73 : + case 74 : image.append(input_stream.GetSuffix(jjimageLen)); jjimageLen = 0; stringBuffer.append( image.charAt(image.length()-1) ); @@ -2843,37 +2849,37 @@ void TokenLexicalActions(Token matchedToken) { switch(jjmatchedKind) { - case 35 : + case 36 : image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); if ("NULL".equals(image.toString())) { LOGGER.info("*** 'NULL' literal is deprecated. Consider replacing it with 'null'"); } break; - case 36 : + case 37 : image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); if ("TRUE".equals(image.toString())) { LOGGER.info("*** 'TRUE' literal is deprecated. Consider replacing it with 'true'"); } break; - case 37 : + case 38 : image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); if ("FALSE".equals(image.toString())) { LOGGER.info("*** 'FALSE' literal is deprecated. Consider replacing it with 'false'"); } break; - case 71 : + case 72 : image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); literalValue = stringBuffer.toString(); break; - case 74 : + case 75 : image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); literalValue = stringBuffer.toString(); break; - case 75 : + case 76 : image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); literalValue = makeInt(); break; - case 76 : + case 77 : image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1))); literalValue = makeFloat(); break; @@ -2974,20 +2980,20 @@ public void SwitchTo(int lexState) public static final int[] jjnewLexState = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 2, -1, -1, 0, -1, -1, 0, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 2, -1, -1, 0, -1, -1, + 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, }; static final long[] jjtoToken = { - 0xfffffff87fffffffL, 0x1c80L, + 0xfffffff0ffffffffL, 0x3901L, }; static final long[] jjtoSkip = { - 0x780000000L, 0x0L, + 0xf00000000L, 0x0L, }; static final long[] jjtoSpecial = { 0x0L, 0x0L, }; static final long[] jjtoMore = { - 0x0L, 0x378L, + 0x0L, 0x6f0L, }; protected JavaCharStream input_stream; diff --git a/agrest-engine/src/main/java/io/agrest/exp/parser/AgExpressionParserTreeConstants.java b/agrest-engine/src/main/java/io/agrest/exp/parser/AgExpressionParserTreeConstants.java index 4169ecf92..f0bf7bb18 100644 --- a/agrest-engine/src/main/java/io/agrest/exp/parser/AgExpressionParserTreeConstants.java +++ b/agrest-engine/src/main/java/io/agrest/exp/parser/AgExpressionParserTreeConstants.java @@ -19,39 +19,41 @@ public interface AgExpressionParserTreeConstants public int JJTLIKEIGNORECASE = 13; public int JJTIN = 14; public int JJTBETWEEN = 15; - public int JJTNOTLIKE = 16; - public int JJTNOTLIKEIGNORECASE = 17; - public int JJTNOTIN = 18; - public int JJTNOTBETWEEN = 19; - public int JJTSCALARLIST = 20; - public int JJTSCALAR = 21; - public int JJTBITWISEOR = 22; - public int JJTBITWISEXOR = 23; - public int JJTBITWISEAND = 24; - public int JJTBITWISELEFTSHIFT = 25; - public int JJTBITWISERIGHTSHIFT = 26; - public int JJTADD = 27; - public int JJTSUBTRACT = 28; - public int JJTMULTIPLY = 29; - public int JJTDIVIDE = 30; - public int JJTBITWISENOT = 31; - public int JJTNEGATE = 32; - public int JJTCONCAT = 33; - public int JJTSUBSTRING = 34; - public int JJTTRIM = 35; - public int JJTLOWER = 36; - public int JJTUPPER = 37; - public int JJTLENGTH = 38; - public int JJTLOCATE = 39; - public int JJTABS = 40; - public int JJTSQRT = 41; - public int JJTMOD = 42; - public int JJTCURRENTDATE = 43; - public int JJTCURRENTTIME = 44; - public int JJTCURRENTTIMESTAMP = 45; - public int JJTEXTRACT = 46; - public int JJTNAMEDPARAMETER = 47; - public int JJTPATH = 48; + public int JJTNOTEXISTS = 16; + public int JJTEXISTS = 17; + public int JJTNOTLIKE = 18; + public int JJTNOTLIKEIGNORECASE = 19; + public int JJTNOTIN = 20; + public int JJTNOTBETWEEN = 21; + public int JJTSCALARLIST = 22; + public int JJTSCALAR = 23; + public int JJTBITWISEOR = 24; + public int JJTBITWISEXOR = 25; + public int JJTBITWISEAND = 26; + public int JJTBITWISELEFTSHIFT = 27; + public int JJTBITWISERIGHTSHIFT = 28; + public int JJTADD = 29; + public int JJTSUBTRACT = 30; + public int JJTMULTIPLY = 31; + public int JJTDIVIDE = 32; + public int JJTBITWISENOT = 33; + public int JJTNEGATE = 34; + public int JJTCONCAT = 35; + public int JJTSUBSTRING = 36; + public int JJTTRIM = 37; + public int JJTLOWER = 38; + public int JJTUPPER = 39; + public int JJTLENGTH = 40; + public int JJTLOCATE = 41; + public int JJTABS = 42; + public int JJTSQRT = 43; + public int JJTMOD = 44; + public int JJTCURRENTDATE = 45; + public int JJTCURRENTTIME = 46; + public int JJTCURRENTTIMESTAMP = 47; + public int JJTEXTRACT = 48; + public int JJTNAMEDPARAMETER = 49; + public int JJTPATH = 50; public String[] jjtNodeName = { @@ -71,6 +73,8 @@ public interface AgExpressionParserTreeConstants "LikeIgnoreCase", "In", "Between", + "NotExists", + "Exists", "NotLike", "NotLikeIgnoreCase", "NotIn", @@ -106,4 +110,4 @@ public interface AgExpressionParserTreeConstants "Path", }; } -/* JavaCC - OriginalChecksum=57348cdda463a745977f3a242a91800e (do not edit this line) */ +/* JavaCC - OriginalChecksum=f3b1ff7ef3c532dcd0ff352552cce4d8 (do not edit this line) */ diff --git a/agrest-engine/src/main/java/io/agrest/exp/parser/AgExpressionParserVisitor.java b/agrest-engine/src/main/java/io/agrest/exp/parser/AgExpressionParserVisitor.java index daa86f052..d2a02c178 100644 --- a/agrest-engine/src/main/java/io/agrest/exp/parser/AgExpressionParserVisitor.java +++ b/agrest-engine/src/main/java/io/agrest/exp/parser/AgExpressionParserVisitor.java @@ -19,6 +19,8 @@ public interface AgExpressionParserVisitor public T visit(ExpLikeIgnoreCase node, T data); public T visit(ExpIn node, T data); public T visit(ExpBetween node, T data); + public T visit(ExpNotExists node, T data); + public T visit(ExpExists node, T data); public T visit(ExpNotLike node, T data); public T visit(ExpNotLikeIgnoreCase node, T data); public T visit(ExpNotIn node, T data); @@ -53,4 +55,4 @@ public interface AgExpressionParserVisitor public T visit(ExpNamedParameter node, T data); public T visit(ExpPath node, T data); } -/* JavaCC - OriginalChecksum=bbbd1fbe3d9eeaf8fa5337263e445eda (do not edit this line) */ +/* JavaCC - OriginalChecksum=b580dcade977da8d675450ea63d239df (do not edit this line) */ diff --git a/agrest-engine/src/main/java/io/agrest/exp/parser/ExpExists.java b/agrest-engine/src/main/java/io/agrest/exp/parser/ExpExists.java new file mode 100644 index 000000000..f74b3d24e --- /dev/null +++ b/agrest-engine/src/main/java/io/agrest/exp/parser/ExpExists.java @@ -0,0 +1,43 @@ +/* Generated By:JJTree: Do not edit this line. ExpExists.java Version 7.0 */ +/* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=false,NODE_PREFIX=Exp,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ +package io.agrest.exp.parser; + +import io.agrest.protocol.Exp; + +public +class ExpExists extends SimpleNode { + public ExpExists(int id) { + super(id); + } + + public ExpExists(AgExpressionParser p, int id) { + super(p, id); + } + + public ExpExists() { + super(AgExpressionParser.JJTEXISTS); + } + + public ExpExists(Exp subExp) { + this(); + setOperand(0, subExp); + } + + /** Accept the visitor. **/ + public T jjtAccept(AgExpressionParserVisitor visitor, T data) { + + return + visitor.visit(this, data); + } + + @Override + protected SimpleNode shallowCopy() { + return new ExpExists(id); + } + + @Override + public String toString() { + return ExpStringConverter.convert(this); + } +} +/* JavaCC - OriginalChecksum=c9bebed7c12d1268a26003897ca9de6a (do not edit this line) */ diff --git a/agrest-engine/src/main/java/io/agrest/exp/parser/ExpNotExists.java b/agrest-engine/src/main/java/io/agrest/exp/parser/ExpNotExists.java new file mode 100644 index 000000000..8583bf38c --- /dev/null +++ b/agrest-engine/src/main/java/io/agrest/exp/parser/ExpNotExists.java @@ -0,0 +1,43 @@ +/* Generated By:JJTree: Do not edit this line. ExpNotExists.java Version 7.0 */ +/* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=false,NODE_PREFIX=Exp,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ +package io.agrest.exp.parser; + +import io.agrest.protocol.Exp; + +public +class ExpNotExists extends SimpleNode { + public ExpNotExists(int id) { + super(id); + } + + public ExpNotExists(AgExpressionParser p, int id) { + super(p, id); + } + + public ExpNotExists() { + super(AgExpressionParser.JJTNOTEXISTS); + } + + public ExpNotExists(Exp subExp) { + this(); + setOperand(0, subExp); + } + + /** Accept the visitor. **/ + public T jjtAccept(AgExpressionParserVisitor visitor, T data) { + + return + visitor.visit(this, data); + } + + @Override + protected SimpleNode shallowCopy() { + return new ExpNotExists(id); + } + + @Override + public String toString() { + return ExpStringConverter.convert(this); + } +} +/* JavaCC - OriginalChecksum=03cd7248945849bc19c8893523f8c916 (do not edit this line) */ diff --git a/agrest-engine/src/main/java/io/agrest/exp/parser/ExpScalar.java b/agrest-engine/src/main/java/io/agrest/exp/parser/ExpScalar.java index 9db0c6b35..0aa9780ad 100644 --- a/agrest-engine/src/main/java/io/agrest/exp/parser/ExpScalar.java +++ b/agrest-engine/src/main/java/io/agrest/exp/parser/ExpScalar.java @@ -18,7 +18,7 @@ public ExpScalar() { } public ExpScalar(Object value) { - super(AgExpressionParserTreeConstants.JJTSCALAR); + this(); setValue(value); } diff --git a/agrest-engine/src/main/java/io/agrest/exp/parser/ExpStringConverter.java b/agrest-engine/src/main/java/io/agrest/exp/parser/ExpStringConverter.java index f637e93b8..e36edd4fa 100644 --- a/agrest-engine/src/main/java/io/agrest/exp/parser/ExpStringConverter.java +++ b/agrest-engine/src/main/java/io/agrest/exp/parser/ExpStringConverter.java @@ -124,6 +124,12 @@ public static String convert(ExpEqual exp) { : "? = ?"; } + public static String convert(ExpExists exp) { + return "exists " + (exp.children != null + ? tryParenthesize(exp.children[0]) + : "?"); + } + public static String convert(ExpExtract exp) { return exp.children != null ? exp.value + "(" + exp.children[0] + ")" @@ -229,6 +235,12 @@ public static String convert(ExpNotEqual exp) { : "? != ?"; } + public static String convert(ExpNotExists exp) { + return "not exists " + (exp.children != null + ? tryParenthesize(exp.children[0]) + : "?"); + } + public static String convert(ExpNotIn exp) { return exp.children != null ? exp.children[0] + " not in " + (exp.children[1].getClass() == ExpNamedParameter.class ? exp.children[1] : "(" + exp.children[1] + ")") diff --git a/agrest-engine/src/main/java/io/agrest/protocol/Exp.java b/agrest-engine/src/main/java/io/agrest/protocol/Exp.java index 944908ff2..44fdee004 100644 --- a/agrest-engine/src/main/java/io/agrest/protocol/Exp.java +++ b/agrest-engine/src/main/java/io/agrest/protocol/Exp.java @@ -86,6 +86,34 @@ static Exp scalar(Object value) { return scalar; } + /** + * @since 5.0 + */ + static Exp exists(String subExp) { + return exists(Exp.parse(subExp)); + } + + /** + * @since 5.0 + */ + static Exp exists(Exp subExp) { + return new ExpExists(subExp); + } + + /** + * @since 5.0 + */ + static Exp notExists(String subExp) { + return notExists(Exp.parse(subExp)); + } + + /** + * @since 5.0 + */ + static Exp notExists(Exp subExp) { + return new ExpNotExists(subExp); + } + /** * @since 5.0 */ diff --git a/agrest-engine/src/main/jjtree/io/agrest/exp/parser/AgExpressionParser.jjt b/agrest-engine/src/main/jjtree/io/agrest/exp/parser/AgExpressionParser.jjt index 6a7685858..101ed2f4b 100644 --- a/agrest-engine/src/main/jjtree/io/agrest/exp/parser/AgExpressionParser.jjt +++ b/agrest-engine/src/main/jjtree/io/agrest/exp/parser/AgExpressionParser.jjt @@ -90,6 +90,9 @@ void andCondition() : {} void notCondition() : {} { + LOOKAHEAD( ( "not" | "!" )? "exists" ) + notExists() + | ( "not" | "!" ) simpleCondition() #Not(1) | simpleCondition() @@ -130,6 +133,18 @@ void simpleCondition() : { )? } +void notExists() : { } +{ + ( "not" | "!" ) exists() #NotExists(1) + | + exists() #Exists(1) +} + +void exists() : { } +{ + "exists" pathExpression() +} + void simpleNotCondition() : { // variable arity for the Like nodes int arity = 2; diff --git a/agrest-engine/src/test/java/io/agrest/exp/parser/ExpExistsTest.java b/agrest-engine/src/test/java/io/agrest/exp/parser/ExpExistsTest.java new file mode 100644 index 000000000..bc453023a --- /dev/null +++ b/agrest-engine/src/test/java/io/agrest/exp/parser/ExpExistsTest.java @@ -0,0 +1,35 @@ +package io.agrest.exp.parser; + +import io.agrest.AgException; +import io.agrest.protocol.Exp; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.CsvSource; +import org.junit.jupiter.params.provider.ValueSource; + +import static org.junit.jupiter.api.Assertions.*; + +class ExpExistsTest { + + @ParameterizedTest + @ValueSource(strings = { + "exists a", + "exists a.b"}) + public void parse(String expString) { + assertEquals(ExpExists.class, Exp.parse(expString).getClass()); + } + + @ParameterizedTest + @CsvSource(delimiter = '|', value = { + "exists a|exists a", + "exists a.b|exists a.b" + }) + public void parsedToString(String expString, String expected) { + assertEquals(expected, Exp.parse(expString).toString()); + } + + @ParameterizedTest + @ValueSource(strings = {"exists", "exists()", "exists (name == 'test')"}) + public void parseInvalidGrammar(String expString) { + assertThrows(AgException.class, () -> Exp.parse(expString)); + } +} diff --git a/agrest-engine/src/test/java/io/agrest/exp/parser/ExpNotExistsTest.java b/agrest-engine/src/test/java/io/agrest/exp/parser/ExpNotExistsTest.java new file mode 100644 index 000000000..77eedc56d --- /dev/null +++ b/agrest-engine/src/test/java/io/agrest/exp/parser/ExpNotExistsTest.java @@ -0,0 +1,38 @@ +package io.agrest.exp.parser; + +import io.agrest.AgException; +import io.agrest.protocol.Exp; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.CsvSource; +import org.junit.jupiter.params.provider.ValueSource; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +class ExpNotExistsTest { + + @ParameterizedTest + @ValueSource(strings = { + "not exists a", + "! exists a", + "!exists a", + "not exists a.b"}) + public void parse(String expString) { + assertEquals(ExpNotExists.class, Exp.parse(expString).getClass()); + } + + @ParameterizedTest + @CsvSource(delimiter = '|', value = { + "not exists a|not exists a", + "not exists a.b|not exists a.b" + }) + public void parsedToString(String expString, String expected) { + assertEquals(expected, Exp.parse(expString).toString()); + } + + @ParameterizedTest + @ValueSource(strings = {"not exists", "not exists()", "not exists (name == 'test')"}) + public void parseInvalidGrammar(String expString) { + assertThrows(AgException.class, () -> Exp.parse(expString)); + } +} diff --git a/agrest-engine/src/test/java/io/agrest/protocol/ExpTest.java b/agrest-engine/src/test/java/io/agrest/protocol/ExpTest.java index 55db08c68..1711ceeaf 100644 --- a/agrest-engine/src/test/java/io/agrest/protocol/ExpTest.java +++ b/agrest-engine/src/test/java/io/agrest/protocol/ExpTest.java @@ -134,6 +134,18 @@ public void namedParamsIgnoresExtraParams() { Exp.parse("a = $1").namedParams(Map.of("1", 2, "2", 4)); } + @Test + public void exists() { + assertEquals("exists (details.value between 5 and 6)", + Exp.exists("details.value between 5 and 6").toString()); + } + + @Test + public void notExists() { + assertEquals("not exists (details.value between 5 and 6)", + Exp.notExists("details.value between 5 and 6").toString()); + } + @Test public void between() { assertEquals("a between 5 and 10", Exp.between("a", 5, 10).toString());