You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by nt...@apache.org on 2020/08/06 14:44:09 UTC
[cayenne] branch master updated: CAY-2666 Support "$" is db: and
obj: expressions
This is an automated email from the ASF dual-hosted git repository.
ntimofeev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git
The following commit(s) were added to refs/heads/master by this push:
new 6207914 CAY-2666 Support "$" is db: and obj: expressions
new be9018e Merge pull request #433 from KravchenkoAS/CAY-2666
6207914 is described below
commit 62079147ad229d2f22dc1e0c53b220a22b1987cc
Author: andreykravchenko <an...@objectstyle.com>
AuthorDate: Fri Jul 31 12:22:45 2020 +0300
CAY-2666 Support "$" is db: and obj: expressions
CAY-2666 Support "$" is db: and obj: expressions
added dollar sign tests
---
.../cayenne/exp/parser/ExpressionParser.java | 1316 +++++++++++---------
.../exp/parser/ExpressionParserConstants.java | 27 +-
.../exp/parser/ExpressionParserTokenManager.java | 804 ++++++------
.../exp/parser/ExpressionParserTreeConstants.java | 4 +-
.../exp/parser/JJTExpressionParserState.java | 4 +-
.../template/parser/JJTSQLTemplateParserState.java | 210 ++--
.../cayenne/template/parser/SQLTemplateParser.java | 523 ++++----
.../parser/SQLTemplateParserTokenManager.java | 392 +++---
.../parser/SQLTemplateParserTreeConstants.java | 4 +-
.../apache/cayenne/exp/parser/ExpressionParser.jjt | 4 +-
.../cayenne/template/parser/SQLTemplateParser.jjt | 2 +-
.../java/org/apache/cayenne/access/Cay2666IT.java | 158 +++
.../org/apache/cayenne/query/ColumnSelectIT.java | 1 -
.../apache/cayenne/testdo/cay_2666/CAY2666.java | 28 +
.../cayenne/testdo/cay_2666/auto/_CAY2666.java | 87 ++
.../cayenne/unit/di/server/CayenneProjects.java | 1 +
.../cayenne/unit/di/server/SchemaBuilder.java | 2 +-
.../server/ServerCaseDataSourceInfoProvider.java | 4 +-
.../test/resources/cay2666/cayenne-cay-2666.xml | 7 +
.../src/test/resources/cay2666/datamap.map.xml | 41 +
20 files changed, 2058 insertions(+), 1561 deletions(-)
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParser.java b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParser.java
index 764f538..ece560d 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParser.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParser.java
@@ -21,8 +21,6 @@
package org.apache.cayenne.exp.parser;
-import java.math.BigDecimal;
-import java.math.BigInteger;
import org.apache.cayenne.exp.Expression;
/**
@@ -36,30 +34,31 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
final public Expression expression() throws ParseException {
orCondition();
jj_consume_token(0);
- {if (true) return (Expression) jjtree.rootNode();}
+{if ("" != null) return (Expression) jjtree.rootNode();}
throw new Error("Missing return statement in function");
- }
+}
final public void orCondition() throws ParseException {
andCondition();
label_1:
while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 1:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case 1:{
;
break;
+ }
default:
jj_la1[0] = jj_gen;
break label_1;
}
jj_consume_token(1);
- ASTOr jjtn001 = new ASTOr(JJTOR);
+ASTOr jjtn001 = new ASTOr(JJTOR);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
andCondition();
} catch (Throwable jjte001) {
- if (jjtc001) {
+if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
@@ -73,33 +72,34 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte001;}
} finally {
- if (jjtc001) {
+if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 2);
}
}
}
- }
+}
final public void andCondition() throws ParseException {
notCondition();
label_2:
while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 2:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case 2:{
;
break;
+ }
default:
jj_la1[1] = jj_gen;
break label_2;
}
jj_consume_token(2);
- ASTAnd jjtn001 = new ASTAnd(JJTAND);
+ASTAnd jjtn001 = new ASTAnd(JJTAND);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
notCondition();
} catch (Throwable jjte001) {
- if (jjtc001) {
+if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
@@ -113,36 +113,38 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte001;}
} finally {
- if (jjtc001) {
+if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 2);
}
}
}
- }
+}
final public void notCondition() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 3:
- case 4:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 3:
+ case 4:{
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case 3:{
jj_consume_token(3);
break;
- case 4:
+ }
+ case 4:{
jj_consume_token(4);
break;
+ }
default:
jj_la1[2] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- ASTNot jjtn001 = new ASTNot(JJTNOT);
+ASTNot jjtn001 = new ASTNot(JJTNOT);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
simpleCondition();
} catch (Throwable jjte001) {
- if (jjtc001) {
+if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
@@ -156,11 +158,12 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte001;}
} finally {
- if (jjtc001) {
+if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 1);
}
}
break;
+ }
case 16:
case 25:
case 26:
@@ -207,42 +210,45 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
case SINGLE_QUOTED_STRING:
case DOUBLE_QUOTED_STRING:
case INT_LITERAL:
- case FLOAT_LITERAL:
+ case FLOAT_LITERAL:{
simpleCondition();
break;
+ }
default:
jj_la1[3] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- }
+}
final public void simpleCondition() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case TRUE:
- ASTTrue jjtn001 = new ASTTrue(JJTTRUE);
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case TRUE:{
+ASTTrue jjtn001 = new ASTTrue(JJTTRUE);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
jj_consume_token(TRUE);
} finally {
- if (jjtc001) {
+if (jjtc001) {
jjtree.closeNodeScope(jjtn001, true);
}
}
break;
- case FALSE:
- ASTFalse jjtn002 = new ASTFalse(JJTFALSE);
+ }
+ case FALSE:{
+ASTFalse jjtn002 = new ASTFalse(JJTFALSE);
boolean jjtc002 = true;
jjtree.openNodeScope(jjtn002);
try {
jj_consume_token(FALSE);
} finally {
- if (jjtc002) {
+if (jjtc002) {
jjtree.closeNodeScope(jjtn002, true);
}
}
break;
+ }
case 16:
case 25:
case 26:
@@ -287,9 +293,9 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
case SINGLE_QUOTED_STRING:
case DOUBLE_QUOTED_STRING:
case INT_LITERAL:
- case FLOAT_LITERAL:
+ case FLOAT_LITERAL:{
conditionExpression();
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 3:
case 4:
case 5:
@@ -303,29 +309,31 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
case 13:
case 14:
case 15:
- case 18:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case 18:{
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 5:
- case 6:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 5:
+ case 6:{
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case 5:{
jj_consume_token(5);
break;
- case 6:
+ }
+ case 6:{
jj_consume_token(6);
break;
+ }
default:
jj_la1[4] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- ASTEqual jjtn003 = new ASTEqual(JJTEQUAL);
+ASTEqual jjtn003 = new ASTEqual(JJTEQUAL);
boolean jjtc003 = true;
jjtree.openNodeScope(jjtn003);
try {
scalarExpression();
} catch (Throwable jjte003) {
- if (jjtc003) {
+if (jjtc003) {
jjtree.clearNodeScope(jjtn003);
jjtc003 = false;
} else {
@@ -339,32 +347,35 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte003;}
} finally {
- if (jjtc003) {
+if (jjtc003) {
jjtree.closeNodeScope(jjtn003, 2);
}
}
break;
+ }
case 7:
- case 8:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 7:
+ case 8:{
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case 7:{
jj_consume_token(7);
break;
- case 8:
+ }
+ case 8:{
jj_consume_token(8);
break;
+ }
default:
jj_la1[5] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- ASTNotEqual jjtn004 = new ASTNotEqual(JJTNOTEQUAL);
+ASTNotEqual jjtn004 = new ASTNotEqual(JJTNOTEQUAL);
boolean jjtc004 = true;
jjtree.openNodeScope(jjtn004);
try {
scalarExpression();
} catch (Throwable jjte004) {
- if (jjtc004) {
+if (jjtc004) {
jjtree.clearNodeScope(jjtn004);
jjtc004 = false;
} else {
@@ -378,20 +389,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte004;}
} finally {
- if (jjtc004) {
+if (jjtc004) {
jjtree.closeNodeScope(jjtn004, 2);
}
}
break;
- case 9:
+ }
+ case 9:{
jj_consume_token(9);
- ASTLessOrEqual jjtn005 = new ASTLessOrEqual(JJTLESSOREQUAL);
+ASTLessOrEqual jjtn005 = new ASTLessOrEqual(JJTLESSOREQUAL);
boolean jjtc005 = true;
jjtree.openNodeScope(jjtn005);
try {
scalarExpression();
} catch (Throwable jjte005) {
- if (jjtc005) {
+if (jjtc005) {
jjtree.clearNodeScope(jjtn005);
jjtc005 = false;
} else {
@@ -405,20 +417,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte005;}
} finally {
- if (jjtc005) {
+if (jjtc005) {
jjtree.closeNodeScope(jjtn005, 2);
}
}
break;
- case 10:
+ }
+ case 10:{
jj_consume_token(10);
- ASTLess jjtn006 = new ASTLess(JJTLESS);
+ASTLess jjtn006 = new ASTLess(JJTLESS);
boolean jjtc006 = true;
jjtree.openNodeScope(jjtn006);
try {
scalarExpression();
} catch (Throwable jjte006) {
- if (jjtc006) {
+if (jjtc006) {
jjtree.clearNodeScope(jjtn006);
jjtc006 = false;
} else {
@@ -432,20 +445,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte006;}
} finally {
- if (jjtc006) {
+if (jjtc006) {
jjtree.closeNodeScope(jjtn006, 2);
}
}
break;
- case 11:
+ }
+ case 11:{
jj_consume_token(11);
- ASTGreater jjtn007 = new ASTGreater(JJTGREATER);
+ASTGreater jjtn007 = new ASTGreater(JJTGREATER);
boolean jjtc007 = true;
jjtree.openNodeScope(jjtn007);
try {
scalarExpression();
} catch (Throwable jjte007) {
- if (jjtc007) {
+if (jjtc007) {
jjtree.clearNodeScope(jjtn007);
jjtc007 = false;
} else {
@@ -459,20 +473,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte007;}
} finally {
- if (jjtc007) {
+if (jjtc007) {
jjtree.closeNodeScope(jjtn007, 2);
}
}
break;
- case 12:
+ }
+ case 12:{
jj_consume_token(12);
- ASTGreaterOrEqual jjtn008 = new ASTGreaterOrEqual(JJTGREATEROREQUAL);
+ASTGreaterOrEqual jjtn008 = new ASTGreaterOrEqual(JJTGREATEROREQUAL);
boolean jjtc008 = true;
jjtree.openNodeScope(jjtn008);
try {
scalarExpression();
} catch (Throwable jjte008) {
- if (jjtc008) {
+if (jjtc008) {
jjtree.clearNodeScope(jjtn008);
jjtc008 = false;
} else {
@@ -486,20 +501,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte008;}
} finally {
- if (jjtc008) {
+if (jjtc008) {
jjtree.closeNodeScope(jjtn008, 2);
}
}
break;
- case 13:
+ }
+ case 13:{
jj_consume_token(13);
- ASTLike jjtn009 = new ASTLike(JJTLIKE);
+ASTLike jjtn009 = new ASTLike(JJTLIKE);
boolean jjtc009 = true;
jjtree.openNodeScope(jjtn009);
try {
scalarExpression();
} catch (Throwable jjte009) {
- if (jjtc009) {
+if (jjtc009) {
jjtree.clearNodeScope(jjtn009);
jjtc009 = false;
} else {
@@ -513,20 +529,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte009;}
} finally {
- if (jjtc009) {
+if (jjtc009) {
jjtree.closeNodeScope(jjtn009, 2);
}
}
break;
- case 14:
+ }
+ case 14:{
jj_consume_token(14);
- ASTLikeIgnoreCase jjtn010 = new ASTLikeIgnoreCase(JJTLIKEIGNORECASE);
+ASTLikeIgnoreCase jjtn010 = new ASTLikeIgnoreCase(JJTLIKEIGNORECASE);
boolean jjtc010 = true;
jjtree.openNodeScope(jjtn010);
try {
scalarExpression();
} catch (Throwable jjte010) {
- if (jjtc010) {
+if (jjtc010) {
jjtree.clearNodeScope(jjtn010);
jjtc010 = false;
} else {
@@ -540,33 +557,36 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte010;}
} finally {
- if (jjtc010) {
+if (jjtc010) {
jjtree.closeNodeScope(jjtn010, 2);
}
}
break;
- case 15:
+ }
+ case 15:{
jj_consume_token(15);
- ASTIn jjtn011 = new ASTIn(JJTIN);
+ASTIn jjtn011 = new ASTIn(JJTIN);
boolean jjtc011 = true;
jjtree.openNodeScope(jjtn011);
try {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 67:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case 67:{
namedParameter();
break;
- case 16:
+ }
+ case 16:{
jj_consume_token(16);
scalarCommaList();
jj_consume_token(17);
break;
+ }
default:
jj_la1[6] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
} catch (Throwable jjte011) {
- if (jjtc011) {
+if (jjtc011) {
jjtree.clearNodeScope(jjtn011);
jjtc011 = false;
} else {
@@ -580,22 +600,23 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte011;}
} finally {
- if (jjtc011) {
+if (jjtc011) {
jjtree.closeNodeScope(jjtn011, 2);
}
}
break;
- case 18:
+ }
+ case 18:{
jj_consume_token(18);
scalarExpression();
jj_consume_token(2);
- ASTBetween jjtn012 = new ASTBetween(JJTBETWEEN);
+ASTBetween jjtn012 = new ASTBetween(JJTBETWEEN);
boolean jjtc012 = true;
jjtree.openNodeScope(jjtn012);
try {
scalarExpression();
} catch (Throwable jjte012) {
- if (jjtc012) {
+if (jjtc012) {
jjtree.clearNodeScope(jjtn012);
jjtc012 = false;
} else {
@@ -609,56 +630,62 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte012;}
} finally {
- if (jjtc012) {
+if (jjtc012) {
jjtree.closeNodeScope(jjtn012, 3);
}
}
break;
+ }
case 3:
- case 4:
+ case 4:{
simpleNotCondition();
break;
+ }
default:
jj_la1[7] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
break;
+ }
default:
jj_la1[8] = jj_gen;
;
}
break;
+ }
default:
jj_la1[9] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- }
+}
final public void simpleNotCondition() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 3:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case 3:{
jj_consume_token(3);
break;
- case 4:
+ }
+ case 4:{
jj_consume_token(4);
break;
+ }
default:
jj_la1[10] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 13:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case 13:{
jj_consume_token(13);
- ASTNotLike jjtn001 = new ASTNotLike(JJTNOTLIKE);
+ASTNotLike jjtn001 = new ASTNotLike(JJTNOTLIKE);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
scalarExpression();
} catch (Throwable jjte001) {
- if (jjtc001) {
+if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
@@ -672,20 +699,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte001;}
} finally {
- if (jjtc001) {
+if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 2);
}
}
break;
- case 14:
+ }
+ case 14:{
jj_consume_token(14);
- ASTNotLikeIgnoreCase jjtn002 = new ASTNotLikeIgnoreCase(JJTNOTLIKEIGNORECASE);
+ASTNotLikeIgnoreCase jjtn002 = new ASTNotLikeIgnoreCase(JJTNOTLIKEIGNORECASE);
boolean jjtc002 = true;
jjtree.openNodeScope(jjtn002);
try {
scalarExpression();
} catch (Throwable jjte002) {
- if (jjtc002) {
+if (jjtc002) {
jjtree.clearNodeScope(jjtn002);
jjtc002 = false;
} else {
@@ -699,33 +727,36 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte002;}
} finally {
- if (jjtc002) {
+if (jjtc002) {
jjtree.closeNodeScope(jjtn002, 2);
}
}
break;
- case 15:
+ }
+ case 15:{
jj_consume_token(15);
- ASTNotIn jjtn003 = new ASTNotIn(JJTNOTIN);
+ASTNotIn jjtn003 = new ASTNotIn(JJTNOTIN);
boolean jjtc003 = true;
jjtree.openNodeScope(jjtn003);
try {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 67:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case 67:{
namedParameter();
break;
- case 16:
+ }
+ case 16:{
jj_consume_token(16);
scalarCommaList();
jj_consume_token(17);
break;
+ }
default:
jj_la1[11] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
} catch (Throwable jjte003) {
- if (jjtc003) {
+if (jjtc003) {
jjtree.clearNodeScope(jjtn003);
jjtc003 = false;
} else {
@@ -739,22 +770,23 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte003;}
} finally {
- if (jjtc003) {
+if (jjtc003) {
jjtree.closeNodeScope(jjtn003, 2);
}
}
break;
- case 18:
+ }
+ case 18:{
jj_consume_token(18);
scalarExpression();
jj_consume_token(2);
- ASTNotBetween jjtn004 = new ASTNotBetween(JJTNOTBETWEEN);
+ASTNotBetween jjtn004 = new ASTNotBetween(JJTNOTBETWEEN);
boolean jjtc004 = true;
jjtree.openNodeScope(jjtn004);
try {
scalarExpression();
} catch (Throwable jjte004) {
- if (jjtc004) {
+if (jjtc004) {
jjtree.clearNodeScope(jjtn004);
jjtc004 = false;
} else {
@@ -768,30 +800,32 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte004;}
} finally {
- if (jjtc004) {
+if (jjtc004) {
jjtree.closeNodeScope(jjtn004, 3);
}
}
break;
+ }
default:
jj_la1[12] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- }
+}
final public void scalarCommaList() throws ParseException {
- ASTList jjtn001 = new ASTList(JJTLIST);
+ASTList jjtn001 = new ASTList(JJTLIST);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
scalarConstExpression();
label_3:
while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 19:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case 19:{
;
break;
+ }
default:
jj_la1[13] = jj_gen;
break label_3;
@@ -800,7 +834,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
scalarConstExpression();
}
} catch (Throwable jjte001) {
- if (jjtc001) {
+if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
@@ -814,14 +848,14 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte001;}
} finally {
- if (jjtc001) {
+if (jjtc001) {
jjtree.closeNodeScope(jjtn001, true);
}
}
- }
+}
final public void conditionExpression() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 16:
case 25:
case 26:
@@ -850,135 +884,146 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
case 71:
case PROPERTY_PATH:
case INT_LITERAL:
- case FLOAT_LITERAL:
+ case FLOAT_LITERAL:{
numericExpression();
break;
+ }
case CONCAT:
case SUBSTRING:
case TRIM:
case LOWER:
case UPPER:
case SINGLE_QUOTED_STRING:
- case DOUBLE_QUOTED_STRING:
+ case DOUBLE_QUOTED_STRING:{
stringExpression();
break;
- case NULL:
- ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
+ }
+ case NULL:{
+ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
jj_consume_token(NULL);
} finally {
- if (jjtc001) {
+if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 0);
}
}
break;
+ }
case AVG:
case MIN:
case MAX:
case SUM:
- case COUNT:
+ case COUNT:{
aggregateExpression();
break;
+ }
case CURRENT_DATE:
case CURRENT_TIME:
- case CURRENT_TIMESTAMP:
+ case CURRENT_TIMESTAMP:{
dateTimeFunction();
break;
+ }
default:
jj_la1[14] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- }
+}
final public void stringParameter() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 68:
case 69:
case 70:
case 71:
- case PROPERTY_PATH:
+ case PROPERTY_PATH:{
pathExpression();
break;
+ }
case CONCAT:
case SUBSTRING:
case TRIM:
case LOWER:
case UPPER:
case SINGLE_QUOTED_STRING:
- case DOUBLE_QUOTED_STRING:
+ case DOUBLE_QUOTED_STRING:{
stringExpression();
break;
+ }
default:
jj_la1[15] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- }
+}
final public void stringLiteral() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case SINGLE_QUOTED_STRING:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case SINGLE_QUOTED_STRING:{
jj_consume_token(SINGLE_QUOTED_STRING);
- ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
- jjtree.closeNodeScope(jjtn001, 0);
+jjtree.closeNodeScope(jjtn001, 0);
jjtc001 = false;
- jjtn001.setValue(token_source.literalValue);
+jjtn001.setValue(token_source.literalValue);
} finally {
- if (jjtc001) {
+if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 0);
}
}
break;
- case DOUBLE_QUOTED_STRING:
+ }
+ case DOUBLE_QUOTED_STRING:{
jj_consume_token(DOUBLE_QUOTED_STRING);
- ASTScalar jjtn002 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn002 = new ASTScalar(JJTSCALAR);
boolean jjtc002 = true;
jjtree.openNodeScope(jjtn002);
try {
- jjtree.closeNodeScope(jjtn002, 0);
+jjtree.closeNodeScope(jjtn002, 0);
jjtc002 = false;
- jjtn002.setValue(token_source.literalValue);
+jjtn002.setValue(token_source.literalValue);
} finally {
- if (jjtc002) {
+if (jjtc002) {
jjtree.closeNodeScope(jjtn002, 0);
}
}
break;
+ }
default:
jj_la1[16] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- }
+}
final public void stringExpression() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SINGLE_QUOTED_STRING:
- case DOUBLE_QUOTED_STRING:
+ case DOUBLE_QUOTED_STRING:{
stringLiteral();
break;
+ }
case CONCAT:
case SUBSTRING:
case TRIM:
case LOWER:
- case UPPER:
+ case UPPER:{
functionsReturningStrings();
break;
+ }
default:
jj_la1[17] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- }
+}
final public void scalarExpression() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 16:
case 25:
case 26:
@@ -1023,172 +1068,183 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
case SINGLE_QUOTED_STRING:
case DOUBLE_QUOTED_STRING:
case INT_LITERAL:
- case FLOAT_LITERAL:
+ case FLOAT_LITERAL:{
conditionExpression();
break;
- case TRUE:
+ }
+ case TRUE:{
jj_consume_token(TRUE);
- ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
- jjtree.closeNodeScope(jjtn001, 0);
+jjtree.closeNodeScope(jjtn001, 0);
jjtc001 = false;
- jjtn001.setValue(true);
+jjtn001.setValue(true);
} finally {
- if (jjtc001) {
+if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 0);
}
}
break;
- case FALSE:
+ }
+ case FALSE:{
jj_consume_token(FALSE);
- ASTScalar jjtn002 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn002 = new ASTScalar(JJTSCALAR);
boolean jjtc002 = true;
jjtree.openNodeScope(jjtn002);
try {
- jjtree.closeNodeScope(jjtn002, 0);
+jjtree.closeNodeScope(jjtn002, 0);
jjtc002 = false;
- jjtn002.setValue(false);
+jjtn002.setValue(false);
} finally {
- if (jjtc002) {
+if (jjtc002) {
jjtree.closeNodeScope(jjtn002, 0);
}
}
break;
+ }
default:
jj_la1[18] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- }
+}
final public void scalarConstExpression() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case SINGLE_QUOTED_STRING:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case SINGLE_QUOTED_STRING:{
jj_consume_token(SINGLE_QUOTED_STRING);
- ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
- jjtree.closeNodeScope(jjtn001, 0);
+jjtree.closeNodeScope(jjtn001, 0);
jjtc001 = false;
- jjtn001.setValue(token_source.literalValue);
+jjtn001.setValue(token_source.literalValue);
} finally {
- if (jjtc001) {
+if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 0);
}
}
break;
- case DOUBLE_QUOTED_STRING:
+ }
+ case DOUBLE_QUOTED_STRING:{
jj_consume_token(DOUBLE_QUOTED_STRING);
- ASTScalar jjtn002 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn002 = new ASTScalar(JJTSCALAR);
boolean jjtc002 = true;
jjtree.openNodeScope(jjtn002);
try {
- jjtree.closeNodeScope(jjtn002, 0);
+jjtree.closeNodeScope(jjtn002, 0);
jjtc002 = false;
- jjtn002.setValue(token_source.literalValue);
+jjtn002.setValue(token_source.literalValue);
} finally {
- if (jjtc002) {
+if (jjtc002) {
jjtree.closeNodeScope(jjtn002, 0);
}
}
break;
- case 67:
+ }
+ case 67:{
namedParameter();
break;
- case INT_LITERAL:
+ }
+ case INT_LITERAL:{
jj_consume_token(INT_LITERAL);
- ASTScalar jjtn003 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn003 = new ASTScalar(JJTSCALAR);
boolean jjtc003 = true;
jjtree.openNodeScope(jjtn003);
try {
- jjtree.closeNodeScope(jjtn003, 0);
+jjtree.closeNodeScope(jjtn003, 0);
jjtc003 = false;
- jjtn003.setValue(token_source.literalValue);
+jjtn003.setValue(token_source.literalValue);
} finally {
- if (jjtc003) {
+if (jjtc003) {
jjtree.closeNodeScope(jjtn003, 0);
}
}
break;
- case FLOAT_LITERAL:
+ }
+ case FLOAT_LITERAL:{
jj_consume_token(FLOAT_LITERAL);
- ASTScalar jjtn004 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn004 = new ASTScalar(JJTSCALAR);
boolean jjtc004 = true;
jjtree.openNodeScope(jjtn004);
try {
- jjtree.closeNodeScope(jjtn004, 0);
+jjtree.closeNodeScope(jjtn004, 0);
jjtc004 = false;
- jjtn004.setValue(token_source.literalValue);
+jjtn004.setValue(token_source.literalValue);
} finally {
- if (jjtc004) {
+if (jjtc004) {
jjtree.closeNodeScope(jjtn004, 0);
}
}
break;
- case TRUE:
+ }
+ case TRUE:{
jj_consume_token(TRUE);
- ASTScalar jjtn005 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn005 = new ASTScalar(JJTSCALAR);
boolean jjtc005 = true;
jjtree.openNodeScope(jjtn005);
try {
- jjtree.closeNodeScope(jjtn005, 0);
+jjtree.closeNodeScope(jjtn005, 0);
jjtc005 = false;
- jjtn005.setValue(true);
+jjtn005.setValue(true);
} finally {
- if (jjtc005) {
+if (jjtc005) {
jjtree.closeNodeScope(jjtn005, 0);
}
}
break;
- case FALSE:
+ }
+ case FALSE:{
jj_consume_token(FALSE);
- ASTScalar jjtn006 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn006 = new ASTScalar(JJTSCALAR);
boolean jjtc006 = true;
jjtree.openNodeScope(jjtn006);
try {
- jjtree.closeNodeScope(jjtn006, 0);
+jjtree.closeNodeScope(jjtn006, 0);
jjtc006 = false;
- jjtn006.setValue(false);
+jjtn006.setValue(false);
} finally {
- if (jjtc006) {
+if (jjtc006) {
jjtree.closeNodeScope(jjtn006, 0);
}
}
break;
+ }
default:
jj_la1[19] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- }
+}
final public void numericExpression() throws ParseException {
bitwiseOr();
- }
+}
final public void bitwiseOr() throws ParseException {
bitwiseXor();
label_4:
while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 20:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case 20:{
;
break;
+ }
default:
jj_la1[20] = jj_gen;
break label_4;
}
jj_consume_token(20);
- ASTBitwiseOr jjtn001 = new ASTBitwiseOr(JJTBITWISEOR);
+ASTBitwiseOr jjtn001 = new ASTBitwiseOr(JJTBITWISEOR);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
bitwiseXor();
} catch (Throwable jjte001) {
- if (jjtc001) {
+if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
@@ -1202,33 +1258,34 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte001;}
} finally {
- if (jjtc001) {
+if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 2);
}
}
}
- }
+}
final public void bitwiseXor() throws ParseException {
bitwiseAnd();
label_5:
while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 21:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case 21:{
;
break;
+ }
default:
jj_la1[21] = jj_gen;
break label_5;
}
jj_consume_token(21);
- ASTBitwiseXor jjtn001 = new ASTBitwiseXor(JJTBITWISEXOR);
+ASTBitwiseXor jjtn001 = new ASTBitwiseXor(JJTBITWISEXOR);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
bitwiseAnd();
} catch (Throwable jjte001) {
- if (jjtc001) {
+if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
@@ -1242,33 +1299,34 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte001;}
} finally {
- if (jjtc001) {
+if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 2);
}
}
}
- }
+}
final public void bitwiseAnd() throws ParseException {
bitwiseShift();
label_6:
while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 22:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case 22:{
;
break;
+ }
default:
jj_la1[22] = jj_gen;
break label_6;
}
jj_consume_token(22);
- ASTBitwiseAnd jjtn001 = new ASTBitwiseAnd(JJTBITWISEAND);
+ASTBitwiseAnd jjtn001 = new ASTBitwiseAnd(JJTBITWISEAND);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
bitwiseShift();
} catch (Throwable jjte001) {
- if (jjtc001) {
+if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
@@ -1282,36 +1340,37 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte001;}
} finally {
- if (jjtc001) {
+if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 2);
}
}
}
- }
+}
final public void bitwiseShift() throws ParseException {
arithmeticExp();
label_7:
while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 23:
- case 24:
+ case 24:{
;
break;
+ }
default:
jj_la1[23] = jj_gen;
break label_7;
}
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 23:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case 23:{
jj_consume_token(23);
- ASTBitwiseLeftShift jjtn001 = new ASTBitwiseLeftShift(JJTBITWISELEFTSHIFT);
+ASTBitwiseLeftShift jjtn001 = new ASTBitwiseLeftShift(JJTBITWISELEFTSHIFT);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
arithmeticExp();
} catch (Throwable jjte001) {
- if (jjtc001) {
+if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
@@ -1325,20 +1384,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte001;}
} finally {
- if (jjtc001) {
+if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 2);
}
}
break;
- case 24:
+ }
+ case 24:{
jj_consume_token(24);
- ASTBitwiseRightShift jjtn002 = new ASTBitwiseRightShift(JJTBITWISERIGHTSHIFT);
+ASTBitwiseRightShift jjtn002 = new ASTBitwiseRightShift(JJTBITWISERIGHTSHIFT);
boolean jjtc002 = true;
jjtree.openNodeScope(jjtn002);
try {
arithmeticExp();
} catch (Throwable jjte002) {
- if (jjtc002) {
+if (jjtc002) {
jjtree.clearNodeScope(jjtn002);
jjtc002 = false;
} else {
@@ -1352,42 +1412,44 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte002;}
} finally {
- if (jjtc002) {
+if (jjtc002) {
jjtree.closeNodeScope(jjtn002, 2);
}
}
break;
+ }
default:
jj_la1[24] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
- }
+}
final public void arithmeticExp() throws ParseException {
multiplySubtractExp();
label_8:
while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 25:
- case 26:
+ case 26:{
;
break;
+ }
default:
jj_la1[25] = jj_gen;
break label_8;
}
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 25:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case 25:{
jj_consume_token(25);
- ASTAdd jjtn001 = new ASTAdd(JJTADD);
+ASTAdd jjtn001 = new ASTAdd(JJTADD);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
multiplySubtractExp();
} catch (Throwable jjte001) {
- if (jjtc001) {
+if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
@@ -1401,20 +1463,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte001;}
} finally {
- if (jjtc001) {
+if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 2);
}
}
break;
- case 26:
+ }
+ case 26:{
jj_consume_token(26);
- ASTSubtract jjtn002 = new ASTSubtract(JJTSUBTRACT);
+ASTSubtract jjtn002 = new ASTSubtract(JJTSUBTRACT);
boolean jjtc002 = true;
jjtree.openNodeScope(jjtn002);
try {
multiplySubtractExp();
} catch (Throwable jjte002) {
- if (jjtc002) {
+if (jjtc002) {
jjtree.clearNodeScope(jjtn002);
jjtc002 = false;
} else {
@@ -1428,42 +1491,44 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte002;}
} finally {
- if (jjtc002) {
+if (jjtc002) {
jjtree.closeNodeScope(jjtn002, 2);
}
}
break;
+ }
default:
jj_la1[26] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
- }
+}
final public void multiplySubtractExp() throws ParseException {
numericTermExt();
label_9:
while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 27:
- case ASTERISK:
+ case ASTERISK:{
;
break;
+ }
default:
jj_la1[27] = jj_gen;
break label_9;
}
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case ASTERISK:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case ASTERISK:{
jj_consume_token(ASTERISK);
- ASTMultiply jjtn001 = new ASTMultiply(JJTMULTIPLY);
+ASTMultiply jjtn001 = new ASTMultiply(JJTMULTIPLY);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
numericTermExt();
} catch (Throwable jjte001) {
- if (jjtc001) {
+if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
@@ -1477,20 +1542,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte001;}
} finally {
- if (jjtc001) {
+if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 2);
}
}
break;
- case 27:
+ }
+ case 27:{
jj_consume_token(27);
- ASTDivide jjtn002 = new ASTDivide(JJTDIVIDE);
+ASTDivide jjtn002 = new ASTDivide(JJTDIVIDE);
boolean jjtc002 = true;
jjtree.openNodeScope(jjtn002);
try {
numericTermExt();
} catch (Throwable jjte002) {
- if (jjtc002) {
+if (jjtc002) {
jjtree.clearNodeScope(jjtn002);
jjtc002 = false;
} else {
@@ -1504,21 +1570,22 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte002;}
} finally {
- if (jjtc002) {
+if (jjtc002) {
jjtree.closeNodeScope(jjtn002, 2);
}
}
break;
+ }
default:
jj_la1[28] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
- }
+}
final public void numericTermExt() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 16:
case 25:
case 26:
@@ -1546,18 +1613,19 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
case 71:
case PROPERTY_PATH:
case INT_LITERAL:
- case FLOAT_LITERAL:
+ case FLOAT_LITERAL:{
numericTerm();
break;
- case 28:
+ }
+ case 28:{
jj_consume_token(28);
- ASTBitwiseNot jjtn001 = new ASTBitwiseNot(JJTBITWISENOT);
+ASTBitwiseNot jjtn001 = new ASTBitwiseNot(JJTBITWISENOT);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
numericTerm();
} catch (Throwable jjte001) {
- if (jjtc001) {
+if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
@@ -1571,20 +1639,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte001;}
} finally {
- if (jjtc001) {
+if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 1);
}
}
break;
+ }
default:
jj_la1[29] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- }
+}
final public void numericTerm() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case 16:
case 25:
case LENGTH:
@@ -1611,26 +1680,28 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
case 71:
case PROPERTY_PATH:
case INT_LITERAL:
- case FLOAT_LITERAL:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 25:
+ case FLOAT_LITERAL:{
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case 25:{
jj_consume_token(25);
break;
+ }
default:
jj_la1[30] = jj_gen;
;
}
numericPrimary();
break;
- case 26:
+ }
+ case 26:{
jj_consume_token(26);
- ASTNegate jjtn001 = new ASTNegate(JJTNEGATE);
+ASTNegate jjtn001 = new ASTNegate(JJTNEGATE);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
numericTerm();
} catch (Throwable jjte001) {
- if (jjtc001) {
+if (jjtc001) {
jjtree.clearNodeScope(jjtn001);
jjtc001 = false;
} else {
@@ -1644,58 +1715,63 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte001;}
} finally {
- if (jjtc001) {
+if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 1);
}
}
break;
+ }
default:
jj_la1[31] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- }
+}
final public void numericPrimary() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 16:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case 16:{
jj_consume_token(16);
orCondition();
jj_consume_token(17);
break;
- case INT_LITERAL:
+ }
+ case INT_LITERAL:{
jj_consume_token(INT_LITERAL);
- ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
- jjtree.closeNodeScope(jjtn001, 0);
+jjtree.closeNodeScope(jjtn001, 0);
jjtc001 = false;
- jjtn001.setValue(token_source.literalValue);
+jjtn001.setValue(token_source.literalValue);
} finally {
- if (jjtc001) {
+if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 0);
}
}
break;
- case FLOAT_LITERAL:
+ }
+ case FLOAT_LITERAL:{
jj_consume_token(FLOAT_LITERAL);
- ASTScalar jjtn002 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn002 = new ASTScalar(JJTSCALAR);
boolean jjtc002 = true;
jjtree.openNodeScope(jjtn002);
try {
- jjtree.closeNodeScope(jjtn002, 0);
+jjtree.closeNodeScope(jjtn002, 0);
jjtc002 = false;
- jjtn002.setValue(token_source.literalValue);
+jjtn002.setValue(token_source.literalValue);
} finally {
- if (jjtc002) {
+if (jjtc002) {
jjtree.closeNodeScope(jjtn002, 0);
}
}
break;
- case 67:
+ }
+ case 67:{
namedParameter();
break;
+ }
case LENGTH:
case LOCATE:
case ABS:
@@ -1710,55 +1786,63 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
case DAY_OF_WEEK:
case HOUR:
case MINUTE:
- case SECOND:
+ case SECOND:{
functionsReturningNumerics();
break;
+ }
case 68:
case 69:
case 70:
case 71:
- case PROPERTY_PATH:
+ case PROPERTY_PATH:{
pathExpression();
break;
- case FUNCTION:
+ }
+ case FUNCTION:{
customFunction();
break;
- case OPERATOR:
+ }
+ case OPERATOR:{
customOperator();
break;
+ }
default:
jj_la1[32] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- }
+}
final public void functionsReturningStrings() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case CONCAT:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case CONCAT:{
concat();
break;
- case SUBSTRING:
+ }
+ case SUBSTRING:{
substring();
break;
- case TRIM:
+ }
+ case TRIM:{
trim();
break;
- case LOWER:
+ }
+ case LOWER:{
lower();
break;
- case UPPER:
+ }
+ case UPPER:{
upper();
break;
+ }
default:
jj_la1[33] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- }
+}
- final public void customFunction() throws ParseException {
- /*@bgen(jjtree) CustomFunction */
+ final public void customFunction() throws ParseException {/*@bgen(jjtree) CustomFunction */
ASTCustomFunction jjtn000 = new ASTCustomFunction(JJTCUSTOMFUNCTION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
@@ -1768,25 +1852,27 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
stringLiteral();
label_10:
while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 19:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case 19:{
;
break;
+ }
default:
jj_la1[34] = jj_gen;
break label_10;
}
jj_consume_token(19);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case CONCAT:
case SUBSTRING:
case TRIM:
case LOWER:
case UPPER:
case SINGLE_QUOTED_STRING:
- case DOUBLE_QUOTED_STRING:
+ case DOUBLE_QUOTED_STRING:{
stringExpression();
break;
+ }
case 16:
case 25:
case 26:
@@ -1815,9 +1901,10 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
case 71:
case PROPERTY_PATH:
case INT_LITERAL:
- case FLOAT_LITERAL:
+ case FLOAT_LITERAL:{
numericExpression();
break;
+ }
default:
jj_la1[35] = jj_gen;
jj_consume_token(-1);
@@ -1826,7 +1913,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
jj_consume_token(17);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -1840,14 +1927,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
- final public void customOperator() throws ParseException {
- /*@bgen(jjtree) CustomOperator */
+ final public void customOperator() throws ParseException {/*@bgen(jjtree) CustomOperator */
ASTCustomOperator jjtn000 = new ASTCustomOperator(JJTCUSTOMOPERATOR);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
@@ -1857,25 +1943,27 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
stringLiteral();
label_11:
while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 19:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case 19:{
;
break;
+ }
default:
jj_la1[36] = jj_gen;
break label_11;
}
jj_consume_token(19);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case CONCAT:
case SUBSTRING:
case TRIM:
case LOWER:
case UPPER:
case SINGLE_QUOTED_STRING:
- case DOUBLE_QUOTED_STRING:
+ case DOUBLE_QUOTED_STRING:{
stringExpression();
break;
+ }
case 16:
case 25:
case 26:
@@ -1904,9 +1992,10 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
case 71:
case PROPERTY_PATH:
case INT_LITERAL:
- case FLOAT_LITERAL:
+ case FLOAT_LITERAL:{
numericExpression();
break;
+ }
default:
jj_la1[37] = jj_gen;
jj_consume_token(-1);
@@ -1915,7 +2004,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
jj_consume_token(17);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -1929,14 +2018,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
- final public void concat() throws ParseException {
- /*@bgen(jjtree) Concat */
+ final public void concat() throws ParseException {/*@bgen(jjtree) Concat */
ASTConcat jjtn000 = new ASTConcat(JJTCONCAT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
@@ -1946,10 +2034,11 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
stringParameter();
label_12:
while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 19:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case 19:{
;
break;
+ }
default:
jj_la1[38] = jj_gen;
break label_12;
@@ -1959,7 +2048,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
jj_consume_token(17);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -1973,14 +2062,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
- final public void substring() throws ParseException {
- /*@bgen(jjtree) Substring */
+ final public void substring() throws ParseException {/*@bgen(jjtree) Substring */
ASTSubstring jjtn000 = new ASTSubstring(JJTSUBSTRING);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
@@ -1990,18 +2078,19 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
stringParameter();
jj_consume_token(19);
numericExpression();
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 19:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case 19:{
jj_consume_token(19);
numericExpression();
break;
+ }
default:
jj_la1[39] = jj_gen;
;
}
jj_consume_token(17);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -2015,14 +2104,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
- final public void trim() throws ParseException {
- /*@bgen(jjtree) Trim */
+ final public void trim() throws ParseException {/*@bgen(jjtree) Trim */
ASTTrim jjtn000 = new ASTTrim(JJTTRIM);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
@@ -2032,7 +2120,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
stringParameter();
jj_consume_token(17);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -2046,14 +2134,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
- final public void lower() throws ParseException {
- /*@bgen(jjtree) Lower */
+ final public void lower() throws ParseException {/*@bgen(jjtree) Lower */
ASTLower jjtn000 = new ASTLower(JJTLOWER);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
@@ -2063,7 +2150,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
stringParameter();
jj_consume_token(17);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -2077,14 +2164,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
- final public void upper() throws ParseException {
- /*@bgen(jjtree) Upper */
+ final public void upper() throws ParseException {/*@bgen(jjtree) Upper */
ASTUpper jjtn000 = new ASTUpper(JJTUPPER);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
@@ -2094,7 +2180,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
stringParameter();
jj_consume_token(17);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -2108,29 +2194,34 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
final public void functionsReturningNumerics() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case LENGTH:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case LENGTH:{
length();
break;
- case LOCATE:
+ }
+ case LOCATE:{
locate();
break;
- case ABS:
+ }
+ case ABS:{
abs();
break;
- case SQRT:
+ }
+ case SQRT:{
sqrt();
break;
- case MOD:
+ }
+ case MOD:{
mod();
break;
+ }
case YEAR:
case MONTH:
case WEEK:
@@ -2140,18 +2231,18 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
case DAY_OF_WEEK:
case HOUR:
case MINUTE:
- case SECOND:
+ case SECOND:{
dateTimeExtractingFunction();
break;
+ }
default:
jj_la1[40] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- }
+}
- final public void length() throws ParseException {
- /*@bgen(jjtree) Length */
+ final public void length() throws ParseException {/*@bgen(jjtree) Length */
ASTLength jjtn000 = new ASTLength(JJTLENGTH);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
@@ -2161,7 +2252,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
stringParameter();
jj_consume_token(17);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -2175,14 +2266,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
- final public void locate() throws ParseException {
- /*@bgen(jjtree) Locate */
+ final public void locate() throws ParseException {/*@bgen(jjtree) Locate */
ASTLocate jjtn000 = new ASTLocate(JJTLOCATE);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
@@ -2192,18 +2282,19 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
stringParameter();
jj_consume_token(19);
stringParameter();
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 19:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case 19:{
jj_consume_token(19);
numericExpression();
break;
+ }
default:
jj_la1[41] = jj_gen;
;
}
jj_consume_token(17);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -2217,14 +2308,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
- final public void abs() throws ParseException {
- /*@bgen(jjtree) Abs */
+ final public void abs() throws ParseException {/*@bgen(jjtree) Abs */
ASTAbs jjtn000 = new ASTAbs(JJTABS);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
@@ -2234,7 +2324,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
numericExpression();
jj_consume_token(17);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -2248,14 +2338,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
- final public void sqrt() throws ParseException {
- /*@bgen(jjtree) Sqrt */
+ final public void sqrt() throws ParseException {/*@bgen(jjtree) Sqrt */
ASTSqrt jjtn000 = new ASTSqrt(JJTSQRT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
@@ -2265,7 +2354,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
numericExpression();
jj_consume_token(17);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -2279,14 +2368,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
- final public void mod() throws ParseException {
- /*@bgen(jjtree) Mod */
+ final public void mod() throws ParseException {/*@bgen(jjtree) Mod */
ASTMod jjtn000 = new ASTMod(JJTMOD);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
@@ -2298,7 +2386,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
numericExpression();
jj_consume_token(17);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -2312,72 +2400,78 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
final public void aggregateExpression() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case AVG:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case AVG:{
avg();
break;
- case MAX:
+ }
+ case MAX:{
max();
break;
- case MIN:
+ }
+ case MIN:{
min();
break;
- case SUM:
+ }
+ case SUM:{
sum();
break;
- case COUNT:
+ }
+ case COUNT:{
count();
break;
+ }
default:
jj_la1[42] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- }
+}
- final public void asterisk() throws ParseException {
- /*@bgen(jjtree) Asterisk */
+ final public void asterisk() throws ParseException {/*@bgen(jjtree) Asterisk */
ASTAsterisk jjtn000 = new ASTAsterisk(JJTASTERISK);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
try {
jj_consume_token(ASTERISK);
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
- final public void count() throws ParseException {
- /*@bgen(jjtree) Count */
+ final public void count() throws ParseException {/*@bgen(jjtree) Count */
ASTCount jjtn000 = new ASTCount(JJTCOUNT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
try {
jj_consume_token(COUNT);
jj_consume_token(16);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case ASTERISK:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case ASTERISK:{
asterisk();
break;
+ }
case 68:
case 69:
case 70:
case 71:
- case PROPERTY_PATH:
+ case PROPERTY_PATH:{
pathExpression();
break;
- case DISTINCT:
+ }
+ case DISTINCT:{
distinct();
break;
+ }
default:
jj_la1[43] = jj_gen;
jj_consume_token(-1);
@@ -2385,7 +2479,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
jj_consume_token(17);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -2399,14 +2493,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
- final public void avg() throws ParseException {
- /*@bgen(jjtree) Avg */
+ final public void avg() throws ParseException {/*@bgen(jjtree) Avg */
ASTAvg jjtn000 = new ASTAvg(JJTAVG);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
@@ -2416,7 +2509,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
numericExpression();
jj_consume_token(17);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -2430,14 +2523,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
- final public void max() throws ParseException {
- /*@bgen(jjtree) Max */
+ final public void max() throws ParseException {/*@bgen(jjtree) Max */
ASTMax jjtn000 = new ASTMax(JJTMAX);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
@@ -2447,7 +2539,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
numericExpression();
jj_consume_token(17);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -2461,14 +2553,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
- final public void min() throws ParseException {
- /*@bgen(jjtree) Min */
+ final public void min() throws ParseException {/*@bgen(jjtree) Min */
ASTMin jjtn000 = new ASTMin(JJTMIN);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
@@ -2478,7 +2569,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
numericExpression();
jj_consume_token(17);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -2492,14 +2583,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
- final public void sum() throws ParseException {
- /*@bgen(jjtree) Sum */
+ final public void sum() throws ParseException {/*@bgen(jjtree) Sum */
ASTSum jjtn000 = new ASTSum(JJTSUM);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
@@ -2509,7 +2599,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
numericExpression();
jj_consume_token(17);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -2523,32 +2613,34 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
final public void dateTimeFunction() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case CURRENT_DATE:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case CURRENT_DATE:{
currentDate();
break;
- case CURRENT_TIME:
+ }
+ case CURRENT_TIME:{
currentTime();
break;
- case CURRENT_TIMESTAMP:
+ }
+ case CURRENT_TIMESTAMP:{
currentTimestamp();
break;
+ }
default:
jj_la1[44] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- }
+}
- final public void currentDate() throws ParseException {
- /*@bgen(jjtree) CurrentDate */
+ final public void currentDate() throws ParseException {/*@bgen(jjtree) CurrentDate */
ASTCurrentDate jjtn000 = new ASTCurrentDate(JJTCURRENTDATE);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
@@ -2557,14 +2649,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
jj_consume_token(16);
jj_consume_token(17);
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
- final public void currentTime() throws ParseException {
- /*@bgen(jjtree) CurrentTime */
+ final public void currentTime() throws ParseException {/*@bgen(jjtree) CurrentTime */
ASTCurrentTime jjtn000 = new ASTCurrentTime(JJTCURRENTTIME);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
@@ -2573,14 +2664,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
jj_consume_token(16);
jj_consume_token(17);
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
- final public void currentTimestamp() throws ParseException {
- /*@bgen(jjtree) CurrentTimestamp */
+ final public void currentTimestamp() throws ParseException {/*@bgen(jjtree) CurrentTimestamp */
ASTCurrentTimestamp jjtn000 = new ASTCurrentTimestamp(JJTCURRENTTIMESTAMP);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
@@ -2589,61 +2679,70 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
jj_consume_token(16);
jj_consume_token(17);
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
/* Date/time parts extracting function */
- final public void dateTimeExtractingFunction() throws ParseException {
- /*@bgen(jjtree) #Extract( 1) */
+ final public void dateTimeExtractingFunction() throws ParseException {/*@bgen(jjtree) #Extract( 1) */
ASTExtract jjtn000 = new ASTExtract(JJTEXTRACT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);Token t;
try {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case YEAR:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case YEAR:{
t = jj_consume_token(YEAR);
break;
- case MONTH:
+ }
+ case MONTH:{
t = jj_consume_token(MONTH);
break;
- case WEEK:
+ }
+ case WEEK:{
t = jj_consume_token(WEEK);
break;
- case DAY_OF_YEAR:
+ }
+ case DAY_OF_YEAR:{
t = jj_consume_token(DAY_OF_YEAR);
break;
- case DAY:
+ }
+ case DAY:{
t = jj_consume_token(DAY);
break;
- case DAY_OF_MONTH:
+ }
+ case DAY_OF_MONTH:{
t = jj_consume_token(DAY_OF_MONTH);
break;
- case DAY_OF_WEEK:
+ }
+ case DAY_OF_WEEK:{
t = jj_consume_token(DAY_OF_WEEK);
break;
- case HOUR:
+ }
+ case HOUR:{
t = jj_consume_token(HOUR);
break;
- case MINUTE:
+ }
+ case MINUTE:{
t = jj_consume_token(MINUTE);
break;
- case SECOND:
+ }
+ case SECOND:{
t = jj_consume_token(SECOND);
break;
+ }
default:
jj_la1[45] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- jjtn000.setPartToken(t.image);
+jjtn000.setPartToken(t.image);
jj_consume_token(16);
pathExpression();
jj_consume_token(17);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -2657,14 +2756,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, 1);
}
}
- }
+}
- final public void distinct() throws ParseException {
- /*@bgen(jjtree) Distinct */
+ final public void distinct() throws ParseException {/*@bgen(jjtree) Distinct */
ASTDistinct jjtn000 = new ASTDistinct(JJTDISTINCT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
@@ -2674,7 +2772,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
pathExpression();
jj_consume_token(17);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -2688,118 +2786,121 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
- final public void namedParameter() throws ParseException {
- Token t;
+ final public void namedParameter() throws ParseException {Token t;
jj_consume_token(67);
t = jj_consume_token(PROPERTY_PATH);
- ASTNamedParameter jjtn001 = new ASTNamedParameter(JJTNAMEDPARAMETER);
+ASTNamedParameter jjtn001 = new ASTNamedParameter(JJTNAMEDPARAMETER);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
- jjtree.closeNodeScope(jjtn001, 0);
+jjtree.closeNodeScope(jjtn001, 0);
jjtc001 = false;
- jjtn001.setValue(t.image);
+jjtn001.setValue(t.image);
} finally {
- if (jjtc001) {
+if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 0);
}
}
- }
+}
- final public void pathExpression() throws ParseException {
- Token t;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case PROPERTY_PATH:
+ final public void pathExpression() throws ParseException {Token t;
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case PROPERTY_PATH:{
t = jj_consume_token(PROPERTY_PATH);
- ASTObjPath jjtn001 = new ASTObjPath(JJTOBJPATH);
+ASTObjPath jjtn001 = new ASTObjPath(JJTOBJPATH);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
- jjtree.closeNodeScope(jjtn001, 0);
+jjtree.closeNodeScope(jjtn001, 0);
jjtc001 = false;
- ExpressionUtils.parsePath(jjtn001, t.image);
+ExpressionUtils.parsePath(jjtn001, t.image);
} finally {
- if (jjtc001) {
+if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 0);
}
}
break;
- case 68:
+ }
+ case 68:{
jj_consume_token(68);
t = jj_consume_token(PROPERTY_PATH);
- ASTObjPath jjtn002 = new ASTObjPath(JJTOBJPATH);
+ASTObjPath jjtn002 = new ASTObjPath(JJTOBJPATH);
boolean jjtc002 = true;
jjtree.openNodeScope(jjtn002);
try {
- jjtree.closeNodeScope(jjtn002, 0);
+jjtree.closeNodeScope(jjtn002, 0);
jjtc002 = false;
- ExpressionUtils.parsePath(jjtn002, t.image);
+ExpressionUtils.parsePath(jjtn002, t.image);
} finally {
- if (jjtc002) {
+if (jjtc002) {
jjtree.closeNodeScope(jjtn002, 0);
}
}
break;
- case 69:
+ }
+ case 69:{
jj_consume_token(69);
t = jj_consume_token(PROPERTY_PATH);
- ASTDbPath jjtn003 = new ASTDbPath(JJTDBPATH);
+ASTDbPath jjtn003 = new ASTDbPath(JJTDBPATH);
boolean jjtc003 = true;
jjtree.openNodeScope(jjtn003);
try {
- jjtree.closeNodeScope(jjtn003, 0);
+jjtree.closeNodeScope(jjtn003, 0);
jjtc003 = false;
- ExpressionUtils.parsePath(jjtn003, t.image);
+ExpressionUtils.parsePath(jjtn003, t.image);
} finally {
- if (jjtc003) {
+if (jjtc003) {
jjtree.closeNodeScope(jjtn003, 0);
}
}
break;
- case 70:
+ }
+ case 70:{
jj_consume_token(70);
t = jj_consume_token(PROPERTY_PATH);
- ASTEnum jjtn004 = new ASTEnum(JJTENUM);
+ASTEnum jjtn004 = new ASTEnum(JJTENUM);
boolean jjtc004 = true;
jjtree.openNodeScope(jjtn004);
try {
- jjtree.closeNodeScope(jjtn004, 0);
+jjtree.closeNodeScope(jjtn004, 0);
jjtc004 = false;
- jjtn004.setEnumValue(t.image);
+jjtn004.setEnumValue(t.image);
} finally {
- if (jjtc004) {
+if (jjtc004) {
jjtree.closeNodeScope(jjtn004, 0);
}
}
break;
- case 71:
+ }
+ case 71:{
jj_consume_token(71);
t = jj_consume_token(PROPERTY_PATH);
- ASTDbIdPath jjtn005 = new ASTDbIdPath(JJTDBIDPATH);
+ASTDbIdPath jjtn005 = new ASTDbIdPath(JJTDBIDPATH);
boolean jjtc005 = true;
jjtree.openNodeScope(jjtn005);
try {
- jjtree.closeNodeScope(jjtn005, 0);
+jjtree.closeNodeScope(jjtn005, 0);
jjtc005 = false;
- ExpressionUtils.parsePath(jjtn005, t.image);
+ExpressionUtils.parsePath(jjtn005, t.image);
} finally {
- if (jjtc005) {
+if (jjtc005) {
jjtree.closeNodeScope(jjtn005, 0);
}
}
break;
+ }
default:
jj_la1[46] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- }
+}
/** Generated Token Manager. */
public ExpressionParserTokenManager token_source;
@@ -2815,128 +2916,136 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
static private int[] jj_la1_1;
static private int[] jj_la1_2;
static {
- jj_la1_init_0();
- jj_la1_init_1();
- jj_la1_init_2();
- }
- private static void jj_la1_init_0() {
- jj_la1_0 = new int[] {0x2,0x4,0x18,0x16010018,0x60,0x180,0x10000,0x4fff8,0x4fff8,0x16010000,0x18,0x10000,0x4e000,0x80000,0x16010000,0x0,0x0,0x0,0x16010000,0x0,0x100000,0x200000,0x400000,0x1800000,0x1800000,0x6000000,0x6000000,0x8000000,0x8000000,0x16010000,0x2000000,0x6010000,0x10000,0x0,0x80000,0x16010000,0x80000,0x16010000,0x80000,0x80000,0x0,0x80000,0x0,0x0,0x0,0x0,0x0,};
- }
- private static void jj_la1_init_1() {
- jj_la1_1 = new int[] {0x0,0x0,0x0,0xfffffdfe,0x0,0x0,0x0,0x0,0x0,0xfffffdfe,0x0,0x0,0x0,0x0,0xfffffdf2,0x7c00,0x0,0x7c00,0xfffffdfe,0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff8f8000,0x0,0xff8f8000,0xff8f8000,0x7c00,0x0,0xff8ffc00,0x0,0xff8ffc00,0x0,0x0,0xff8f8000,0x0,0x1f0,0x200,0x700000,0xff800000,0x0,};
- }
- private static void jj_la1_init_2() {
- jj_la1_2 = new int[] {0x0,0x0,0x0,0x7202ff,0x0,0x0,0x8,0x0,0x0,0x7202ff,0x0,0x8,0x0,0x0,0x7202ff,0x1202f0,0x120000,0x120000,0x7202ff,0x720008,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100,0x100,0x6002ff,0x0,0x6002ff,0x6002ff,0x0,0x0,0x7202ff,0x0,0x7202ff,0x0,0x0,0x1,0x0,0x0,0x3f0,0x0,0x1,0x2f0,};
- }
+ jj_la1_init_0();
+ jj_la1_init_1();
+ jj_la1_init_2();
+ }
+ private static void jj_la1_init_0() {
+ jj_la1_0 = new int[] {0x2,0x4,0x18,0x16010018,0x60,0x180,0x10000,0x4fff8,0x4fff8,0x16010000,0x18,0x10000,0x4e000,0x80000,0x16010000,0x0,0x0,0x0,0x16010000,0x0,0x100000,0x200000,0x400000,0x1800000,0x1800000,0x6000000,0x6000000,0x8000000,0x8000000,0x16010000,0x2000000,0x6010000,0x10000,0x0,0x80000,0x16010000,0x80000,0x16010000,0x80000,0x80000,0x0,0x80000,0x0,0x0,0x0,0x0,0x0,};
+ }
+ private static void jj_la1_init_1() {
+ jj_la1_1 = new int[] {0x0,0x0,0x0,0xfffffdfe,0x0,0x0,0x0,0x0,0x0,0xfffffdfe,0x0,0x0,0x0,0x0,0xfffffdf2,0x7c00,0x0,0x7c00,0xfffffdfe,0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff8f8000,0x0,0xff8f8000,0xff8f8000,0x7c00,0x0,0xff8ffc00,0x0,0xff8ffc00,0x0,0x0,0xff8f8000,0x0,0x1f0,0x200,0x700000,0xff800000,0x0,};
+ }
+ private static void jj_la1_init_2() {
+ jj_la1_2 = new int[] {0x0,0x0,0x0,0xe402ff,0x0,0x0,0x8,0x0,0x0,0xe402ff,0x0,0x8,0x0,0x0,0xe402ff,0x2402f0,0x240000,0x240000,0xe402ff,0xe40008,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100,0x100,0xc002ff,0x0,0xc002ff,0xc002ff,0x0,0x0,0xe402ff,0x0,0xe402ff,0x0,0x0,0x1,0x0,0x0,0x3f0,0x0,0x1,0x2f0,};
+ }
/** Constructor with InputStream. */
public ExpressionParser(java.io.InputStream stream) {
- this(stream, null);
+ this(stream, null);
}
/** Constructor with InputStream and supplied encoding */
public ExpressionParser(java.io.InputStream stream, String encoding) {
- try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
- token_source = new ExpressionParserTokenManager(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 47; i++) jj_la1[i] = -1;
+ try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
+ token_source = new ExpressionParserTokenManager(jj_input_stream);
+ token = new Token();
+ jj_ntk = -1;
+ jj_gen = 0;
+ for (int i = 0; i < 47; i++) jj_la1[i] = -1;
}
/** Reinitialise. */
public void ReInit(java.io.InputStream stream) {
- ReInit(stream, null);
+ ReInit(stream, null);
}
/** Reinitialise. */
public void ReInit(java.io.InputStream stream, String encoding) {
- try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
- token_source.ReInit(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jjtree.reset();
- jj_gen = 0;
- for (int i = 0; i < 47; i++) jj_la1[i] = -1;
+ try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
+ token_source.ReInit(jj_input_stream);
+ token = new Token();
+ jj_ntk = -1;
+ jjtree.reset();
+ jj_gen = 0;
+ for (int i = 0; i < 47; i++) jj_la1[i] = -1;
}
/** Constructor. */
public ExpressionParser(java.io.Reader stream) {
- jj_input_stream = new JavaCharStream(stream, 1, 1);
- token_source = new ExpressionParserTokenManager(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 47; i++) jj_la1[i] = -1;
+ jj_input_stream = new JavaCharStream(stream, 1, 1);
+ token_source = new ExpressionParserTokenManager(jj_input_stream);
+ token = new Token();
+ jj_ntk = -1;
+ jj_gen = 0;
+ for (int i = 0; i < 47; i++) jj_la1[i] = -1;
}
/** Reinitialise. */
public void ReInit(java.io.Reader stream) {
- jj_input_stream.ReInit(stream, 1, 1);
- token_source.ReInit(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jjtree.reset();
- jj_gen = 0;
- for (int i = 0; i < 47; i++) jj_la1[i] = -1;
+ if (jj_input_stream == null) {
+ jj_input_stream = new JavaCharStream(stream, 1, 1);
+ } else {
+ jj_input_stream.ReInit(stream, 1, 1);
+ }
+ if (token_source == null) {
+ token_source = new ExpressionParserTokenManager(jj_input_stream);
+ }
+
+ token_source.ReInit(jj_input_stream);
+ token = new Token();
+ jj_ntk = -1;
+ jjtree.reset();
+ jj_gen = 0;
+ for (int i = 0; i < 47; i++) jj_la1[i] = -1;
}
/** Constructor with generated Token Manager. */
public ExpressionParser(ExpressionParserTokenManager tm) {
- token_source = tm;
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 47; i++) jj_la1[i] = -1;
+ token_source = tm;
+ token = new Token();
+ jj_ntk = -1;
+ jj_gen = 0;
+ for (int i = 0; i < 47; i++) jj_la1[i] = -1;
}
/** Reinitialise. */
public void ReInit(ExpressionParserTokenManager tm) {
- token_source = tm;
- token = new Token();
- jj_ntk = -1;
- jjtree.reset();
- jj_gen = 0;
- for (int i = 0; i < 47; i++) jj_la1[i] = -1;
+ token_source = tm;
+ token = new Token();
+ jj_ntk = -1;
+ jjtree.reset();
+ jj_gen = 0;
+ for (int i = 0; i < 47; i++) jj_la1[i] = -1;
}
private Token jj_consume_token(int kind) throws ParseException {
- Token oldToken;
- if ((oldToken = token).next != null) token = token.next;
- else token = token.next = token_source.getNextToken();
- jj_ntk = -1;
- if (token.kind == kind) {
- jj_gen++;
- return token;
- }
- token = oldToken;
- jj_kind = kind;
- throw generateParseException();
+ Token oldToken;
+ if ((oldToken = token).next != null) token = token.next;
+ else token = token.next = token_source.getNextToken();
+ jj_ntk = -1;
+ if (token.kind == kind) {
+ jj_gen++;
+ return token;
+ }
+ token = oldToken;
+ jj_kind = kind;
+ throw generateParseException();
}
/** Get the next Token. */
final public Token getNextToken() {
- if (token.next != null) token = token.next;
- else token = token.next = token_source.getNextToken();
- jj_ntk = -1;
- jj_gen++;
- return token;
+ if (token.next != null) token = token.next;
+ else token = token.next = token_source.getNextToken();
+ jj_ntk = -1;
+ jj_gen++;
+ return token;
}
/** Get the specific Token. */
final public Token getToken(int index) {
- Token t = token;
- for (int i = 0; i < index; i++) {
- if (t.next != null) t = t.next;
- else t = t.next = token_source.getNextToken();
- }
- return t;
+ Token t = token;
+ for (int i = 0; i < index; i++) {
+ if (t.next != null) t = t.next;
+ else t = t.next = token_source.getNextToken();
+ }
+ return t;
}
- private int jj_ntk() {
- if ((jj_nt=token.next) == null)
- return (jj_ntk = (token.next=token_source.getNextToken()).kind);
- else
- return (jj_ntk = jj_nt.kind);
+ private int jj_ntk_f() {
+ if ((jj_nt=token.next) == null)
+ return (jj_ntk = (token.next=token_source.getNextToken()).kind);
+ else
+ return (jj_ntk = jj_nt.kind);
}
private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();
@@ -2945,39 +3054,46 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
/** Generate ParseException. */
public ParseException generateParseException() {
- jj_expentries.clear();
- boolean[] la1tokens = new boolean[91];
- if (jj_kind >= 0) {
- la1tokens[jj_kind] = true;
- jj_kind = -1;
- }
- for (int i = 0; i < 47; i++) {
- if (jj_la1[i] == jj_gen) {
- for (int j = 0; j < 32; j++) {
- if ((jj_la1_0[i] & (1<<j)) != 0) {
- la1tokens[j] = true;
- }
- if ((jj_la1_1[i] & (1<<j)) != 0) {
- la1tokens[32+j] = true;
- }
- if ((jj_la1_2[i] & (1<<j)) != 0) {
- la1tokens[64+j] = true;
- }
- }
- }
- }
- for (int i = 0; i < 91; i++) {
- if (la1tokens[i]) {
- jj_expentry = new int[1];
- jj_expentry[0] = i;
- jj_expentries.add(jj_expentry);
- }
- }
- int[][] exptokseq = new int[jj_expentries.size()][];
- for (int i = 0; i < jj_expentries.size(); i++) {
- exptokseq[i] = jj_expentries.get(i);
- }
- return new ParseException(token, exptokseq, tokenImage);
+ jj_expentries.clear();
+ boolean[] la1tokens = new boolean[92];
+ if (jj_kind >= 0) {
+ la1tokens[jj_kind] = true;
+ jj_kind = -1;
+ }
+ for (int i = 0; i < 47; i++) {
+ if (jj_la1[i] == jj_gen) {
+ for (int j = 0; j < 32; j++) {
+ if ((jj_la1_0[i] & (1<<j)) != 0) {
+ la1tokens[j] = true;
+ }
+ if ((jj_la1_1[i] & (1<<j)) != 0) {
+ la1tokens[32+j] = true;
+ }
+ if ((jj_la1_2[i] & (1<<j)) != 0) {
+ la1tokens[64+j] = true;
+ }
+ }
+ }
+ }
+ for (int i = 0; i < 92; i++) {
+ if (la1tokens[i]) {
+ jj_expentry = new int[1];
+ jj_expentry[0] = i;
+ jj_expentries.add(jj_expentry);
+ }
+ }
+ int[][] exptokseq = new int[jj_expentries.size()][];
+ for (int i = 0; i < jj_expentries.size(); i++) {
+ exptokseq[i] = jj_expentries.get(i);
+ }
+ return new ParseException(token, exptokseq, tokenImage);
+ }
+
+ private boolean trace_enabled;
+
+/** Trace enabled. */
+ final public boolean trace_enabled() {
+ return trace_enabled;
}
/** Enable tracing. */
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserConstants.java b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserConstants.java
index 8aef2e2..eb99db0 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserConstants.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserConstants.java
@@ -109,25 +109,27 @@ public interface ExpressionParserConstants {
/** RegularExpression Id. */
int DIGIT = 76;
/** RegularExpression Id. */
- int ESC = 79;
+ int DOLLAR_SIGN = 77;
/** RegularExpression Id. */
- int SINGLE_QUOTED_STRING = 81;
+ int ESC = 80;
/** RegularExpression Id. */
- int STRING_ESC = 82;
+ int SINGLE_QUOTED_STRING = 82;
/** RegularExpression Id. */
- int DOUBLE_QUOTED_STRING = 84;
+ int STRING_ESC = 83;
/** RegularExpression Id. */
- int INT_LITERAL = 85;
+ int DOUBLE_QUOTED_STRING = 85;
/** RegularExpression Id. */
- int FLOAT_LITERAL = 86;
+ int INT_LITERAL = 86;
/** RegularExpression Id. */
- int DEC_FLT = 87;
+ int FLOAT_LITERAL = 87;
/** RegularExpression Id. */
- int DEC_DIGITS = 88;
+ int DEC_FLT = 88;
/** RegularExpression Id. */
- int EXPONENT = 89;
+ int DEC_DIGITS = 89;
/** RegularExpression Id. */
- int FLT_SUFF = 90;
+ int EXPONENT = 90;
+ /** RegularExpression Id. */
+ int FLT_SUFF = 91;
/** Lexical state. */
int DEFAULT = 0;
@@ -215,13 +217,14 @@ public interface ExpressionParserConstants {
"<IDENTIFIER>",
"<LETTER>",
"<DIGIT>",
+ "<DOLLAR_SIGN>",
"\"\\\'\"",
"\"\\\"\"",
"<ESC>",
- "<token of kind 80>",
+ "<token of kind 81>",
"\"\\\'\"",
"<STRING_ESC>",
- "<token of kind 83>",
+ "<token of kind 84>",
"\"\\\"\"",
"<INT_LITERAL>",
"<FLOAT_LITERAL>",
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserTokenManager.java b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserTokenManager.java
index e66e7b4..6976880 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserTokenManager.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserTokenManager.java
@@ -25,8 +25,8 @@ import java.math.BigInteger;
import org.apache.cayenne.exp.Expression;
/** Token Manager. */
-public class ExpressionParserTokenManager implements ExpressionParserConstants
-{
+@SuppressWarnings ("unused")
+public class ExpressionParserTokenManager implements ExpressionParserConstants {
/** Holds the last value computed by a constant token. */
Object literalValue;
@@ -38,18 +38,18 @@ public class ExpressionParserTokenManager implements ExpressionParserConstants
{
int ofs = image.length() - 1;
switch ( image.charAt(ofs) ) {
- case 'n': return '\u005cn';
- case 'r': return '\u005cr';
- case 't': return '\u005ct';
- case 'b': return '\u005cb';
- case 'f': return '\u005cf';
- case '\u005c\u005c': return '\u005c\u005c';
- case '\u005c'': return '\u005c'';
- case '\u005c"': return '\u005c"';
+ case 'n': return '\n';
+ case 'r': return '\r';
+ case 't': return '\t';
+ case 'b': return '\b';
+ case 'f': return '\f';
+ case '\\': return '\\';
+ case '\'': return '\'';
+ case '\"': return '\"';
}
// Otherwise, it's an octal number. Find the backslash and convert.
- while ( image.charAt(--ofs) != '\u005c\u005c' )
+ while ( image.charAt(--ofs) != '\\' )
{}
int value = 0;
while ( ++ofs < image.length() )
@@ -103,8 +103,7 @@ public class ExpressionParserTokenManager implements ExpressionParserConstants
public java.io.PrintStream debugStream = System.out;
/** Set debug output. */
public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
-private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
-{
+private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1){
switch (pos)
{
case 0:
@@ -334,8 +333,7 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
return -1;
}
}
-private final int jjStartNfa_0(int pos, long active0, long active1)
-{
+private final int jjStartNfa_0(int pos, long active0, long active1){
return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1);
}
private int jjStopAtPos(int pos, int kind)
@@ -344,21 +342,20 @@ private int jjStopAtPos(int pos, int kind)
jjmatchedPos = pos;
return pos + 1;
}
-private int jjMoveStringLiteralDfa0_0()
-{
+private int jjMoveStringLiteralDfa0_0(){
switch(curChar)
{
case 33:
jjmatchedKind = 4;
return jjMoveStringLiteralDfa1_0(0x80L, 0x0L);
case 34:
- return jjStopAtPos(0, 78);
+ return jjStopAtPos(0, 79);
case 36:
return jjStopAtPos(0, 67);
case 38:
return jjStopAtPos(0, 22);
case 39:
- return jjStopAtPos(0, 77);
+ return jjStopAtPos(0, 78);
case 40:
return jjStopAtPos(0, 16);
case 41:
@@ -426,8 +423,7 @@ private int jjMoveStringLiteralDfa0_0()
return jjMoveNfa_0(3, 0);
}
}
-private int jjMoveStringLiteralDfa1_0(long active0, long active1)
-{
+private int jjMoveStringLiteralDfa1_0(long active0, long active1){
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(0, active0, active1);
@@ -490,8 +486,7 @@ private int jjMoveStringLiteralDfa1_0(long active0, long active1)
}
return jjStartNfa_0(0, active0, active1);
}
-private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1)
-{
+private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1){
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_0(0, old0, old1);
try { curChar = input_stream.readChar(); }
@@ -572,8 +567,7 @@ private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long a
}
return jjStartNfa_0(1, active0, active1);
}
-private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1)
-{
+private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1){
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_0(1, old0, old1);
try { curChar = input_stream.readChar(); }
@@ -637,8 +631,7 @@ private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long a
}
return jjStartNfa_0(2, active0, active1);
}
-private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1)
-{
+private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1){
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_0(2, old0, old1);
try { curChar = input_stream.readChar(); }
@@ -685,8 +678,7 @@ private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long a
}
return jjStartNfa_0(3, active0, active1);
}
-private int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long active1)
-{
+private int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long active1){
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_0(3, old0, old1);
try { curChar = input_stream.readChar(); }
@@ -731,8 +723,7 @@ private int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long a
}
return jjStartNfa_0(4, active0, active1);
}
-private int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long active1)
-{
+private int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long active1){
if (((active0 &= old0) | (active1 &= old1)) == 0L)
return jjStartNfa_0(4, old0, old1);
try { curChar = input_stream.readChar(); }
@@ -761,8 +752,7 @@ private int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long a
}
return jjStartNfa_0(5, active0, 0L);
}
-private int jjMoveStringLiteralDfa7_0(long old0, long active0)
-{
+private int jjMoveStringLiteralDfa7_0(long old0, long active0){
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(5, old0, 0L);
try { curChar = input_stream.readChar(); }
@@ -793,8 +783,7 @@ private int jjMoveStringLiteralDfa7_0(long old0, long active0)
}
return jjStartNfa_0(6, active0, 0L);
}
-private int jjMoveStringLiteralDfa8_0(long old0, long active0)
-{
+private int jjMoveStringLiteralDfa8_0(long old0, long active0){
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(6, old0, 0L);
try { curChar = input_stream.readChar(); }
@@ -827,8 +816,7 @@ private int jjMoveStringLiteralDfa8_0(long old0, long active0)
}
return jjStartNfa_0(7, active0, 0L);
}
-private int jjMoveStringLiteralDfa9_0(long old0, long active0)
-{
+private int jjMoveStringLiteralDfa9_0(long old0, long active0){
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(7, old0, 0L);
try { curChar = input_stream.readChar(); }
@@ -853,8 +841,7 @@ private int jjMoveStringLiteralDfa9_0(long old0, long active0)
}
return jjStartNfa_0(8, active0, 0L);
}
-private int jjMoveStringLiteralDfa10_0(long old0, long active0)
-{
+private int jjMoveStringLiteralDfa10_0(long old0, long active0){
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(8, old0, 0L);
try { curChar = input_stream.readChar(); }
@@ -877,8 +864,7 @@ private int jjMoveStringLiteralDfa10_0(long old0, long active0)
}
return jjStartNfa_0(9, active0, 0L);
}
-private int jjMoveStringLiteralDfa11_0(long old0, long active0)
-{
+private int jjMoveStringLiteralDfa11_0(long old0, long active0){
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(9, old0, 0L);
try { curChar = input_stream.readChar(); }
@@ -895,8 +881,7 @@ private int jjMoveStringLiteralDfa11_0(long old0, long active0)
}
return jjStartNfa_0(10, active0, 0L);
}
-private int jjMoveStringLiteralDfa12_0(long old0, long active0)
-{
+private int jjMoveStringLiteralDfa12_0(long old0, long active0){
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(10, old0, 0L);
try { curChar = input_stream.readChar(); }
@@ -913,8 +898,7 @@ private int jjMoveStringLiteralDfa12_0(long old0, long active0)
}
return jjStartNfa_0(11, active0, 0L);
}
-private int jjMoveStringLiteralDfa13_0(long old0, long active0)
-{
+private int jjMoveStringLiteralDfa13_0(long old0, long active0){
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(11, old0, 0L);
try { curChar = input_stream.readChar(); }
@@ -960,11 +944,11 @@ private int jjMoveNfa_0(int startState, int curPos)
switch(jjstateSet[--i])
{
case 33:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
else if (curChar == 43)
{
@@ -975,27 +959,27 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 80;
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 73;
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
else if (curChar == 43)
{
if (kind > 73)
kind = 73;
- jjCheckNAdd(72);
+ { jjCheckNAdd(72); }
}
else if (curChar == 35)
jjstateSet[jjnewStateCnt++] = 69;
break;
case 5:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
else if (curChar == 43)
{
@@ -1006,27 +990,27 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 80;
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 73;
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
else if (curChar == 43)
{
if (kind > 73)
kind = 73;
- jjCheckNAdd(72);
+ { jjCheckNAdd(72); }
}
else if (curChar == 35)
jjstateSet[jjnewStateCnt++] = 69;
break;
case 28:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
else if (curChar == 43)
{
@@ -1037,27 +1021,27 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 80;
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 73;
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
else if (curChar == 43)
{
if (kind > 73)
kind = 73;
- jjCheckNAdd(72);
+ { jjCheckNAdd(72); }
}
else if (curChar == 35)
jjstateSet[jjnewStateCnt++] = 69;
break;
case 64:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
else if (curChar == 43)
{
@@ -1068,27 +1052,27 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 80;
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 73;
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
else if (curChar == 43)
{
if (kind > 73)
kind = 73;
- jjCheckNAdd(72);
+ { jjCheckNAdd(72); }
}
else if (curChar == 35)
jjstateSet[jjnewStateCnt++] = 69;
break;
case 32:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
else if (curChar == 43)
{
@@ -1099,27 +1083,27 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 80;
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 73;
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
else if (curChar == 43)
{
if (kind > 73)
kind = 73;
- jjCheckNAdd(72);
+ { jjCheckNAdd(72); }
}
else if (curChar == 35)
jjstateSet[jjnewStateCnt++] = 69;
break;
case 36:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
else if (curChar == 43)
{
@@ -1130,27 +1114,27 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 80;
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 73;
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
else if (curChar == 43)
{
if (kind > 73)
kind = 73;
- jjCheckNAdd(72);
+ { jjCheckNAdd(72); }
}
else if (curChar == 35)
jjstateSet[jjnewStateCnt++] = 69;
break;
case 27:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
else if (curChar == 43)
{
@@ -1161,45 +1145,45 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 80;
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 73;
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
else if (curChar == 43)
{
if (kind > 73)
kind = 73;
- jjCheckNAdd(72);
+ { jjCheckNAdd(72); }
}
else if (curChar == 35)
jjstateSet[jjnewStateCnt++] = 69;
break;
case 3:
if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddStates(7, 12);
+ { jjCheckNAddStates(7, 12); }
else if (curChar == 46)
- jjCheckNAdd(42);
+ { jjCheckNAdd(42); }
if ((0x3fe000000000000L & l) != 0L)
{
- if (kind > 85)
- kind = 85;
- jjCheckNAddTwoStates(39, 40);
+ if (kind > 86)
+ kind = 86;
+ { jjCheckNAddTwoStates(39, 40); }
}
else if (curChar == 48)
{
- if (kind > 85)
- kind = 85;
- jjCheckNAddStates(13, 15);
+ if (kind > 86)
+ kind = 86;
+ { jjCheckNAddStates(13, 15); }
}
break;
case 31:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
else if (curChar == 43)
{
@@ -1210,27 +1194,27 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 80;
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 73;
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
else if (curChar == 43)
{
if (kind > 73)
kind = 73;
- jjCheckNAdd(72);
+ { jjCheckNAdd(72); }
}
else if (curChar == 35)
jjstateSet[jjnewStateCnt++] = 69;
break;
case 63:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
else if (curChar == 43)
{
@@ -1241,27 +1225,27 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 80;
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 73;
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
else if (curChar == 43)
{
if (kind > 73)
kind = 73;
- jjCheckNAdd(72);
+ { jjCheckNAdd(72); }
}
else if (curChar == 35)
jjstateSet[jjnewStateCnt++] = 69;
break;
case 15:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
else if (curChar == 43)
{
@@ -1272,27 +1256,27 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 80;
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 73;
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
else if (curChar == 43)
{
if (kind > 73)
kind = 73;
- jjCheckNAdd(72);
+ { jjCheckNAdd(72); }
}
else if (curChar == 35)
jjstateSet[jjnewStateCnt++] = 69;
break;
case 35:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
else if (curChar == 43)
{
@@ -1303,27 +1287,27 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 80;
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 73;
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
else if (curChar == 43)
{
if (kind > 73)
kind = 73;
- jjCheckNAdd(72);
+ { jjCheckNAdd(72); }
}
else if (curChar == 35)
jjstateSet[jjnewStateCnt++] = 69;
break;
case 26:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
else if (curChar == 43)
{
@@ -1334,27 +1318,27 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 80;
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 73;
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
else if (curChar == 43)
{
if (kind > 73)
kind = 73;
- jjCheckNAdd(72);
+ { jjCheckNAdd(72); }
}
else if (curChar == 35)
jjstateSet[jjnewStateCnt++] = 69;
break;
case 30:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
else if (curChar == 43)
{
@@ -1365,27 +1349,27 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 80;
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 73;
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
else if (curChar == 43)
{
if (kind > 73)
kind = 73;
- jjCheckNAdd(72);
+ { jjCheckNAdd(72); }
}
else if (curChar == 35)
jjstateSet[jjnewStateCnt++] = 69;
break;
case 83:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
else if (curChar == 43)
{
@@ -1396,27 +1380,27 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 80;
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 73;
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
else if (curChar == 43)
{
if (kind > 73)
kind = 73;
- jjCheckNAdd(72);
+ { jjCheckNAdd(72); }
}
else if (curChar == 35)
jjstateSet[jjnewStateCnt++] = 69;
break;
case 34:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
else if (curChar == 43)
{
@@ -1427,27 +1411,27 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 80;
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 73;
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
else if (curChar == 43)
{
if (kind > 73)
kind = 73;
- jjCheckNAdd(72);
+ { jjCheckNAdd(72); }
}
else if (curChar == 35)
jjstateSet[jjnewStateCnt++] = 69;
break;
case 6:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
else if (curChar == 43)
{
@@ -1458,27 +1442,27 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 80;
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 73;
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
else if (curChar == 43)
{
if (kind > 73)
kind = 73;
- jjCheckNAdd(72);
+ { jjCheckNAdd(72); }
}
else if (curChar == 35)
jjstateSet[jjnewStateCnt++] = 69;
break;
case 29:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
else if (curChar == 43)
{
@@ -1489,17 +1473,17 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 80;
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 73;
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff001000000000L & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
else if (curChar == 43)
{
if (kind > 73)
kind = 73;
- jjCheckNAdd(72);
+ { jjCheckNAdd(72); }
}
else if (curChar == 35)
jjstateSet[jjnewStateCnt++] = 69;
@@ -1507,165 +1491,165 @@ private int jjMoveNfa_0(int startState, int curPos)
case 38:
if ((0x3fe000000000000L & l) == 0L)
break;
- if (kind > 85)
- kind = 85;
- jjCheckNAddTwoStates(39, 40);
+ if (kind > 86)
+ kind = 86;
+ { jjCheckNAddTwoStates(39, 40); }
break;
case 39:
if ((0x3ff000000000000L & l) == 0L)
break;
- if (kind > 85)
- kind = 85;
- jjCheckNAddTwoStates(39, 40);
+ if (kind > 86)
+ kind = 86;
+ { jjCheckNAddTwoStates(39, 40); }
break;
case 41:
if (curChar == 46)
- jjCheckNAdd(42);
+ { jjCheckNAdd(42); }
break;
case 42:
if ((0x3ff000000000000L & l) == 0L)
break;
- if (kind > 86)
- kind = 86;
- jjCheckNAddStates(16, 18);
+ if (kind > 87)
+ kind = 87;
+ { jjCheckNAddStates(16, 18); }
break;
case 44:
if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(45);
+ { jjCheckNAdd(45); }
break;
case 45:
if ((0x3ff000000000000L & l) == 0L)
break;
- if (kind > 86)
- kind = 86;
- jjCheckNAddTwoStates(45, 46);
+ if (kind > 87)
+ kind = 87;
+ { jjCheckNAddTwoStates(45, 46); }
break;
case 47:
if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddStates(7, 12);
+ { jjCheckNAddStates(7, 12); }
break;
case 48:
if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddTwoStates(48, 49);
+ { jjCheckNAddTwoStates(48, 49); }
break;
case 49:
if (curChar != 46)
break;
- if (kind > 86)
- kind = 86;
- jjCheckNAddStates(19, 21);
+ if (kind > 87)
+ kind = 87;
+ { jjCheckNAddStates(19, 21); }
break;
case 50:
if ((0x3ff000000000000L & l) == 0L)
break;
- if (kind > 86)
- kind = 86;
- jjCheckNAddStates(19, 21);
+ if (kind > 87)
+ kind = 87;
+ { jjCheckNAddStates(19, 21); }
break;
case 51:
if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddTwoStates(51, 52);
+ { jjCheckNAddTwoStates(51, 52); }
break;
case 53:
if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(54);
+ { jjCheckNAdd(54); }
break;
case 54:
if ((0x3ff000000000000L & l) == 0L)
break;
- if (kind > 86)
- kind = 86;
- jjCheckNAddTwoStates(54, 46);
+ if (kind > 87)
+ kind = 87;
+ { jjCheckNAddTwoStates(54, 46); }
break;
case 55:
if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddTwoStates(55, 46);
+ { jjCheckNAddTwoStates(55, 46); }
break;
case 56:
if (curChar != 48)
break;
- if (kind > 85)
- kind = 85;
- jjCheckNAddStates(13, 15);
+ if (kind > 86)
+ kind = 86;
+ { jjCheckNAddStates(13, 15); }
break;
case 57:
if ((0xff000000000000L & l) == 0L)
break;
- if (kind > 85)
- kind = 85;
- jjCheckNAddTwoStates(57, 40);
+ if (kind > 86)
+ kind = 86;
+ { jjCheckNAddTwoStates(57, 40); }
break;
case 59:
if ((0x3ff000000000000L & l) == 0L)
break;
- if (kind > 85)
- kind = 85;
- jjCheckNAddTwoStates(59, 40);
+ if (kind > 86)
+ kind = 86;
+ { jjCheckNAddTwoStates(59, 40); }
break;
case 67:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff001000000000L & l) == 0L)
break;
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
break;
case 68:
if (curChar == 35)
jjstateSet[jjnewStateCnt++] = 69;
break;
case 70:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff001000000000L & l) == 0L)
break;
if (kind > 73)
kind = 73;
- jjCheckNAddStates(22, 24);
+ { jjCheckNAddStates(22, 24); }
break;
case 71:
if (curChar != 43)
break;
if (kind > 73)
kind = 73;
- jjCheckNAdd(72);
+ { jjCheckNAdd(72); }
break;
case 72:
if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 73;
break;
case 74:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff001000000000L & l) == 0L)
break;
if (kind > 73)
kind = 73;
- jjCheckNAddStates(25, 28);
+ { jjCheckNAddStates(25, 28); }
break;
case 75:
if (curChar == 35)
jjstateSet[jjnewStateCnt++] = 76;
break;
case 77:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff001000000000L & l) == 0L)
break;
if (kind > 73)
kind = 73;
- jjCheckNAddStates(29, 31);
+ { jjCheckNAddStates(29, 31); }
break;
case 78:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff001000000000L & l) == 0L)
break;
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
break;
case 79:
if (curChar == 35)
jjstateSet[jjnewStateCnt++] = 80;
break;
case 81:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff001000000000L & l) == 0L)
break;
if (kind > 74)
kind = 74;
- jjCheckNAddTwoStates(81, 82);
+ { jjCheckNAddTwoStates(81, 82); }
break;
case 82:
if (curChar == 43 && kind > 74)
@@ -1687,13 +1671,13 @@ private int jjMoveNfa_0(int startState, int curPos)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
if (curChar == 101)
jjstateSet[jjnewStateCnt++] = 32;
@@ -1703,13 +1687,13 @@ private int jjMoveNfa_0(int startState, int curPos)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
if (curChar == 117)
jjstateSet[jjnewStateCnt++] = 4;
@@ -1719,13 +1703,13 @@ private int jjMoveNfa_0(int startState, int curPos)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
if (curChar == 109)
jjstateSet[jjnewStateCnt++] = 27;
@@ -1735,13 +1719,13 @@ private int jjMoveNfa_0(int startState, int curPos)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
if (curChar == 119)
{
@@ -1754,13 +1738,13 @@ private int jjMoveNfa_0(int startState, int curPos)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
if (curChar == 110)
jjstateSet[jjnewStateCnt++] = 31;
@@ -1770,13 +1754,13 @@ private int jjMoveNfa_0(int startState, int curPos)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
if (curChar == 117)
jjstateSet[jjnewStateCnt++] = 35;
@@ -1786,13 +1770,13 @@ private int jjMoveNfa_0(int startState, int curPos)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
if (curChar == 101)
jjstateSet[jjnewStateCnt++] = 26;
@@ -1802,10 +1786,10 @@ private int jjMoveNfa_0(int startState, int curPos)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(32, 38);
+ { jjCheckNAddStates(32, 38); }
}
if (curChar == 110)
- jjAddStates(39, 40);
+ { jjAddStates(39, 40); }
else if (curChar == 99)
jjstateSet[jjnewStateCnt++] = 36;
else if (curChar == 70)
@@ -1824,13 +1808,13 @@ private int jjMoveNfa_0(int startState, int curPos)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
if (curChar == 116)
jjstateSet[jjnewStateCnt++] = 30;
@@ -1840,13 +1824,13 @@ private int jjMoveNfa_0(int startState, int curPos)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
if (curChar == 111)
jjstateSet[jjnewStateCnt++] = 64;
@@ -1858,13 +1842,13 @@ private int jjMoveNfa_0(int startState, int curPos)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
if (curChar == 97)
jjstateSet[jjnewStateCnt++] = 14;
@@ -1874,13 +1858,13 @@ private int jjMoveNfa_0(int startState, int curPos)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
if (curChar == 114)
jjstateSet[jjnewStateCnt++] = 34;
@@ -1890,13 +1874,13 @@ private int jjMoveNfa_0(int startState, int curPos)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
if (curChar == 115)
jjstateSet[jjnewStateCnt++] = 25;
@@ -1906,13 +1890,13 @@ private int jjMoveNfa_0(int startState, int curPos)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
if (curChar == 84)
jjstateSet[jjnewStateCnt++] = 29;
@@ -1922,13 +1906,13 @@ private int jjMoveNfa_0(int startState, int curPos)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
break;
case 34:
@@ -1936,13 +1920,13 @@ private int jjMoveNfa_0(int startState, int curPos)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
if (curChar == 114)
jjstateSet[jjnewStateCnt++] = 33;
@@ -1952,13 +1936,13 @@ private int jjMoveNfa_0(int startState, int curPos)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
if (curChar == 114)
jjstateSet[jjnewStateCnt++] = 5;
@@ -1968,13 +1952,13 @@ private int jjMoveNfa_0(int startState, int curPos)
{
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
}
if (curChar == 105)
jjstateSet[jjnewStateCnt++] = 28;
@@ -2072,35 +2056,35 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 36;
break;
case 40:
- if ((0x110000001100L & l) != 0L && kind > 85)
- kind = 85;
+ if ((0x110000001100L & l) != 0L && kind > 86)
+ kind = 86;
break;
case 43:
if ((0x2000000020L & l) != 0L)
- jjAddStates(41, 42);
+ { jjAddStates(41, 42); }
break;
case 46:
- if ((0x5400000054L & l) != 0L && kind > 86)
- kind = 86;
+ if ((0x5400000054L & l) != 0L && kind > 87)
+ kind = 87;
break;
case 52:
if ((0x2000000020L & l) != 0L)
- jjAddStates(43, 44);
+ { jjAddStates(43, 44); }
break;
case 58:
if ((0x100000001000000L & l) != 0L)
- jjCheckNAdd(59);
+ { jjCheckNAdd(59); }
break;
case 59:
if ((0x7e0000007eL & l) == 0L)
break;
- if (kind > 85)
- kind = 85;
- jjCheckNAddTwoStates(59, 40);
+ if (kind > 86)
+ kind = 86;
+ { jjCheckNAddTwoStates(59, 40); }
break;
case 60:
if (curChar == 110)
- jjAddStates(39, 40);
+ { jjAddStates(39, 40); }
break;
case 61:
if (curChar == 108 && kind > 33)
@@ -2119,14 +2103,14 @@ private int jjMoveNfa_0(int startState, int curPos)
break;
if (kind > 73)
kind = 73;
- jjCheckNAddStates(32, 38);
+ { jjCheckNAddStates(32, 38); }
break;
case 67:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
if (kind > 73)
kind = 73;
- jjCheckNAddStates(3, 6);
+ { jjCheckNAddStates(3, 6); }
break;
case 69:
case 70:
@@ -2134,7 +2118,7 @@ private int jjMoveNfa_0(int startState, int curPos)
break;
if (kind > 73)
kind = 73;
- jjCheckNAddStates(22, 24);
+ { jjCheckNAddStates(22, 24); }
break;
case 73:
case 74:
@@ -2142,7 +2126,7 @@ private int jjMoveNfa_0(int startState, int curPos)
break;
if (kind > 73)
kind = 73;
- jjCheckNAddStates(25, 28);
+ { jjCheckNAddStates(25, 28); }
break;
case 76:
case 77:
@@ -2150,14 +2134,14 @@ private int jjMoveNfa_0(int startState, int curPos)
break;
if (kind > 73)
kind = 73;
- jjCheckNAddStates(29, 31);
+ { jjCheckNAddStates(29, 31); }
break;
case 78:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
if (kind > 74)
kind = 74;
- jjCheckNAddStates(0, 2);
+ { jjCheckNAddStates(0, 2); }
break;
case 80:
case 81:
@@ -2165,7 +2149,7 @@ private int jjMoveNfa_0(int startState, int curPos)
break;
if (kind > 74)
kind = 74;
- jjCheckNAddTwoStates(81, 82);
+ { jjCheckNAddTwoStates(81, 82); }
break;
default : break;
}
@@ -2173,7 +2157,7 @@ private int jjMoveNfa_0(int startState, int curPos)
}
else
{
- int hiByte = (int)(curChar >> 8);
+ int hiByte = (curChar >> 8);
int i1 = hiByte >> 6;
long l1 = 1L << (hiByte & 077);
int i2 = (curChar & 0xff) >> 6;
@@ -2182,7 +2166,7 @@ private int jjMoveNfa_0(int startState, int curPos)
{
switch(jjstateSet[--i])
{
- default : break;
+ default : if (i1 == 0 || l1 == 0 || i2 == 0 || l2 == 0) break; else break;
}
} while(i != startsAt);
}
@@ -2199,24 +2183,21 @@ private int jjMoveNfa_0(int startState, int curPos)
catch(java.io.IOException e) { return curPos; }
}
}
-private final int jjStopStringLiteralDfa_1(int pos, long active0, long active1)
-{
+private final int jjStopStringLiteralDfa_1(int pos, long active0, long active1){
switch (pos)
{
default :
return -1;
}
}
-private final int jjStartNfa_1(int pos, long active0, long active1)
-{
+private final int jjStartNfa_1(int pos, long active0, long active1){
return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0, active1), pos + 1);
}
-private int jjMoveStringLiteralDfa0_1()
-{
+private int jjMoveStringLiteralDfa0_1(){
switch(curChar)
{
case 39:
- return jjStopAtPos(0, 81);
+ return jjStopAtPos(0, 82);
default :
return jjMoveNfa_1(0, 0);
}
@@ -2246,12 +2227,12 @@ private int jjMoveNfa_1(int startState, int curPos)
switch(jjstateSet[--i])
{
case 0:
- if ((0xffffff7fffffffffL & l) != 0L && kind > 80)
- kind = 80;
+ if ((0xffffff7fffffffffL & l) != 0L && kind > 81)
+ kind = 81;
break;
case 1:
- if ((0x8400000000L & l) != 0L && kind > 79)
- kind = 79;
+ if ((0x8400000000L & l) != 0L && kind > 80)
+ kind = 80;
break;
case 2:
if ((0xf000000000000L & l) != 0L)
@@ -2260,13 +2241,13 @@ private int jjMoveNfa_1(int startState, int curPos)
case 3:
if ((0xff000000000000L & l) == 0L)
break;
- if (kind > 79)
- kind = 79;
+ if (kind > 80)
+ kind = 80;
jjstateSet[jjnewStateCnt++] = 4;
break;
case 4:
- if ((0xff000000000000L & l) != 0L && kind > 79)
- kind = 79;
+ if ((0xff000000000000L & l) != 0L && kind > 80)
+ kind = 80;
break;
default : break;
}
@@ -2282,19 +2263,19 @@ private int jjMoveNfa_1(int startState, int curPos)
case 0:
if ((0xffffffffefffffffL & l) != 0L)
{
- if (kind > 80)
- kind = 80;
+ if (kind > 81)
+ kind = 81;
}
else if (curChar == 92)
- jjAddStates(45, 47);
+ { jjAddStates(45, 47); }
break;
case 1:
- if ((0x14404510000000L & l) != 0L && kind > 79)
- kind = 79;
+ if ((0x14404510000000L & l) != 0L && kind > 80)
+ kind = 80;
break;
case 5:
- if ((0xffffffffefffffffL & l) != 0L && kind > 80)
- kind = 80;
+ if ((0xffffffffefffffffL & l) != 0L && kind > 81)
+ kind = 81;
break;
default : break;
}
@@ -2302,7 +2283,7 @@ private int jjMoveNfa_1(int startState, int curPos)
}
else
{
- int hiByte = (int)(curChar >> 8);
+ int hiByte = (curChar >> 8);
int i1 = hiByte >> 6;
long l1 = 1L << (hiByte & 077);
int i2 = (curChar & 0xff) >> 6;
@@ -2312,10 +2293,10 @@ private int jjMoveNfa_1(int startState, int curPos)
switch(jjstateSet[--i])
{
case 0:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 80)
- kind = 80;
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 81)
+ kind = 81;
break;
- default : break;
+ default : if (i1 == 0 || l1 == 0 || i2 == 0 || l2 == 0) break; else break;
}
} while(i != startsAt);
}
@@ -2332,24 +2313,21 @@ private int jjMoveNfa_1(int startState, int curPos)
catch(java.io.IOException e) { return curPos; }
}
}
-private final int jjStopStringLiteralDfa_2(int pos, long active0, long active1)
-{
+private final int jjStopStringLiteralDfa_2(int pos, long active0, long active1){
switch (pos)
{
default :
return -1;
}
}
-private final int jjStartNfa_2(int pos, long active0, long active1)
-{
+private final int jjStartNfa_2(int pos, long active0, long active1){
return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0, active1), pos + 1);
}
-private int jjMoveStringLiteralDfa0_2()
-{
+private int jjMoveStringLiteralDfa0_2(){
switch(curChar)
{
case 34:
- return jjStopAtPos(0, 84);
+ return jjStopAtPos(0, 85);
default :
return jjMoveNfa_2(0, 0);
}
@@ -2373,12 +2351,12 @@ private int jjMoveNfa_2(int startState, int curPos)
switch(jjstateSet[--i])
{
case 0:
- if ((0xfffffffbffffffffL & l) != 0L && kind > 83)
- kind = 83;
+ if ((0xfffffffbffffffffL & l) != 0L && kind > 84)
+ kind = 84;
break;
case 1:
- if ((0x8400000000L & l) != 0L && kind > 82)
- kind = 82;
+ if ((0x8400000000L & l) != 0L && kind > 83)
+ kind = 83;
break;
case 2:
if ((0xf000000000000L & l) != 0L)
@@ -2387,13 +2365,13 @@ private int jjMoveNfa_2(int startState, int curPos)
case 3:
if ((0xff000000000000L & l) == 0L)
break;
- if (kind > 82)
- kind = 82;
+ if (kind > 83)
+ kind = 83;
jjstateSet[jjnewStateCnt++] = 4;
break;
case 4:
- if ((0xff000000000000L & l) != 0L && kind > 82)
- kind = 82;
+ if ((0xff000000000000L & l) != 0L && kind > 83)
+ kind = 83;
break;
default : break;
}
@@ -2409,19 +2387,19 @@ private int jjMoveNfa_2(int startState, int curPos)
case 0:
if ((0xffffffffefffffffL & l) != 0L)
{
- if (kind > 83)
- kind = 83;
+ if (kind > 84)
+ kind = 84;
}
else if (curChar == 92)
- jjAddStates(45, 47);
+ { jjAddStates(45, 47); }
break;
case 1:
- if ((0x14404510000000L & l) != 0L && kind > 82)
- kind = 82;
+ if ((0x14404510000000L & l) != 0L && kind > 83)
+ kind = 83;
break;
case 5:
- if ((0xffffffffefffffffL & l) != 0L && kind > 83)
- kind = 83;
+ if ((0xffffffffefffffffL & l) != 0L && kind > 84)
+ kind = 84;
break;
default : break;
}
@@ -2429,7 +2407,7 @@ private int jjMoveNfa_2(int startState, int curPos)
}
else
{
- int hiByte = (int)(curChar >> 8);
+ int hiByte = (curChar >> 8);
int i1 = hiByte >> 6;
long l1 = 1L << (hiByte & 077);
int i2 = (curChar & 0xff) >> 6;
@@ -2439,10 +2417,10 @@ private int jjMoveNfa_2(int startState, int curPos)
switch(jjstateSet[--i])
{
case 0:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 83)
- kind = 83;
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 84)
+ kind = 84;
break;
- default : break;
+ default : if (i1 == 0 || l1 == 0 || i2 == 0 || l2 == 0) break; else break;
}
} while(i != startsAt);
}
@@ -2459,23 +2437,6 @@ private int jjMoveNfa_2(int startState, int curPos)
catch(java.io.IOException e) { return curPos; }
}
}
-static final int[] jjnextStates = {
- 78, 79, 82, 67, 68, 71, 72, 48, 49, 51, 52, 55, 46, 57, 58, 40,
- 42, 43, 46, 50, 43, 46, 70, 71, 72, 72, 74, 75, 71, 72, 77, 71,
- 67, 68, 71, 72, 78, 79, 82, 63, 65, 44, 45, 53, 54, 1, 2, 3,
-};
-private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
-{
- switch(hiByte)
- {
- case 0:
- return ((jjbitVec2[i2] & l2) != 0L);
- default :
- if ((jjbitVec0[i1] & l1) != 0L)
- return true;
- return false;
- }
-}
/** Token literal values. */
public static final String[] jjstrLiteralImages = {
@@ -2493,84 +2454,7 @@ null, null, null, "\141\166\147", "\155\151\156", "\155\141\170", "\163\165\155"
"\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",
"\146\156", "\157\160", "\44", "\157\142\152\72", "\144\142\72", "\145\156\165\155\72",
"\144\142\151\144\72", "\52", null, null, null, null, null, null, null, null, null, null, null, null,
-null, null, null, null, null, null, };
-
-/** Lexer state names. */
-public static final String[] lexStateNames = {
- "DEFAULT",
- "WithinSingleQuoteLiteral",
- "WithinDoubleQuoteLiteral",
-};
-
-/** Lex State array. */
-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, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 1, 2, -1, -1, 0, -1, -1, 0, -1, -1, -1, -1, -1, -1,
-};
-static final long[] jjtoToken = {
- 0xfffffffe1fffffffL, 0x7207ffL,
-};
-static final long[] jjtoSkip = {
- 0x1e0000000L, 0x0L,
-};
-static final long[] jjtoMore = {
- 0x0L, 0xde000L,
-};
-protected JavaCharStream input_stream;
-private final int[] jjrounds = new int[83];
-private final int[] jjstateSet = new int[166];
-private final StringBuilder jjimage = new StringBuilder();
-private StringBuilder image = jjimage;
-private int jjimageLen;
-private int lengthOfMatch;
-protected char curChar;
-/** Constructor. */
-public ExpressionParserTokenManager(JavaCharStream stream){
- if (JavaCharStream.staticFlag)
- throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
- input_stream = stream;
-}
-
-/** Constructor. */
-public ExpressionParserTokenManager(JavaCharStream stream, int lexState){
- this(stream);
- SwitchTo(lexState);
-}
-
-/** Reinitialise parser. */
-public void ReInit(JavaCharStream stream)
-{
- jjmatchedPos = jjnewStateCnt = 0;
- curLexState = defaultLexState;
- input_stream = stream;
- ReInitRounds();
-}
-private void ReInitRounds()
-{
- int i;
- jjround = 0x80000001;
- for (i = 83; i-- > 0;)
- jjrounds[i] = 0x80000000;
-}
-
-/** Reinitialise parser. */
-public void ReInit(JavaCharStream stream, int lexState)
-{
- ReInit(stream);
- SwitchTo(lexState);
-}
-
-/** Switch to specified lex state. */
-public void SwitchTo(int lexState)
-{
- if (lexState >= 3 || lexState < 0)
- throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
- else
- curLexState = lexState;
-}
-
+null, null, null, null, null, null, null, };
protected Token jjFillToken()
{
final Token t;
@@ -2594,6 +2478,23 @@ protected Token jjFillToken()
return t;
}
+static final int[] jjnextStates = {
+ 78, 79, 82, 67, 68, 71, 72, 48, 49, 51, 52, 55, 46, 57, 58, 40,
+ 42, 43, 46, 50, 43, 46, 70, 71, 72, 72, 74, 75, 71, 72, 77, 71,
+ 67, 68, 71, 72, 78, 79, 82, 63, 65, 44, 45, 53, 54, 1, 2, 3,
+};
+private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
+{
+ switch(hiByte)
+ {
+ case 0:
+ return ((jjbitVec2[i2] & l2) != 0L);
+ default :
+ if ((jjbitVec0[i1] & l1) != 0L)
+ return true;
+ return false;
+ }
+}
int curLexState = 0;
int defaultLexState = 0;
@@ -2615,9 +2516,10 @@ public Token getNextToken()
{
curChar = input_stream.BeginToken();
}
- catch(java.io.IOException e)
+ catch(Exception e)
{
jjmatchedKind = 0;
+ jjmatchedPos = -1;
matchedToken = jjFillToken();
return matchedToken;
}
@@ -2703,37 +2605,45 @@ public Token getNextToken()
}
}
+void SkipLexicalActions(Token matchedToken)
+{
+ switch(jjmatchedKind)
+ {
+ default :
+ break;
+ }
+}
void MoreLexicalActions()
{
jjimageLen += (lengthOfMatch = jjmatchedPos + 1);
switch(jjmatchedKind)
{
- case 77 :
+ case 78 :
image.append(input_stream.GetSuffix(jjimageLen));
jjimageLen = 0;
stringBuffer = new StringBuffer();
break;
- case 78 :
+ case 79 :
image.append(input_stream.GetSuffix(jjimageLen));
jjimageLen = 0;
stringBuffer = new StringBuffer();
break;
- case 79 :
+ case 80 :
image.append(input_stream.GetSuffix(jjimageLen));
jjimageLen = 0;
stringBuffer.append( escapeChar() );
break;
- case 80 :
+ case 81 :
image.append(input_stream.GetSuffix(jjimageLen));
jjimageLen = 0;
stringBuffer.append( image.charAt(image.length()-1) );
break;
- case 82 :
+ case 83 :
image.append(input_stream.GetSuffix(jjimageLen));
jjimageLen = 0;
stringBuffer.append( escapeChar() );
break;
- case 83 :
+ case 84 :
image.append(input_stream.GetSuffix(jjimageLen));
jjimageLen = 0;
stringBuffer.append( image.charAt(image.length()-1) );
@@ -2746,19 +2656,19 @@ void TokenLexicalActions(Token matchedToken)
{
switch(jjmatchedKind)
{
- case 81 :
+ case 82 :
image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
literalValue = stringBuffer.toString();
break;
- case 84 :
+ case 85 :
image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
literalValue = stringBuffer.toString();
break;
- case 85 :
+ case 86 :
image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
literalValue = makeInt();
break;
- case 86 :
+ case 87 :
image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
literalValue = makeFloat();
break;
@@ -2793,4 +2703,94 @@ private void jjCheckNAddStates(int start, int end)
} while (start++ != end);
}
+ /** Constructor. */
+ public ExpressionParserTokenManager(JavaCharStream stream){
+
+ if (JavaCharStream.staticFlag)
+ throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
+
+ input_stream = stream;
+ }
+
+ /** Constructor. */
+ public ExpressionParserTokenManager (JavaCharStream stream, int lexState){
+ ReInit(stream);
+ SwitchTo(lexState);
+ }
+
+ /** Reinitialise parser. */
+
+ public void ReInit(JavaCharStream stream)
+ {
+
+
+ jjmatchedPos =
+ jjnewStateCnt =
+ 0;
+ curLexState = defaultLexState;
+ input_stream = stream;
+ ReInitRounds();
+ }
+
+ private void ReInitRounds()
+ {
+ int i;
+ jjround = 0x80000001;
+ for (i = 83; i-- > 0;)
+ jjrounds[i] = 0x80000000;
+ }
+
+ /** Reinitialise parser. */
+ public void ReInit(JavaCharStream stream, int lexState)
+
+ {
+ ReInit(stream);
+ SwitchTo(lexState);
+ }
+
+ /** Switch to specified lex state. */
+ public void SwitchTo(int lexState)
+ {
+ if (lexState >= 3 || lexState < 0)
+ throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
+ else
+ curLexState = lexState;
+ }
+
+
+/** Lexer state names. */
+public static final String[] lexStateNames = {
+ "DEFAULT",
+ "WithinSingleQuoteLiteral",
+ "WithinDoubleQuoteLiteral",
+};
+
+/** Lex State array. */
+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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1, 2, -1, -1, 0, -1, -1, 0, -1, -1, -1, -1, -1, -1,
+};
+static final long[] jjtoToken = {
+ 0xfffffffe1fffffffL, 0xe407ffL,
+};
+static final long[] jjtoSkip = {
+ 0x1e0000000L, 0x0L,
+};
+static final long[] jjtoSpecial = {
+ 0x0L, 0x0L,
+};
+static final long[] jjtoMore = {
+ 0x0L, 0x1bc000L,
+};
+ protected JavaCharStream input_stream;
+
+ private final int[] jjrounds = new int[83];
+ private final int[] jjstateSet = new int[2 * 83];
+ private final StringBuilder jjimage = new StringBuilder();
+ private StringBuilder image = jjimage;
+ private int jjimageLen;
+ private int lengthOfMatch;
+ protected char curChar;
}
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserTreeConstants.java b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserTreeConstants.java
index 4938f04..c3b3539 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserTreeConstants.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserTreeConstants.java
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. ExpressionParserTreeConstants.java Version 5.0 */
+/* Generated By:JavaCC: Do not edit this line. ExpressionParserTreeConstants.java Version 7.0.5 */
package org.apache.cayenne.exp.parser;
public interface ExpressionParserTreeConstants
@@ -130,4 +130,4 @@ public interface ExpressionParserTreeConstants
"DbIdPath",
};
}
-/* JavaCC - OriginalChecksum=f2cfb85aec04b89e51d38e9c241ae471 (do not edit this line) */
+/* JavaCC - OriginalChecksum=cd72c6d845f6bcd460bdcd71d3700282 (do not edit this line) */
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/JJTExpressionParserState.java b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/JJTExpressionParserState.java
index 349ac96..063fef2 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/JJTExpressionParserState.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/JJTExpressionParserState.java
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. JJTExpressionParserState.java Version 5.0 */
+/* Generated By:JavaCC: Do not edit this line. JJTExpressionParserState.java Version 7.0.5 */
package org.apache.cayenne.exp.parser;
public class JJTExpressionParserState {
@@ -120,4 +120,4 @@ public class JJTExpressionParserState {
}
}
}
-/* JavaCC - OriginalChecksum=b1c8a6064ef7a507929d26284938a24b (do not edit this line) */
+/* JavaCC - OriginalChecksum=4600ff3b66322d8f3f50176b034a1b48 (do not edit this line) */
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/template/parser/JJTSQLTemplateParserState.java b/cayenne-server/src/main/java/org/apache/cayenne/template/parser/JJTSQLTemplateParserState.java
index 747abd3..d180f13 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/template/parser/JJTSQLTemplateParserState.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/template/parser/JJTSQLTemplateParserState.java
@@ -26,115 +26,119 @@ import java.util.List;
* @since 4.1
*/
public class JJTSQLTemplateParserState {
- private List<Node> nodes;
- private List<Integer> marks;
-
- private int sp; // number of nodes on stack
- private int mk; // current mark
- private boolean node_created;
-
- public JJTSQLTemplateParserState() {
- nodes = new ArrayList<>();
- marks = new ArrayList<>();
- sp = 0;
- mk = 0;
+ private List<Node> nodes;
+ private List<Integer> marks;
+
+ private int sp; // number of nodes on stack
+ private int mk; // current mark
+ private boolean node_created;
+
+ public JJTSQLTemplateParserState() {
+ nodes = new ArrayList<>();
+ marks = new ArrayList<>();
+ sp = 0;
+ mk = 0;
+ }
+
+ /* Determines whether the current node was actually closed and
+ pushed. This should only be called in the final user action of a
+ node scope. */
+ public boolean nodeCreated() {
+ return node_created;
+ }
+
+ /* Call this to reinitialize the node stack. It is called
+ automatically by the parser's ReInit() method. */
+ public void reset() {
+ nodes.clear();
+ marks.clear();
+ sp = 0;
+ mk = 0;
+ }
+
+ /* Returns the root node of the AST. It only makes sense to call
+ this after a successful parse. */
+ public Node rootNode() {
+ return nodes.get(0);
+ }
+
+ /* Pushes a node on to the stack. */
+ public void pushNode(Node n) {
+ nodes.add(n);
+ ++sp;
+ }
+
+ /* Returns the node on the top of the stack, and remove it from the
+ stack. */
+ public Node popNode() {
+ if (--sp < mk) {
+ mk = marks.remove(marks.size()-1);
}
+ return nodes.remove(nodes.size()-1);
+ }
- /* Determines whether the current node was actually closed and
- pushed. This should only be called in the final user action of a
- node scope. */
- public boolean nodeCreated() {
- return node_created;
- }
-
- /* Call this to reinitialize the node stack. It is called
- automatically by the parser's ReInit() method. */
- public void reset() {
- nodes.clear();
- marks.clear();
- sp = 0;
- mk = 0;
- }
-
- /* Returns the root node of the AST. It only makes sense to call
- this after a successful parse. */
- public Node rootNode() {
- return nodes.get(0);
- }
-
- /* Pushes a node on to the stack. */
- public void pushNode(Node n) {
- nodes.add(n);
- ++sp;
- }
-
- /* Returns the node on the top of the stack, and remove it from the
- stack. */
- public Node popNode() {
- if (--sp < mk) {
- mk = marks.remove(marks.size() - 1);
- }
- return nodes.remove(nodes.size() - 1);
- }
-
- /* Returns the node currently on the top of the stack. */
- public Node peekNode() {
- return nodes.get(nodes.size() - 1);
- }
+ /* Returns the node currently on the top of the stack. */
+ public Node peekNode() {
+ return nodes.get(nodes.size()-1);
+ }
- /* Returns the number of children on the stack in the current node
- scope. */
- public int nodeArity() {
- return sp - mk;
- }
+ /* Returns the number of children on the stack in the current node
+ scope. */
+ public int nodeArity() {
+ return sp - mk;
+ }
- public void clearNodeScope(Node n) {
- while (sp > mk) {
- popNode();
- }
- mk = marks.remove(marks.size() - 1);
- }
- public void openNodeScope(Node n) {
- marks.add(mk);
- mk = sp;
+ public void clearNodeScope(Node n) {
+ while (sp > mk) {
+ popNode();
}
-
- /* A definite node is constructed from a specified number of
- children. That number of nodes are popped from the stack and
- made the children of the definite node. Then the definite node
- is pushed on to the stack. */
- public void closeNodeScope(Node n, int num) {
- mk = marks.remove(marks.size() - 1);
- while (num-- > 0) {
- Node c = popNode();
- c.jjtSetParent(n);
- n.jjtAddChild(c, num);
- }
- pushNode(n);
- node_created = true;
+ mk = marks.remove(marks.size()-1);
+ }
+
+
+ public void openNodeScope(Node n) {
+ marks.add(mk);
+ mk = sp;
+ }
+
+
+ /* A definite node is constructed from a specified number of
+ children. That number of nodes are popped from the stack and
+ made the children of the definite node. Then the definite node
+ is pushed on to the stack. */
+ public void closeNodeScope(Node n, int num) {
+ mk = marks.remove(marks.size()-1);
+ while (num-- > 0) {
+ Node c = popNode();
+ c.jjtSetParent(n);
+ n.jjtAddChild(c, num);
}
-
-
- /* A conditional node is constructed if its condition is true. All
- the nodes that have been pushed since the node was opened are
- made children of the conditional node, which is then pushed
- on to the stack. If the condition is false the node is not
- constructed and they are left on the stack. */
- public void closeNodeScope(Node n, boolean condition) {
- if (condition) {
- int a = nodeArity();
- mk = marks.remove(marks.size() - 1);
- while (a-- > 0) {
- Node c = popNode();
- c.jjtSetParent(n);
- n.jjtAddChild(c, a);
- }
- pushNode(n);
- node_created = true;
- } else {
- mk = marks.remove(marks.size() - 1);
- node_created = false;
- }
+ pushNode(n);
+ node_created = true;
+ }
+
+
+ /* A conditional node is constructed if its condition is true. All
+ the nodes that have been pushed since the node was opened are
+ made children of the conditional node, which is then pushed
+ on to the stack. If the condition is false the node is not
+ constructed and they are left on the stack. */
+ public void closeNodeScope(Node n, boolean condition) {
+ if (condition) {
+ int a = nodeArity();
+ mk = marks.remove(marks.size()-1);
+ while (a-- > 0) {
+ Node c = popNode();
+ c.jjtSetParent(n);
+ n.jjtAddChild(c, a);
+ }
+ pushNode(n);
+ node_created = true;
+ } else {
+ mk = marks.remove(marks.size()-1);
+ node_created = false;
}
+ }
}
+/* JavaCC - OriginalChecksum=ab07603ac74783740fe93ab7d678d910 (do not edit this line) */
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/template/parser/SQLTemplateParser.java b/cayenne-server/src/main/java/org/apache/cayenne/template/parser/SQLTemplateParser.java
index cfbefe3..24a12c9 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/template/parser/SQLTemplateParser.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/template/parser/SQLTemplateParser.java
@@ -34,47 +34,51 @@ public class SQLTemplateParser/*@bgen(jjtree)*/implements SQLTemplateParserTreeC
final public Node template() throws ParseException {
block();
jj_consume_token(0);
- {if (true) return (ASTBlock) jjtree.rootNode();}
+{if ("" != null) return (ASTBlock) jjtree.rootNode();}
throw new Error("Missing return statement in function");
- }
+}
/*
Top component of parsing tree
*/
- final public void block() throws ParseException {
- /*@bgen(jjtree) Block */
+ final public void block() throws ParseException {/*@bgen(jjtree) Block */
ASTBlock jjtn000 = new ASTBlock(JJTBLOCK);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
try {
label_1:
while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case IF:
case SHARP:
case DOLLAR:
case TEXT:
- case TEXT_OTHER:
+ case TEXT_OTHER:{
;
break;
+ }
default:
jj_la1[0] = jj_gen;
break label_1;
}
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case IF:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case IF:{
ifElse();
break;
- case SHARP:
+ }
+ case SHARP:{
directive();
break;
- case DOLLAR:
+ }
+ case DOLLAR:{
variable();
break;
+ }
case TEXT:
- case TEXT_OTHER:
+ case TEXT_OTHER:{
text();
break;
+ }
default:
jj_la1[1] = jj_gen;
jj_consume_token(-1);
@@ -82,7 +86,7 @@ public class SQLTemplateParser/*@bgen(jjtree)*/implements SQLTemplateParserTreeC
}
}
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -96,48 +100,48 @@ public class SQLTemplateParser/*@bgen(jjtree)*/implements SQLTemplateParserTreeC
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
/*
Plain text that is not processed in any way by render
*/
- final public void text() throws ParseException {
- /*@bgen(jjtree) Text */
+ final public void text() throws ParseException {/*@bgen(jjtree) Text */
ASTText jjtn000 = new ASTText(JJTTEXT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);Token t;
try {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case TEXT:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case TEXT:{
t = jj_consume_token(TEXT);
break;
- case TEXT_OTHER:
+ }
+ case TEXT_OTHER:{
t = jj_consume_token(TEXT_OTHER);
break;
+ }
default:
jj_la1[2] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- jjtree.closeNodeScope(jjtn000, true);
+jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
- jjtn000.setValue(t.image);
+jjtn000.setValue(t.image);
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
/*
Condition directive: #if(condition) ... #else ... #end
*/
- final public void ifElse() throws ParseException {
- /*@bgen(jjtree) IfElse */
+ final public void ifElse() throws ParseException {/*@bgen(jjtree) IfElse */
ASTIfElse jjtn000 = new ASTIfElse(JJTIFELSE);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
@@ -147,18 +151,19 @@ public class SQLTemplateParser/*@bgen(jjtree)*/implements SQLTemplateParserTreeC
expression();
jj_consume_token(RBRACKET);
block();
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case ELSE:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case ELSE:{
jj_consume_token(ELSE);
block();
break;
+ }
default:
jj_la1[3] = jj_gen;
;
}
jj_consume_token(END);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -172,26 +177,25 @@ public class SQLTemplateParser/*@bgen(jjtree)*/implements SQLTemplateParserTreeC
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
/*
Directive in form of #directiveName(args list)
*/
- final public void directive() throws ParseException {
- /*@bgen(jjtree) Directive */
+ final public void directive() throws ParseException {/*@bgen(jjtree) Directive */
ASTDirective jjtn000 = new ASTDirective(JJTDIRECTIVE);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);Token t;
try {
jj_consume_token(SHARP);
t = jj_consume_token(IDENTIFIER);
- jjtn000.setIdentifier(t.image);
+jjtn000.setIdentifier(t.image);
jj_consume_token(LBRACKET);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case DOLLAR:
case TRUE:
case FALSE:
@@ -199,11 +203,11 @@ public class SQLTemplateParser/*@bgen(jjtree)*/implements SQLTemplateParserTreeC
case SINGLE_QUOTED_STRING:
case DOUBLE_QUOTED_STRING:
case INT_LITERAL:
- case FLOAT_LITERAL:
+ case FLOAT_LITERAL:{
expression();
label_2:
while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case DOLLAR:
case TRUE:
case FALSE:
@@ -212,17 +216,19 @@ public class SQLTemplateParser/*@bgen(jjtree)*/implements SQLTemplateParserTreeC
case SINGLE_QUOTED_STRING:
case DOUBLE_QUOTED_STRING:
case INT_LITERAL:
- case FLOAT_LITERAL:
+ case FLOAT_LITERAL:{
;
break;
+ }
default:
jj_la1[4] = jj_gen;
break label_2;
}
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case COMMA:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case COMMA:{
jj_consume_token(COMMA);
break;
+ }
default:
jj_la1[5] = jj_gen;
;
@@ -230,13 +236,14 @@ public class SQLTemplateParser/*@bgen(jjtree)*/implements SQLTemplateParserTreeC
expression();
}
break;
+ }
default:
jj_la1[6] = jj_gen;
;
}
jj_consume_token(RBRACKET);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -250,44 +257,46 @@ public class SQLTemplateParser/*@bgen(jjtree)*/implements SQLTemplateParserTreeC
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
/*
valid expression in parameters of method or directive
can be scalar, variable (with methods calls) or array
*/
- final public void expression() throws ParseException {
- /*@bgen(jjtree) Expression */
+ final public void expression() throws ParseException {/*@bgen(jjtree) Expression */
ASTExpression jjtn000 = new ASTExpression(JJTEXPRESSION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
try {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case TRUE:
case FALSE:
case SINGLE_QUOTED_STRING:
case DOUBLE_QUOTED_STRING:
case INT_LITERAL:
- case FLOAT_LITERAL:
+ case FLOAT_LITERAL:{
scalar();
break;
- case DOLLAR:
+ }
+ case DOLLAR:{
variable();
break;
- case LSBRACKET:
+ }
+ case LSBRACKET:{
array();
break;
+ }
default:
jj_la1[7] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -301,11 +310,11 @@ public class SQLTemplateParser/*@bgen(jjtree)*/implements SQLTemplateParserTreeC
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
/*
Single scalar value: String, long, double, boolean
@@ -314,131 +323,150 @@ public class SQLTemplateParser/*@bgen(jjtree)*/implements SQLTemplateParserTreeC
double: simple and exponential form
*/
final public void scalar() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case SINGLE_QUOTED_STRING:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case SINGLE_QUOTED_STRING:{
jj_consume_token(SINGLE_QUOTED_STRING);
- ASTStringScalar jjtn001 = new ASTStringScalar(JJTSTRINGSCALAR);
+ASTStringScalar jjtn001 = new ASTStringScalar(JJTSTRINGSCALAR);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
try {
- jjtree.closeNodeScope(jjtn001, 0);
+jjtree.closeNodeScope(jjtn001, 0);
jjtc001 = false;
- jjtn001.setValue((String)token_source.literalValue);
+jjtn001.setValue((String)token_source.literalValue);
} finally {
- if (jjtc001) {
+if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 0);
}
}
break;
- case DOUBLE_QUOTED_STRING:
+ }
+ case DOUBLE_QUOTED_STRING:{
jj_consume_token(DOUBLE_QUOTED_STRING);
- ASTStringScalar jjtn002 = new ASTStringScalar(JJTSTRINGSCALAR);
+ASTStringScalar jjtn002 = new ASTStringScalar(JJTSTRINGSCALAR);
boolean jjtc002 = true;
jjtree.openNodeScope(jjtn002);
try {
- jjtree.closeNodeScope(jjtn002, 0);
+jjtree.closeNodeScope(jjtn002, 0);
jjtc002 = false;
- jjtn002.setValue((String)token_source.literalValue);
+jjtn002.setValue((String)token_source.literalValue);
} finally {
- if (jjtc002) {
+if (jjtc002) {
jjtree.closeNodeScope(jjtn002, 0);
}
}
break;
- case INT_LITERAL:
+ }
+ case INT_LITERAL:{
jj_consume_token(INT_LITERAL);
- ASTIntScalar jjtn003 = new ASTIntScalar(JJTINTSCALAR);
+ASTIntScalar jjtn003 = new ASTIntScalar(JJTINTSCALAR);
boolean jjtc003 = true;
jjtree.openNodeScope(jjtn003);
try {
- jjtree.closeNodeScope(jjtn003, 0);
+jjtree.closeNodeScope(jjtn003, 0);
jjtc003 = false;
- jjtn003.setValue((Long)token_source.literalValue);
+jjtn003.setValue((Long)token_source.literalValue);
} finally {
- if (jjtc003) {
+if (jjtc003) {
jjtree.closeNodeScope(jjtn003, 0);
}
}
break;
- case FLOAT_LITERAL:
+ }
+ case FLOAT_LITERAL:{
jj_consume_token(FLOAT_LITERAL);
- ASTFloatScalar jjtn004 = new ASTFloatScalar(JJTFLOATSCALAR);
+ASTFloatScalar jjtn004 = new ASTFloatScalar(JJTFLOATSCALAR);
boolean jjtc004 = true;
jjtree.openNodeScope(jjtn004);
try {
- jjtree.closeNodeScope(jjtn004, 0);
+jjtree.closeNodeScope(jjtn004, 0);
jjtc004 = false;
- jjtn004.setValue((Double)token_source.literalValue);
+jjtn004.setValue((Double)token_source.literalValue);
} finally {
- if (jjtc004) {
+if (jjtc004) {
jjtree.closeNodeScope(jjtn004, 0);
}
}
break;
- case TRUE:
+ }
+ case TRUE:{
jj_consume_token(TRUE);
- ASTBoolScalar jjtn005 = new ASTBoolScalar(JJTBOOLSCALAR);
+ASTBoolScalar jjtn005 = new ASTBoolScalar(JJTBOOLSCALAR);
boolean jjtc005 = true;
jjtree.openNodeScope(jjtn005);
try {
- jjtree.closeNodeScope(jjtn005, 0);
+jjtree.closeNodeScope(jjtn005, 0);
jjtc005 = false;
- jjtn005.setValue(true);
+jjtn005.setValue(true);
} finally {
- if (jjtc005) {
+if (jjtc005) {
jjtree.closeNodeScope(jjtn005, 0);
}
}
break;
- case FALSE:
+ }
+ case FALSE:{
jj_consume_token(FALSE);
- ASTBoolScalar jjtn006 = new ASTBoolScalar(JJTBOOLSCALAR);
+ASTBoolScalar jjtn006 = new ASTBoolScalar(JJTBOOLSCALAR);
boolean jjtc006 = true;
jjtree.openNodeScope(jjtn006);
try {
- jjtree.closeNodeScope(jjtn006, 0);
+jjtree.closeNodeScope(jjtn006, 0);
jjtc006 = false;
- jjtn006.setValue(false);
+jjtn006.setValue(false);
} finally {
- if (jjtc006) {
+if (jjtc006) {
jjtree.closeNodeScope(jjtn006, 0);
}
}
break;
+ }
default:
jj_la1[8] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
- }
+}
/*
Variable, optionally with some methods calls
$a or $a.method() or $a.method1().method2()
*/
- final public void variable() throws ParseException {
- /*@bgen(jjtree) Variable */
+ final public void variable() throws ParseException {/*@bgen(jjtree) Variable */
ASTVariable jjtn000 = new ASTVariable(JJTVARIABLE);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);Token t;
try {
jj_consume_token(DOLLAR);
- t = jj_consume_token(IDENTIFIER);
- jjtn000.setIdentifier(t.image);
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case IDENTIFIER:{
+ t = jj_consume_token(IDENTIFIER);
+ break;
+ }
+ case TEXT_OTHER:{
+ t = jj_consume_token(TEXT_OTHER);
+ break;
+ }
+ default:
+ jj_la1[9] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+jjtn000.setIdentifier(t.image);
label_3:
while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case DOT:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case DOT:{
;
break;
+ }
default:
- jj_la1[9] = jj_gen;
+ jj_la1[10] = jj_gen;
break label_3;
}
method();
}
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -452,27 +480,26 @@ public class SQLTemplateParser/*@bgen(jjtree)*/implements SQLTemplateParserTreeC
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
/*
Method call, valid only as part of variable, can be chain of methods
$a.method1($var).method2().method3('val')
*/
- final public void method() throws ParseException {
- /*@bgen(jjtree) Method */
+ final public void method() throws ParseException {/*@bgen(jjtree) Method */
ASTMethod jjtn000 = new ASTMethod(JJTMETHOD);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);Token t;
try {
jj_consume_token(DOT);
t = jj_consume_token(IDENTIFIER);
- jjtn000.setIdentifier(t.image);
+jjtn000.setIdentifier(t.image);
jj_consume_token(LBRACKET);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case DOLLAR:
case TRUE:
case FALSE:
@@ -480,11 +507,11 @@ public class SQLTemplateParser/*@bgen(jjtree)*/implements SQLTemplateParserTreeC
case SINGLE_QUOTED_STRING:
case DOUBLE_QUOTED_STRING:
case INT_LITERAL:
- case FLOAT_LITERAL:
+ case FLOAT_LITERAL:{
expression();
label_4:
while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case DOLLAR:
case TRUE:
case FALSE:
@@ -493,31 +520,34 @@ public class SQLTemplateParser/*@bgen(jjtree)*/implements SQLTemplateParserTreeC
case SINGLE_QUOTED_STRING:
case DOUBLE_QUOTED_STRING:
case INT_LITERAL:
- case FLOAT_LITERAL:
+ case FLOAT_LITERAL:{
;
break;
+ }
default:
- jj_la1[10] = jj_gen;
+ jj_la1[11] = jj_gen;
break label_4;
}
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case COMMA:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case COMMA:{
jj_consume_token(COMMA);
break;
+ }
default:
- jj_la1[11] = jj_gen;
+ jj_la1[12] = jj_gen;
;
}
expression();
}
break;
+ }
default:
- jj_la1[12] = jj_gen;
+ jj_la1[13] = jj_gen;
;
}
jj_consume_token(RBRACKET);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -531,51 +561,52 @@ public class SQLTemplateParser/*@bgen(jjtree)*/implements SQLTemplateParserTreeC
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
/*
Comma or space separated array of scalars and/or variables
valid values: [], ['a' 5], [$a, 'b', 5]
*/
- final public void array() throws ParseException {
- /*@bgen(jjtree) Array */
+ final public void array() throws ParseException {/*@bgen(jjtree) Array */
ASTArray jjtn000 = new ASTArray(JJTARRAY);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
try {
jj_consume_token(LSBRACKET);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case DOLLAR:
case TRUE:
case FALSE:
case SINGLE_QUOTED_STRING:
case DOUBLE_QUOTED_STRING:
case INT_LITERAL:
- case FLOAT_LITERAL:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case FLOAT_LITERAL:{
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case TRUE:
case FALSE:
case SINGLE_QUOTED_STRING:
case DOUBLE_QUOTED_STRING:
case INT_LITERAL:
- case FLOAT_LITERAL:
+ case FLOAT_LITERAL:{
scalar();
break;
- case DOLLAR:
+ }
+ case DOLLAR:{
variable();
break;
+ }
default:
- jj_la1[13] = jj_gen;
+ jj_la1[14] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
label_5:
while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case DOLLAR:
case TRUE:
case FALSE:
@@ -583,47 +614,52 @@ public class SQLTemplateParser/*@bgen(jjtree)*/implements SQLTemplateParserTreeC
case SINGLE_QUOTED_STRING:
case DOUBLE_QUOTED_STRING:
case INT_LITERAL:
- case FLOAT_LITERAL:
+ case FLOAT_LITERAL:{
;
break;
+ }
default:
- jj_la1[14] = jj_gen;
+ jj_la1[15] = jj_gen;
break label_5;
}
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case COMMA:
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case COMMA:{
jj_consume_token(COMMA);
break;
+ }
default:
- jj_la1[15] = jj_gen;
+ jj_la1[16] = jj_gen;
;
}
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case TRUE:
case FALSE:
case SINGLE_QUOTED_STRING:
case DOUBLE_QUOTED_STRING:
case INT_LITERAL:
- case FLOAT_LITERAL:
+ case FLOAT_LITERAL:{
scalar();
break;
- case DOLLAR:
+ }
+ case DOLLAR:{
variable();
break;
+ }
default:
- jj_la1[16] = jj_gen;
+ jj_la1[17] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
break;
+ }
default:
- jj_la1[17] = jj_gen;
+ jj_la1[18] = jj_gen;
;
}
jj_consume_token(RSBRACKET);
} catch (Throwable jjte000) {
- if (jjtc000) {
+if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
@@ -637,11 +673,11 @@ public class SQLTemplateParser/*@bgen(jjtree)*/implements SQLTemplateParserTreeC
}
{if (true) throw (Error)jjte000;}
} finally {
- if (jjtc000) {
+if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
- }
+}
/** Generated Token Manager. */
public SQLTemplateParserTokenManager token_source;
@@ -652,128 +688,136 @@ public class SQLTemplateParser/*@bgen(jjtree)*/implements SQLTemplateParserTreeC
public Token jj_nt;
private int jj_ntk;
private int jj_gen;
- final private int[] jj_la1 = new int[18];
+ final private int[] jj_la1 = new int[19];
static private int[] jj_la1_0;
static private int[] jj_la1_1;
static {
- jj_la1_init_0();
- jj_la1_init_1();
- }
- private static void jj_la1_init_0() {
- jj_la1_0 = new int[] {0x320,0x320,0x0,0x40,0x90006e00,0x2000,0x90004e00,0x90004e00,0x90000c00,0x20000,0x90006e00,0x2000,0x90004e00,0x90000e00,0x90002e00,0x2000,0x90000e00,0x90000e00,};
- }
- private static void jj_la1_init_1() {
- jj_la1_1 = new int[] {0xc0,0xc0,0xc0,0x0,0x3,0x0,0x3,0x3,0x3,0x0,0x3,0x0,0x3,0x3,0x3,0x0,0x3,0x3,};
- }
+ jj_la1_init_0();
+ jj_la1_init_1();
+ }
+ private static void jj_la1_init_0() {
+ jj_la1_0 = new int[] {0x320,0x320,0x0,0x40,0x90006e00,0x2000,0x90004e00,0x90004e00,0x90000c00,0x40000,0x20000,0x90006e00,0x2000,0x90004e00,0x90000e00,0x90002e00,0x2000,0x90000e00,0x90000e00,};
+ }
+ private static void jj_la1_init_1() {
+ jj_la1_1 = new int[] {0xc0,0xc0,0xc0,0x0,0x3,0x0,0x3,0x3,0x3,0x80,0x0,0x3,0x0,0x3,0x3,0x3,0x0,0x3,0x3,};
+ }
/** Constructor with InputStream. */
public SQLTemplateParser(java.io.InputStream stream) {
- this(stream, null);
+ this(stream, null);
}
/** Constructor with InputStream and supplied encoding */
public SQLTemplateParser(java.io.InputStream stream, String encoding) {
- try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
- token_source = new SQLTemplateParserTokenManager(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 18; i++) jj_la1[i] = -1;
+ try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
+ token_source = new SQLTemplateParserTokenManager(jj_input_stream);
+ token = new Token();
+ jj_ntk = -1;
+ jj_gen = 0;
+ for (int i = 0; i < 19; i++) jj_la1[i] = -1;
}
/** Reinitialise. */
public void ReInit(java.io.InputStream stream) {
- ReInit(stream, null);
+ ReInit(stream, null);
}
/** Reinitialise. */
public void ReInit(java.io.InputStream stream, String encoding) {
- try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
- token_source.ReInit(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jjtree.reset();
- jj_gen = 0;
- for (int i = 0; i < 18; i++) jj_la1[i] = -1;
+ try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
+ token_source.ReInit(jj_input_stream);
+ token = new Token();
+ jj_ntk = -1;
+ jjtree.reset();
+ jj_gen = 0;
+ for (int i = 0; i < 19; i++) jj_la1[i] = -1;
}
/** Constructor. */
public SQLTemplateParser(java.io.Reader stream) {
- jj_input_stream = new JavaCharStream(stream, 1, 1);
- token_source = new SQLTemplateParserTokenManager(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 18; i++) jj_la1[i] = -1;
+ jj_input_stream = new JavaCharStream(stream, 1, 1);
+ token_source = new SQLTemplateParserTokenManager(jj_input_stream);
+ token = new Token();
+ jj_ntk = -1;
+ jj_gen = 0;
+ for (int i = 0; i < 19; i++) jj_la1[i] = -1;
}
/** Reinitialise. */
public void ReInit(java.io.Reader stream) {
- jj_input_stream.ReInit(stream, 1, 1);
- token_source.ReInit(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jjtree.reset();
- jj_gen = 0;
- for (int i = 0; i < 18; i++) jj_la1[i] = -1;
+ if (jj_input_stream == null) {
+ jj_input_stream = new JavaCharStream(stream, 1, 1);
+ } else {
+ jj_input_stream.ReInit(stream, 1, 1);
+ }
+ if (token_source == null) {
+ token_source = new SQLTemplateParserTokenManager(jj_input_stream);
+ }
+
+ token_source.ReInit(jj_input_stream);
+ token = new Token();
+ jj_ntk = -1;
+ jjtree.reset();
+ jj_gen = 0;
+ for (int i = 0; i < 19; i++) jj_la1[i] = -1;
}
/** Constructor with generated Token Manager. */
public SQLTemplateParser(SQLTemplateParserTokenManager tm) {
- token_source = tm;
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 18; i++) jj_la1[i] = -1;
+ token_source = tm;
+ token = new Token();
+ jj_ntk = -1;
+ jj_gen = 0;
+ for (int i = 0; i < 19; i++) jj_la1[i] = -1;
}
/** Reinitialise. */
public void ReInit(SQLTemplateParserTokenManager tm) {
- token_source = tm;
- token = new Token();
- jj_ntk = -1;
- jjtree.reset();
- jj_gen = 0;
- for (int i = 0; i < 18; i++) jj_la1[i] = -1;
+ token_source = tm;
+ token = new Token();
+ jj_ntk = -1;
+ jjtree.reset();
+ jj_gen = 0;
+ for (int i = 0; i < 19; i++) jj_la1[i] = -1;
}
private Token jj_consume_token(int kind) throws ParseException {
- Token oldToken;
- if ((oldToken = token).next != null) token = token.next;
- else token = token.next = token_source.getNextToken();
- jj_ntk = -1;
- if (token.kind == kind) {
- jj_gen++;
- return token;
- }
- token = oldToken;
- jj_kind = kind;
- throw generateParseException();
+ Token oldToken;
+ if ((oldToken = token).next != null) token = token.next;
+ else token = token.next = token_source.getNextToken();
+ jj_ntk = -1;
+ if (token.kind == kind) {
+ jj_gen++;
+ return token;
+ }
+ token = oldToken;
+ jj_kind = kind;
+ throw generateParseException();
}
/** Get the next Token. */
final public Token getNextToken() {
- if (token.next != null) token = token.next;
- else token = token.next = token_source.getNextToken();
- jj_ntk = -1;
- jj_gen++;
- return token;
+ if (token.next != null) token = token.next;
+ else token = token.next = token_source.getNextToken();
+ jj_ntk = -1;
+ jj_gen++;
+ return token;
}
/** Get the specific Token. */
final public Token getToken(int index) {
- Token t = token;
- for (int i = 0; i < index; i++) {
- if (t.next != null) t = t.next;
- else t = t.next = token_source.getNextToken();
- }
- return t;
+ Token t = token;
+ for (int i = 0; i < index; i++) {
+ if (t.next != null) t = t.next;
+ else t = t.next = token_source.getNextToken();
+ }
+ return t;
}
- private int jj_ntk() {
- if ((jj_nt=token.next) == null)
- return (jj_ntk = (token.next=token_source.getNextToken()).kind);
- else
- return (jj_ntk = jj_nt.kind);
+ private int jj_ntk_f() {
+ if ((jj_nt=token.next) == null)
+ return (jj_ntk = (token.next=token_source.getNextToken()).kind);
+ else
+ return (jj_ntk = jj_nt.kind);
}
private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();
@@ -782,36 +826,43 @@ public class SQLTemplateParser/*@bgen(jjtree)*/implements SQLTemplateParserTreeC
/** Generate ParseException. */
public ParseException generateParseException() {
- jj_expentries.clear();
- boolean[] la1tokens = new boolean[40];
- if (jj_kind >= 0) {
- la1tokens[jj_kind] = true;
- jj_kind = -1;
- }
- for (int i = 0; i < 18; i++) {
- if (jj_la1[i] == jj_gen) {
- for (int j = 0; j < 32; j++) {
- if ((jj_la1_0[i] & (1<<j)) != 0) {
- la1tokens[j] = true;
- }
- if ((jj_la1_1[i] & (1<<j)) != 0) {
- la1tokens[32+j] = true;
- }
- }
- }
- }
- for (int i = 0; i < 40; i++) {
- if (la1tokens[i]) {
- jj_expentry = new int[1];
- jj_expentry[0] = i;
- jj_expentries.add(jj_expentry);
- }
- }
- int[][] exptokseq = new int[jj_expentries.size()][];
- for (int i = 0; i < jj_expentries.size(); i++) {
- exptokseq[i] = jj_expentries.get(i);
- }
- return new ParseException(token, exptokseq, tokenImage);
+ jj_expentries.clear();
+ boolean[] la1tokens = new boolean[40];
+ if (jj_kind >= 0) {
+ la1tokens[jj_kind] = true;
+ jj_kind = -1;
+ }
+ for (int i = 0; i < 19; i++) {
+ if (jj_la1[i] == jj_gen) {
+ for (int j = 0; j < 32; j++) {
+ if ((jj_la1_0[i] & (1<<j)) != 0) {
+ la1tokens[j] = true;
+ }
+ if ((jj_la1_1[i] & (1<<j)) != 0) {
+ la1tokens[32+j] = true;
+ }
+ }
+ }
+ }
+ for (int i = 0; i < 40; i++) {
+ if (la1tokens[i]) {
+ jj_expentry = new int[1];
+ jj_expentry[0] = i;
+ jj_expentries.add(jj_expentry);
+ }
+ }
+ int[][] exptokseq = new int[jj_expentries.size()][];
+ for (int i = 0; i < jj_expentries.size(); i++) {
+ exptokseq[i] = jj_expentries.get(i);
+ }
+ return new ParseException(token, exptokseq, tokenImage);
+ }
+
+ private boolean trace_enabled;
+
+/** Trace enabled. */
+ final public boolean trace_enabled() {
+ return trace_enabled;
}
/** Enable tracing. */
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/template/parser/SQLTemplateParserTokenManager.java b/cayenne-server/src/main/java/org/apache/cayenne/template/parser/SQLTemplateParserTokenManager.java
index 79fdb7b..7e3de5e 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/template/parser/SQLTemplateParserTokenManager.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/template/parser/SQLTemplateParserTokenManager.java
@@ -21,8 +21,7 @@
package org.apache.cayenne.template.parser;
/** Token Manager. */
-public class SQLTemplateParserTokenManager implements SQLTemplateParserConstants
-{
+public class SQLTemplateParserTokenManager implements SQLTemplateParserConstants {
/** Holds the last value computed by a constant token. */
Object literalValue;
@@ -55,18 +54,18 @@ public class SQLTemplateParserTokenManager implements SQLTemplateParserConstants
private char escapeChar() {
int ofs = image.length() - 1;
switch ( image.charAt(ofs) ) {
- case 'n': return '\u005cn';
- case 'r': return '\u005cr';
- case 't': return '\u005ct';
- case 'b': return '\u005cb';
- case 'f': return '\u005cf';
- case '\u005c\u005c': return '\u005c\u005c';
- case '\u005c'': return '\u005c'';
- case '\u005c"': return '\u005c"';
+ case 'n': return '\n';
+ case 'r': return '\r';
+ case 't': return '\t';
+ case 'b': return '\b';
+ case 'f': return '\f';
+ case '\\': return '\\';
+ case '\'': return '\'';
+ case '\"': return '\"';
}
// Otherwise, it's an octal number. Find the backslash and convert.
- while ( image.charAt(--ofs) != '\u005c\u005c' ){
+ while ( image.charAt(--ofs) != '\\' ){
}
int value = 0;
@@ -124,16 +123,14 @@ public class SQLTemplateParserTokenManager implements SQLTemplateParserConstants
public java.io.PrintStream debugStream = System.out;
/** Set debug output. */
public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
-private final int jjStopStringLiteralDfa_0(int pos, long active0)
-{
+private final int jjStopStringLiteralDfa_0(int pos, long active0){
switch (pos)
{
default :
return -1;
}
}
-private final int jjStartNfa_0(int pos, long active0)
-{
+private final int jjStartNfa_0(int pos, long active0){
return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
}
private int jjStopAtPos(int pos, int kind)
@@ -142,8 +139,7 @@ private int jjStopAtPos(int pos, int kind)
jjmatchedPos = pos;
return pos + 1;
}
-private int jjMoveStringLiteralDfa0_0()
-{
+private int jjMoveStringLiteralDfa0_0(){
switch(curChar)
{
case 35:
@@ -155,8 +151,7 @@ private int jjMoveStringLiteralDfa0_0()
return jjMoveNfa_0(0, 0);
}
}
-private int jjMoveStringLiteralDfa1_0(long active0)
-{
+private int jjMoveStringLiteralDfa1_0(long active0){
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(0, active0);
@@ -177,8 +172,7 @@ private int jjMoveStringLiteralDfa1_0(long active0)
}
return jjStartNfa_0(0, active0);
}
-private int jjMoveStringLiteralDfa2_0(long old0, long active0)
-{
+private int jjMoveStringLiteralDfa2_0(long old0, long active0){
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(0, old0);
try { curChar = input_stream.readChar(); }
@@ -201,8 +195,7 @@ private int jjMoveStringLiteralDfa2_0(long old0, long active0)
}
return jjStartNfa_0(1, active0);
}
-private int jjMoveStringLiteralDfa3_0(long old0, long active0)
-{
+private int jjMoveStringLiteralDfa3_0(long old0, long active0){
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(1, old0);
try { curChar = input_stream.readChar(); }
@@ -223,8 +216,7 @@ private int jjMoveStringLiteralDfa3_0(long old0, long active0)
}
return jjStartNfa_0(2, active0);
}
-private int jjMoveStringLiteralDfa4_0(long old0, long active0)
-{
+private int jjMoveStringLiteralDfa4_0(long old0, long active0){
if (((active0 &= old0)) == 0L)
return jjStartNfa_0(2, old0);
try { curChar = input_stream.readChar(); }
@@ -294,7 +286,7 @@ private int jjMoveNfa_0(int startState, int curPos)
}
else
{
- int hiByte = (int)(curChar >> 8);
+ int hiByte = (curChar >> 8);
int i1 = hiByte >> 6;
long l1 = 1L << (hiByte & 077);
int i2 = (curChar & 0xff) >> 6;
@@ -327,20 +319,17 @@ private int jjMoveNfa_0(int startState, int curPos)
catch(java.io.IOException e) { return curPos; }
}
}
-private final int jjStopStringLiteralDfa_4(int pos, long active0)
-{
+private final int jjStopStringLiteralDfa_4(int pos, long active0){
switch (pos)
{
default :
return -1;
}
}
-private final int jjStartNfa_4(int pos, long active0)
-{
+private final int jjStartNfa_4(int pos, long active0){
return jjMoveNfa_4(jjStopStringLiteralDfa_4(pos, active0), pos + 1);
}
-private int jjMoveStringLiteralDfa0_4()
-{
+private int jjMoveStringLiteralDfa0_4(){
switch(curChar)
{
case 39:
@@ -408,7 +397,7 @@ private int jjMoveNfa_4(int startState, int curPos)
kind = 27;
}
else if (curChar == 92)
- jjAddStates(0, 2);
+ { jjAddStates(0, 2); }
break;
case 1:
if ((0x14404510000000L & l) != 0L && kind > 26)
@@ -424,7 +413,7 @@ private int jjMoveNfa_4(int startState, int curPos)
}
else
{
- int hiByte = (int)(curChar >> 8);
+ int hiByte = (curChar >> 8);
int i1 = hiByte >> 6;
long l1 = 1L << (hiByte & 077);
int i2 = (curChar & 0xff) >> 6;
@@ -510,7 +499,7 @@ private int jjMoveNfa_3(int startState, int curPos)
}
else
{
- int hiByte = (int)(curChar >> 8);
+ int hiByte = (curChar >> 8);
int i1 = hiByte >> 6;
long l1 = 1L << (hiByte & 077);
int i2 = (curChar & 0xff) >> 6;
@@ -536,20 +525,17 @@ private int jjMoveNfa_3(int startState, int curPos)
catch(java.io.IOException e) { return curPos; }
}
}
-private final int jjStopStringLiteralDfa_2(int pos, long active0)
-{
+private final int jjStopStringLiteralDfa_2(int pos, long active0){
switch (pos)
{
default :
return -1;
}
}
-private final int jjStartNfa_2(int pos, long active0)
-{
+private final int jjStartNfa_2(int pos, long active0){
return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0), pos + 1);
}
-private int jjMoveStringLiteralDfa0_2()
-{
+private int jjMoveStringLiteralDfa0_2(){
switch(curChar)
{
case 35:
@@ -565,8 +551,7 @@ private int jjMoveStringLiteralDfa0_2()
return jjMoveNfa_2(0, 0);
}
}
-private int jjMoveStringLiteralDfa1_2(long active0)
-{
+private int jjMoveStringLiteralDfa1_2(long active0){
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_2(0, active0);
@@ -583,8 +568,7 @@ private int jjMoveStringLiteralDfa1_2(long active0)
}
return jjStartNfa_2(0, active0);
}
-private int jjMoveStringLiteralDfa2_2(long old0, long active0)
-{
+private int jjMoveStringLiteralDfa2_2(long old0, long active0){
if (((active0 &= old0)) == 0L)
return jjStartNfa_2(0, old0);
try { curChar = input_stream.readChar(); }
@@ -607,8 +591,7 @@ private int jjMoveStringLiteralDfa2_2(long old0, long active0)
}
return jjStartNfa_2(1, active0);
}
-private int jjMoveStringLiteralDfa3_2(long old0, long active0)
-{
+private int jjMoveStringLiteralDfa3_2(long old0, long active0){
if (((active0 &= old0)) == 0L)
return jjStartNfa_2(1, old0);
try { curChar = input_stream.readChar(); }
@@ -629,8 +612,7 @@ private int jjMoveStringLiteralDfa3_2(long old0, long active0)
}
return jjStartNfa_2(2, active0);
}
-private int jjMoveStringLiteralDfa4_2(long old0, long active0)
-{
+private int jjMoveStringLiteralDfa4_2(long old0, long active0){
if (((active0 &= old0)) == 0L)
return jjStartNfa_2(2, old0);
try { curChar = input_stream.readChar(); }
@@ -672,7 +654,7 @@ private int jjMoveNfa_2(int startState, int curPos)
if ((0xfc00bee7ffffffffL & l) == 0L)
break;
kind = 39;
- jjCheckNAdd(2);
+ { jjCheckNAdd(2); }
break;
case 1:
if ((0x3ff000000000000L & l) == 0L)
@@ -696,13 +678,13 @@ private int jjMoveNfa_2(int startState, int curPos)
{
if (kind > 18)
kind = 18;
- jjCheckNAdd(1);
+ { jjCheckNAdd(1); }
}
else if ((0xf800000178000001L & l) != 0L)
{
if (kind > 39)
kind = 39;
- jjCheckNAdd(2);
+ { jjCheckNAdd(2); }
}
break;
case 1:
@@ -710,13 +692,13 @@ private int jjMoveNfa_2(int startState, int curPos)
break;
if (kind > 18)
kind = 18;
- jjCheckNAdd(1);
+ { jjCheckNAdd(1); }
break;
case 2:
if ((0xf800000178000001L & l) == 0L)
break;
kind = 39;
- jjCheckNAdd(2);
+ { jjCheckNAdd(2); }
break;
default : break;
}
@@ -724,7 +706,7 @@ private int jjMoveNfa_2(int startState, int curPos)
}
else
{
- int hiByte = (int)(curChar >> 8);
+ int hiByte = (curChar >> 8);
int i1 = hiByte >> 6;
long l1 = 1L << (hiByte & 077);
int i2 = (curChar & 0xff) >> 6;
@@ -739,7 +721,7 @@ private int jjMoveNfa_2(int startState, int curPos)
break;
if (kind > 39)
kind = 39;
- jjCheckNAdd(2);
+ { jjCheckNAdd(2); }
break;
default : break;
}
@@ -758,20 +740,17 @@ private int jjMoveNfa_2(int startState, int curPos)
catch(java.io.IOException e) { return curPos; }
}
}
-private final int jjStopStringLiteralDfa_5(int pos, long active0)
-{
+private final int jjStopStringLiteralDfa_5(int pos, long active0){
switch (pos)
{
default :
return -1;
}
}
-private final int jjStartNfa_5(int pos, long active0)
-{
+private final int jjStartNfa_5(int pos, long active0){
return jjMoveNfa_5(jjStopStringLiteralDfa_5(pos, active0), pos + 1);
}
-private int jjMoveStringLiteralDfa0_5()
-{
+private int jjMoveStringLiteralDfa0_5(){
switch(curChar)
{
case 34:
@@ -839,7 +818,7 @@ private int jjMoveNfa_5(int startState, int curPos)
kind = 30;
}
else if (curChar == 92)
- jjAddStates(0, 2);
+ { jjAddStates(0, 2); }
break;
case 1:
if ((0x14404510000000L & l) != 0L && kind > 29)
@@ -855,7 +834,7 @@ private int jjMoveNfa_5(int startState, int curPos)
}
else
{
- int hiByte = (int)(curChar >> 8);
+ int hiByte = (curChar >> 8);
int i1 = hiByte >> 6;
long l1 = 1L << (hiByte & 077);
int i2 = (curChar & 0xff) >> 6;
@@ -885,20 +864,17 @@ private int jjMoveNfa_5(int startState, int curPos)
catch(java.io.IOException e) { return curPos; }
}
}
-private final int jjStopStringLiteralDfa_1(int pos, long active0)
-{
+private final int jjStopStringLiteralDfa_1(int pos, long active0){
switch (pos)
{
default :
return -1;
}
}
-private final int jjStartNfa_1(int pos, long active0)
-{
+private final int jjStartNfa_1(int pos, long active0){
return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0), pos + 1);
}
-private int jjMoveStringLiteralDfa0_1()
-{
+private int jjMoveStringLiteralDfa0_1(){
switch(curChar)
{
case 34:
@@ -953,22 +929,22 @@ private int jjMoveNfa_1(int startState, int curPos)
{
case 3:
if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddStates(3, 8);
+ { jjCheckNAddStates(3, 8); }
else if (curChar == 46)
- jjCheckNAdd(29);
+ { jjCheckNAdd(29); }
else if (curChar == 45)
- jjAddStates(9, 10);
+ { jjAddStates(9, 10); }
if ((0x3fe000000000000L & l) != 0L)
{
if (kind > 32)
kind = 32;
- jjCheckNAddTwoStates(22, 23);
+ { jjCheckNAddTwoStates(22, 23); }
}
else if (curChar == 48)
{
if (kind > 32)
kind = 32;
- jjCheckNAddStates(11, 13);
+ { jjCheckNAddStates(11, 13); }
}
break;
case 19:
@@ -980,105 +956,105 @@ private int jjMoveNfa_1(int startState, int curPos)
break;
case 20:
if (curChar == 45)
- jjAddStates(9, 10);
+ { jjAddStates(9, 10); }
break;
case 21:
if ((0x3fe000000000000L & l) == 0L)
break;
if (kind > 32)
kind = 32;
- jjCheckNAddTwoStates(22, 23);
+ { jjCheckNAddTwoStates(22, 23); }
break;
case 22:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 32)
kind = 32;
- jjCheckNAddTwoStates(22, 23);
+ { jjCheckNAddTwoStates(22, 23); }
break;
case 24:
if (curChar != 48)
break;
if (kind > 32)
kind = 32;
- jjCheckNAddStates(11, 13);
+ { jjCheckNAddStates(11, 13); }
break;
case 25:
if ((0xff000000000000L & l) == 0L)
break;
if (kind > 32)
kind = 32;
- jjCheckNAddTwoStates(25, 23);
+ { jjCheckNAddTwoStates(25, 23); }
break;
case 27:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 32)
kind = 32;
- jjCheckNAddTwoStates(27, 23);
+ { jjCheckNAddTwoStates(27, 23); }
break;
case 28:
if (curChar == 46)
- jjCheckNAdd(29);
+ { jjCheckNAdd(29); }
break;
case 29:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 33)
kind = 33;
- jjCheckNAddStates(14, 16);
+ { jjCheckNAddStates(14, 16); }
break;
case 31:
if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(32);
+ { jjCheckNAdd(32); }
break;
case 32:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 33)
kind = 33;
- jjCheckNAddTwoStates(32, 33);
+ { jjCheckNAddTwoStates(32, 33); }
break;
case 34:
if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddStates(3, 8);
+ { jjCheckNAddStates(3, 8); }
break;
case 35:
if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddTwoStates(35, 36);
+ { jjCheckNAddTwoStates(35, 36); }
break;
case 36:
if (curChar != 46)
break;
if (kind > 33)
kind = 33;
- jjCheckNAddStates(17, 19);
+ { jjCheckNAddStates(17, 19); }
break;
case 37:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 33)
kind = 33;
- jjCheckNAddStates(17, 19);
+ { jjCheckNAddStates(17, 19); }
break;
case 38:
if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddTwoStates(38, 39);
+ { jjCheckNAddTwoStates(38, 39); }
break;
case 40:
if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(41);
+ { jjCheckNAdd(41); }
break;
case 41:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 33)
kind = 33;
- jjCheckNAddTwoStates(41, 33);
+ { jjCheckNAddTwoStates(41, 33); }
break;
case 42:
if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddTwoStates(42, 33);
+ { jjCheckNAddTwoStates(42, 33); }
break;
default : break;
}
@@ -1096,7 +1072,7 @@ private int jjMoveNfa_1(int startState, int curPos)
{
if (kind > 18)
kind = 18;
- jjCheckNAdd(19);
+ { jjCheckNAdd(19); }
}
if (curChar == 70)
jjstateSet[jjnewStateCnt++] = 16;
@@ -1181,7 +1157,7 @@ private int jjMoveNfa_1(int startState, int curPos)
break;
if (kind > 18)
kind = 18;
- jjCheckNAdd(19);
+ { jjCheckNAdd(19); }
break;
case 23:
if ((0x110000001100L & l) != 0L && kind > 32)
@@ -1189,18 +1165,18 @@ private int jjMoveNfa_1(int startState, int curPos)
break;
case 26:
if ((0x100000001000000L & l) != 0L)
- jjCheckNAdd(27);
+ { jjCheckNAdd(27); }
break;
case 27:
if ((0x7e0000007eL & l) == 0L)
break;
if (kind > 32)
kind = 32;
- jjCheckNAddTwoStates(27, 23);
+ { jjCheckNAddTwoStates(27, 23); }
break;
case 30:
if ((0x2000000020L & l) != 0L)
- jjAddStates(20, 21);
+ { jjAddStates(20, 21); }
break;
case 33:
if ((0x5400000054L & l) != 0L && kind > 33)
@@ -1208,7 +1184,7 @@ private int jjMoveNfa_1(int startState, int curPos)
break;
case 39:
if ((0x2000000020L & l) != 0L)
- jjAddStates(22, 23);
+ { jjAddStates(22, 23); }
break;
default : break;
}
@@ -1216,7 +1192,7 @@ private int jjMoveNfa_1(int startState, int curPos)
}
else
{
- int hiByte = (int)(curChar >> 8);
+ int hiByte = (curChar >> 8);
int i1 = hiByte >> 6;
long l1 = 1L << (hiByte & 077);
int i2 = (curChar & 0xff) >> 6;
@@ -1242,22 +1218,6 @@ private int jjMoveNfa_1(int startState, int curPos)
catch(java.io.IOException e) { return curPos; }
}
}
-static final int[] jjnextStates = {
- 1, 2, 3, 35, 36, 38, 39, 42, 33, 21, 24, 25, 26, 23, 29, 30,
- 33, 37, 30, 33, 31, 32, 40, 41,
-};
-private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
-{
- switch(hiByte)
- {
- case 0:
- return ((jjbitVec2[i2] & l2) != 0L);
- default :
- if ((jjbitVec0[i1] & l1) != 0L)
- return true;
- return false;
- }
-}
/** Token literal values. */
public static final String[] jjstrLiteralImages = {
@@ -1265,84 +1225,6 @@ public static final String[] jjstrLiteralImages = {
"\43\145\156\144", "\43", "\44", null, null, "\51", "\54", "\133", "\135", "\50", "\56", null,
null, null, "\43\43", null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, };
-
-/** Lexer state names. */
-public static final String[] lexStateNames = {
- "DEFAULT",
- "ARGS",
- "NOT_TEXT",
- "IN_SINGLE_LINE_COMMENT",
- "WithinSingleQuoteLiteral",
- "WithinDoubleQuoteLiteral",
-};
-
-/** Lex State array. */
-public static final int[] jjnewLexState = {
- -1, -1, -1, -1, -1, 2, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 3, 0, -1, 4,
- 5, -1, -1, 1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, 0,
-};
-static final long[] jjtoToken = {
- 0xc39067ffe1L,
-};
-static final long[] jjtoSkip = {
- 0x80001eL,
-};
-static final long[] jjtoMore = {
- 0x6f000000L,
-};
-protected JavaCharStream input_stream;
-private final int[] jjrounds = new int[43];
-private final int[] jjstateSet = new int[86];
-private final StringBuilder jjimage = new StringBuilder();
-private StringBuilder image = jjimage;
-private int jjimageLen;
-private int lengthOfMatch;
-protected char curChar;
-/** Constructor. */
-public SQLTemplateParserTokenManager(JavaCharStream stream){
- if (JavaCharStream.staticFlag)
- throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
- input_stream = stream;
-}
-
-/** Constructor. */
-public SQLTemplateParserTokenManager(JavaCharStream stream, int lexState){
- this(stream);
- SwitchTo(lexState);
-}
-
-/** Reinitialise parser. */
-public void ReInit(JavaCharStream stream)
-{
- jjmatchedPos = jjnewStateCnt = 0;
- curLexState = defaultLexState;
- input_stream = stream;
- ReInitRounds();
-}
-private void ReInitRounds()
-{
- int i;
- jjround = 0x80000001;
- for (i = 43; i-- > 0;)
- jjrounds[i] = 0x80000000;
-}
-
-/** Reinitialise parser. */
-public void ReInit(JavaCharStream stream, int lexState)
-{
- ReInit(stream);
- SwitchTo(lexState);
-}
-
-/** Switch to specified lex state. */
-public void SwitchTo(int lexState)
-{
- if (lexState >= 6 || lexState < 0)
- throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
- else
- curLexState = lexState;
-}
-
protected Token jjFillToken()
{
final Token t;
@@ -1357,7 +1239,9 @@ protected Token jjFillToken()
beginColumn = input_stream.getBeginColumn();
endLine = input_stream.getEndLine();
endColumn = input_stream.getEndColumn();
- t = Token.newToken(jjmatchedKind, curTokenImage);
+ t = Token.newToken(jjmatchedKind);
+ t.kind = jjmatchedKind;
+ t.image = curTokenImage;
t.beginLine = beginLine;
t.endLine = endLine;
@@ -1366,6 +1250,22 @@ protected Token jjFillToken()
return t;
}
+static final int[] jjnextStates = {
+ 1, 2, 3, 35, 36, 38, 39, 42, 33, 21, 24, 25, 26, 23, 29, 30,
+ 33, 37, 30, 33, 31, 32, 40, 41,
+};
+private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
+{
+ switch(hiByte)
+ {
+ case 0:
+ return ((jjbitVec2[i2] & l2) != 0L);
+ default :
+ if ((jjbitVec0[i1] & l1) != 0L)
+ return true;
+ return false;
+ }
+}
int curLexState = 0;
int defaultLexState = 0;
@@ -1387,9 +1287,10 @@ public Token getNextToken()
{
curChar = input_stream.BeginToken();
}
- catch(java.io.IOException e)
+ catch(Exception e)
{
jjmatchedKind = 0;
+ jjmatchedPos = -1;
matchedToken = jjFillToken();
return matchedToken;
}
@@ -1494,6 +1395,14 @@ public Token getNextToken()
}
}
+void SkipLexicalActions(Token matchedToken)
+{
+ switch(jjmatchedKind)
+ {
+ default :
+ break;
+ }
+}
void MoreLexicalActions()
{
jjimageLen += (lengthOfMatch = jjmatchedPos + 1);
@@ -1604,4 +1513,95 @@ private void jjCheckNAddStates(int start, int end)
} while (start++ != end);
}
+ /** Constructor. */
+ public SQLTemplateParserTokenManager(JavaCharStream stream){
+
+ if (JavaCharStream.staticFlag)
+ throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
+
+ input_stream = stream;
+ }
+
+ /** Constructor. */
+ public SQLTemplateParserTokenManager (JavaCharStream stream, int lexState){
+ ReInit(stream);
+ SwitchTo(lexState);
+ }
+
+ /** Reinitialise parser. */
+
+ public void ReInit(JavaCharStream stream)
+ {
+
+
+ jjmatchedPos =
+ jjnewStateCnt =
+ 0;
+ curLexState = defaultLexState;
+ input_stream = stream;
+ ReInitRounds();
+ }
+
+ private void ReInitRounds()
+ {
+ int i;
+ jjround = 0x80000001;
+ for (i = 43; i-- > 0;)
+ jjrounds[i] = 0x80000000;
+ }
+
+ /** Reinitialise parser. */
+ public void ReInit(JavaCharStream stream, int lexState)
+
+ {
+ ReInit(stream);
+ SwitchTo(lexState);
+ }
+
+ /** Switch to specified lex state. */
+ public void SwitchTo(int lexState)
+ {
+ if (lexState >= 6 || lexState < 0)
+ throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
+ else
+ curLexState = lexState;
+ }
+
+
+/** Lexer state names. */
+public static final String[] lexStateNames = {
+ "DEFAULT",
+ "ARGS",
+ "NOT_TEXT",
+ "IN_SINGLE_LINE_COMMENT",
+ "WithinSingleQuoteLiteral",
+ "WithinDoubleQuoteLiteral",
+};
+
+/** Lex State array. */
+public static final int[] jjnewLexState = {
+ -1, -1, -1, -1, -1, 2, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 3, 0, -1, 4,
+ 5, -1, -1, 1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, 0,
+};
+static final long[] jjtoToken = {
+ 0xc39067ffe1L,
+};
+static final long[] jjtoSkip = {
+ 0x80001eL,
+};
+static final long[] jjtoSpecial = {
+ 0x0L,
+};
+static final long[] jjtoMore = {
+ 0x6f000000L,
+};
+ protected JavaCharStream input_stream;
+
+ private final int[] jjrounds = new int[43];
+ private final int[] jjstateSet = new int[2 * 43];
+ private final StringBuilder jjimage = new StringBuilder();
+ private StringBuilder image = jjimage;
+ private int jjimageLen;
+ private int lengthOfMatch;
+ protected char curChar;
}
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/template/parser/SQLTemplateParserTreeConstants.java b/cayenne-server/src/main/java/org/apache/cayenne/template/parser/SQLTemplateParserTreeConstants.java
index 0549e18..455bdef 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/template/parser/SQLTemplateParserTreeConstants.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/template/parser/SQLTemplateParserTreeConstants.java
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. SQLTemplateParserTreeConstants.java Version 5.0 */
+/* Generated By:JavaCC: Do not edit this line. SQLTemplateParserTreeConstants.java Version 7.0.5 */
package org.apache.cayenne.template.parser;
public interface SQLTemplateParserTreeConstants
@@ -34,4 +34,4 @@ public interface SQLTemplateParserTreeConstants
"Array",
};
}
-/* JavaCC - OriginalChecksum=4e04f6ed8da48f129794e9555444f8df (do not edit this line) */
+/* JavaCC - OriginalChecksum=47a0bbea07c6f5e8188c26aba4a9b62e (do not edit this line) */
diff --git a/cayenne-server/src/main/jjtree/org/apache/cayenne/exp/parser/ExpressionParser.jjt b/cayenne-server/src/main/jjtree/org/apache/cayenne/exp/parser/ExpressionParser.jjt
index 5e57b75..90fbea2 100644
--- a/cayenne-server/src/main/jjtree/org/apache/cayenne/exp/parser/ExpressionParser.jjt
+++ b/cayenne-server/src/main/jjtree/org/apache/cayenne/exp/parser/ExpressionParser.jjt
@@ -629,11 +629,13 @@ TOKEN : {
TOKEN :
{
- < IDENTIFIER: <LETTER> (<LETTER>|<DIGIT>)* (["#"]<LETTER> (<LETTER>|<DIGIT>)*)? (["+"])? >
+ < IDENTIFIER: <LETTER> (<LETTER>|<DIGIT>|<DOLLAR_SIGN>)* (["#"]<LETTER> (<LETTER>|<DIGIT>|<DOLLAR_SIGN>)*)? (["+"])? >
|
< #LETTER: ["_","a"-"z","A"-"Z"] >
|
< #DIGIT: ["0"-"9"] >
+|
+ < #DOLLAR_SIGN: ["$"] >
}
/**
diff --git a/cayenne-server/src/main/jjtree/org/apache/cayenne/template/parser/SQLTemplateParser.jjt b/cayenne-server/src/main/jjtree/org/apache/cayenne/template/parser/SQLTemplateParser.jjt
index 0106fe2..c64d882 100644
--- a/cayenne-server/src/main/jjtree/org/apache/cayenne/template/parser/SQLTemplateParser.jjt
+++ b/cayenne-server/src/main/jjtree/org/apache/cayenne/template/parser/SQLTemplateParser.jjt
@@ -186,7 +186,7 @@ void variable() #Variable : {
Token t;
}
{
- <DOLLAR> ( t = <IDENTIFIER> ) {
+ <DOLLAR> ( t = <IDENTIFIER> | t = <TEXT_OTHER> ) {
jjtThis.setIdentifier(t.image);
}
( method() )*
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/Cay2666IT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/Cay2666IT.java
new file mode 100644
index 0000000..6ea85f4
--- /dev/null
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/Cay2666IT.java
@@ -0,0 +1,158 @@
+/*****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ****************************************************************/
+package org.apache.cayenne.access;
+
+import org.apache.cayenne.di.Inject;
+import org.apache.cayenne.exp.Expression;
+import org.apache.cayenne.exp.ExpressionFactory;
+import org.apache.cayenne.exp.parser.ASTDbPath;
+import org.apache.cayenne.exp.parser.ASTEqual;
+import org.apache.cayenne.exp.parser.ASTObjPath;
+import org.apache.cayenne.query.ObjectSelect;
+import org.apache.cayenne.test.jdbc.DBHelper;
+import org.apache.cayenne.test.jdbc.TableHelper;
+import org.apache.cayenne.testdo.cay_2666.CAY2666;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
+import org.apache.cayenne.unit.di.server.ServerCase;
+import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
+
+import java.io.IOException;
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+
+/**
+ * @since 4.2
+ */
+@UseServerRuntime(CayenneProjects.CAY_2666)
+public class Cay2666IT extends ServerCase {
+
+ @Inject
+ private DataContext context;
+
+ @Inject
+ private DBHelper dbHelper;
+
+ private TableHelper tTest;
+
+ @Test
+ public void testExp_Path() {
+ Expression exp1 = ExpressionFactory.exp("object$.path");
+ assertEquals(Expression.OBJ_PATH, exp1.getType());
+
+ Expression exp2 = ExpressionFactory.exp("db:object.path$");
+ assertEquals(Expression.DB_PATH, exp2.getType());
+ }
+
+ @Test
+ public void testPathExp() {
+ assertEquals("abc$.xyz$", ExpressionFactory.pathExp("abc$.xyz$").toString());
+ }
+
+ @Test
+ public void testDbPathExp() {
+ assertEquals("db:abc.xyz$", ExpressionFactory.dbPathExp("abc.xyz$").toString());
+ }
+
+ @Test
+ public void testExpWithAlias() {
+ Expression expression = ExpressionFactory.exp("paintings#p1.galleries$#p2.name = 'Test'");
+ assertEquals("p1.p2.name", expression.getOperand(0).toString());
+ assertEquals("galleries$", ((ASTObjPath)expression.getOperand(0)).getPathAliases().get("p2"));
+ }
+
+ @Test
+ public void testExpWithAliasAndOuterJoin() {
+ Expression expression = ExpressionFactory.exp("paintings$#p1+.name = 'Test'");
+ assertEquals("p1.name", expression.getOperand(0).toString());
+ assertEquals("paintings$+", ((ASTObjPath)expression.getOperand(0)).getPathAliases().get("p1"));
+ }
+
+ @Test
+ public void testDbPathWithDollarSign() throws IOException {
+ StringBuilder buffer = new StringBuilder();
+ new ASTDbPath("x$").appendAsString(buffer);
+ assertEquals("db:x$", buffer.toString());
+ }
+
+ @Test
+ public void testExpDbPathWithDollarSign() throws IOException {
+ Expression exp = ExpressionFactory.exp("db:x$ = 'A'");
+ Expression expression = new ASTEqual(new ASTDbPath("x$"), "A");
+ assertEquals(exp, expression);
+
+ exp = ExpressionFactory.exp("x$ = 'A'");
+ expression = new ASTEqual(new ASTDbPath("x$"), "A");
+ assertNotEquals(exp, expression);
+
+ exp = ExpressionFactory.exp("db:x$ = $name", "A");
+ expression = new ASTEqual(new ASTDbPath("x$"), "A");
+ assertEquals(exp, expression);
+ }
+
+ @Test
+ public void testObjPathWithDollarSign() throws IOException {
+ StringBuilder buffer = new StringBuilder();
+
+ new ASTObjPath("obj:x$").appendAsString(buffer);
+ assertEquals("obj:x$", buffer.toString());
+
+ assertEquals("y$", new ASTObjPath("y$").toString());
+ }
+
+ @Test
+ public void testExpObjPathWithDollarSign() throws IOException {
+ Expression exp = ExpressionFactory.exp("obj:x$ = 'A'");
+ Expression expression = new ASTEqual(new ASTObjPath("x$"), "A");
+ assertEquals(exp, expression);
+
+ exp = ExpressionFactory.exp("x$ = 'A'");
+ expression = new ASTEqual(new ASTObjPath("x$"), "A");
+ assertEquals(exp, expression);
+
+
+ exp = ExpressionFactory.exp("obj:x$ = $name", "A");
+ expression = new ASTEqual(new ASTObjPath("x$"), "A");
+ assertEquals(exp, expression);
+ }
+
+ @Test
+ public void testExpressionWithDollarSign() throws Exception {
+ tTest = new TableHelper(dbHelper, "Cay2666");
+ tTest.setColumns("ID", "NAME$");
+ tTest.insert(1, "st.One");
+
+ Expression expression = ExpressionFactory.exp("name$ = 'st.One'");
+ List<CAY2666> cay2666List = ObjectSelect.query(CAY2666.class).where(expression).select(context);
+ assertEquals(1, cay2666List.size());
+
+ expression = ExpressionFactory.exp("obj:name$ = 'st.Two'");
+ cay2666List = ObjectSelect.query(CAY2666.class).where(expression).select(context);
+ assertEquals(0, cay2666List.size());
+
+ tTest.insert(2, "st.Two");
+
+ expression = ExpressionFactory.exp("db:NAME$ = 'st.Two'");
+ cay2666List = ObjectSelect.query(CAY2666.class).where(expression).select(context);
+ assertEquals(1, cay2666List.size());
+ }
+
+}
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/query/ColumnSelectIT.java b/cayenne-server/src/test/java/org/apache/cayenne/query/ColumnSelectIT.java
index 5220e7b..eb79b6f 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/query/ColumnSelectIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/query/ColumnSelectIT.java
@@ -126,7 +126,6 @@ public class ColumnSelectIT extends ServerCase {
public void testSelectSimpleHaving() throws Exception {
Object[] result = ObjectSelect.query(Artist.class)
.columns(Artist.DATE_OF_BIRTH, PropertyFactory.COUNT)
- .orderBy(Artist.DATE_OF_BIRTH.asc())
.having(Artist.DATE_OF_BIRTH.eq(dateFormat.parse("1/2/17")))
.selectOne(context);
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/cay_2666/CAY2666.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/cay_2666/CAY2666.java
new file mode 100644
index 0000000..049ed09
--- /dev/null
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/cay_2666/CAY2666.java
@@ -0,0 +1,28 @@
+/*****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ****************************************************************/
+
+package org.apache.cayenne.testdo.cay_2666;
+
+import org.apache.cayenne.testdo.cay_2666.auto._CAY2666;
+
+public class CAY2666 extends _CAY2666 {
+
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/cay_2666/auto/_CAY2666.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/cay_2666/auto/_CAY2666.java
new file mode 100644
index 0000000..4240d4a
--- /dev/null
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/cay_2666/auto/_CAY2666.java
@@ -0,0 +1,87 @@
+package org.apache.cayenne.testdo.cay_2666.auto;
+
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+
+import org.apache.cayenne.BaseDataObject;
+import org.apache.cayenne.exp.property.PropertyFactory;
+import org.apache.cayenne.exp.property.StringProperty;
+
+/**
+ * Class _CAY2666 was generated by Cayenne.
+ * It is probably a good idea to avoid changing this class manually,
+ * since it may be overwritten next time code is regenerated.
+ * If you need to make any customizations, please use subclass.
+ */
+public abstract class _CAY2666 extends BaseDataObject {
+
+ private static final long serialVersionUID = 1L;
+
+ public static final String ID_PK_COLUMN = "ID";
+
+ public static final StringProperty<String> NAME$ = PropertyFactory.createString("name$", String.class);
+
+ protected String name$;
+
+
+ public void setName$(String name$) {
+ beforePropertyWrite("name$", this.name$, name$);
+ this.name$ = name$;
+ }
+
+ public String getName$() {
+ beforePropertyRead("name$");
+ return this.name$;
+ }
+
+ @Override
+ public Object readPropertyDirectly(String propName) {
+ if(propName == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch(propName) {
+ case "name$":
+ return this.name$;
+ default:
+ return super.readPropertyDirectly(propName);
+ }
+ }
+
+ @Override
+ public void writePropertyDirectly(String propName, Object val) {
+ if(propName == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (propName) {
+ case "name$":
+ this.name$ = (String)val;
+ break;
+ default:
+ super.writePropertyDirectly(propName, val);
+ }
+ }
+
+ private void writeObject(ObjectOutputStream out) throws IOException {
+ writeSerialized(out);
+ }
+
+ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
+ readSerialized(in);
+ }
+
+ @Override
+ protected void writeState(ObjectOutputStream out) throws IOException {
+ super.writeState(out);
+ out.writeObject(this.name$);
+ }
+
+ @Override
+ protected void readState(ObjectInputStream in) throws IOException, ClassNotFoundException {
+ super.readState(in);
+ this.name$ = (String)in.readObject();
+ }
+
+}
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/CayenneProjects.java b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/CayenneProjects.java
index 201c024..bd971d8 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/CayenneProjects.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/CayenneProjects.java
@@ -85,4 +85,5 @@ public class CayenneProjects {
public static final String JAVA8 = "cayenne-java8.xml";
public static final String INHERITANCE_WITH_ENUM_PROJECT = "cayenne-inheritance-with-enum.xml";
public static final String LAZY_ATTRIBUTES_PROJECT = "cayenne-lazy-attributes.xml";
+ public static final String CAY_2666 = "cay2666/cayenne-cay-2666.xml";
}
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/SchemaBuilder.java b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/SchemaBuilder.java
index 4924c24..2b8aed1 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/SchemaBuilder.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/SchemaBuilder.java
@@ -82,7 +82,7 @@ public class SchemaBuilder {
"qualified.map.xml", "quoted-identifiers.map.xml", "inheritance-single-table1.map.xml",
"inheritance-vertical.map.xml", "oneway-rels.map.xml", "unsupported-distinct-types.map.xml",
"array-type.map.xml", "cay-2032.map.xml", "weighted-sort.map.xml", "hybrid-data-object.map.xml",
- "java8.map.xml", "inheritance-with-enum.map.xml", "lazy-attributes.map.xml" };
+ "java8.map.xml", "inheritance-with-enum.map.xml", "lazy-attributes.map.xml", "cay2666/datamap.map.xml" };
// hardcoded dependent entities that should be excluded
// if LOBs are not supported
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseDataSourceInfoProvider.java b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseDataSourceInfoProvider.java
index fff3e73..edc7a6b 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseDataSourceInfoProvider.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseDataSourceInfoProvider.java
@@ -73,7 +73,7 @@ public class ServerCaseDataSourceInfoProvider implements Provider<DataSourceInfo
hsqldb.setAdapterClassName(HSQLDBAdapter.class.getName());
hsqldb.setUserName("sa");
hsqldb.setPassword("");
- hsqldb.setDataSourceUrl("jdbc:hsqldb:mem:aname");
+ hsqldb.setDataSourceUrl("jdbc:hsqldb:mem:aname;sql.regular_names=false");
hsqldb.setJdbcDriver("org.hsqldb.jdbcDriver");
hsqldb.setMinConnections(ConnectionProperties.MIN_CONNECTIONS);
hsqldb.setMaxConnections(ConnectionProperties.MAX_CONNECTIONS);
@@ -83,7 +83,7 @@ public class ServerCaseDataSourceInfoProvider implements Provider<DataSourceInfo
h2.setAdapterClassName(H2Adapter.class.getName());
h2.setUserName("sa");
h2.setPassword("");
- h2.setDataSourceUrl("jdbc:h2:mem:aname;MVCC=TRUE;DB_CLOSE_DELAY=-1");
+ h2.setDataSourceUrl("jdbc:h2:mem:aname;DB_CLOSE_DELAY=-1");
h2.setJdbcDriver("org.h2.Driver");
h2.setMinConnections(ConnectionProperties.MIN_CONNECTIONS);
h2.setMaxConnections(ConnectionProperties.MAX_CONNECTIONS);
diff --git a/cayenne-server/src/test/resources/cay2666/cayenne-cay-2666.xml b/cayenne-server/src/test/resources/cay2666/cayenne-cay-2666.xml
new file mode 100644
index 0000000..9f629d3
--- /dev/null
+++ b/cayenne-server/src/test/resources/cay2666/cayenne-cay-2666.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<domain xmlns="http://cayenne.apache.org/schema/10/domain"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://cayenne.apache.org/schema/10/domain https://cayenne.apache.org/schema/10/domain.xsd"
+ project-version="10">
+ <map name="datamap"/>
+</domain>
diff --git a/cayenne-server/src/test/resources/cay2666/datamap.map.xml b/cayenne-server/src/test/resources/cay2666/datamap.map.xml
new file mode 100644
index 0000000..ad70f79
--- /dev/null
+++ b/cayenne-server/src/test/resources/cay2666/datamap.map.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<data-map xmlns="http://cayenne.apache.org/schema/10/modelMap"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://cayenne.apache.org/schema/10/modelMap https://cayenne.apache.org/schema/10/modelMap.xsd"
+ project-version="10">
+ <property name="quoteSqlIdentifiers" value="true"/>
+ <property name="defaultPackage" value="org.apache.cayenne.testdo.cay_2666"/>
+ <db-entity name="Cay2666">
+ <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/>
+ <db-attribute name="NAME$" type="VARCHAR" length="10"/>
+ </db-entity>
+ <obj-entity name="Cay2666" className="org.apache.cayenne.testdo.cay_2666.CAY2666" dbEntityName="Cay2666">
+ <obj-attribute name="name$" type="java.lang.String" db-attribute-path="NAME$"/>
+ </obj-entity>
+ <dbImport xmlns="http://cayenne.apache.org/schema/10/dbimport">
+ <tableTypes>
+ <tableType>TABLE</tableType>
+ <tableType>VIEW</tableType>
+ </tableTypes>
+ <forceDataMapCatalog>false</forceDataMapCatalog>
+ <forceDataMapSchema>false</forceDataMapSchema>
+ <namingStrategy>org.apache.cayenne.dbsync.naming.DefaultObjectNameGenerator</namingStrategy>
+ <skipPrimaryKeyLoading>false</skipPrimaryKeyLoading>
+ <skipRelationshipsLoading>false</skipRelationshipsLoading>
+ <useJava7Types>false</useJava7Types>
+ <usePrimitives>true</usePrimitives>
+ </dbImport>
+ <cgen xmlns="http://cayenne.apache.org/schema/10/cgen">
+ <destDir>../../java</destDir>
+ <mode>entity</mode>
+ <template>templates/v4_1/subclass.vm</template>
+ <superTemplate>templates/v4_1/superclass.vm</superTemplate>
+ <outputPattern>*.java</outputPattern>
+ <makePairs>true</makePairs>
+ <usePkgPath>true</usePkgPath>
+ <overwrite>false</overwrite>
+ <createPropertyNames>false</createPropertyNames>
+ <createPKProperties>false</createPKProperties>
+ <client>false</client>
+ </cgen>
+</data-map>