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 2017/03/20 10:18:27 UTC
[2/3] cayenne git commit: CAY-2269 Add support for date/time
components extraction in expression functions
http://git-wip-us.apache.org/repos/asf/cayenne/blob/05a77250/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserTokenManager.java
----------------------------------------------------------------------
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 a5b3d00..e1d31ad 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
@@ -108,181 +108,189 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
switch (pos)
{
case 0:
- if ((active0 & 0x387f4f00004e006L) != 0L)
+ if ((active0 & 0x18030000000000L) != 0L)
{
- jjmatchedKind = 59;
- return 74;
+ jjmatchedKind = 69;
+ return 36;
}
if ((active0 & 0x80000000000L) != 0L)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
return 6;
}
if ((active0 & 0x8L) != 0L)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
return 63;
}
- if ((active0 & 0x18030000000000L) != 0L)
+ if ((active0 & 0xffc7f4f00004e006L) != 0L || (active1 & 0xeL) != 0L)
{
- jjmatchedKind = 59;
- return 36;
+ jjmatchedKind = 69;
+ return 74;
}
return -1;
case 1:
- if ((active0 & 0x80000000000L) != 0L)
+ if ((active0 & 0x18000000000000L) != 0L)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
jjmatchedPos = 1;
- return 5;
+ return 35;
}
- if ((active0 & 0x387f7f000046004L) != 0L)
+ if ((active0 & 0x8002L) != 0L)
+ return 74;
+ if ((active0 & 0x80000000000L) != 0L)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
jjmatchedPos = 1;
- return 74;
+ return 5;
}
if ((active0 & 0x8L) != 0L)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
jjmatchedPos = 1;
return 64;
}
- if ((active0 & 0x8002L) != 0L)
- return 74;
- if ((active0 & 0x18000000000000L) != 0L)
+ if ((active0 & 0xffc7f7f000046004L) != 0L || (active1 & 0xeL) != 0L)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
jjmatchedPos = 1;
- return 35;
+ return 74;
}
return -1;
case 2:
- if ((active0 & 0x282ff0000046000L) != 0L)
+ if ((active0 & 0x5e0500f00000000cL) != 0L)
+ return 74;
+ if ((active0 & 0xa1c2ff0000046000L) != 0L || (active1 & 0xaL) != 0L)
{
- jjmatchedKind = 59;
- jjmatchedPos = 2;
+ if (jjmatchedPos != 2)
+ {
+ jjmatchedKind = 69;
+ jjmatchedPos = 2;
+ }
return 74;
}
if ((active0 & 0x18000000000000L) != 0L)
{
- jjmatchedKind = 59;
- jjmatchedPos = 2;
+ if (jjmatchedPos != 2)
+ {
+ jjmatchedKind = 69;
+ jjmatchedPos = 2;
+ }
return 34;
}
- if ((active0 & 0x500f00000000cL) != 0L)
- return 74;
return -1;
case 3:
- if ((active0 & 0x200f70000040000L) != 0L)
+ if ((active0 & 0x2142080000006000L) != 0L)
+ return 74;
+ if ((active0 & 0x18000000000000L) != 0L)
{
if (jjmatchedPos != 3)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
jjmatchedPos = 3;
}
- return 74;
+ return 33;
}
- if ((active0 & 0x18000000000000L) != 0L)
+ if ((active0 & 0xda80f70000040000L) != 0L || (active1 & 0x8L) != 0L)
{
if (jjmatchedPos != 3)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
jjmatchedPos = 3;
}
- return 33;
- }
- if ((active0 & 0x2080000006000L) != 0L)
return 74;
+ }
return -1;
case 4:
+ if ((active0 & 0x80310000000000L) != 0L)
+ return 74;
if ((active0 & 0x18000000000000L) != 0L)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
jjmatchedPos = 4;
return 32;
}
- if ((active0 & 0xc60000044000L) != 0L)
+ if ((active0 & 0xda00c60000044000L) != 0L)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
jjmatchedPos = 4;
return 74;
}
- if ((active0 & 0x310000000000L) != 0L)
- return 74;
return -1;
case 5:
- if ((active0 & 0x40000044000L) != 0L)
+ if ((active0 & 0x18000000000000L) != 0L)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
jjmatchedPos = 5;
- return 74;
+ return 31;
}
- if ((active0 & 0xc20000000000L) != 0L)
+ if ((active0 & 0xc000c20000000000L) != 0L)
return 74;
- if ((active0 & 0x18000000000000L) != 0L)
+ if ((active0 & 0x1a00040000044000L) != 0L)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
jjmatchedPos = 5;
- return 31;
+ return 74;
}
return -1;
case 6:
- if ((active0 & 0x40000004000L) != 0L)
+ if ((active0 & 0x18000000000000L) != 0L)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
jjmatchedPos = 6;
- return 74;
+ return 30;
}
if ((active0 & 0x40000L) != 0L)
return 74;
- if ((active0 & 0x18000000000000L) != 0L)
+ if ((active0 & 0x1a00040000004000L) != 0L)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
jjmatchedPos = 6;
- return 30;
+ return 74;
}
return -1;
case 7:
- if ((active0 & 0x8040000004000L) != 0L)
+ if ((active0 & 0x1a08040000004000L) != 0L)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
jjmatchedPos = 7;
return 74;
}
if ((active0 & 0x10000000000000L) != 0L)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
jjmatchedPos = 7;
return 29;
}
return -1;
case 8:
+ if ((active0 & 0x1200040000000000L) != 0L)
+ return 74;
if ((active0 & 0x10000000000000L) != 0L)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
jjmatchedPos = 8;
return 28;
}
- if ((active0 & 0x8000000004000L) != 0L)
+ if ((active0 & 0x808000000004000L) != 0L)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
jjmatchedPos = 8;
return 74;
}
- if ((active0 & 0x40000000000L) != 0L)
- return 74;
return -1;
case 9:
+ if ((active0 & 0x800000000000000L) != 0L)
+ return 74;
if ((active0 & 0x10000000000000L) != 0L)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
jjmatchedPos = 9;
return 27;
}
if ((active0 & 0x8000000004000L) != 0L)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
jjmatchedPos = 9;
return 74;
}
@@ -290,19 +298,19 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
case 10:
if ((active0 & 0x10000000000000L) != 0L)
return 26;
+ if ((active0 & 0x8000000000000L) != 0L)
+ return 74;
if ((active0 & 0x4000L) != 0L)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
jjmatchedPos = 10;
return 74;
}
- if ((active0 & 0x8000000000000L) != 0L)
- return 74;
return -1;
case 11:
if ((active0 & 0x4000L) != 0L)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
jjmatchedPos = 11;
return 74;
}
@@ -310,7 +318,7 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
case 12:
if ((active0 & 0x4000L) != 0L)
{
- jjmatchedKind = 59;
+ jjmatchedKind = 69;
jjmatchedPos = 12;
return 74;
}
@@ -335,21 +343,21 @@ private int jjMoveStringLiteralDfa0_0()
{
case 33:
jjmatchedKind = 4;
- return jjMoveStringLiteralDfa1_0(0x80L);
+ return jjMoveStringLiteralDfa1_0(0x80L, 0x0L);
case 34:
- return jjStopAtPos(0, 64);
+ return jjStopAtPos(0, 74);
case 36:
- return jjStopAtPos(0, 54);
+ return jjStopAtPos(0, 64);
case 38:
return jjStopAtPos(0, 22);
case 39:
- return jjStopAtPos(0, 63);
+ return jjStopAtPos(0, 73);
case 40:
return jjStopAtPos(0, 16);
case 41:
return jjStopAtPos(0, 17);
case 42:
- return jjStopAtPos(0, 58);
+ return jjStopAtPos(0, 68);
case 43:
return jjStopAtPos(0, 25);
case 44:
@@ -360,41 +368,47 @@ private int jjMoveStringLiteralDfa0_0()
return jjStopAtPos(0, 27);
case 60:
jjmatchedKind = 10;
- return jjMoveStringLiteralDfa1_0(0x800300L);
+ return jjMoveStringLiteralDfa1_0(0x800300L, 0x0L);
case 61:
jjmatchedKind = 5;
- return jjMoveStringLiteralDfa1_0(0x40L);
+ return jjMoveStringLiteralDfa1_0(0x40L, 0x0L);
case 62:
jjmatchedKind = 11;
- return jjMoveStringLiteralDfa1_0(0x1001000L);
+ return jjMoveStringLiteralDfa1_0(0x1001000L, 0x0L);
case 94:
return jjStopAtPos(0, 21);
case 97:
- return jjMoveStringLiteralDfa1_0(0x1001000000004L);
+ return jjMoveStringLiteralDfa1_0(0x1001000000004L, 0x0L);
case 98:
- return jjMoveStringLiteralDfa1_0(0x40000L);
+ return jjMoveStringLiteralDfa1_0(0x40000L, 0x0L);
case 99:
- return jjMoveStringLiteralDfa1_0(0x18030000000000L);
+ return jjMoveStringLiteralDfa1_0(0x18030000000000L, 0x0L);
case 100:
- return jjMoveStringLiteralDfa1_0(0x100000000000000L);
+ return jjMoveStringLiteralDfa1_0(0x1e00000000000000L, 0x4L);
case 101:
- return jjMoveStringLiteralDfa1_0(0x200000000000000L);
+ return jjMoveStringLiteralDfa1_0(0x0L, 0x8L);
+ case 104:
+ return jjMoveStringLiteralDfa1_0(0x2000000000000000L, 0x0L);
case 105:
- return jjMoveStringLiteralDfa1_0(0x8000L);
+ return jjMoveStringLiteralDfa1_0(0x8000L, 0x0L);
case 108:
- return jjMoveStringLiteralDfa1_0(0xd00000006000L);
+ return jjMoveStringLiteralDfa1_0(0xd00000006000L, 0x0L);
case 109:
- return jjMoveStringLiteralDfa1_0(0x4006000000000L);
+ return jjMoveStringLiteralDfa1_0(0x4084006000000000L, 0x0L);
case 110:
- return jjMoveStringLiteralDfa1_0(0x8L);
+ return jjMoveStringLiteralDfa1_0(0x8L, 0x0L);
case 111:
- return jjMoveStringLiteralDfa1_0(0x80000000000002L);
+ return jjMoveStringLiteralDfa1_0(0x2L, 0x2L);
case 115:
- return jjMoveStringLiteralDfa1_0(0x2048000000000L);
+ return jjMoveStringLiteralDfa1_0(0x8002048000000000L, 0x0L);
case 116:
- return jjMoveStringLiteralDfa1_0(0x80000000000L);
+ return jjMoveStringLiteralDfa1_0(0x80000000000L, 0x0L);
case 117:
- return jjMoveStringLiteralDfa1_0(0x200000000000L);
+ return jjMoveStringLiteralDfa1_0(0x200000000000L, 0x0L);
+ case 119:
+ return jjMoveStringLiteralDfa1_0(0x100000000000000L, 0x0L);
+ case 121:
+ return jjMoveStringLiteralDfa1_0(0x40000000000000L, 0x0L);
case 124:
return jjStopAtPos(0, 20);
case 126:
@@ -403,11 +417,11 @@ private int jjMoveStringLiteralDfa0_0()
return jjMoveNfa_0(3, 0);
}
}
-private int jjMoveStringLiteralDfa1_0(long active0)
+private int jjMoveStringLiteralDfa1_0(long active0, long active1)
{
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(0, active0, 0L);
+ jjStopStringLiteralDfa_0(0, active0, active1);
return 1;
}
switch(curChar)
@@ -433,83 +447,90 @@ private int jjMoveStringLiteralDfa1_0(long active0)
return jjStopAtPos(1, 24);
break;
case 97:
- return jjMoveStringLiteralDfa2_0(active0, 0x4000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x1e00004000000000L, active1, 0L);
case 98:
- return jjMoveStringLiteralDfa2_0(active0, 0x181000000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x1000000000000L, active1, 0x6L);
case 101:
- return jjMoveStringLiteralDfa2_0(active0, 0x400000040000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x8140400000040000L, active1, 0L);
case 105:
- return jjMoveStringLiteralDfa2_0(active0, 0x2000006000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x4000002000006000L, active1, 0L);
case 110:
if ((active0 & 0x8000L) != 0L)
return jjStartNfaWithStates_0(1, 15, 74);
- return jjMoveStringLiteralDfa2_0(active0, 0x200000000000004L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x4L, active1, 0x8L);
case 111:
- return jjMoveStringLiteralDfa2_0(active0, 0x4930000000008L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x2084930000000008L, active1, 0L);
case 112:
- return jjMoveStringLiteralDfa2_0(active0, 0x200000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x200000000000L, active1, 0L);
case 113:
- return jjMoveStringLiteralDfa2_0(active0, 0x2000000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x2000000000000L, active1, 0L);
case 114:
if ((active0 & 0x2L) != 0L)
return jjStartNfaWithStates_0(1, 1, 74);
- return jjMoveStringLiteralDfa2_0(active0, 0x80000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x80000000000L, active1, 0L);
case 117:
- return jjMoveStringLiteralDfa2_0(active0, 0x18048000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x18048000000000L, active1, 0L);
case 118:
- return jjMoveStringLiteralDfa2_0(active0, 0x1000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x1000000000L, active1, 0L);
default :
break;
}
- return jjStartNfa_0(0, active0, 0L);
+ return jjStartNfa_0(0, active0, active1);
}
-private int jjMoveStringLiteralDfa2_0(long old0, long active0)
+private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1)
{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(0, old0, 0L);
+ if (((active0 &= old0) | (active1 &= old1)) == 0L)
+ return jjStartNfa_0(0, old0, old1);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(1, active0, 0L);
+ jjStopStringLiteralDfa_0(1, active0, active1);
return 2;
}
switch(curChar)
{
case 58:
- if ((active0 & 0x100000000000000L) != 0L)
- return jjStopAtPos(2, 56);
+ if ((active1 & 0x4L) != 0L)
+ return jjStopAtPos(2, 66);
break;
+ case 97:
+ return jjMoveStringLiteralDfa3_0(active0, 0x40000000000000L, active1, 0L);
case 98:
- return jjMoveStringLiteralDfa3_0(active0, 0x40000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x40000000000L, active1, 0L);
case 99:
- return jjMoveStringLiteralDfa3_0(active0, 0x800000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x8000800000000000L, active1, 0L);
case 100:
if ((active0 & 0x4L) != 0L)
return jjStartNfaWithStates_0(2, 2, 74);
else if ((active0 & 0x4000000000000L) != 0L)
return jjStartNfaWithStates_0(2, 50, 74);
break;
+ case 101:
+ return jjMoveStringLiteralDfa3_0(active0, 0x100000000000000L, active1, 0L);
case 103:
if ((active0 & 0x1000000000L) != 0L)
return jjStartNfaWithStates_0(2, 36, 74);
break;
case 105:
- return jjMoveStringLiteralDfa3_0(active0, 0x80000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x80000000000L, active1, 0L);
case 106:
- return jjMoveStringLiteralDfa3_0(active0, 0x80000000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x2L);
case 107:
- return jjMoveStringLiteralDfa3_0(active0, 0x6000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x6000L, active1, 0L);
case 109:
if ((active0 & 0x8000000000L) != 0L)
return jjStartNfaWithStates_0(2, 39, 74);
break;
case 110:
if ((active0 & 0x2000000000L) != 0L)
- return jjStartNfaWithStates_0(2, 37, 74);
- return jjMoveStringLiteralDfa3_0(active0, 0x420000000000L);
+ {
+ jjmatchedKind = 37;
+ jjmatchedPos = 2;
+ }
+ return jjMoveStringLiteralDfa3_0(active0, 0x4080420000000000L, active1, 0L);
case 112:
- return jjMoveStringLiteralDfa3_0(active0, 0x200000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x200000000000L, active1, 0L);
case 114:
- return jjMoveStringLiteralDfa3_0(active0, 0x1a000000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x1a000000000000L, active1, 0L);
case 115:
if ((active0 & 0x1000000000000L) != 0L)
return jjStartNfaWithStates_0(2, 48, 74);
@@ -517,90 +538,119 @@ private int jjMoveStringLiteralDfa2_0(long old0, long active0)
case 116:
if ((active0 & 0x8L) != 0L)
return jjStartNfaWithStates_0(2, 3, 74);
- return jjMoveStringLiteralDfa3_0(active0, 0x40000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x40000L, active1, 0L);
case 117:
- return jjMoveStringLiteralDfa3_0(active0, 0x200010000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x2000010000000000L, active1, 0x8L);
case 119:
- return jjMoveStringLiteralDfa3_0(active0, 0x100000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x100000000000L, active1, 0L);
case 120:
if ((active0 & 0x4000000000L) != 0L)
return jjStartNfaWithStates_0(2, 38, 74);
break;
+ case 121:
+ if ((active0 & 0x400000000000000L) != 0L)
+ {
+ jjmatchedKind = 58;
+ jjmatchedPos = 2;
+ }
+ return jjMoveStringLiteralDfa3_0(active0, 0x1a00000000000000L, active1, 0L);
default :
break;
}
- return jjStartNfa_0(1, active0, 0L);
+ return jjStartNfa_0(1, active0, active1);
}
-private int jjMoveStringLiteralDfa3_0(long old0, long active0)
+private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1)
{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(1, old0, 0L);
+ if (((active0 &= old0) | (active1 &= old1)) == 0L)
+ return jjStartNfa_0(1, old0, old1);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(2, active0, 0L);
+ jjStopStringLiteralDfa_0(2, active0, active1);
return 3;
}
switch(curChar)
{
case 58:
- if ((active0 & 0x80000000000000L) != 0L)
- return jjStopAtPos(3, 55);
+ if ((active1 & 0x2L) != 0L)
+ return jjStopAtPos(3, 65);
break;
+ case 79:
+ return jjMoveStringLiteralDfa4_0(active0, 0x1a00000000000000L, active1, 0L);
case 97:
- return jjMoveStringLiteralDfa4_0(active0, 0x800000000000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0x800000000000L, active1, 0L);
case 99:
- return jjMoveStringLiteralDfa4_0(active0, 0x20000000000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0x20000000000L, active1, 0L);
case 101:
if ((active0 & 0x2000L) != 0L)
{
jjmatchedKind = 13;
jjmatchedPos = 3;
}
- return jjMoveStringLiteralDfa4_0(active0, 0x300000004000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0x300000004000L, active1, 0L);
case 103:
- return jjMoveStringLiteralDfa4_0(active0, 0x400000000000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0x400000000000L, active1, 0L);
+ case 107:
+ if ((active0 & 0x100000000000000L) != 0L)
+ return jjStartNfaWithStates_0(3, 56, 74);
+ break;
case 109:
if ((active0 & 0x80000000000L) != 0L)
return jjStartNfaWithStates_0(3, 43, 74);
- return jjMoveStringLiteralDfa4_0(active0, 0x200000000000000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x8L);
case 110:
- return jjMoveStringLiteralDfa4_0(active0, 0x10000000000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0x10000000000L, active1, 0L);
+ case 111:
+ return jjMoveStringLiteralDfa4_0(active0, 0x8000000000000000L, active1, 0L);
case 114:
- return jjMoveStringLiteralDfa4_0(active0, 0x18000000000000L);
+ if ((active0 & 0x40000000000000L) != 0L)
+ return jjStartNfaWithStates_0(3, 54, 74);
+ else if ((active0 & 0x2000000000000000L) != 0L)
+ return jjStartNfaWithStates_0(3, 61, 74);
+ return jjMoveStringLiteralDfa4_0(active0, 0x18000000000000L, active1, 0L);
case 115:
- return jjMoveStringLiteralDfa4_0(active0, 0x40000000000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0x40000000000L, active1, 0L);
case 116:
if ((active0 & 0x2000000000000L) != 0L)
return jjStartNfaWithStates_0(3, 49, 74);
- break;
+ return jjMoveStringLiteralDfa4_0(active0, 0x80000000000000L, active1, 0L);
+ case 117:
+ return jjMoveStringLiteralDfa4_0(active0, 0x4000000000000000L, active1, 0L);
case 119:
- return jjMoveStringLiteralDfa4_0(active0, 0x40000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0x40000L, active1, 0L);
default :
break;
}
- return jjStartNfa_0(2, active0, 0L);
+ return jjStartNfa_0(2, active0, active1);
}
-private int jjMoveStringLiteralDfa4_0(long old0, long active0)
+private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1)
{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(2, old0, 0L);
+ if (((active0 &= old0) | (active1 &= old1)) == 0L)
+ return jjStartNfa_0(2, old0, old1);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(3, active0, 0L);
+ jjStopStringLiteralDfa_0(3, active0, active1);
return 4;
}
switch(curChar)
{
case 58:
- if ((active0 & 0x200000000000000L) != 0L)
- return jjStopAtPos(4, 57);
+ if ((active1 & 0x8L) != 0L)
+ return jjStopAtPos(4, 67);
break;
case 73:
- return jjMoveStringLiteralDfa5_0(active0, 0x4000L);
+ return jjMoveStringLiteralDfa5_0(active0, 0x4000L, active1, 0L);
case 97:
- return jjMoveStringLiteralDfa5_0(active0, 0x20000000000L);
+ return jjMoveStringLiteralDfa5_0(active0, 0x20000000000L, active1, 0L);
case 101:
- return jjMoveStringLiteralDfa5_0(active0, 0x18000000040000L);
+ return jjMoveStringLiteralDfa5_0(active0, 0x18000000040000L, active1, 0L);
+ case 102:
+ return jjMoveStringLiteralDfa5_0(active0, 0x1a00000000000000L, active1, 0L);
+ case 104:
+ if ((active0 & 0x80000000000000L) != 0L)
+ return jjStartNfaWithStates_0(4, 55, 74);
+ break;
+ case 110:
+ return jjMoveStringLiteralDfa5_0(active0, 0x8000000000000000L, active1, 0L);
case 114:
if ((active0 & 0x100000000000L) != 0L)
return jjStartNfaWithStates_0(4, 44, 74);
@@ -610,16 +660,16 @@ private int jjMoveStringLiteralDfa4_0(long old0, long active0)
case 116:
if ((active0 & 0x10000000000L) != 0L)
return jjStartNfaWithStates_0(4, 40, 74);
- return jjMoveStringLiteralDfa5_0(active0, 0xc40000000000L);
+ return jjMoveStringLiteralDfa5_0(active0, 0x4000c40000000000L, active1, 0L);
default :
break;
}
- return jjStartNfa_0(3, active0, 0L);
+ return jjStartNfa_0(3, active0, active1);
}
-private int jjMoveStringLiteralDfa5_0(long old0, long active0)
+private int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long active1)
{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(3, old0, 0L);
+ if (((active0 &= old0) | (active1 &= old1)) == 0L)
+ return jjStartNfa_0(3, old0, old1);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(4, active0, 0L);
@@ -627,9 +677,21 @@ private int jjMoveStringLiteralDfa5_0(long old0, long active0)
}
switch(curChar)
{
+ case 77:
+ return jjMoveStringLiteralDfa6_0(active0, 0x800000000000000L);
+ case 87:
+ return jjMoveStringLiteralDfa6_0(active0, 0x1000000000000000L);
+ case 89:
+ return jjMoveStringLiteralDfa6_0(active0, 0x200000000000000L);
+ case 100:
+ if ((active0 & 0x8000000000000000L) != 0L)
+ return jjStartNfaWithStates_0(5, 63, 74);
+ break;
case 101:
if ((active0 & 0x800000000000L) != 0L)
return jjStartNfaWithStates_0(5, 47, 74);
+ else if ((active0 & 0x4000000000000000L) != 0L)
+ return jjStartNfaWithStates_0(5, 62, 74);
return jjMoveStringLiteralDfa6_0(active0, 0x40000L);
case 103:
return jjMoveStringLiteralDfa6_0(active0, 0x4000L);
@@ -661,12 +723,16 @@ private int jjMoveStringLiteralDfa6_0(long old0, long active0)
}
switch(curChar)
{
+ case 101:
+ return jjMoveStringLiteralDfa7_0(active0, 0x1200000000000000L);
case 105:
return jjMoveStringLiteralDfa7_0(active0, 0x40000000000L);
case 110:
if ((active0 & 0x40000L) != 0L)
return jjStartNfaWithStates_0(6, 18, 74);
return jjMoveStringLiteralDfa7_0(active0, 0x4000L);
+ case 111:
+ return jjMoveStringLiteralDfa7_0(active0, 0x800000000000000L);
case 116:
return jjMoveStringLiteralDfa7_0(active0, 0x18000000000000L);
default :
@@ -689,8 +755,12 @@ private int jjMoveStringLiteralDfa7_0(long old0, long active0)
return jjMoveStringLiteralDfa8_0(active0, 0x8000000000000L);
case 84:
return jjMoveStringLiteralDfa8_0(active0, 0x10000000000000L);
+ case 97:
+ return jjMoveStringLiteralDfa8_0(active0, 0x200000000000000L);
+ case 101:
+ return jjMoveStringLiteralDfa8_0(active0, 0x1000000000000000L);
case 110:
- return jjMoveStringLiteralDfa8_0(active0, 0x40000000000L);
+ return jjMoveStringLiteralDfa8_0(active0, 0x800040000000000L);
case 111:
return jjMoveStringLiteralDfa8_0(active0, 0x4000L);
default :
@@ -717,8 +787,16 @@ private int jjMoveStringLiteralDfa8_0(long old0, long active0)
break;
case 105:
return jjMoveStringLiteralDfa9_0(active0, 0x10000000000000L);
+ case 107:
+ if ((active0 & 0x1000000000000000L) != 0L)
+ return jjStartNfaWithStates_0(8, 60, 74);
+ break;
case 114:
+ if ((active0 & 0x200000000000000L) != 0L)
+ return jjStartNfaWithStates_0(8, 57, 74);
return jjMoveStringLiteralDfa9_0(active0, 0x4000L);
+ case 116:
+ return jjMoveStringLiteralDfa9_0(active0, 0x800000000000000L);
default :
break;
}
@@ -737,6 +815,10 @@ private int jjMoveStringLiteralDfa9_0(long old0, long active0)
{
case 101:
return jjMoveStringLiteralDfa10_0(active0, 0x4000L);
+ case 104:
+ if ((active0 & 0x800000000000000L) != 0L)
+ return jjStartNfaWithStates_0(9, 59, 74);
+ break;
case 109:
return jjMoveStringLiteralDfa10_0(active0, 0x10000000000000L);
case 116:
@@ -855,324 +937,324 @@ private int jjMoveNfa_0(int startState, int curPos)
case 26:
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
else if (curChar == 43)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
}
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 70;
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
else if (curChar == 43)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAdd(69);
}
break;
case 32:
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
else if (curChar == 43)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
}
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 70;
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
else if (curChar == 43)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAdd(69);
}
break;
case 63:
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
else if (curChar == 43)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
}
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 70;
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
else if (curChar == 43)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAdd(69);
}
break;
case 5:
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
else if (curChar == 43)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
}
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 70;
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
else if (curChar == 43)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAdd(69);
}
break;
case 64:
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
else if (curChar == 43)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
}
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 70;
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
else if (curChar == 43)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAdd(69);
}
break;
case 30:
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
else if (curChar == 43)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
}
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 70;
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
else if (curChar == 43)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAdd(69);
}
break;
case 29:
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
else if (curChar == 43)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
}
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 70;
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
else if (curChar == 43)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAdd(69);
}
break;
case 35:
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
else if (curChar == 43)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
}
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 70;
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
else if (curChar == 43)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAdd(69);
}
break;
case 27:
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
else if (curChar == 43)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
}
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 70;
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
else if (curChar == 43)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAdd(69);
}
break;
case 33:
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
else if (curChar == 43)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
}
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 70;
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
else if (curChar == 43)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAdd(69);
}
break;
case 6:
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
else if (curChar == 43)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
}
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 70;
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
else if (curChar == 43)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAdd(69);
}
break;
case 74:
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
else if (curChar == 43)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
}
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 70;
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
else if (curChar == 43)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAdd(69);
}
break;
@@ -1183,137 +1265,137 @@ private int jjMoveNfa_0(int startState, int curPos)
jjCheckNAdd(42);
if ((0x3fe000000000000L & l) != 0L)
{
- if (kind > 71)
- kind = 71;
+ if (kind > 81)
+ kind = 81;
jjCheckNAddTwoStates(39, 40);
}
else if (curChar == 48)
{
- if (kind > 71)
- kind = 71;
+ if (kind > 81)
+ kind = 81;
jjCheckNAddStates(9, 11);
}
break;
case 31:
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
else if (curChar == 43)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
}
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 70;
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
else if (curChar == 43)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAdd(69);
}
break;
case 36:
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
else if (curChar == 43)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
}
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 70;
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
else if (curChar == 43)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAdd(69);
}
break;
case 28:
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
else if (curChar == 43)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
}
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 70;
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
else if (curChar == 43)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAdd(69);
}
break;
case 34:
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
else if (curChar == 43)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
}
else if (curChar == 46)
jjstateSet[jjnewStateCnt++] = 70;
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
else if (curChar == 43)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAdd(69);
}
break;
case 38:
if ((0x3fe000000000000L & l) == 0L)
break;
- if (kind > 71)
- kind = 71;
+ if (kind > 81)
+ kind = 81;
jjCheckNAddTwoStates(39, 40);
break;
case 39:
if ((0x3ff000000000000L & l) == 0L)
break;
- if (kind > 71)
- kind = 71;
+ if (kind > 81)
+ kind = 81;
jjCheckNAddTwoStates(39, 40);
break;
case 41:
@@ -1323,8 +1405,8 @@ private int jjMoveNfa_0(int startState, int curPos)
case 42:
if ((0x3ff000000000000L & l) == 0L)
break;
- if (kind > 72)
- kind = 72;
+ if (kind > 82)
+ kind = 82;
jjCheckNAddStates(12, 14);
break;
case 44:
@@ -1334,8 +1416,8 @@ private int jjMoveNfa_0(int startState, int curPos)
case 45:
if ((0x3ff000000000000L & l) == 0L)
break;
- if (kind > 72)
- kind = 72;
+ if (kind > 82)
+ kind = 82;
jjCheckNAddTwoStates(45, 46);
break;
case 47:
@@ -1349,15 +1431,15 @@ private int jjMoveNfa_0(int startState, int curPos)
case 49:
if (curChar != 46)
break;
- if (kind > 72)
- kind = 72;
+ if (kind > 82)
+ kind = 82;
jjCheckNAddStates(15, 17);
break;
case 50:
if ((0x3ff000000000000L & l) == 0L)
break;
- if (kind > 72)
- kind = 72;
+ if (kind > 82)
+ kind = 82;
jjCheckNAddStates(15, 17);
break;
case 51:
@@ -1371,8 +1453,8 @@ private int jjMoveNfa_0(int startState, int curPos)
case 54:
if ((0x3ff000000000000L & l) == 0L)
break;
- if (kind > 72)
- kind = 72;
+ if (kind > 82)
+ kind = 82;
jjCheckNAddTwoStates(54, 46);
break;
case 55:
@@ -1382,36 +1464,36 @@ private int jjMoveNfa_0(int startState, int curPos)
case 56:
if (curChar != 48)
break;
- if (kind > 71)
- kind = 71;
+ if (kind > 81)
+ kind = 81;
jjCheckNAddStates(9, 11);
break;
case 57:
if ((0xff000000000000L & l) == 0L)
break;
- if (kind > 71)
- kind = 71;
+ if (kind > 81)
+ kind = 81;
jjCheckNAddTwoStates(57, 40);
break;
case 59:
if ((0x3ff000000000000L & l) == 0L)
break;
- if (kind > 71)
- kind = 71;
+ if (kind > 81)
+ kind = 81;
jjCheckNAddTwoStates(59, 40);
break;
case 67:
if ((0x3ff000000000000L & l) == 0L)
break;
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
break;
case 68:
if (curChar != 43)
break;
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAdd(69);
break;
case 69:
@@ -1421,20 +1503,20 @@ private int jjMoveNfa_0(int startState, int curPos)
case 71:
if ((0x3ff000000000000L & l) == 0L)
break;
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(18, 20);
break;
case 72:
if ((0x3ff000000000000L & l) == 0L)
break;
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
break;
case 73:
- if (curChar == 43 && kind > 60)
- kind = 60;
+ if (curChar == 43 && kind > 70)
+ kind = 70;
break;
default : break;
}
@@ -1450,14 +1532,14 @@ private int jjMoveNfa_0(int startState, int curPos)
case 26:
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
if (curChar == 115)
@@ -1466,14 +1548,14 @@ private int jjMoveNfa_0(int startState, int curPos)
case 32:
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
if (curChar == 110)
@@ -1482,14 +1564,14 @@ private int jjMoveNfa_0(int startState, int curPos)
case 63:
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
if (curChar == 111)
@@ -1500,14 +1582,14 @@ private int jjMoveNfa_0(int startState, int curPos)
case 5:
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
if (curChar == 117)
@@ -1516,14 +1598,14 @@ private int jjMoveNfa_0(int startState, int curPos)
case 64:
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
if (curChar == 119)
@@ -1535,14 +1617,14 @@ private int jjMoveNfa_0(int startState, int curPos)
case 30:
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
if (curChar == 84)
@@ -1551,14 +1633,14 @@ private int jjMoveNfa_0(int startState, int curPos)
case 29:
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
if (curChar == 105)
@@ -1567,14 +1649,14 @@ private int jjMoveNfa_0(int startState, int curPos)
case 35:
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
if (curChar == 114)
@@ -1583,14 +1665,14 @@ private int jjMoveNfa_0(int startState, int curPos)
case 27:
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
if (curChar == 101)
@@ -1599,14 +1681,14 @@ private int jjMoveNfa_0(int startState, int curPos)
case 33:
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
if (curChar == 101)
@@ -1615,14 +1697,14 @@ private int jjMoveNfa_0(int startState, int curPos)
case 6:
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
if (curChar == 114)
@@ -1631,22 +1713,22 @@ private int jjMoveNfa_0(int startState, int curPos)
case 74:
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
break;
case 3:
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(21, 25);
}
if (curChar == 110)
@@ -1667,14 +1749,14 @@ private int jjMoveNfa_0(int startState, int curPos)
case 31:
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
if (curChar == 116)
@@ -1683,14 +1765,14 @@ private int jjMoveNfa_0(int startState, int curPos)
case 36:
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
if (curChar == 117)
@@ -1699,14 +1781,14 @@ private int jjMoveNfa_0(int startState, int curPos)
case 28:
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
if (curChar == 109)
@@ -1715,14 +1797,14 @@ private int jjMoveNfa_0(int startState, int curPos)
case 34:
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
}
if (curChar == 114)
@@ -1825,16 +1907,16 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 36;
break;
case 40:
- if ((0x110000001100L & l) != 0L && kind > 71)
- kind = 71;
+ if ((0x110000001100L & l) != 0L && kind > 81)
+ kind = 81;
break;
case 43:
if ((0x2000000020L & l) != 0L)
jjAddStates(28, 29);
break;
case 46:
- if ((0x5400000054L & l) != 0L && kind > 72)
- kind = 72;
+ if ((0x5400000054L & l) != 0L && kind > 82)
+ kind = 82;
break;
case 52:
if ((0x2000000020L & l) != 0L)
@@ -1847,8 +1929,8 @@ private int jjMoveNfa_0(int startState, int curPos)
case 59:
if ((0x7e0000007eL & l) == 0L)
break;
- if (kind > 71)
- kind = 71;
+ if (kind > 81)
+ kind = 81;
jjCheckNAddTwoStates(59, 40);
break;
case 60:
@@ -1870,30 +1952,30 @@ private int jjMoveNfa_0(int startState, int curPos)
case 66:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(21, 25);
break;
case 67:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(0, 2);
break;
case 70:
case 71:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
- if (kind > 59)
- kind = 59;
+ if (kind > 69)
+ kind = 69;
jjCheckNAddStates(18, 20);
break;
case 72:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
- if (kind > 60)
- kind = 60;
+ if (kind > 70)
+ kind = 70;
jjCheckNAddTwoStates(72, 73);
break;
default : break;
@@ -1945,7 +2027,7 @@ private int jjMoveStringLiteralDfa0_1()
switch(curChar)
{
case 39:
- return jjStopAtPos(0, 67);
+ return jjStopAtPos(0, 77);
default :
return jjMoveNfa_1(0, 0);
}
@@ -1975,12 +2057,12 @@ private int jjMoveNfa_1(int startState, int curPos)
switch(jjstateSet[--i])
{
case 0:
- if ((0xffffff7fffffffffL & l) != 0L && kind > 66)
- kind = 66;
+ if ((0xffffff7fffffffffL & l) != 0L && kind > 76)
+ kind = 76;
break;
case 1:
- if ((0x8400000000L & l) != 0L && kind > 65)
- kind = 65;
+ if ((0x8400000000L & l) != 0L && kind > 75)
+ kind = 75;
break;
case 2:
if ((0xf000000000000L & l) != 0L)
@@ -1989,13 +2071,13 @@ private int jjMoveNfa_1(int startState, int curPos)
case 3:
if ((0xff000000000000L & l) == 0L)
break;
- if (kind > 65)
- kind = 65;
+ if (kind > 75)
+ kind = 75;
jjstateSet[jjnewStateCnt++] = 4;
break;
case 4:
- if ((0xff000000000000L & l) != 0L && kind > 65)
- kind = 65;
+ if ((0xff000000000000L & l) != 0L && kind > 75)
+ kind = 75;
break;
default : break;
}
@@ -2011,19 +2093,19 @@ private int jjMoveNfa_1(int startState, int curPos)
case 0:
if ((0xffffffffefffffffL & l) != 0L)
{
- if (kind > 66)
- kind = 66;
+ if (kind > 76)
+ kind = 76;
}
else if (curChar == 92)
jjAddStates(32, 34);
break;
case 1:
- if ((0x14404510000000L & l) != 0L && kind > 65)
- kind = 65;
+ if ((0x14404510000000L & l) != 0L && kind > 75)
+ kind = 75;
break;
case 5:
- if ((0xffffffffefffffffL & l) != 0L && kind > 66)
- kind = 66;
+ if ((0xffffffffefffffffL & l) != 0L && kind > 76)
+ kind = 76;
break;
default : break;
}
@@ -2041,8 +2123,8 @@ private int jjMoveNfa_1(int startState, int curPos)
switch(jjstateSet[--i])
{
case 0:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 66)
- kind = 66;
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 76)
+ kind = 76;
break;
default : break;
}
@@ -2078,7 +2160,7 @@ private int jjMoveStringLiteralDfa0_2()
switch(curChar)
{
case 34:
- return jjStopAtPos(0, 70);
+ return jjStopAtPos(0, 80);
default :
return jjMoveNfa_2(0, 0);
}
@@ -2102,12 +2184,12 @@ private int jjMoveNfa_2(int startState, int curPos)
switch(jjstateSet[--i])
{
case 0:
- if ((0xfffffffbffffffffL & l) != 0L && kind > 69)
- kind = 69;
+ if ((0xfffffffbffffffffL & l) != 0L && kind > 79)
+ kind = 79;
break;
case 1:
- if ((0x8400000000L & l) != 0L && kind > 68)
- kind = 68;
+ if ((0x8400000000L & l) != 0L && kind > 78)
+ kind = 78;
break;
case 2:
if ((0xf000000000000L & l) != 0L)
@@ -2116,13 +2198,13 @@ private int jjMoveNfa_2(int startState, int curPos)
case 3:
if ((0xff000000000000L & l) == 0L)
break;
- if (kind > 68)
- kind = 68;
+ if (kind > 78)
+ kind = 78;
jjstateSet[jjnewStateCnt++] = 4;
break;
case 4:
- if ((0xff000000000000L & l) != 0L && kind > 68)
- kind = 68;
+ if ((0xff000000000000L & l) != 0L && kind > 78)
+ kind = 78;
break;
default : break;
}
@@ -2138,19 +2220,19 @@ private int jjMoveNfa_2(int startState, int curPos)
case 0:
if ((0xffffffffefffffffL & l) != 0L)
{
- if (kind > 69)
- kind = 69;
+ if (kind > 79)
+ kind = 79;
}
else if (curChar == 92)
jjAddStates(32, 34);
break;
case 1:
- if ((0x14404510000000L & l) != 0L && kind > 68)
- kind = 68;
+ if ((0x14404510000000L & l) != 0L && kind > 78)
+ kind = 78;
break;
case 5:
- if ((0xffffffffefffffffL & l) != 0L && kind > 69)
- kind = 69;
+ if ((0xffffffffefffffffL & l) != 0L && kind > 79)
+ kind = 79;
break;
default : break;
}
@@ -2168,8 +2250,8 @@ private int jjMoveNfa_2(int startState, int curPos)
switch(jjstateSet[--i])
{
case 0:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 69)
- kind = 69;
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 79)
+ kind = 79;
break;
default : break;
}
@@ -2216,9 +2298,12 @@ null, null, null, "\141\166\147", "\155\151\156", "\155\141\170", "\163\165\155"
"\143\157\165\156\164", "\143\157\156\143\141\164", "\163\165\142\163\164\162\151\156\147",
"\164\162\151\155", "\154\157\167\145\162", "\165\160\160\145\162", "\154\145\156\147\164\150",
"\154\157\143\141\164\145", "\141\142\163", "\163\161\162\164", "\155\157\144",
-"\143\165\162\162\145\156\164\104\141\164\145", "\143\165\162\162\145\156\164\124\151\155\145", null, "\44",
-"\157\142\152\72", "\144\142\72", "\145\156\165\155\72", "\52", null, null, null, null, null,
-null, null, null, null, null, null, null, null, null, null, null, null, null, };
+"\143\165\162\162\145\156\164\104\141\164\145", "\143\165\162\162\145\156\164\124\151\155\145", null, "\171\145\141\162",
+"\155\157\156\164\150", "\167\145\145\153", "\144\141\171\117\146\131\145\141\162", "\144\141\171",
+"\144\141\171\117\146\115\157\156\164\150", "\144\141\171\117\146\127\145\145\153", "\150\157\165\162",
+"\155\151\156\165\164\145", "\163\145\143\157\156\144", "\44", "\157\142\152\72", "\144\142\72",
+"\145\156\165\155\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 = {
@@ -2231,17 +2316,17 @@ public static final String[] lexStateNames = {
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, 2, -1, -1, 0, -1, -1, 0, -1, -1, -1, -1,
- -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 2,
+ -1, -1, 0, -1, -1, 0, -1, -1, -1, -1, -1, -1,
};
static final long[] jjtoToken = {
- 0x1ffffffe1fffffffL, 0x1c8L,
+ 0xfffffffe1fffffffL, 0x7207fL,
};
static final long[] jjtoSkip = {
0x1e0000000L, 0x0L,
};
static final long[] jjtoMore = {
- 0x8000000000000000L, 0x37L,
+ 0x0L, 0xde00L,
};
protected JavaCharStream input_stream;
private final int[] jjrounds = new int[74];
@@ -2433,32 +2518,32 @@ void MoreLexicalActions()
jjimageLen += (lengthOfMatch = jjmatchedPos + 1);
switch(jjmatchedKind)
{
- case 63 :
+ case 73 :
image.append(input_stream.GetSuffix(jjimageLen));
jjimageLen = 0;
stringBuffer = new StringBuffer();
break;
- case 64 :
+ case 74 :
image.append(input_stream.GetSuffix(jjimageLen));
jjimageLen = 0;
stringBuffer = new StringBuffer();
break;
- case 65 :
+ case 75 :
image.append(input_stream.GetSuffix(jjimageLen));
jjimageLen = 0;
stringBuffer.append( escapeChar() );
break;
- case 66 :
+ case 76 :
image.append(input_stream.GetSuffix(jjimageLen));
jjimageLen = 0;
stringBuffer.append( image.charAt(image.length()-1) );
break;
- case 68 :
+ case 78 :
image.append(input_stream.GetSuffix(jjimageLen));
jjimageLen = 0;
stringBuffer.append( escapeChar() );
break;
- case 69 :
+ case 79 :
image.append(input_stream.GetSuffix(jjimageLen));
jjimageLen = 0;
stringBuffer.append( image.charAt(image.length()-1) );
@@ -2471,19 +2556,19 @@ void TokenLexicalActions(Token matchedToken)
{
switch(jjmatchedKind)
{
- case 67 :
+ case 77 :
image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
literalValue = stringBuffer.toString();
break;
- case 70 :
+ case 80 :
image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
literalValue = stringBuffer.toString();
break;
- case 71 :
+ case 81 :
image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
literalValue = makeInt();
break;
- case 72 :
+ case 82 :
image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
literalValue = makeFloat();
break;
http://git-wip-us.apache.org/repos/asf/cayenne/blob/05a77250/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserTreeConstants.java
----------------------------------------------------------------------
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 b03d25e..2b8c022 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
@@ -74,9 +74,10 @@ public interface ExpressionParserTreeConstants
public int JJTCURRENTDATE = 49;
public int JJTCURRENTTIME = 50;
public int JJTCURRENTTIMESTAMP = 51;
- public int JJTNAMEDPARAMETER = 52;
- public int JJTOBJPATH = 53;
- public int JJTDBPATH = 54;
+ public int JJTEXTRACT = 52;
+ public int JJTNAMEDPARAMETER = 53;
+ public int JJTOBJPATH = 54;
+ public int JJTDBPATH = 55;
public String[] jjtNodeName = {
@@ -132,9 +133,10 @@ public interface ExpressionParserTreeConstants
"CurrentDate",
"CurrentTime",
"CurrentTimestamp",
+ "Extract",
"NamedParameter",
"ObjPath",
"DbPath",
};
}
-/* JavaCC - OriginalChecksum=7571de31b81c878cf4b5f52ebb555fb1 (do not edit this line) */
+/* JavaCC - OriginalChecksum=fa5ebea216f594b98b337cf22871715e (do not edit this line) */
http://git-wip-us.apache.org/repos/asf/cayenne/blob/05a77250/cayenne-server/src/main/jjtree/org/apache/cayenne/exp/parser/ExpressionParser.jjt
----------------------------------------------------------------------
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 f61c692..2bca76d 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
@@ -179,13 +179,13 @@ void scalarConstExpression() : {}
|
namedParameter()
|
- <INT_LITERAL> { jjtThis.setValue(token_source.literalValue); } #Scalar(0)
+ <INT_LITERAL> { jjtThis.setValue(token_source.literalValue); } #Scalar(0)
|
- <FLOAT_LITERAL>{ jjtThis.setValue(token_source.literalValue); } #Scalar(0)
+ <FLOAT_LITERAL> { jjtThis.setValue(token_source.literalValue); } #Scalar(0)
|
- <TRUE> { jjtThis.setValue(true); } #Scalar(0)
+ <TRUE> { jjtThis.setValue(true); } #Scalar(0)
|
- <FALSE> { jjtThis.setValue(false); } #Scalar(0)
+ <FALSE> { jjtThis.setValue(false); } #Scalar(0)
}
void numericExpression() : {}
@@ -314,7 +314,7 @@ void upper() #Upper : { }
void functionsReturningNumerics() : { }
{
- length() | locate() | abs() | sqrt() | mod()
+ length() | locate() | abs() | sqrt() | mod() | dateTimeExtractingFunction()
}
void length() #Length : { }
@@ -397,6 +397,27 @@ void currentTimestamp() #CurrentTimestamp : {}
<CURRENT_TIMESTAMP> "(" ")"
}
+/* Date/time parts extracting function */
+void dateTimeExtractingFunction() #Extract(1) : {
+ Token t;
+}
+{
+ (
+ t = <YEAR>
+ | t = <MONTH>
+ | t = <WEEK>
+ | t = <DAY_OF_YEAR>
+ | t = <DAY>
+ | t = <DAY_OF_MONTH>
+ | t = <DAY_OF_WEEK>
+ | t = <HOUR>
+ | t = <MINUTE>
+ | t = <SECOND>
+ ) {
+ jjtThis.setPartToken(t.image);
+ }
+ "(" pathExpression() ")"
+}
TOKEN_MGR_DECLS:
{
@@ -521,6 +542,24 @@ TOKEN : /* functions returning datetime */
| <CURRENT_TIMESTAMP: "currentTimestamp" | "now" >
}
+/*
+ Data/time parts extracting functions' names.
+ MUST be in sync with enum ASTExtract.DateTimePart.
+*/
+TOKEN :
+{
+ <YEAR: "year">
+ | <MONTH: "month">
+ | <WEEK: "week">
+ | <DAY_OF_YEAR: "dayOfYear">
+ | <DAY: "day">
+ | <DAY_OF_MONTH: "dayOfMonth">
+ | <DAY_OF_WEEK: "dayOfWeek">
+ | <HOUR: "hour">
+ | <MINUTE: "minute">
+ | <SECOND: "second">
+}
+
void namedParameter() :
{
Token t;
http://git-wip-us.apache.org/repos/asf/cayenne/blob/05a77250/cayenne-server/src/test/java/org/apache/cayenne/exp/parser/ASTCurrentDateTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/exp/parser/ASTCurrentDateTest.java b/cayenne-server/src/test/java/org/apache/cayenne/exp/parser/ASTCurrentDateTest.java
new file mode 100644
index 0000000..f3bb0aa
--- /dev/null
+++ b/cayenne-server/src/test/java/org/apache/cayenne/exp/parser/ASTCurrentDateTest.java
@@ -0,0 +1,51 @@
+/*****************************************************************
+ * 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
+ *
+ * http://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.exp.parser;
+
+import java.util.Date;
+
+import org.apache.cayenne.exp.Expression;
+import org.apache.cayenne.exp.ExpressionFactory;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @since 4.0
+ */
+public class ASTCurrentDateTest {
+
+ @Test
+ public void testParse() {
+ Expression exp2 = ExpressionFactory.exp("currentDate()");
+ assertTrue(exp2 instanceof ASTCurrentDate);
+
+ assertEquals("currentDate()", exp2.toString());
+ }
+
+ @Test
+ public void testEvaluate() {
+ Expression exp = new ASTCurrentDate();
+ Object result = exp.evaluate(new Object());
+ assertTrue(result instanceof Date);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/cayenne/blob/05a77250/cayenne-server/src/test/java/org/apache/cayenne/exp/parser/ASTCurrentTimeTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/exp/parser/ASTCurrentTimeTest.java b/cayenne-server/src/test/java/org/apache/cayenne/exp/parser/ASTCurrentTimeTest.java
new file mode 100644
index 0000000..d79b65d
--- /dev/null
+++ b/cayenne-server/src/test/java/org/apache/cayenne/exp/parser/ASTCurrentTimeTest.java
@@ -0,0 +1,50 @@
+/*****************************************************************
+ * 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
+ *
+ * http://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.exp.parser;
+
+import java.util.Date;
+
+import org.apache.cayenne.exp.Expression;
+import org.apache.cayenne.exp.ExpressionFactory;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @since 4.0
+ */
+public class ASTCurrentTimeTest {
+
+ @Test
+ public void testParse() {
+ Expression exp2 = ExpressionFactory.exp("currentTime()");
+ assertTrue(exp2 instanceof ASTCurrentTime);
+
+ assertEquals("currentTime()", exp2.toString());
+ }
+
+ @Test
+ public void testEvaluate() {
+ Expression exp = new ASTCurrentTime();
+ Object result = exp.evaluate(new Object());
+ assertTrue(result instanceof Date);
+ }
+}