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/01/24 09:21:29 UTC
[1/2] cayenne git commit: CAY-2205 Support for aggregate functions in
ExpressionParser
Repository: cayenne
Updated Branches:
refs/heads/master c24bb767e -> bbb746caa
http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbb746ca/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 79285ff..be7659e 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
@@ -20,10 +20,9 @@
package org.apache.cayenne.exp.parser;
-import java.io.*;
-import java.util.*;
-import java.math.*;
-import org.apache.cayenne.exp.*;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import org.apache.cayenne.exp.Expression;
/** Token Manager. */
public class ExpressionParserTokenManager implements ExpressionParserConstants
@@ -101,9 +100,9 @@ public class ExpressionParserTokenManager implements ExpressionParserConstants
}
/** Debug output. */
- public PrintStream debugStream = System.out;
+ public java.io.PrintStream debugStream = System.out;
/** Set debug output. */
- public void setDebugStream(PrintStream ds) { debugStream = ds; }
+ public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
private int jjStopAtPos(int pos, int kind)
{
jjmatchedKind = kind;
@@ -115,16 +114,16 @@ private int jjMoveStringLiteralDfa0_0()
switch(curChar)
{
case 9:
- jjmatchedKind = 31;
+ jjmatchedKind = 30;
return jjMoveNfa_0(3, 0);
case 10:
- jjmatchedKind = 32;
+ jjmatchedKind = 31;
return jjMoveNfa_0(3, 0);
case 13:
- jjmatchedKind = 33;
+ jjmatchedKind = 32;
return jjMoveNfa_0(3, 0);
case 32:
- jjmatchedKind = 30;
+ jjmatchedKind = 29;
return jjMoveNfa_0(3, 0);
case 33:
jjmatchedKind = 4;
@@ -133,7 +132,7 @@ private int jjMoveStringLiteralDfa0_0()
jjmatchedKind = 64;
return jjMoveNfa_0(3, 0);
case 36:
- jjmatchedKind = 55;
+ jjmatchedKind = 54;
return jjMoveNfa_0(3, 0);
case 38:
jjmatchedKind = 22;
@@ -148,7 +147,7 @@ private int jjMoveStringLiteralDfa0_0()
jjmatchedKind = 17;
return jjMoveNfa_0(3, 0);
case 42:
- jjmatchedKind = 27;
+ jjmatchedKind = 58;
return jjMoveNfa_0(3, 0);
case 43:
jjmatchedKind = 25;
@@ -160,7 +159,7 @@ private int jjMoveStringLiteralDfa0_0()
jjmatchedKind = 26;
return jjMoveNfa_0(3, 0);
case 47:
- jjmatchedKind = 28;
+ jjmatchedKind = 27;
return jjMoveNfa_0(3, 0);
case 60:
jjmatchedKind = 10;
@@ -172,53 +171,53 @@ private int jjMoveStringLiteralDfa0_0()
jjmatchedKind = 11;
return jjMoveStringLiteralDfa1_0(0x1001000L);
case 65:
- return jjMoveStringLiteralDfa1_0(0x2002000000000L);
+ return jjMoveStringLiteralDfa1_0(0x1001000000000L);
case 67:
- return jjMoveStringLiteralDfa1_0(0x70060000000000L);
+ return jjMoveStringLiteralDfa1_0(0x38030000000000L);
case 76:
- return jjMoveStringLiteralDfa1_0(0x1a00000000000L);
+ return jjMoveStringLiteralDfa1_0(0xd00000000000L);
case 77:
- return jjMoveStringLiteralDfa1_0(0x800c000000000L);
+ return jjMoveStringLiteralDfa1_0(0x4006000000000L);
case 83:
- return jjMoveStringLiteralDfa1_0(0x4090000000000L);
+ return jjMoveStringLiteralDfa1_0(0x2048000000000L);
case 84:
- return jjMoveStringLiteralDfa1_0(0x100000000000L);
+ return jjMoveStringLiteralDfa1_0(0x80000000000L);
case 85:
- return jjMoveStringLiteralDfa1_0(0x400000000000L);
+ return jjMoveStringLiteralDfa1_0(0x200000000000L);
case 94:
jjmatchedKind = 21;
return jjMoveNfa_0(3, 0);
case 97:
- return jjMoveStringLiteralDfa1_0(0x2002000000004L);
+ return jjMoveStringLiteralDfa1_0(0x1001000000004L);
case 98:
return jjMoveStringLiteralDfa1_0(0x40000L);
case 99:
- return jjMoveStringLiteralDfa1_0(0x70060000000000L);
+ return jjMoveStringLiteralDfa1_0(0x38030000000000L);
case 100:
- return jjMoveStringLiteralDfa1_0(0x200000000000000L);
+ return jjMoveStringLiteralDfa1_0(0x100000000000000L);
case 101:
- return jjMoveStringLiteralDfa1_0(0x400000000000000L);
+ return jjMoveStringLiteralDfa1_0(0x200000000000000L);
case 105:
return jjMoveStringLiteralDfa1_0(0x8000L);
case 108:
- return jjMoveStringLiteralDfa1_0(0x1a00000006000L);
+ return jjMoveStringLiteralDfa1_0(0xd00000006000L);
case 109:
- return jjMoveStringLiteralDfa1_0(0x800c000000000L);
+ return jjMoveStringLiteralDfa1_0(0x4006000000000L);
case 110:
return jjMoveStringLiteralDfa1_0(0x8L);
case 111:
- return jjMoveStringLiteralDfa1_0(0x100000000000002L);
+ return jjMoveStringLiteralDfa1_0(0x80000000000002L);
case 115:
- return jjMoveStringLiteralDfa1_0(0x4090000000000L);
+ return jjMoveStringLiteralDfa1_0(0x2048000000000L);
case 116:
- return jjMoveStringLiteralDfa1_0(0x100000000000L);
+ return jjMoveStringLiteralDfa1_0(0x80000000000L);
case 117:
- return jjMoveStringLiteralDfa1_0(0x400000000000L);
+ return jjMoveStringLiteralDfa1_0(0x200000000000L);
case 124:
jjmatchedKind = 20;
return jjMoveNfa_0(3, 0);
case 126:
- jjmatchedKind = 29;
+ jjmatchedKind = 28;
return jjMoveNfa_0(3, 0);
default :
return jjMoveNfa_0(3, 0);
@@ -227,7 +226,7 @@ private int jjMoveStringLiteralDfa0_0()
private int jjMoveStringLiteralDfa1_0(long active0)
{
try { curChar = input_stream.readChar(); }
- catch(IOException e) {
+ catch(java.io.IOException e) {
return jjMoveNfa_0(3, 0);
}
switch(curChar)
@@ -274,57 +273,57 @@ private int jjMoveStringLiteralDfa1_0(long active0)
}
break;
case 65:
- return jjMoveStringLiteralDfa2_0(active0, 0x8000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x4000000000L);
case 66:
- return jjMoveStringLiteralDfa2_0(active0, 0x2000000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x1000000000000L);
case 69:
- return jjMoveStringLiteralDfa2_0(active0, 0x800000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x400000000000L);
case 73:
- return jjMoveStringLiteralDfa2_0(active0, 0x4000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x2000000000L);
case 79:
- return jjMoveStringLiteralDfa2_0(active0, 0x9260000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x4930000000000L);
case 80:
- return jjMoveStringLiteralDfa2_0(active0, 0x400000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x200000000000L);
case 81:
- return jjMoveStringLiteralDfa2_0(active0, 0x4000000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x2000000000000L);
case 82:
- return jjMoveStringLiteralDfa2_0(active0, 0x100000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x80000000000L);
case 85:
- return jjMoveStringLiteralDfa2_0(active0, 0x70090000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x38048000000000L);
case 86:
- return jjMoveStringLiteralDfa2_0(active0, 0x2000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x1000000000L);
case 97:
- return jjMoveStringLiteralDfa2_0(active0, 0x8000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x4000000000L);
case 98:
- return jjMoveStringLiteralDfa2_0(active0, 0x302000000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x181000000000000L);
case 101:
- return jjMoveStringLiteralDfa2_0(active0, 0x800000040000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x400000040000L);
case 105:
- return jjMoveStringLiteralDfa2_0(active0, 0x4000006000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x2000006000L);
case 110:
if ((active0 & 0x8000L) != 0L)
{
jjmatchedKind = 15;
jjmatchedPos = 1;
}
- return jjMoveStringLiteralDfa2_0(active0, 0x400000000000004L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x200000000000004L);
case 111:
- return jjMoveStringLiteralDfa2_0(active0, 0x9260000000008L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x4930000000008L);
case 112:
- return jjMoveStringLiteralDfa2_0(active0, 0x400000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x200000000000L);
case 113:
- return jjMoveStringLiteralDfa2_0(active0, 0x4000000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x2000000000000L);
case 114:
if ((active0 & 0x2L) != 0L)
{
jjmatchedKind = 1;
jjmatchedPos = 1;
}
- return jjMoveStringLiteralDfa2_0(active0, 0x100000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x80000000000L);
case 117:
- return jjMoveStringLiteralDfa2_0(active0, 0x70090000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x38048000000000L);
case 118:
- return jjMoveStringLiteralDfa2_0(active0, 0x2000000000L);
+ return jjMoveStringLiteralDfa2_0(active0, 0x1000000000L);
default :
break;
}
@@ -335,125 +334,125 @@ private int jjMoveStringLiteralDfa2_0(long old0, long active0)
if (((active0 &= old0)) == 0L)
return jjMoveNfa_0(3, 1);
try { curChar = input_stream.readChar(); }
- catch(IOException e) {
+ catch(java.io.IOException e) {
return jjMoveNfa_0(3, 1);
}
switch(curChar)
{
case 58:
- if ((active0 & 0x200000000000000L) != 0L)
+ if ((active0 & 0x100000000000000L) != 0L)
{
- jjmatchedKind = 57;
+ jjmatchedKind = 56;
jjmatchedPos = 2;
}
break;
case 66:
- return jjMoveStringLiteralDfa3_0(active0, 0x80000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x40000000000L);
case 67:
- return jjMoveStringLiteralDfa3_0(active0, 0x1000000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x800000000000L);
case 68:
- if ((active0 & 0x8000000000000L) != 0L)
+ if ((active0 & 0x4000000000000L) != 0L)
{
- jjmatchedKind = 51;
+ jjmatchedKind = 50;
jjmatchedPos = 2;
}
break;
case 71:
- if ((active0 & 0x2000000000L) != 0L)
+ if ((active0 & 0x1000000000L) != 0L)
{
- jjmatchedKind = 37;
+ jjmatchedKind = 36;
jjmatchedPos = 2;
}
break;
case 73:
- return jjMoveStringLiteralDfa3_0(active0, 0x100000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x80000000000L);
case 77:
- if ((active0 & 0x10000000000L) != 0L)
+ if ((active0 & 0x8000000000L) != 0L)
{
- jjmatchedKind = 40;
+ jjmatchedKind = 39;
jjmatchedPos = 2;
}
break;
case 78:
- if ((active0 & 0x4000000000L) != 0L)
+ if ((active0 & 0x2000000000L) != 0L)
{
- jjmatchedKind = 38;
+ jjmatchedKind = 37;
jjmatchedPos = 2;
}
- return jjMoveStringLiteralDfa3_0(active0, 0x840000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x420000000000L);
case 80:
- return jjMoveStringLiteralDfa3_0(active0, 0x400000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x200000000000L);
case 82:
- return jjMoveStringLiteralDfa3_0(active0, 0x74000000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x3a000000000000L);
case 83:
- if ((active0 & 0x2000000000000L) != 0L)
+ if ((active0 & 0x1000000000000L) != 0L)
{
- jjmatchedKind = 49;
+ jjmatchedKind = 48;
jjmatchedPos = 2;
}
break;
case 85:
- return jjMoveStringLiteralDfa3_0(active0, 0x20000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x10000000000L);
case 87:
- return jjMoveStringLiteralDfa3_0(active0, 0x200000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x100000000000L);
case 88:
- if ((active0 & 0x8000000000L) != 0L)
+ if ((active0 & 0x4000000000L) != 0L)
{
- jjmatchedKind = 39;
+ jjmatchedKind = 38;
jjmatchedPos = 2;
}
break;
case 98:
- return jjMoveStringLiteralDfa3_0(active0, 0x80000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x40000000000L);
case 99:
- return jjMoveStringLiteralDfa3_0(active0, 0x1000000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x800000000000L);
case 100:
if ((active0 & 0x4L) != 0L)
{
jjmatchedKind = 2;
jjmatchedPos = 2;
}
- else if ((active0 & 0x8000000000000L) != 0L)
+ else if ((active0 & 0x4000000000000L) != 0L)
{
- jjmatchedKind = 51;
+ jjmatchedKind = 50;
jjmatchedPos = 2;
}
break;
case 103:
- if ((active0 & 0x2000000000L) != 0L)
+ if ((active0 & 0x1000000000L) != 0L)
{
- jjmatchedKind = 37;
+ jjmatchedKind = 36;
jjmatchedPos = 2;
}
break;
case 105:
- return jjMoveStringLiteralDfa3_0(active0, 0x100000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x80000000000L);
case 106:
- return jjMoveStringLiteralDfa3_0(active0, 0x100000000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x80000000000000L);
case 107:
return jjMoveStringLiteralDfa3_0(active0, 0x6000L);
case 109:
- if ((active0 & 0x10000000000L) != 0L)
+ if ((active0 & 0x8000000000L) != 0L)
{
- jjmatchedKind = 40;
+ jjmatchedKind = 39;
jjmatchedPos = 2;
}
break;
case 110:
- if ((active0 & 0x4000000000L) != 0L)
+ if ((active0 & 0x2000000000L) != 0L)
{
- jjmatchedKind = 38;
+ jjmatchedKind = 37;
jjmatchedPos = 2;
}
- return jjMoveStringLiteralDfa3_0(active0, 0x840000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x420000000000L);
case 112:
- return jjMoveStringLiteralDfa3_0(active0, 0x400000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x200000000000L);
case 114:
- return jjMoveStringLiteralDfa3_0(active0, 0x74000000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x3a000000000000L);
case 115:
- if ((active0 & 0x2000000000000L) != 0L)
+ if ((active0 & 0x1000000000000L) != 0L)
{
- jjmatchedKind = 49;
+ jjmatchedKind = 48;
jjmatchedPos = 2;
}
break;
@@ -465,13 +464,13 @@ private int jjMoveStringLiteralDfa2_0(long old0, long active0)
}
return jjMoveStringLiteralDfa3_0(active0, 0x40000L);
case 117:
- return jjMoveStringLiteralDfa3_0(active0, 0x400020000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x200010000000000L);
case 119:
- return jjMoveStringLiteralDfa3_0(active0, 0x200000000000L);
+ return jjMoveStringLiteralDfa3_0(active0, 0x100000000000L);
case 120:
- if ((active0 & 0x8000000000L) != 0L)
+ if ((active0 & 0x4000000000L) != 0L)
{
- jjmatchedKind = 39;
+ jjmatchedKind = 38;
jjmatchedPos = 2;
}
break;
@@ -485,76 +484,76 @@ private int jjMoveStringLiteralDfa3_0(long old0, long active0)
if (((active0 &= old0)) == 0L)
return jjMoveNfa_0(3, 2);
try { curChar = input_stream.readChar(); }
- catch(IOException e) {
+ catch(java.io.IOException e) {
return jjMoveNfa_0(3, 2);
}
switch(curChar)
{
case 58:
- if ((active0 & 0x100000000000000L) != 0L)
+ if ((active0 & 0x80000000000000L) != 0L)
{
- jjmatchedKind = 56;
+ jjmatchedKind = 55;
jjmatchedPos = 3;
}
break;
case 65:
- return jjMoveStringLiteralDfa4_0(active0, 0x1000000000000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0x800000000000L);
case 67:
- return jjMoveStringLiteralDfa4_0(active0, 0x40000000000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0x20000000000L);
case 69:
- return jjMoveStringLiteralDfa4_0(active0, 0x600000000000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0x300000000000L);
case 71:
- return jjMoveStringLiteralDfa4_0(active0, 0x800000000000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0x400000000000L);
case 77:
- if ((active0 & 0x100000000000L) != 0L)
+ if ((active0 & 0x80000000000L) != 0L)
{
- jjmatchedKind = 44;
+ jjmatchedKind = 43;
jjmatchedPos = 3;
}
break;
case 78:
- return jjMoveStringLiteralDfa4_0(active0, 0x20000000000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0x10000000000L);
case 82:
- return jjMoveStringLiteralDfa4_0(active0, 0x70000000000000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0x38000000000000L);
case 83:
- return jjMoveStringLiteralDfa4_0(active0, 0x80000000000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0x40000000000L);
case 84:
- if ((active0 & 0x4000000000000L) != 0L)
+ if ((active0 & 0x2000000000000L) != 0L)
{
- jjmatchedKind = 50;
+ jjmatchedKind = 49;
jjmatchedPos = 3;
}
break;
case 97:
- return jjMoveStringLiteralDfa4_0(active0, 0x1000000000000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0x800000000000L);
case 99:
- return jjMoveStringLiteralDfa4_0(active0, 0x40000000000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0x20000000000L);
case 101:
if ((active0 & 0x2000L) != 0L)
{
jjmatchedKind = 13;
jjmatchedPos = 3;
}
- return jjMoveStringLiteralDfa4_0(active0, 0x600000004000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0x300000004000L);
case 103:
- return jjMoveStringLiteralDfa4_0(active0, 0x800000000000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0x400000000000L);
case 109:
- if ((active0 & 0x100000000000L) != 0L)
+ if ((active0 & 0x80000000000L) != 0L)
{
- jjmatchedKind = 44;
+ jjmatchedKind = 43;
jjmatchedPos = 3;
}
- return jjMoveStringLiteralDfa4_0(active0, 0x400000000000000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0x200000000000000L);
case 110:
- return jjMoveStringLiteralDfa4_0(active0, 0x20000000000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0x10000000000L);
case 114:
- return jjMoveStringLiteralDfa4_0(active0, 0x70000000000000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0x38000000000000L);
case 115:
- return jjMoveStringLiteralDfa4_0(active0, 0x80000000000L);
+ return jjMoveStringLiteralDfa4_0(active0, 0x40000000000L);
case 116:
- if ((active0 & 0x4000000000000L) != 0L)
+ if ((active0 & 0x2000000000000L) != 0L)
{
- jjmatchedKind = 50;
+ jjmatchedKind = 49;
jjmatchedPos = 3;
}
break;
@@ -570,66 +569,66 @@ private int jjMoveStringLiteralDfa4_0(long old0, long active0)
if (((active0 &= old0)) == 0L)
return jjMoveNfa_0(3, 3);
try { curChar = input_stream.readChar(); }
- catch(IOException e) {
+ catch(java.io.IOException e) {
return jjMoveNfa_0(3, 3);
}
switch(curChar)
{
case 58:
- if ((active0 & 0x400000000000000L) != 0L)
+ if ((active0 & 0x200000000000000L) != 0L)
{
- jjmatchedKind = 58;
+ jjmatchedKind = 57;
jjmatchedPos = 4;
}
break;
case 65:
- return jjMoveStringLiteralDfa5_0(active0, 0x40000000000L);
+ return jjMoveStringLiteralDfa5_0(active0, 0x20000000000L);
case 69:
- return jjMoveStringLiteralDfa5_0(active0, 0x70000000000000L);
+ return jjMoveStringLiteralDfa5_0(active0, 0x38000000000000L);
case 73:
return jjMoveStringLiteralDfa5_0(active0, 0x4000L);
case 82:
- if ((active0 & 0x200000000000L) != 0L)
+ if ((active0 & 0x100000000000L) != 0L)
{
- jjmatchedKind = 45;
+ jjmatchedKind = 44;
jjmatchedPos = 4;
}
- else if ((active0 & 0x400000000000L) != 0L)
+ else if ((active0 & 0x200000000000L) != 0L)
{
- jjmatchedKind = 46;
+ jjmatchedKind = 45;
jjmatchedPos = 4;
}
break;
case 84:
- if ((active0 & 0x20000000000L) != 0L)
+ if ((active0 & 0x10000000000L) != 0L)
{
- jjmatchedKind = 41;
+ jjmatchedKind = 40;
jjmatchedPos = 4;
}
- return jjMoveStringLiteralDfa5_0(active0, 0x1880000000000L);
+ return jjMoveStringLiteralDfa5_0(active0, 0xc40000000000L);
case 97:
- return jjMoveStringLiteralDfa5_0(active0, 0x40000000000L);
+ return jjMoveStringLiteralDfa5_0(active0, 0x20000000000L);
case 101:
- return jjMoveStringLiteralDfa5_0(active0, 0x70000000040000L);
+ return jjMoveStringLiteralDfa5_0(active0, 0x38000000040000L);
case 114:
- if ((active0 & 0x200000000000L) != 0L)
+ if ((active0 & 0x100000000000L) != 0L)
{
- jjmatchedKind = 45;
+ jjmatchedKind = 44;
jjmatchedPos = 4;
}
- else if ((active0 & 0x400000000000L) != 0L)
+ else if ((active0 & 0x200000000000L) != 0L)
{
- jjmatchedKind = 46;
+ jjmatchedKind = 45;
jjmatchedPos = 4;
}
break;
case 116:
- if ((active0 & 0x20000000000L) != 0L)
+ if ((active0 & 0x10000000000L) != 0L)
{
- jjmatchedKind = 41;
+ jjmatchedKind = 40;
jjmatchedPos = 4;
}
- return jjMoveStringLiteralDfa5_0(active0, 0x1880000000000L);
+ return jjMoveStringLiteralDfa5_0(active0, 0xc40000000000L);
default :
break;
}
@@ -640,60 +639,60 @@ private int jjMoveStringLiteralDfa5_0(long old0, long active0)
if (((active0 &= old0)) == 0L)
return jjMoveNfa_0(3, 4);
try { curChar = input_stream.readChar(); }
- catch(IOException e) {
+ catch(java.io.IOException e) {
return jjMoveNfa_0(3, 4);
}
switch(curChar)
{
case 69:
- if ((active0 & 0x1000000000000L) != 0L)
+ if ((active0 & 0x800000000000L) != 0L)
{
- jjmatchedKind = 48;
+ jjmatchedKind = 47;
jjmatchedPos = 5;
}
break;
case 72:
- if ((active0 & 0x800000000000L) != 0L)
+ if ((active0 & 0x400000000000L) != 0L)
{
- jjmatchedKind = 47;
+ jjmatchedKind = 46;
jjmatchedPos = 5;
}
break;
case 78:
- return jjMoveStringLiteralDfa6_0(active0, 0x70000000000000L);
+ return jjMoveStringLiteralDfa6_0(active0, 0x38000000000000L);
case 82:
- return jjMoveStringLiteralDfa6_0(active0, 0x80000000000L);
+ return jjMoveStringLiteralDfa6_0(active0, 0x40000000000L);
case 84:
- if ((active0 & 0x40000000000L) != 0L)
+ if ((active0 & 0x20000000000L) != 0L)
{
- jjmatchedKind = 42;
+ jjmatchedKind = 41;
jjmatchedPos = 5;
}
break;
case 101:
- if ((active0 & 0x1000000000000L) != 0L)
+ if ((active0 & 0x800000000000L) != 0L)
{
- jjmatchedKind = 48;
+ jjmatchedKind = 47;
jjmatchedPos = 5;
}
return jjMoveStringLiteralDfa6_0(active0, 0x40000L);
case 103:
return jjMoveStringLiteralDfa6_0(active0, 0x4000L);
case 104:
- if ((active0 & 0x800000000000L) != 0L)
+ if ((active0 & 0x400000000000L) != 0L)
{
- jjmatchedKind = 47;
+ jjmatchedKind = 46;
jjmatchedPos = 5;
}
break;
case 110:
- return jjMoveStringLiteralDfa6_0(active0, 0x70000000000000L);
+ return jjMoveStringLiteralDfa6_0(active0, 0x38000000000000L);
case 114:
- return jjMoveStringLiteralDfa6_0(active0, 0x80000000000L);
+ return jjMoveStringLiteralDfa6_0(active0, 0x40000000000L);
case 116:
- if ((active0 & 0x40000000000L) != 0L)
+ if ((active0 & 0x20000000000L) != 0L)
{
- jjmatchedKind = 42;
+ jjmatchedKind = 41;
jjmatchedPos = 5;
}
break;
@@ -707,17 +706,17 @@ private int jjMoveStringLiteralDfa6_0(long old0, long active0)
if (((active0 &= old0)) == 0L)
return jjMoveNfa_0(3, 5);
try { curChar = input_stream.readChar(); }
- catch(IOException e) {
+ catch(java.io.IOException e) {
return jjMoveNfa_0(3, 5);
}
switch(curChar)
{
case 73:
- return jjMoveStringLiteralDfa7_0(active0, 0x80000000000L);
+ return jjMoveStringLiteralDfa7_0(active0, 0x40000000000L);
case 84:
- return jjMoveStringLiteralDfa7_0(active0, 0x70000000000000L);
+ return jjMoveStringLiteralDfa7_0(active0, 0x38000000000000L);
case 105:
- return jjMoveStringLiteralDfa7_0(active0, 0x80000000000L);
+ return jjMoveStringLiteralDfa7_0(active0, 0x40000000000L);
case 110:
if ((active0 & 0x40000L) != 0L)
{
@@ -726,7 +725,7 @@ private int jjMoveStringLiteralDfa6_0(long old0, long active0)
}
return jjMoveStringLiteralDfa7_0(active0, 0x4000L);
case 116:
- return jjMoveStringLiteralDfa7_0(active0, 0x70000000000000L);
+ return jjMoveStringLiteralDfa7_0(active0, 0x38000000000000L);
default :
break;
}
@@ -737,17 +736,17 @@ private int jjMoveStringLiteralDfa7_0(long old0, long active0)
if (((active0 &= old0)) == 0L)
return jjMoveNfa_0(3, 6);
try { curChar = input_stream.readChar(); }
- catch(IOException e) {
+ catch(java.io.IOException e) {
return jjMoveNfa_0(3, 6);
}
switch(curChar)
{
case 78:
- return jjMoveStringLiteralDfa8_0(active0, 0x80000000000L);
+ return jjMoveStringLiteralDfa8_0(active0, 0x40000000000L);
case 95:
- return jjMoveStringLiteralDfa8_0(active0, 0x70000000000000L);
+ return jjMoveStringLiteralDfa8_0(active0, 0x38000000000000L);
case 110:
- return jjMoveStringLiteralDfa8_0(active0, 0x80000000000L);
+ return jjMoveStringLiteralDfa8_0(active0, 0x40000000000L);
case 111:
return jjMoveStringLiteralDfa8_0(active0, 0x4000L);
default :
@@ -760,35 +759,35 @@ private int jjMoveStringLiteralDfa8_0(long old0, long active0)
if (((active0 &= old0)) == 0L)
return jjMoveNfa_0(3, 7);
try { curChar = input_stream.readChar(); }
- catch(IOException e) {
+ catch(java.io.IOException e) {
return jjMoveNfa_0(3, 7);
}
switch(curChar)
{
case 68:
- return jjMoveStringLiteralDfa9_0(active0, 0x10000000000000L);
+ return jjMoveStringLiteralDfa9_0(active0, 0x8000000000000L);
case 71:
- if ((active0 & 0x80000000000L) != 0L)
+ if ((active0 & 0x40000000000L) != 0L)
{
- jjmatchedKind = 43;
+ jjmatchedKind = 42;
jjmatchedPos = 8;
}
break;
case 84:
- return jjMoveStringLiteralDfa9_0(active0, 0x60000000000000L);
+ return jjMoveStringLiteralDfa9_0(active0, 0x30000000000000L);
case 100:
- return jjMoveStringLiteralDfa9_0(active0, 0x10000000000000L);
+ return jjMoveStringLiteralDfa9_0(active0, 0x8000000000000L);
case 103:
- if ((active0 & 0x80000000000L) != 0L)
+ if ((active0 & 0x40000000000L) != 0L)
{
- jjmatchedKind = 43;
+ jjmatchedKind = 42;
jjmatchedPos = 8;
}
break;
case 114:
return jjMoveStringLiteralDfa9_0(active0, 0x4000L);
case 116:
- return jjMoveStringLiteralDfa9_0(active0, 0x60000000000000L);
+ return jjMoveStringLiteralDfa9_0(active0, 0x30000000000000L);
default :
break;
}
@@ -799,21 +798,21 @@ private int jjMoveStringLiteralDfa9_0(long old0, long active0)
if (((active0 &= old0)) == 0L)
return jjMoveNfa_0(3, 8);
try { curChar = input_stream.readChar(); }
- catch(IOException e) {
+ catch(java.io.IOException e) {
return jjMoveNfa_0(3, 8);
}
switch(curChar)
{
case 65:
- return jjMoveStringLiteralDfa10_0(active0, 0x10000000000000L);
+ return jjMoveStringLiteralDfa10_0(active0, 0x8000000000000L);
case 73:
- return jjMoveStringLiteralDfa10_0(active0, 0x60000000000000L);
+ return jjMoveStringLiteralDfa10_0(active0, 0x30000000000000L);
case 97:
- return jjMoveStringLiteralDfa10_0(active0, 0x10000000000000L);
+ return jjMoveStringLiteralDfa10_0(active0, 0x8000000000000L);
case 101:
return jjMoveStringLiteralDfa10_0(active0, 0x4000L);
case 105:
- return jjMoveStringLiteralDfa10_0(active0, 0x60000000000000L);
+ return jjMoveStringLiteralDfa10_0(active0, 0x30000000000000L);
default :
break;
}
@@ -824,7 +823,7 @@ private int jjMoveStringLiteralDfa10_0(long old0, long active0)
if (((active0 &= old0)) == 0L)
return jjMoveNfa_0(3, 9);
try { curChar = input_stream.readChar(); }
- catch(IOException e) {
+ catch(java.io.IOException e) {
return jjMoveNfa_0(3, 9);
}
switch(curChar)
@@ -832,13 +831,13 @@ private int jjMoveStringLiteralDfa10_0(long old0, long active0)
case 67:
return jjMoveStringLiteralDfa11_0(active0, 0x4000L);
case 77:
- return jjMoveStringLiteralDfa11_0(active0, 0x60000000000000L);
+ return jjMoveStringLiteralDfa11_0(active0, 0x30000000000000L);
case 84:
- return jjMoveStringLiteralDfa11_0(active0, 0x10000000000000L);
+ return jjMoveStringLiteralDfa11_0(active0, 0x8000000000000L);
case 109:
- return jjMoveStringLiteralDfa11_0(active0, 0x60000000000000L);
+ return jjMoveStringLiteralDfa11_0(active0, 0x30000000000000L);
case 116:
- return jjMoveStringLiteralDfa11_0(active0, 0x10000000000000L);
+ return jjMoveStringLiteralDfa11_0(active0, 0x8000000000000L);
default :
break;
}
@@ -849,37 +848,37 @@ private int jjMoveStringLiteralDfa11_0(long old0, long active0)
if (((active0 &= old0)) == 0L)
return jjMoveNfa_0(3, 10);
try { curChar = input_stream.readChar(); }
- catch(IOException e) {
+ catch(java.io.IOException e) {
return jjMoveNfa_0(3, 10);
}
switch(curChar)
{
case 69:
- if ((active0 & 0x10000000000000L) != 0L)
+ if ((active0 & 0x8000000000000L) != 0L)
{
- jjmatchedKind = 52;
+ jjmatchedKind = 51;
jjmatchedPos = 11;
}
- else if ((active0 & 0x20000000000000L) != 0L)
+ else if ((active0 & 0x10000000000000L) != 0L)
{
- jjmatchedKind = 53;
+ jjmatchedKind = 52;
jjmatchedPos = 11;
}
- return jjMoveStringLiteralDfa12_0(active0, 0x40000000000000L);
+ return jjMoveStringLiteralDfa12_0(active0, 0x20000000000000L);
case 97:
return jjMoveStringLiteralDfa12_0(active0, 0x4000L);
case 101:
- if ((active0 & 0x10000000000000L) != 0L)
+ if ((active0 & 0x8000000000000L) != 0L)
{
- jjmatchedKind = 52;
+ jjmatchedKind = 51;
jjmatchedPos = 11;
}
- else if ((active0 & 0x20000000000000L) != 0L)
+ else if ((active0 & 0x10000000000000L) != 0L)
{
- jjmatchedKind = 53;
+ jjmatchedKind = 52;
jjmatchedPos = 11;
}
- return jjMoveStringLiteralDfa12_0(active0, 0x40000000000000L);
+ return jjMoveStringLiteralDfa12_0(active0, 0x20000000000000L);
default :
break;
}
@@ -890,15 +889,15 @@ private int jjMoveStringLiteralDfa12_0(long old0, long active0)
if (((active0 &= old0)) == 0L)
return jjMoveNfa_0(3, 11);
try { curChar = input_stream.readChar(); }
- catch(IOException e) {
+ catch(java.io.IOException e) {
return jjMoveNfa_0(3, 11);
}
switch(curChar)
{
case 83:
- return jjMoveStringLiteralDfa13_0(active0, 0x40000000000000L);
+ return jjMoveStringLiteralDfa13_0(active0, 0x20000000000000L);
case 115:
- return jjMoveStringLiteralDfa13_0(active0, 0x40000000004000L);
+ return jjMoveStringLiteralDfa13_0(active0, 0x20000000004000L);
default :
break;
}
@@ -909,13 +908,13 @@ private int jjMoveStringLiteralDfa13_0(long old0, long active0)
if (((active0 &= old0)) == 0L)
return jjMoveNfa_0(3, 12);
try { curChar = input_stream.readChar(); }
- catch(IOException e) {
+ catch(java.io.IOException e) {
return jjMoveNfa_0(3, 12);
}
switch(curChar)
{
case 84:
- return jjMoveStringLiteralDfa14_0(active0, 0x40000000000000L);
+ return jjMoveStringLiteralDfa14_0(active0, 0x20000000000000L);
case 101:
if ((active0 & 0x4000L) != 0L)
{
@@ -924,7 +923,7 @@ private int jjMoveStringLiteralDfa13_0(long old0, long active0)
}
break;
case 116:
- return jjMoveStringLiteralDfa14_0(active0, 0x40000000000000L);
+ return jjMoveStringLiteralDfa14_0(active0, 0x20000000000000L);
default :
break;
}
@@ -935,15 +934,15 @@ private int jjMoveStringLiteralDfa14_0(long old0, long active0)
if (((active0 &= old0)) == 0L)
return jjMoveNfa_0(3, 13);
try { curChar = input_stream.readChar(); }
- catch(IOException e) {
+ catch(java.io.IOException e) {
return jjMoveNfa_0(3, 13);
}
switch(curChar)
{
case 65:
- return jjMoveStringLiteralDfa15_0(active0, 0x40000000000000L);
+ return jjMoveStringLiteralDfa15_0(active0, 0x20000000000000L);
case 97:
- return jjMoveStringLiteralDfa15_0(active0, 0x40000000000000L);
+ return jjMoveStringLiteralDfa15_0(active0, 0x20000000000000L);
default :
break;
}
@@ -954,15 +953,15 @@ private int jjMoveStringLiteralDfa15_0(long old0, long active0)
if (((active0 &= old0)) == 0L)
return jjMoveNfa_0(3, 14);
try { curChar = input_stream.readChar(); }
- catch(IOException e) {
+ catch(java.io.IOException e) {
return jjMoveNfa_0(3, 14);
}
switch(curChar)
{
case 77:
- return jjMoveStringLiteralDfa16_0(active0, 0x40000000000000L);
+ return jjMoveStringLiteralDfa16_0(active0, 0x20000000000000L);
case 109:
- return jjMoveStringLiteralDfa16_0(active0, 0x40000000000000L);
+ return jjMoveStringLiteralDfa16_0(active0, 0x20000000000000L);
default :
break;
}
@@ -973,22 +972,22 @@ private int jjMoveStringLiteralDfa16_0(long old0, long active0)
if (((active0 &= old0)) == 0L)
return jjMoveNfa_0(3, 15);
try { curChar = input_stream.readChar(); }
- catch(IOException e) {
+ catch(java.io.IOException e) {
return jjMoveNfa_0(3, 15);
}
switch(curChar)
{
case 80:
- if ((active0 & 0x40000000000000L) != 0L)
+ if ((active0 & 0x20000000000000L) != 0L)
{
- jjmatchedKind = 54;
+ jjmatchedKind = 53;
jjmatchedPos = 16;
}
break;
case 112:
- if ((active0 & 0x40000000000000L) != 0L)
+ if ((active0 & 0x20000000000000L) != 0L)
{
- jjmatchedKind = 54;
+ jjmatchedKind = 53;
jjmatchedPos = 16;
}
break;
@@ -1004,7 +1003,7 @@ private int jjMoveNfa_0(int startState, int curPos)
int seenUpto;
input_stream.backup(seenUpto = curPos + 1);
try { curChar = input_stream.readChar(); }
- catch(IOException e) { throw new Error("Internal Error"); }
+ catch(java.io.IOException e) { throw new Error("Internal Error"); }
curPos = 0;
int startsAt = 0;
jjnewStateCnt = 56;
@@ -1206,8 +1205,8 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 2;
break;
case 0:
- if (curChar == 108 && kind > 34)
- kind = 34;
+ if (curChar == 108 && kind > 33)
+ kind = 33;
break;
case 1:
if (curChar == 108)
@@ -1218,8 +1217,8 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 1;
break;
case 4:
- if (curChar == 76 && kind > 34)
- kind = 34;
+ if (curChar == 76 && kind > 33)
+ kind = 33;
break;
case 5:
if (curChar == 76)
@@ -1234,8 +1233,8 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 6;
break;
case 8:
- if (curChar == 101 && kind > 35)
- kind = 35;
+ if (curChar == 101 && kind > 34)
+ kind = 34;
break;
case 9:
if (curChar == 117)
@@ -1250,8 +1249,8 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 10;
break;
case 12:
- if (curChar == 69 && kind > 35)
- kind = 35;
+ if (curChar == 69 && kind > 34)
+ kind = 34;
break;
case 13:
if (curChar == 85)
@@ -1266,8 +1265,8 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 14;
break;
case 16:
- if (curChar == 101 && kind > 36)
- kind = 36;
+ if (curChar == 101 && kind > 35)
+ kind = 35;
break;
case 17:
if (curChar == 115)
@@ -1286,8 +1285,8 @@ private int jjMoveNfa_0(int startState, int curPos)
jjstateSet[jjnewStateCnt++] = 19;
break;
case 21:
- if (curChar == 69 && kind > 36)
- kind = 36;
+ if (curChar == 69 && kind > 35)
+ kind = 35;
break;
case 22:
if (curChar == 83)
@@ -1390,7 +1389,7 @@ private int jjMoveNfa_0(int startState, int curPos)
if ((i = jjnewStateCnt) == (startsAt = 56 - (jjnewStateCnt = startsAt)))
break;
try { curChar = input_stream.readChar(); }
- catch(IOException e) { break; }
+ catch(java.io.IOException e) { break; }
}
if (jjmatchedPos > strPos)
return curPos;
@@ -1400,7 +1399,7 @@ private int jjMoveNfa_0(int startState, int curPos)
if (curPos < toRet)
for (i = toRet - Math.min(curPos, seenUpto); i-- > 0; )
try { curChar = input_stream.readChar(); }
- catch(IOException e) { throw new Error("Internal Error : Please send a bug report."); }
+ catch(java.io.IOException e) { throw new Error("Internal Error : Please send a bug report."); }
if (jjmatchedPos < strPos)
{
@@ -1542,7 +1541,7 @@ private int jjMoveNfa_1(int startState, int curPos)
if ((i = jjnewStateCnt) == (startsAt = 6 - (jjnewStateCnt = startsAt)))
return curPos;
try { curChar = input_stream.readChar(); }
- catch(IOException e) { return curPos; }
+ catch(java.io.IOException e) { return curPos; }
}
}
private final int jjStopStringLiteralDfa_2(int pos, long active0, long active1)
@@ -1669,7 +1668,7 @@ private int jjMoveNfa_2(int startState, int curPos)
if ((i = jjnewStateCnt) == (startsAt = 6 - (jjnewStateCnt = startsAt)))
return curPos;
try { curChar = input_stream.readChar(); }
- catch(IOException e) { return curPos; }
+ catch(java.io.IOException e) { return curPos; }
}
}
static final int[] jjnextStates = {
@@ -1695,11 +1694,11 @@ public static final String[] jjstrLiteralImages = {
"", "\157\162", "\141\156\144", "\156\157\164", "\41", "\75", "\75\75",
"\41\75", "\74\76", "\74\75", "\74", "\76", "\76\75", "\154\151\153\145",
"\154\151\153\145\111\147\156\157\162\145\103\141\163\145", "\151\156", "\50", "\51", "\142\145\164\167\145\145\156", "\54", "\174",
-"\136", "\46", "\74\74", "\76\76", "\53", "\55", "\52", "\57", "\176", null, null,
+"\136", "\46", "\74\74", "\76\76", "\53", "\55", "\57", "\176", null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null,
-null, null, null, null, null, null, null, null, null, "\44", "\157\142\152\72",
-"\144\142\72", "\145\156\165\155\72", null, null, null, null, null, null, null, null, null,
-null, null, null, null, null, null, null, null, null, };
+null, null, null, null, null, null, null, "\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 = {
@@ -1716,10 +1715,10 @@ public static final int[] jjnewLexState = {
-1, -1,
};
static final long[] jjtoToken = {
- 0x1ffffffc3fffffffL, 0x1c8L,
+ 0x1ffffffe1fffffffL, 0x1c8L,
};
static final long[] jjtoSkip = {
- 0x3c0000000L, 0x0L,
+ 0x1e0000000L, 0x0L,
};
static final long[] jjtoMore = {
0x8000000000000000L, 0x37L,
@@ -1821,7 +1820,7 @@ public Token getNextToken()
{
curChar = input_stream.BeginToken();
}
- catch(IOException e)
+ catch(java.io.IOException e)
{
jjmatchedKind = 0;
matchedToken = jjFillToken();
@@ -1878,14 +1877,14 @@ public Token getNextToken()
curChar = input_stream.readChar();
continue;
}
- catch (IOException e1) { }
+ catch (java.io.IOException e1) { }
}
int error_line = input_stream.getEndLine();
int error_column = input_stream.getEndColumn();
String error_after = null;
boolean EOFSeen = false;
try { input_stream.readChar(); input_stream.backup(1); }
- catch (IOException e1) {
+ catch (java.io.IOException e1) {
EOFSeen = true;
error_after = curPos <= 1 ? "" : input_stream.GetImage();
if (curChar == '\n' || curChar == '\r') {
http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbb746ca/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 62fa5a3..3de9230 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
@@ -65,9 +65,15 @@ public interface ExpressionParserTreeConstants
public int JJTABS = 40;
public int JJTSQRT = 41;
public int JJTMOD = 42;
- public int JJTNAMEDPARAMETER = 43;
- public int JJTOBJPATH = 44;
- public int JJTDBPATH = 45;
+ public int JJTASTERISK = 43;
+ public int JJTCOUNT = 44;
+ public int JJTAVG = 45;
+ public int JJTMAX = 46;
+ public int JJTMIN = 47;
+ public int JJTSUM = 48;
+ public int JJTNAMEDPARAMETER = 49;
+ public int JJTOBJPATH = 50;
+ public int JJTDBPATH = 51;
public String[] jjtNodeName = {
@@ -114,9 +120,15 @@ public interface ExpressionParserTreeConstants
"Abs",
"Sqrt",
"Mod",
+ "Asterisk",
+ "Count",
+ "Avg",
+ "Max",
+ "Min",
+ "Sum",
"NamedParameter",
"ObjPath",
"DbPath",
};
}
-/* JavaCC - OriginalChecksum=3658f423e33338225cd28f666e76c706 (do not edit this line) */
+/* JavaCC - OriginalChecksum=0fe59a033c5f411d1c7cc0cc441fabf6 (do not edit this line) */
http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbb746ca/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 16e443b..033d9eb 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
@@ -34,10 +34,9 @@ PARSER_BEGIN(ExpressionParser)
package org.apache.cayenne.exp.parser;
-import java.io.*;
-import java.util.*;
-import java.math.*;
-import org.apache.cayenne.exp.*;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import org.apache.cayenne.exp.Expression;
/**
* Parser of Cayenne Expressions.
@@ -141,6 +140,8 @@ void conditionExpression() : {}
stringExpression()
|
<NULL> #Scalar(0)
+ |
+ aggregateExpression()
}
void stringParameter() : {}
@@ -239,7 +240,7 @@ void multiplySubtractExp() : {}
{
numericTermExt()
(
- "*" numericTermExt() #Multiply(2)
+ <ASTERISK> numericTermExt() #Multiply(2)
|
"/" numericTermExt() #Divide(2)
)*
@@ -286,7 +287,7 @@ void functionsReturningStrings() : { }
void concat() #Concat : { }
{
- <CONCAT> "(" stringParameter() "," stringParameter() ")"
+ <CONCAT> "(" stringParameter() ( "," stringParameter() )* ")"
}
void substring() #Substring : { }
@@ -339,6 +340,41 @@ void mod() #Mod : { }
<MOD> "(" numericExpression() "," numericExpression() ")"
}
+void aggregateExpression() : { }
+{
+ (avg() | max() | min() | sum() | count())
+}
+
+void asterisk() #Asterisk : {}
+{
+ <ASTERISK>
+}
+
+void count() #Count : { }
+{
+ <COUNT> "(" ( asterisk() | numericExpression() ) ")"
+}
+
+void avg() #Avg : { }
+{
+ <AVG> "(" numericExpression() ")"
+}
+
+void max() #Max : { }
+{
+ <MAX> "(" numericExpression() ")"
+}
+
+void min() #Min : { }
+{
+ <MIN> "(" numericExpression() ")"
+}
+
+void sum() #Sum : { }
+{
+ <SUM> "(" numericExpression() ")"
+}
+
TOKEN_MGR_DECLS:
{
@@ -487,6 +523,10 @@ void pathExpression() : {
}
TOKEN : {
+ <ASTERISK: "*">
+}
+
+TOKEN : {
<PROPERTY_PATH: <IDENTIFIER> ( "." <IDENTIFIER>) *>
}
http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbb746ca/cayenne-server/src/test/java/org/apache/cayenne/exp/parser/ASTAggregateTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/exp/parser/ASTAggregateTest.java b/cayenne-server/src/test/java/org/apache/cayenne/exp/parser/ASTAggregateTest.java
index 87ec3bf..496e449 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/exp/parser/ASTAggregateTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/exp/parser/ASTAggregateTest.java
@@ -19,9 +19,13 @@
package org.apache.cayenne.exp.parser;
+import org.apache.cayenne.exp.Expression;
+import org.apache.cayenne.exp.ExpressionException;
+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
@@ -34,28 +38,82 @@ public class ASTAggregateTest {
assertEquals("AVG", avg.getFunctionName());
}
+ @Test(expected = ExpressionException.class)
+ public void testAvgEvaluate() throws Exception {
+ ASTAvg avg = new ASTAvg(null);
+ avg.evaluate(new Object());
+ }
+
+ @Test
+ public void testAvgParse() throws Exception {
+ Expression exp = ExpressionFactory.exp("AVG(artistName)");
+ assertTrue(exp instanceof ASTAvg);
+ assertEquals(1, exp.getOperandCount());
+ assertTrue(exp.getOperand(0) instanceof ASTObjPath);
+ }
+
@Test
public void testCountConstruct() throws Exception {
- ASTCount count = new ASTCount(null);
+ ASTCount count = new ASTCount();
assertEquals("COUNT", count.getFunctionName());
}
@Test
+ public void testCountExpParse() throws Exception {
+ Expression exp = ExpressionFactory.exp("COUNT(artistName)");
+ assertTrue(exp instanceof ASTCount);
+ assertEquals(1, exp.getOperandCount());
+ assertTrue(exp.getOperand(0) instanceof ASTObjPath);
+ }
+
+ @Test
+ public void testCountAsteriskParse() throws Exception {
+ Expression exp = ExpressionFactory.exp("COUNT(*)");
+ assertTrue(exp instanceof ASTCount);
+ assertEquals(1, exp.getOperandCount());
+ assertTrue(exp.getOperand(0) instanceof ASTAsterisk);
+ }
+
+ @Test
public void testMinConstruct() throws Exception {
ASTMin min = new ASTMin(null);
assertEquals("MIN", min.getFunctionName());
}
@Test
+ public void testMinParse() throws Exception {
+ Expression exp = ExpressionFactory.exp("MIN(artistName)");
+ assertTrue(exp instanceof ASTMin);
+ assertEquals(1, exp.getOperandCount());
+ assertTrue(exp.getOperand(0) instanceof ASTObjPath);
+ }
+
+ @Test
public void testMaxConstruct() throws Exception {
ASTMax max = new ASTMax(null);
assertEquals("MAX", max.getFunctionName());
}
@Test
+ public void testMaxParse() throws Exception {
+ Expression exp = ExpressionFactory.exp("MAX(artistName)");
+ assertTrue(exp instanceof ASTMax);
+ assertEquals(1, exp.getOperandCount());
+ assertTrue(exp.getOperand(0) instanceof ASTObjPath);
+ }
+
+ @Test
public void testSumConstruct() throws Exception {
ASTSum sum = new ASTSum(null);
assertEquals("SUM", sum.getFunctionName());
}
+ @Test
+ public void testSumParse() throws Exception {
+ Expression exp = ExpressionFactory.exp("SUM(artistName)");
+ assertTrue(exp instanceof ASTSum);
+ assertEquals(1, exp.getOperandCount());
+ assertTrue(exp.getOperand(0) instanceof ASTObjPath);
+ }
+
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbb746ca/cayenne-server/src/test/java/org/apache/cayenne/exp/parser/ASTConcatTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/exp/parser/ASTConcatTest.java b/cayenne-server/src/test/java/org/apache/cayenne/exp/parser/ASTConcatTest.java
index 0374aaa..b468efe 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/exp/parser/ASTConcatTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/exp/parser/ASTConcatTest.java
@@ -19,6 +19,8 @@
package org.apache.cayenne.exp.parser;
+import org.apache.cayenne.exp.Expression;
+import org.apache.cayenne.exp.ExpressionFactory;
import org.apache.cayenne.testdo.testmap.Artist;
import org.junit.Test;
@@ -47,4 +49,18 @@ public class ASTConcatTest {
assertEquals("name test", res);
}
+ @Test
+ public void testParseConcat() throws Exception {
+ Expression exp = ExpressionFactory.exp("CONCAT(artistName, ' ', 'test')");
+ assertEquals(ASTConcat.class, exp.getClass());
+ assertEquals(3, exp.getOperandCount());
+
+ Artist a = new Artist();
+ a.setArtistName("name");
+
+ Object res = exp.evaluate(a);
+ assertTrue(res instanceof String);
+ assertEquals("name test", res);
+ }
+
}
[2/2] cayenne git commit: CAY-2205 Support for aggregate functions in
ExpressionParser
Posted by nt...@apache.org.
CAY-2205 Support for aggregate functions in ExpressionParser
Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/bbb746ca
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/bbb746ca
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/bbb746ca
Branch: refs/heads/master
Commit: bbb746caa9a5dfc5ca0f1527294a75c91c7342f6
Parents: c24bb76
Author: Nikita Timofeev <st...@gmail.com>
Authored: Tue Jan 24 12:20:01 2017 +0300
Committer: Nikita Timofeev <st...@gmail.com>
Committed: Tue Jan 24 12:20:01 2017 +0300
----------------------------------------------------------------------
.../exp/parser/ASTAggregateFunctionCall.java | 5 +
.../apache/cayenne/exp/parser/ASTAsterisk.java | 5 +-
.../org/apache/cayenne/exp/parser/ASTAvg.java | 8 +-
.../org/apache/cayenne/exp/parser/ASTCount.java | 9 +-
.../org/apache/cayenne/exp/parser/ASTMax.java | 8 +-
.../org/apache/cayenne/exp/parser/ASTMin.java | 8 +-
.../org/apache/cayenne/exp/parser/ASTSum.java | 8 +-
.../cayenne/exp/parser/ExpressionParser.java | 680 +++++++++++++------
.../exp/parser/ExpressionParserConstants.java | 46 +-
.../parser/ExpressionParserTokenManager.java | 485 +++++++------
.../parser/ExpressionParserTreeConstants.java | 20 +-
.../cayenne/exp/parser/ExpressionParser.jjt | 52 +-
.../cayenne/exp/parser/ASTAggregateTest.java | 60 +-
.../cayenne/exp/parser/ASTConcatTest.java | 16 +
14 files changed, 882 insertions(+), 528 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbb746ca/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTAggregateFunctionCall.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTAggregateFunctionCall.java b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTAggregateFunctionCall.java
index b6e692d..641f711 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTAggregateFunctionCall.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTAggregateFunctionCall.java
@@ -33,4 +33,9 @@ public abstract class ASTAggregateFunctionCall extends ASTFunctionCall {
ASTAggregateFunctionCall(int id, String functionName, Object... nodes) {
super(id, functionName, nodes);
}
+
+ @Override
+ protected Object evaluateNode(Object o) throws Exception {
+ throw new UnsupportedOperationException("In-memory evaluation of aggregate functions not implemented yet.");
+ }
}
http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbb746ca/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTAsterisk.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTAsterisk.java b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTAsterisk.java
index 33b81cc..a5ed21c 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTAsterisk.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTAsterisk.java
@@ -38,7 +38,7 @@ public class ASTAsterisk extends SimpleNode {
}
public ASTAsterisk() {
- super(ExpressionParserTreeConstants.JJTMULTIPLY);
+ super(ExpressionParserTreeConstants.JJTASTERISK);
}
@Override
@@ -48,8 +48,7 @@ public class ASTAsterisk extends SimpleNode {
@Override
protected String getExpressionOperator(int index) {
- throw new UnsupportedOperationException("No operator for '" + ExpressionParserTreeConstants.jjtNodeName[id]
- + "'");
+ throw new UnsupportedOperationException("No operator for '" + ExpressionParserTreeConstants.jjtNodeName[id] + "'");
}
@Override
http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbb746ca/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTAvg.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTAvg.java b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTAvg.java
index eb95216..972a5ee 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTAvg.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTAvg.java
@@ -31,13 +31,7 @@ public class ASTAvg extends ASTAggregateFunctionCall {
}
public ASTAvg(Expression expression) {
- super(0, "AVG", expression);
- }
-
-
- @Override
- protected Object evaluateNode(Object o) throws Exception {
- return o; // TODO: how to evaluate aggregation function?
+ super(ExpressionParserTreeConstants.JJTAVG, "AVG", expression);
}
@Override
http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbb746ca/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTCount.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTCount.java b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTCount.java
index ee3a65e..89d42e7 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTCount.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTCount.java
@@ -31,16 +31,11 @@ public class ASTCount extends ASTAggregateFunctionCall {
}
public ASTCount(Expression expression) {
- super(0, "COUNT", expression);
+ super(ExpressionParserTreeConstants.JJTCOUNT, "COUNT", expression);
}
public ASTCount() {
- super(0, "COUNT", new ASTAsterisk());
- }
-
- @Override
- protected Object evaluateNode(Object o) throws Exception {
- return o; // TODO: how to evaluate aggregation function?
+ this(new ASTAsterisk());
}
@Override
http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbb746ca/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTMax.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTMax.java b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTMax.java
index 2a59d76..8c3bc3d 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTMax.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTMax.java
@@ -31,13 +31,7 @@ public class ASTMax extends ASTAggregateFunctionCall {
}
public ASTMax(Expression expression) {
- super(0, "MAX", expression);
- }
-
-
- @Override
- protected Object evaluateNode(Object o) throws Exception {
- return o; // TODO: how to evaluate aggregation function?
+ super(ExpressionParserTreeConstants.JJTMAX, "MAX", expression);
}
@Override
http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbb746ca/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTMin.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTMin.java b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTMin.java
index dc5142f..b869120 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTMin.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTMin.java
@@ -31,13 +31,7 @@ public class ASTMin extends ASTAggregateFunctionCall {
}
public ASTMin(Expression expression) {
- super(0, "MIN", expression);
- }
-
-
- @Override
- protected Object evaluateNode(Object o) throws Exception {
- return o; // TODO: how to evaluate aggregation function?
+ super(ExpressionParserTreeConstants.JJTMIN, "MIN", expression);
}
@Override
http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbb746ca/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTSum.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTSum.java b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTSum.java
index 73e0b8c..7b031b4 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTSum.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTSum.java
@@ -31,13 +31,7 @@ public class ASTSum extends ASTAggregateFunctionCall {
}
public ASTSum(Expression expression) {
- super(0, "SUM", expression);
- }
-
-
- @Override
- protected Object evaluateNode(Object o) throws Exception {
- return o; // TODO: how to evaluate aggregation function?
+ super(ExpressionParserTreeConstants.JJTSUM, "SUM", expression);
}
@Override
http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbb746ca/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParser.java
----------------------------------------------------------------------
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 20a6f42..4e6e703 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
@@ -162,10 +162,15 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
case 16:
case 25:
case 26:
- case 29:
+ case 28:
case NULL:
case TRUE:
case FALSE:
+ case AVG:
+ case MIN:
+ case MAX:
+ case SUM:
+ case COUNT:
case CONCAT:
case SUBSTRING:
case TRIM:
@@ -176,10 +181,10 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
case ABS:
case SQRT:
case MOD:
+ case 54:
case 55:
case 56:
case 57:
- case 58:
case PROPERTY_PATH:
case SINGLE_QUOTED_STRING:
case DOUBLE_QUOTED_STRING:
@@ -197,34 +202,39 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
final public void simpleCondition() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case TRUE:
- ASTTrue jjtn001 = new ASTTrue(JJTTRUE);
- boolean jjtc001 = true;
- jjtree.openNodeScope(jjtn001);
+ ASTTrue jjtn001 = new ASTTrue(JJTTRUE);
+ boolean jjtc001 = true;
+ jjtree.openNodeScope(jjtn001);
try {
jj_consume_token(TRUE);
} finally {
- if (jjtc001) {
- jjtree.closeNodeScope(jjtn001, true);
- }
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, true);
+ }
}
break;
case FALSE:
- ASTFalse jjtn002 = new ASTFalse(JJTFALSE);
- boolean jjtc002 = true;
- jjtree.openNodeScope(jjtn002);
+ ASTFalse jjtn002 = new ASTFalse(JJTFALSE);
+ boolean jjtc002 = true;
+ jjtree.openNodeScope(jjtn002);
try {
jj_consume_token(FALSE);
} finally {
- if (jjtc002) {
- jjtree.closeNodeScope(jjtn002, true);
- }
+ if (jjtc002) {
+ jjtree.closeNodeScope(jjtn002, true);
+ }
}
break;
case 16:
case 25:
case 26:
- case 29:
+ case 28:
case NULL:
+ case AVG:
+ case MIN:
+ case MAX:
+ case SUM:
+ case COUNT:
case CONCAT:
case SUBSTRING:
case TRIM:
@@ -235,10 +245,10 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
case ABS:
case SQRT:
case MOD:
+ case 54:
case 55:
case 56:
case 57:
- case 58:
case PROPERTY_PATH:
case SINGLE_QUOTED_STRING:
case DOUBLE_QUOTED_STRING:
@@ -469,46 +479,46 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
{if (true) throw (Error)jjte009;}
} finally {
- if (jjtc009) {
- jjtree.closeNodeScope(jjtn009, 2);
- }
+ if (jjtc009) {
+ jjtree.closeNodeScope(jjtn009, 2);
+ }
}
break;
case 14:
jj_consume_token(14);
- ASTLikeIgnoreCase jjtn010 = new ASTLikeIgnoreCase(JJTLIKEIGNORECASE);
- boolean jjtc010 = true;
- jjtree.openNodeScope(jjtn010);
+ ASTLikeIgnoreCase jjtn010 = new ASTLikeIgnoreCase(JJTLIKEIGNORECASE);
+ boolean jjtc010 = true;
+ jjtree.openNodeScope(jjtn010);
try {
scalarExpression();
} catch (Throwable jjte010) {
- if (jjtc010) {
- jjtree.clearNodeScope(jjtn010);
- jjtc010 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte010 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte010;}
- }
- if (jjte010 instanceof ParseException) {
- {if (true) throw (ParseException)jjte010;}
- }
- {if (true) throw (Error)jjte010;}
+ if (jjtc010) {
+ jjtree.clearNodeScope(jjtn010);
+ jjtc010 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte010 instanceof RuntimeException) {
+ {if (true) throw (RuntimeException)jjte010;}
+ }
+ if (jjte010 instanceof ParseException) {
+ {if (true) throw (ParseException)jjte010;}
+ }
+ {if (true) throw (Error)jjte010;}
} finally {
- if (jjtc010) {
- jjtree.closeNodeScope(jjtn010, 2);
- }
+ if (jjtc010) {
+ jjtree.closeNodeScope(jjtn010, 2);
+ }
}
break;
case 15:
jj_consume_token(15);
- ASTIn jjtn011 = new ASTIn(JJTIN);
- boolean jjtc011 = true;
- jjtree.openNodeScope(jjtn011);
+ ASTIn jjtn011 = new ASTIn(JJTIN);
+ boolean jjtc011 = true;
+ jjtree.openNodeScope(jjtn011);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 55:
+ case 54:
namedParameter();
break;
case 16:
@@ -522,52 +532,52 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
throw new ParseException();
}
} catch (Throwable jjte011) {
- if (jjtc011) {
- jjtree.clearNodeScope(jjtn011);
- jjtc011 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte011 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte011;}
- }
- if (jjte011 instanceof ParseException) {
- {if (true) throw (ParseException)jjte011;}
- }
- {if (true) throw (Error)jjte011;}
+ if (jjtc011) {
+ jjtree.clearNodeScope(jjtn011);
+ jjtc011 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte011 instanceof RuntimeException) {
+ {if (true) throw (RuntimeException)jjte011;}
+ }
+ if (jjte011 instanceof ParseException) {
+ {if (true) throw (ParseException)jjte011;}
+ }
+ {if (true) throw (Error)jjte011;}
} finally {
- if (jjtc011) {
- jjtree.closeNodeScope(jjtn011, 2);
- }
+ if (jjtc011) {
+ jjtree.closeNodeScope(jjtn011, 2);
+ }
}
break;
case 18:
jj_consume_token(18);
scalarExpression();
jj_consume_token(2);
- ASTBetween jjtn012 = new ASTBetween(JJTBETWEEN);
- boolean jjtc012 = true;
- jjtree.openNodeScope(jjtn012);
+ ASTBetween jjtn012 = new ASTBetween(JJTBETWEEN);
+ boolean jjtc012 = true;
+ jjtree.openNodeScope(jjtn012);
try {
scalarExpression();
} catch (Throwable jjte012) {
- if (jjtc012) {
- jjtree.clearNodeScope(jjtn012);
- jjtc012 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte012 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte012;}
- }
- if (jjte012 instanceof ParseException) {
- {if (true) throw (ParseException)jjte012;}
- }
- {if (true) throw (Error)jjte012;}
+ if (jjtc012) {
+ jjtree.clearNodeScope(jjtn012);
+ jjtc012 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte012 instanceof RuntimeException) {
+ {if (true) throw (RuntimeException)jjte012;}
+ }
+ if (jjte012 instanceof ParseException) {
+ {if (true) throw (ParseException)jjte012;}
+ }
+ {if (true) throw (Error)jjte012;}
} finally {
- if (jjtc012) {
- jjtree.closeNodeScope(jjtn012, 3);
- }
+ if (jjtc012) {
+ jjtree.closeNodeScope(jjtn012, 3);
+ }
}
break;
case 3:
@@ -662,12 +672,12 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
break;
case 15:
jj_consume_token(15);
- ASTNotIn jjtn003 = new ASTNotIn(JJTNOTIN);
- boolean jjtc003 = true;
- jjtree.openNodeScope(jjtn003);
+ ASTNotIn jjtn003 = new ASTNotIn(JJTNOTIN);
+ boolean jjtc003 = true;
+ jjtree.openNodeScope(jjtn003);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 55:
+ case 54:
namedParameter();
break;
case 16:
@@ -681,23 +691,23 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
throw new ParseException();
}
} catch (Throwable jjte003) {
- if (jjtc003) {
- jjtree.clearNodeScope(jjtn003);
- jjtc003 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte003 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte003;}
- }
- if (jjte003 instanceof ParseException) {
- {if (true) throw (ParseException)jjte003;}
- }
- {if (true) throw (Error)jjte003;}
+ if (jjtc003) {
+ jjtree.clearNodeScope(jjtn003);
+ jjtc003 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte003 instanceof RuntimeException) {
+ {if (true) throw (RuntimeException)jjte003;}
+ }
+ if (jjte003 instanceof ParseException) {
+ {if (true) throw (ParseException)jjte003;}
+ }
+ {if (true) throw (Error)jjte003;}
} finally {
- if (jjtc003) {
- jjtree.closeNodeScope(jjtn003, 2);
- }
+ if (jjtc003) {
+ jjtree.closeNodeScope(jjtn003, 2);
+ }
}
break;
case 18:
@@ -781,16 +791,16 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
case 16:
case 25:
case 26:
- case 29:
+ case 28:
case LENGTH:
case LOCATE:
case ABS:
case SQRT:
case MOD:
+ case 54:
case 55:
case 56:
case 57:
- case 58:
case PROPERTY_PATH:
case INT_LITERAL:
case FLOAT_LITERAL:
@@ -809,14 +819,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
- try {
- jj_consume_token(NULL);
- } finally {
+ try {
+ jj_consume_token(NULL);
+ } finally {
if (jjtc001) {
jjtree.closeNodeScope(jjtn001, 0);
}
}
break;
+ case AVG:
+ case MIN:
+ case MAX:
+ case SUM:
+ case COUNT:
+ aggregateExpression();
+ break;
default:
jj_la1[14] = jj_gen;
jj_consume_token(-1);
@@ -826,9 +843,9 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
final public void stringParameter() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case 55:
case 56:
case 57:
- case 58:
case PROPERTY_PATH:
pathExpression();
break;
@@ -852,32 +869,32 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case SINGLE_QUOTED_STRING:
jj_consume_token(SINGLE_QUOTED_STRING);
- ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
- boolean jjtc001 = true;
- jjtree.openNodeScope(jjtn001);
+ ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
+ boolean jjtc001 = true;
+ jjtree.openNodeScope(jjtn001);
try {
- jjtree.closeNodeScope(jjtn001, 0);
- jjtc001 = false;
- jjtn001.setValue(token_source.literalValue);
+ jjtree.closeNodeScope(jjtn001, 0);
+ jjtc001 = false;
+ jjtn001.setValue(token_source.literalValue);
} finally {
- if (jjtc001) {
- jjtree.closeNodeScope(jjtn001, 0);
- }
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, 0);
+ }
}
break;
case DOUBLE_QUOTED_STRING:
jj_consume_token(DOUBLE_QUOTED_STRING);
- ASTScalar jjtn002 = new ASTScalar(JJTSCALAR);
- boolean jjtc002 = true;
- jjtree.openNodeScope(jjtn002);
+ ASTScalar jjtn002 = new ASTScalar(JJTSCALAR);
+ boolean jjtc002 = true;
+ jjtree.openNodeScope(jjtn002);
try {
- jjtree.closeNodeScope(jjtn002, 0);
- jjtc002 = false;
- jjtn002.setValue(token_source.literalValue);
+ jjtree.closeNodeScope(jjtn002, 0);
+ jjtc002 = false;
+ jjtn002.setValue(token_source.literalValue);
} finally {
- if (jjtc002) {
- jjtree.closeNodeScope(jjtn002, 0);
- }
+ if (jjtc002) {
+ jjtree.closeNodeScope(jjtn002, 0);
+ }
}
break;
case CONCAT:
@@ -899,8 +916,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
case 16:
case 25:
case 26:
- case 29:
+ case 28:
case NULL:
+ case AVG:
+ case MIN:
+ case MAX:
+ case SUM:
+ case COUNT:
case CONCAT:
case SUBSTRING:
case TRIM:
@@ -911,10 +933,10 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
case ABS:
case SQRT:
case MOD:
+ case 54:
case 55:
case 56:
case 57:
- case 58:
case PROPERTY_PATH:
case SINGLE_QUOTED_STRING:
case DOUBLE_QUOTED_STRING:
@@ -991,7 +1013,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
}
break;
- case 55:
+ case 54:
namedParameter();
break;
case INT_LITERAL:
@@ -1343,7 +1365,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 27:
- case 28:
+ case ASTERISK:
;
break;
default:
@@ -1351,35 +1373,35 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
break label_9;
}
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 27:
- jj_consume_token(27);
- ASTMultiply jjtn001 = new ASTMultiply(JJTMULTIPLY);
- boolean jjtc001 = true;
- jjtree.openNodeScope(jjtn001);
+ case ASTERISK:
+ jj_consume_token(ASTERISK);
+ ASTMultiply jjtn001 = new ASTMultiply(JJTMULTIPLY);
+ boolean jjtc001 = true;
+ jjtree.openNodeScope(jjtn001);
try {
numericTermExt();
} catch (Throwable jjte001) {
- if (jjtc001) {
- jjtree.clearNodeScope(jjtn001);
- jjtc001 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte001 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte001;}
- }
- if (jjte001 instanceof ParseException) {
- {if (true) throw (ParseException)jjte001;}
- }
- {if (true) throw (Error)jjte001;}
+ if (jjtc001) {
+ jjtree.clearNodeScope(jjtn001);
+ jjtc001 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte001 instanceof RuntimeException) {
+ {if (true) throw (RuntimeException)jjte001;}
+ }
+ if (jjte001 instanceof ParseException) {
+ {if (true) throw (ParseException)jjte001;}
+ }
+ {if (true) throw (Error)jjte001;}
} finally {
- if (jjtc001) {
- jjtree.closeNodeScope(jjtn001, 2);
- }
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, 2);
+ }
}
break;
- case 28:
- jj_consume_token(28);
+ case 27:
+ jj_consume_token(27);
ASTDivide jjtn002 = new ASTDivide(JJTDIVIDE);
boolean jjtc002 = true;
jjtree.openNodeScope(jjtn002);
@@ -1423,17 +1445,17 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
case ABS:
case SQRT:
case MOD:
+ case 54:
case 55:
case 56:
case 57:
- case 58:
case PROPERTY_PATH:
case INT_LITERAL:
case FLOAT_LITERAL:
numericTerm();
break;
- case 29:
- jj_consume_token(29);
+ case 28:
+ jj_consume_token(28);
ASTBitwiseNot jjtn001 = new ASTBitwiseNot(JJTBITWISENOT);
boolean jjtc001 = true;
jjtree.openNodeScope(jjtn001);
@@ -1475,10 +1497,10 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
case ABS:
case SQRT:
case MOD:
+ case 54:
case 55:
case 56:
case 57:
- case 58:
case PROPERTY_PATH:
case INT_LITERAL:
case FLOAT_LITERAL:
@@ -1563,7 +1585,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
}
break;
- case 55:
+ case 54:
namedParameter();
break;
case LENGTH:
@@ -1573,9 +1595,9 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
case MOD:
functionsReturningNumerics();
break;
+ case 55:
case 56:
case 57:
- case 58:
case PROPERTY_PATH:
pathExpression();
break;
@@ -1619,8 +1641,19 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
jj_consume_token(CONCAT);
jj_consume_token(16);
stringParameter();
- jj_consume_token(19);
- stringParameter();
+ label_10:
+ while (true) {
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case 19:
+ ;
+ break;
+ default:
+ jj_la1[33] = jj_gen;
+ break label_10;
+ }
+ jj_consume_token(19);
+ stringParameter();
+ }
jj_consume_token(17);
} catch (Throwable jjte000) {
if (jjtc000) {
@@ -1660,7 +1693,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
numericExpression();
break;
default:
- jj_la1[33] = jj_gen;
+ jj_la1[34] = jj_gen;
;
}
jj_consume_token(17);
@@ -1796,7 +1829,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
mod();
break;
default:
- jj_la1[34] = jj_gen;
+ jj_la1[35] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
@@ -1850,7 +1883,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
numericExpression();
break;
default:
- jj_la1[35] = jj_gen;
+ jj_la1[36] = jj_gen;
;
}
jj_consume_token(17);
@@ -1970,9 +2003,228 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
}
}
+ final public void aggregateExpression() throws ParseException {
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case AVG:
+ avg();
+ break;
+ case MAX:
+ max();
+ break;
+ case MIN:
+ min();
+ break;
+ case SUM:
+ sum();
+ break;
+ case COUNT:
+ count();
+ break;
+ default:
+ jj_la1[37] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ }
+
+ 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) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
+ }
+ }
+
+ 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:
+ asterisk();
+ break;
+ case 16:
+ case 25:
+ case 26:
+ case 28:
+ case LENGTH:
+ case LOCATE:
+ case ABS:
+ case SQRT:
+ case MOD:
+ case 54:
+ case 55:
+ case 56:
+ case 57:
+ case PROPERTY_PATH:
+ case INT_LITERAL:
+ case FLOAT_LITERAL:
+ numericExpression();
+ break;
+ default:
+ jj_la1[38] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ jj_consume_token(17);
+ } catch (Throwable jjte000) {
+ if (jjtc000) {
+ jjtree.clearNodeScope(jjtn000);
+ jjtc000 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte000 instanceof RuntimeException) {
+ {if (true) throw (RuntimeException)jjte000;}
+ }
+ if (jjte000 instanceof ParseException) {
+ {if (true) throw (ParseException)jjte000;}
+ }
+ {if (true) throw (Error)jjte000;}
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
+ }
+ }
+
+ final public void avg() throws ParseException {
+ /*@bgen(jjtree) Avg */
+ ASTAvg jjtn000 = new ASTAvg(JJTAVG);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);
+ try {
+ jj_consume_token(AVG);
+ jj_consume_token(16);
+ numericExpression();
+ jj_consume_token(17);
+ } catch (Throwable jjte000) {
+ if (jjtc000) {
+ jjtree.clearNodeScope(jjtn000);
+ jjtc000 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte000 instanceof RuntimeException) {
+ {if (true) throw (RuntimeException)jjte000;}
+ }
+ if (jjte000 instanceof ParseException) {
+ {if (true) throw (ParseException)jjte000;}
+ }
+ {if (true) throw (Error)jjte000;}
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
+ }
+ }
+
+ final public void max() throws ParseException {
+ /*@bgen(jjtree) Max */
+ ASTMax jjtn000 = new ASTMax(JJTMAX);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);
+ try {
+ jj_consume_token(MAX);
+ jj_consume_token(16);
+ numericExpression();
+ jj_consume_token(17);
+ } catch (Throwable jjte000) {
+ if (jjtc000) {
+ jjtree.clearNodeScope(jjtn000);
+ jjtc000 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte000 instanceof RuntimeException) {
+ {if (true) throw (RuntimeException)jjte000;}
+ }
+ if (jjte000 instanceof ParseException) {
+ {if (true) throw (ParseException)jjte000;}
+ }
+ {if (true) throw (Error)jjte000;}
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
+ }
+ }
+
+ final public void min() throws ParseException {
+ /*@bgen(jjtree) Min */
+ ASTMin jjtn000 = new ASTMin(JJTMIN);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);
+ try {
+ jj_consume_token(MIN);
+ jj_consume_token(16);
+ numericExpression();
+ jj_consume_token(17);
+ } catch (Throwable jjte000) {
+ if (jjtc000) {
+ jjtree.clearNodeScope(jjtn000);
+ jjtc000 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte000 instanceof RuntimeException) {
+ {if (true) throw (RuntimeException)jjte000;}
+ }
+ if (jjte000 instanceof ParseException) {
+ {if (true) throw (ParseException)jjte000;}
+ }
+ {if (true) throw (Error)jjte000;}
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
+ }
+ }
+
+ final public void sum() throws ParseException {
+ /*@bgen(jjtree) Sum */
+ ASTSum jjtn000 = new ASTSum(JJTSUM);
+ boolean jjtc000 = true;
+ jjtree.openNodeScope(jjtn000);
+ try {
+ jj_consume_token(SUM);
+ jj_consume_token(16);
+ numericExpression();
+ jj_consume_token(17);
+ } catch (Throwable jjte000) {
+ if (jjtc000) {
+ jjtree.clearNodeScope(jjtn000);
+ jjtc000 = false;
+ } else {
+ jjtree.popNode();
+ }
+ if (jjte000 instanceof RuntimeException) {
+ {if (true) throw (RuntimeException)jjte000;}
+ }
+ if (jjte000 instanceof ParseException) {
+ {if (true) throw (ParseException)jjte000;}
+ }
+ {if (true) throw (Error)jjte000;}
+ } finally {
+ if (jjtc000) {
+ jjtree.closeNodeScope(jjtn000, true);
+ }
+ }
+ }
+
final public void namedParameter() throws ParseException {
Token t;
- jj_consume_token(55);
+ jj_consume_token(54);
t = jj_consume_token(PROPERTY_PATH);
ASTNamedParameter jjtn001 = new ASTNamedParameter(JJTNAMEDPARAMETER);
boolean jjtc001 = true;
@@ -1993,69 +2245,69 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case PROPERTY_PATH:
t = jj_consume_token(PROPERTY_PATH);
- ASTObjPath jjtn001 = new ASTObjPath(JJTOBJPATH);
- boolean jjtc001 = true;
- jjtree.openNodeScope(jjtn001);
+ ASTObjPath jjtn001 = new ASTObjPath(JJTOBJPATH);
+ boolean jjtc001 = true;
+ jjtree.openNodeScope(jjtn001);
try {
- jjtree.closeNodeScope(jjtn001, 0);
- jjtc001 = false;
- jjtn001.setPath(t.image);
+ jjtree.closeNodeScope(jjtn001, 0);
+ jjtc001 = false;
+ jjtn001.setPath(t.image);
} finally {
- if (jjtc001) {
- jjtree.closeNodeScope(jjtn001, 0);
- }
+ if (jjtc001) {
+ jjtree.closeNodeScope(jjtn001, 0);
+ }
}
break;
- case 56:
- jj_consume_token(56);
+ case 55:
+ jj_consume_token(55);
t = jj_consume_token(PROPERTY_PATH);
- ASTObjPath jjtn002 = new ASTObjPath(JJTOBJPATH);
- boolean jjtc002 = true;
- jjtree.openNodeScope(jjtn002);
+ ASTObjPath jjtn002 = new ASTObjPath(JJTOBJPATH);
+ boolean jjtc002 = true;
+ jjtree.openNodeScope(jjtn002);
try {
- jjtree.closeNodeScope(jjtn002, 0);
- jjtc002 = false;
- jjtn002.setPath(t.image);
+ jjtree.closeNodeScope(jjtn002, 0);
+ jjtc002 = false;
+ jjtn002.setPath(t.image);
} finally {
- if (jjtc002) {
- jjtree.closeNodeScope(jjtn002, 0);
- }
+ if (jjtc002) {
+ jjtree.closeNodeScope(jjtn002, 0);
+ }
}
break;
- case 57:
- jj_consume_token(57);
+ case 56:
+ jj_consume_token(56);
t = jj_consume_token(PROPERTY_PATH);
- ASTDbPath jjtn003 = new ASTDbPath(JJTDBPATH);
- boolean jjtc003 = true;
- jjtree.openNodeScope(jjtn003);
+ ASTDbPath jjtn003 = new ASTDbPath(JJTDBPATH);
+ boolean jjtc003 = true;
+ jjtree.openNodeScope(jjtn003);
try {
- jjtree.closeNodeScope(jjtn003, 0);
- jjtc003 = false;
- jjtn003.setPath(t.image);
+ jjtree.closeNodeScope(jjtn003, 0);
+ jjtc003 = false;
+ jjtn003.setPath(t.image);
} finally {
- if (jjtc003) {
- jjtree.closeNodeScope(jjtn003, 0);
- }
+ if (jjtc003) {
+ jjtree.closeNodeScope(jjtn003, 0);
+ }
}
break;
- case 58:
- jj_consume_token(58);
+ case 57:
+ jj_consume_token(57);
t = jj_consume_token(PROPERTY_PATH);
- ASTScalar jjtn004 = new ASTScalar(JJTSCALAR);
- boolean jjtc004 = true;
- jjtree.openNodeScope(jjtn004);
+ ASTScalar jjtn004 = new ASTScalar(JJTSCALAR);
+ boolean jjtc004 = true;
+ jjtree.openNodeScope(jjtn004);
try {
- jjtree.closeNodeScope(jjtn004, 0);
- jjtc004 = false;
- jjtn004.setValue(ParserUtil.makeEnum(t.image));
+ jjtree.closeNodeScope(jjtn004, 0);
+ jjtc004 = false;
+ jjtn004.setValue(ParserUtil.makeEnum(t.image));
} finally {
- if (jjtc004) {
- jjtree.closeNodeScope(jjtn004, 0);
- }
+ if (jjtc004) {
+ jjtree.closeNodeScope(jjtn004, 0);
+ }
}
break;
default:
- jj_la1[36] = jj_gen;
+ jj_la1[39] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
@@ -2070,7 +2322,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
public Token jj_nt;
private int jj_ntk;
private int jj_gen;
- final private int[] jj_la1 = new int[37];
+ final private int[] jj_la1 = new int[40];
static private int[] jj_la1_0;
static private int[] jj_la1_1;
static private int[] jj_la1_2;
@@ -2080,13 +2332,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
jj_la1_init_2();
}
private static void jj_la1_init_0() {
- jj_la1_0 = new int[] {0x2,0x4,0x18,0x26010018,0x60,0x180,0x10000,0x4fff8,0x4fff8,0x26010000,0x18,0x10000,0x4e000,0x80000,0x26010000,0x0,0x0,0x26010000,0x0,0x100000,0x200000,0x400000,0x1800000,0x1800000,0x6000000,0x6000000,0x18000000,0x18000000,0x26010000,0x2000000,0x6010000,0x10000,0x0,0x80000,0x0,0x80000,0x0,};
+ jj_la1_0 = new int[] {0x2,0x4,0x18,0x16010018,0x60,0x180,0x10000,0x4fff8,0x4fff8,0x16010000,0x18,0x10000,0x4e000,0x80000,0x16010000,0x0,0x0,0x16010000,0x0,0x100000,0x200000,0x400000,0x1800000,0x1800000,0x6000000,0x6000000,0x8000000,0x8000000,0x16010000,0x2000000,0x6010000,0x10000,0x0,0x80000,0x80000,0x0,0x80000,0x0,0x16010000,0x0,};
}
private static void jj_la1_init_1() {
- jj_la1_1 = new int[] {0x0,0x0,0x0,0xf8ffc1c,0x0,0x0,0x800000,0x0,0x0,0xf8ffc1c,0x0,0x800000,0x0,0x0,0xf8ffc04,0xf007c00,0x7c00,0xf8ffc1c,0x800018,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf8f8000,0x0,0xf8f8000,0xf8f8000,0x7c00,0x0,0xf8000,0x0,0xf000000,};
+ jj_la1_1 = new int[] {0x0,0x0,0x0,0xbc7fffe,0x0,0x0,0x400000,0x0,0x0,0xbc7fffe,0x0,0x400000,0x0,0x0,0xbc7fff2,0xb803e00,0x3e00,0xbc7fffe,0x40000c,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000000,0x4000000,0xbc7c000,0x0,0xbc7c000,0xbc7c000,0x3e00,0x0,0x0,0x7c000,0x0,0x1f0,0xfc7c000,0xb800000,};
}
private static void jj_la1_init_2() {
- jj_la1_2 = new int[] {0x0,0x0,0x0,0x1c8,0x0,0x0,0x0,0x0,0x0,0x1c8,0x0,0x0,0x0,0x0,0x1c8,0x48,0x48,0x1c8,0x1c8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180,0x0,0x180,0x180,0x0,0x0,0x0,0x0,0x0,};
+ jj_la1_2 = new int[] {0x0,0x0,0x0,0x1c8,0x0,0x0,0x0,0x0,0x0,0x1c8,0x0,0x0,0x0,0x0,0x1c8,0x48,0x48,0x1c8,0x1c8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180,0x0,0x180,0x180,0x0,0x0,0x0,0x0,0x0,0x0,0x180,0x0,};
}
/** Constructor with InputStream. */
@@ -2100,7 +2352,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
token = new Token();
jj_ntk = -1;
jj_gen = 0;
- for (int i = 0; i < 37; i++) jj_la1[i] = -1;
+ for (int i = 0; i < 40; i++) jj_la1[i] = -1;
}
/** Reinitialise. */
@@ -2115,7 +2367,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
jj_ntk = -1;
jjtree.reset();
jj_gen = 0;
- for (int i = 0; i < 37; i++) jj_la1[i] = -1;
+ for (int i = 0; i < 40; i++) jj_la1[i] = -1;
}
/** Constructor. */
@@ -2125,7 +2377,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
token = new Token();
jj_ntk = -1;
jj_gen = 0;
- for (int i = 0; i < 37; i++) jj_la1[i] = -1;
+ for (int i = 0; i < 40; i++) jj_la1[i] = -1;
}
/** Reinitialise. */
@@ -2136,7 +2388,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
jj_ntk = -1;
jjtree.reset();
jj_gen = 0;
- for (int i = 0; i < 37; i++) jj_la1[i] = -1;
+ for (int i = 0; i < 40; i++) jj_la1[i] = -1;
}
/** Constructor with generated Token Manager. */
@@ -2145,7 +2397,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
token = new Token();
jj_ntk = -1;
jj_gen = 0;
- for (int i = 0; i < 37; i++) jj_la1[i] = -1;
+ for (int i = 0; i < 40; i++) jj_la1[i] = -1;
}
/** Reinitialise. */
@@ -2155,7 +2407,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
jj_ntk = -1;
jjtree.reset();
jj_gen = 0;
- for (int i = 0; i < 37; i++) jj_la1[i] = -1;
+ for (int i = 0; i < 40; i++) jj_la1[i] = -1;
}
private Token jj_consume_token(int kind) throws ParseException {
@@ -2211,7 +2463,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
la1tokens[jj_kind] = true;
jj_kind = -1;
}
- for (int i = 0; i < 37; i++) {
+ for (int i = 0; i < 40; i++) {
if (jj_la1[i] == jj_gen) {
for (int j = 0; j < 32; j++) {
if ((jj_la1_0[i] & (1<<j)) != 0) {
http://git-wip-us.apache.org/repos/asf/cayenne/blob/bbb746ca/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserConstants.java
----------------------------------------------------------------------
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 7d50af0..8d368e5 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
@@ -31,47 +31,49 @@ public interface ExpressionParserConstants {
/** End of File. */
int EOF = 0;
/** RegularExpression Id. */
- int NULL = 34;
+ int NULL = 33;
/** RegularExpression Id. */
- int TRUE = 35;
+ int TRUE = 34;
/** RegularExpression Id. */
- int FALSE = 36;
+ int FALSE = 35;
/** RegularExpression Id. */
- int AVG = 37;
+ int AVG = 36;
/** RegularExpression Id. */
- int MIN = 38;
+ int MIN = 37;
/** RegularExpression Id. */
- int MAX = 39;
+ int MAX = 38;
/** RegularExpression Id. */
- int SUM = 40;
+ int SUM = 39;
/** RegularExpression Id. */
- int COUNT = 41;
+ int COUNT = 40;
/** RegularExpression Id. */
- int CONCAT = 42;
+ int CONCAT = 41;
/** RegularExpression Id. */
- int SUBSTRING = 43;
+ int SUBSTRING = 42;
/** RegularExpression Id. */
- int TRIM = 44;
+ int TRIM = 43;
/** RegularExpression Id. */
- int LOWER = 45;
+ int LOWER = 44;
/** RegularExpression Id. */
- int UPPER = 46;
+ int UPPER = 45;
/** RegularExpression Id. */
- int LENGTH = 47;
+ int LENGTH = 46;
/** RegularExpression Id. */
- int LOCATE = 48;
+ int LOCATE = 47;
/** RegularExpression Id. */
- int ABS = 49;
+ int ABS = 48;
/** RegularExpression Id. */
- int SQRT = 50;
+ int SQRT = 49;
/** RegularExpression Id. */
- int MOD = 51;
+ int MOD = 50;
/** RegularExpression Id. */
- int CURRENT_DATE = 52;
+ int CURRENT_DATE = 51;
/** RegularExpression Id. */
- int CURRENT_TIME = 53;
+ int CURRENT_TIME = 52;
/** RegularExpression Id. */
- int CURRENT_TIMESTAMP = 54;
+ int CURRENT_TIMESTAMP = 53;
+ /** RegularExpression Id. */
+ int ASTERISK = 58;
/** RegularExpression Id. */
int PROPERTY_PATH = 59;
/** RegularExpression Id. */
@@ -137,7 +139,6 @@ public interface ExpressionParserConstants {
"\">>\"",
"\"+\"",
"\"-\"",
- "\"*\"",
"\"/\"",
"\"~\"",
"\" \"",
@@ -169,6 +170,7 @@ public interface ExpressionParserConstants {
"\"obj:\"",
"\"db:\"",
"\"enum:\"",
+ "\"*\"",
"<PROPERTY_PATH>",
"<IDENTIFIER>",
"<LETTER>",