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 2022/05/25 15:12:43 UTC

[cayenne] branch STABLE-4.1 updated: CAY-2736 Can't use function names as a path in a string-based expression

This is an automated email from the ASF dual-hosted git repository.

ntimofeev pushed a commit to branch STABLE-4.1
in repository https://gitbox.apache.org/repos/asf/cayenne.git


The following commit(s) were added to refs/heads/STABLE-4.1 by this push:
     new ebe763570 CAY-2736 Can't use function names as a path in a string-based expression
ebe763570 is described below

commit ebe763570364c53b44f9ad0429390174aba685e0
Author: Nikita Timofeev <st...@gmail.com>
AuthorDate: Fri May 20 18:14:03 2022 +0300

    CAY-2736 Can't use function names as a path in a string-based expression
---
 RELEASE-NOTES.txt                                  |    1 +
 .../cayenne/exp/parser/ExpressionParser.java       | 1413 ++++++++++++--------
 .../exp/parser/ExpressionParserTokenManager.java   |  548 ++++----
 .../exp/parser/ExpressionParserTreeConstants.java  |    4 +-
 .../exp/parser/JJTExpressionParserState.java       |    4 +-
 .../apache/cayenne/exp/parser/JavaCharStream.java  | 1254 +++++++++--------
 .../apache/cayenne/exp/parser/ParseException.java  |   48 +-
 .../apache/cayenne/exp/parser/TokenMgrError.java   |   37 +-
 .../apache/cayenne/exp/parser/ExpressionParser.jjt |   55 +-
 .../org/apache/cayenne/exp/ExpressionTest.java     |   22 +
 10 files changed, 1901 insertions(+), 1485 deletions(-)

diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 850134045..40c8e7725 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -20,6 +20,7 @@ CAY-2727 Modeler: cgen destDir Unix platform path separator
 CAY-2729 Unable to use custom templates from a folder at upper level then datamap
 CAY-2730 Duplicating lines in a cgen config saved to datamap.xml
 CAY-2731 Exception when setting a CLOB on H2 v2.0.202
+CAY-2736 Can't use function names as a path in a string-based expression
 
 ----------------------------------
 Release: 4.1.1
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 2eaca2f3b..cf8e7f13c 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
@@ -1,3 +1,4 @@
+/* ExpressionParser.java */
 /* Generated By:JJTree&JavaCC: Do not edit this line. ExpressionParser.java */
 /*****************************************************************
  *   Licensed to the Apache Software Foundation (ASF) under one
@@ -36,30 +37,31 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
   final public Expression expression() throws ParseException {
     orCondition();
     jj_consume_token(0);
-        {if (true) return (Expression) jjtree.rootNode();}
+{if ("" != null) return (Expression) jjtree.rootNode();}
     throw new Error("Missing return statement in function");
-  }
+}
 
   final public void orCondition() throws ParseException {
     andCondition();
     label_1:
     while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case 1:
+      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+      case 1:{
         ;
         break;
+        }
       default:
         jj_la1[0] = jj_gen;
         break label_1;
       }
       jj_consume_token(1);
-                                ASTOr jjtn001 = new ASTOr(JJTOR);
+ASTOr jjtn001 = new ASTOr(JJTOR);
                                 boolean jjtc001 = true;
                                 jjtree.openNodeScope(jjtn001);
       try {
         andCondition();
       } catch (Throwable jjte001) {
-                                if (jjtc001) {
+if (jjtc001) {
                                   jjtree.clearNodeScope(jjtn001);
                                   jjtc001 = false;
                                 } else {
@@ -73,33 +75,34 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
                                 }
                                 {if (true) throw (Error)jjte001;}
       } finally {
-                                if (jjtc001) {
+if (jjtc001) {
                                   jjtree.closeNodeScope(jjtn001,  2);
                                 }
       }
     }
-  }
+}
 
   final public void andCondition() throws ParseException {
     notCondition();
     label_2:
     while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case 2:
+      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+      case 2:{
         ;
         break;
+        }
       default:
         jj_la1[1] = jj_gen;
         break label_2;
       }
       jj_consume_token(2);
-                                 ASTAnd jjtn001 = new ASTAnd(JJTAND);
+ASTAnd jjtn001 = new ASTAnd(JJTAND);
                                  boolean jjtc001 = true;
                                  jjtree.openNodeScope(jjtn001);
       try {
         notCondition();
       } catch (Throwable jjte001) {
-                                 if (jjtc001) {
+if (jjtc001) {
                                    jjtree.clearNodeScope(jjtn001);
                                    jjtc001 = false;
                                  } else {
@@ -113,36 +116,38 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
                                  }
                                  {if (true) throw (Error)jjte001;}
       } finally {
-                                 if (jjtc001) {
+if (jjtc001) {
                                    jjtree.closeNodeScope(jjtn001,  2);
                                  }
       }
     }
-  }
+}
 
   final public void notCondition() throws ParseException {
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
     case 3:
-    case 4:
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case 3:
+    case 4:{
+      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+      case 3:{
         jj_consume_token(3);
         break;
-      case 4:
+        }
+      case 4:{
         jj_consume_token(4);
         break;
+        }
       default:
         jj_la1[2] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
-                                  ASTNot jjtn001 = new ASTNot(JJTNOT);
+ASTNot jjtn001 = new ASTNot(JJTNOT);
                                   boolean jjtc001 = true;
                                   jjtree.openNodeScope(jjtn001);
       try {
         simpleCondition();
       } catch (Throwable jjte001) {
-                                  if (jjtc001) {
+if (jjtc001) {
                                     jjtree.clearNodeScope(jjtn001);
                                     jjtc001 = false;
                                   } else {
@@ -156,11 +161,12 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
                                   }
                                   {if (true) throw (Error)jjte001;}
       } finally {
-                                  if (jjtc001) {
+if (jjtc001) {
                                     jjtree.closeNodeScope(jjtn001,  1);
                                   }
       }
       break;
+      }
     case 16:
     case 25:
     case 26:
@@ -204,42 +210,45 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
     case SINGLE_QUOTED_STRING:
     case DOUBLE_QUOTED_STRING:
     case INT_LITERAL:
-    case FLOAT_LITERAL:
+    case FLOAT_LITERAL:{
       simpleCondition();
       break;
+      }
     default:
       jj_la1[3] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
-  }
+}
 
   final public void simpleCondition() throws ParseException {
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case TRUE:
-            ASTTrue jjtn001 = new ASTTrue(JJTTRUE);
+    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+    case TRUE:{
+ASTTrue jjtn001 = new ASTTrue(JJTTRUE);
             boolean jjtc001 = true;
             jjtree.openNodeScope(jjtn001);
       try {
         jj_consume_token(TRUE);
       } finally {
-            if (jjtc001) {
+if (jjtc001) {
               jjtree.closeNodeScope(jjtn001, true);
             }
       }
       break;
-    case FALSE:
-            ASTFalse jjtn002 = new ASTFalse(JJTFALSE);
+      }
+    case FALSE:{
+ASTFalse jjtn002 = new ASTFalse(JJTFALSE);
             boolean jjtc002 = true;
             jjtree.openNodeScope(jjtn002);
       try {
         jj_consume_token(FALSE);
       } finally {
-            if (jjtc002) {
+if (jjtc002) {
               jjtree.closeNodeScope(jjtn002, true);
             }
       }
       break;
+      }
     case 16:
     case 25:
     case 26:
@@ -281,9 +290,9 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
     case SINGLE_QUOTED_STRING:
     case DOUBLE_QUOTED_STRING:
     case INT_LITERAL:
-    case FLOAT_LITERAL:
+    case FLOAT_LITERAL:{
       conditionExpression();
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
       case 3:
       case 4:
       case 5:
@@ -297,29 +306,31 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
       case 13:
       case 14:
       case 15:
-      case 18:
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case 18:{
+        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
         case 5:
-        case 6:
-          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-          case 5:
+        case 6:{
+          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+          case 5:{
             jj_consume_token(5);
             break;
-          case 6:
+            }
+          case 6:{
             jj_consume_token(6);
             break;
+            }
           default:
             jj_la1[4] = jj_gen;
             jj_consume_token(-1);
             throw new ParseException();
           }
-                          ASTEqual jjtn003 = new ASTEqual(JJTEQUAL);
+ASTEqual jjtn003 = new ASTEqual(JJTEQUAL);
                           boolean jjtc003 = true;
                           jjtree.openNodeScope(jjtn003);
           try {
             scalarExpression();
           } catch (Throwable jjte003) {
-                          if (jjtc003) {
+if (jjtc003) {
                             jjtree.clearNodeScope(jjtn003);
                             jjtc003 = false;
                           } else {
@@ -333,32 +344,35 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
                           }
                           {if (true) throw (Error)jjte003;}
           } finally {
-                          if (jjtc003) {
+if (jjtc003) {
                             jjtree.closeNodeScope(jjtn003,  2);
                           }
           }
           break;
+          }
         case 7:
-        case 8:
-          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-          case 7:
+        case 8:{
+          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+          case 7:{
             jj_consume_token(7);
             break;
-          case 8:
+            }
+          case 8:{
             jj_consume_token(8);
             break;
+            }
           default:
             jj_la1[5] = jj_gen;
             jj_consume_token(-1);
             throw new ParseException();
           }
-                           ASTNotEqual jjtn004 = new ASTNotEqual(JJTNOTEQUAL);
+ASTNotEqual jjtn004 = new ASTNotEqual(JJTNOTEQUAL);
                            boolean jjtc004 = true;
                            jjtree.openNodeScope(jjtn004);
           try {
             scalarExpression();
           } catch (Throwable jjte004) {
-                           if (jjtc004) {
+if (jjtc004) {
                              jjtree.clearNodeScope(jjtn004);
                              jjtc004 = false;
                            } else {
@@ -372,20 +386,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
                            }
                            {if (true) throw (Error)jjte004;}
           } finally {
-                           if (jjtc004) {
+if (jjtc004) {
                              jjtree.closeNodeScope(jjtn004,  2);
                            }
           }
           break;
-        case 9:
+          }
+        case 9:{
           jj_consume_token(9);
-                 ASTLessOrEqual jjtn005 = new ASTLessOrEqual(JJTLESSOREQUAL);
+ASTLessOrEqual jjtn005 = new ASTLessOrEqual(JJTLESSOREQUAL);
                  boolean jjtc005 = true;
                  jjtree.openNodeScope(jjtn005);
           try {
             scalarExpression();
           } catch (Throwable jjte005) {
-                 if (jjtc005) {
+if (jjtc005) {
                    jjtree.clearNodeScope(jjtn005);
                    jjtc005 = false;
                  } else {
@@ -399,20 +414,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
                  }
                  {if (true) throw (Error)jjte005;}
           } finally {
-                 if (jjtc005) {
+if (jjtc005) {
                    jjtree.closeNodeScope(jjtn005,  2);
                  }
           }
           break;
-        case 10:
+          }
+        case 10:{
           jj_consume_token(10);
-                ASTLess jjtn006 = new ASTLess(JJTLESS);
+ASTLess jjtn006 = new ASTLess(JJTLESS);
                 boolean jjtc006 = true;
                 jjtree.openNodeScope(jjtn006);
           try {
             scalarExpression();
           } catch (Throwable jjte006) {
-                if (jjtc006) {
+if (jjtc006) {
                   jjtree.clearNodeScope(jjtn006);
                   jjtc006 = false;
                 } else {
@@ -426,20 +442,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
                 }
                 {if (true) throw (Error)jjte006;}
           } finally {
-                if (jjtc006) {
+if (jjtc006) {
                   jjtree.closeNodeScope(jjtn006,  2);
                 }
           }
           break;
-        case 11:
+          }
+        case 11:{
           jj_consume_token(11);
-                 ASTGreater jjtn007 = new ASTGreater(JJTGREATER);
+ASTGreater jjtn007 = new ASTGreater(JJTGREATER);
                  boolean jjtc007 = true;
                  jjtree.openNodeScope(jjtn007);
           try {
             scalarExpression();
           } catch (Throwable jjte007) {
-                 if (jjtc007) {
+if (jjtc007) {
                    jjtree.clearNodeScope(jjtn007);
                    jjtc007 = false;
                  } else {
@@ -453,20 +470,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
                  }
                  {if (true) throw (Error)jjte007;}
           } finally {
-                 if (jjtc007) {
+if (jjtc007) {
                    jjtree.closeNodeScope(jjtn007,  2);
                  }
           }
           break;
-        case 12:
+          }
+        case 12:{
           jj_consume_token(12);
-                 ASTGreaterOrEqual jjtn008 = new ASTGreaterOrEqual(JJTGREATEROREQUAL);
+ASTGreaterOrEqual jjtn008 = new ASTGreaterOrEqual(JJTGREATEROREQUAL);
                  boolean jjtc008 = true;
                  jjtree.openNodeScope(jjtn008);
           try {
             scalarExpression();
           } catch (Throwable jjte008) {
-                 if (jjtc008) {
+if (jjtc008) {
                    jjtree.clearNodeScope(jjtn008);
                    jjtc008 = false;
                  } else {
@@ -480,20 +498,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
                  }
                  {if (true) throw (Error)jjte008;}
           } finally {
-                 if (jjtc008) {
+if (jjtc008) {
                    jjtree.closeNodeScope(jjtn008,  2);
                  }
           }
           break;
-        case 13:
+          }
+        case 13:{
           jj_consume_token(13);
-                   ASTLike jjtn009 = new ASTLike(JJTLIKE);
+ASTLike jjtn009 = new ASTLike(JJTLIKE);
                    boolean jjtc009 = true;
                    jjtree.openNodeScope(jjtn009);
           try {
             scalarExpression();
           } catch (Throwable jjte009) {
-                   if (jjtc009) {
+if (jjtc009) {
                      jjtree.clearNodeScope(jjtn009);
                      jjtc009 = false;
                    } else {
@@ -507,20 +526,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
                    }
                    {if (true) throw (Error)jjte009;}
           } finally {
-                   if (jjtc009) {
+if (jjtc009) {
                      jjtree.closeNodeScope(jjtn009,  2);
                    }
           }
           break;
-        case 14:
+          }
+        case 14:{
           jj_consume_token(14);
-                              ASTLikeIgnoreCase jjtn010 = new ASTLikeIgnoreCase(JJTLIKEIGNORECASE);
+ASTLikeIgnoreCase jjtn010 = new ASTLikeIgnoreCase(JJTLIKEIGNORECASE);
                               boolean jjtc010 = true;
                               jjtree.openNodeScope(jjtn010);
           try {
             scalarExpression();
           } catch (Throwable jjte010) {
-                              if (jjtc010) {
+if (jjtc010) {
                                 jjtree.clearNodeScope(jjtn010);
                                 jjtc010 = false;
                               } else {
@@ -534,33 +554,36 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
                               }
                               {if (true) throw (Error)jjte010;}
           } finally {
-                              if (jjtc010) {
+if (jjtc010) {
                                 jjtree.closeNodeScope(jjtn010,  2);
                               }
           }
           break;
-        case 15:
+          }
+        case 15:{
           jj_consume_token(15);
-                 ASTIn jjtn011 = new ASTIn(JJTIN);
+ASTIn jjtn011 = new ASTIn(JJTIN);
                  boolean jjtc011 = true;
                  jjtree.openNodeScope(jjtn011);
           try {
-            switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-            case 65:
+            switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+            case 65:{
               namedParameter();
               break;
-            case 16:
+              }
+            case 16:{
               jj_consume_token(16);
               scalarCommaList();
               jj_consume_token(17);
               break;
+              }
             default:
               jj_la1[6] = jj_gen;
               jj_consume_token(-1);
               throw new ParseException();
             }
           } catch (Throwable jjte011) {
-                 if (jjtc011) {
+if (jjtc011) {
                    jjtree.clearNodeScope(jjtn011);
                    jjtc011 = false;
                  } else {
@@ -574,22 +597,23 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
                  }
                  {if (true) throw (Error)jjte011;}
           } finally {
-                 if (jjtc011) {
+if (jjtc011) {
                    jjtree.closeNodeScope(jjtn011,  2);
                  }
           }
           break;
-        case 18:
+          }
+        case 18:{
           jj_consume_token(18);
           scalarExpression();
           jj_consume_token(2);
-                                                ASTBetween jjtn012 = new ASTBetween(JJTBETWEEN);
+ASTBetween jjtn012 = new ASTBetween(JJTBETWEEN);
                                                 boolean jjtc012 = true;
                                                 jjtree.openNodeScope(jjtn012);
           try {
             scalarExpression();
           } catch (Throwable jjte012) {
-                                                if (jjtc012) {
+if (jjtc012) {
                                                   jjtree.clearNodeScope(jjtn012);
                                                   jjtc012 = false;
                                                 } else {
@@ -603,56 +627,62 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
                                                 }
                                                 {if (true) throw (Error)jjte012;}
           } finally {
-                                                if (jjtc012) {
+if (jjtc012) {
                                                   jjtree.closeNodeScope(jjtn012,  3);
                                                 }
           }
           break;
+          }
         case 3:
-        case 4:
+        case 4:{
           simpleNotCondition();
           break;
+          }
         default:
           jj_la1[7] = jj_gen;
           jj_consume_token(-1);
           throw new ParseException();
         }
         break;
+        }
       default:
         jj_la1[8] = jj_gen;
         ;
       }
       break;
+      }
     default:
       jj_la1[9] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
-  }
+}
 
   final public void simpleNotCondition() throws ParseException {
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case 3:
+    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+    case 3:{
       jj_consume_token(3);
       break;
-    case 4:
+      }
+    case 4:{
       jj_consume_token(4);
       break;
+      }
     default:
       jj_la1[10] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case 13:
+    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+    case 13:{
       jj_consume_token(13);
-                         ASTNotLike jjtn001 = new ASTNotLike(JJTNOTLIKE);
+ASTNotLike jjtn001 = new ASTNotLike(JJTNOTLIKE);
                          boolean jjtc001 = true;
                          jjtree.openNodeScope(jjtn001);
       try {
         scalarExpression();
       } catch (Throwable jjte001) {
-                         if (jjtc001) {
+if (jjtc001) {
                            jjtree.clearNodeScope(jjtn001);
                            jjtc001 = false;
                          } else {
@@ -666,20 +696,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
                          }
                          {if (true) throw (Error)jjte001;}
       } finally {
-                         if (jjtc001) {
+if (jjtc001) {
                            jjtree.closeNodeScope(jjtn001,  2);
                          }
       }
       break;
-    case 14:
+      }
+    case 14:{
       jj_consume_token(14);
-                                ASTNotLikeIgnoreCase jjtn002 = new ASTNotLikeIgnoreCase(JJTNOTLIKEIGNORECASE);
+ASTNotLikeIgnoreCase jjtn002 = new ASTNotLikeIgnoreCase(JJTNOTLIKEIGNORECASE);
                                 boolean jjtc002 = true;
                                 jjtree.openNodeScope(jjtn002);
       try {
         scalarExpression();
       } catch (Throwable jjte002) {
-                                if (jjtc002) {
+if (jjtc002) {
                                   jjtree.clearNodeScope(jjtn002);
                                   jjtc002 = false;
                                 } else {
@@ -693,33 +724,36 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
                                 }
                                 {if (true) throw (Error)jjte002;}
       } finally {
-                                if (jjtc002) {
+if (jjtc002) {
                                   jjtree.closeNodeScope(jjtn002,  2);
                                 }
       }
       break;
-    case 15:
+      }
+    case 15:{
       jj_consume_token(15);
-                       ASTNotIn jjtn003 = new ASTNotIn(JJTNOTIN);
+ASTNotIn jjtn003 = new ASTNotIn(JJTNOTIN);
                        boolean jjtc003 = true;
                        jjtree.openNodeScope(jjtn003);
       try {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case 65:
+        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+        case 65:{
           namedParameter();
           break;
-        case 16:
+          }
+        case 16:{
           jj_consume_token(16);
           scalarCommaList();
           jj_consume_token(17);
           break;
+          }
         default:
           jj_la1[11] = jj_gen;
           jj_consume_token(-1);
           throw new ParseException();
         }
       } catch (Throwable jjte003) {
-                       if (jjtc003) {
+if (jjtc003) {
                          jjtree.clearNodeScope(jjtn003);
                          jjtc003 = false;
                        } else {
@@ -733,22 +767,23 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
                        }
                        {if (true) throw (Error)jjte003;}
       } finally {
-                       if (jjtc003) {
+if (jjtc003) {
                          jjtree.closeNodeScope(jjtn003,  2);
                        }
       }
       break;
-    case 18:
+      }
+    case 18:{
       jj_consume_token(18);
       scalarExpression();
       jj_consume_token(2);
-                                                      ASTNotBetween jjtn004 = new ASTNotBetween(JJTNOTBETWEEN);
+ASTNotBetween jjtn004 = new ASTNotBetween(JJTNOTBETWEEN);
                                                       boolean jjtc004 = true;
                                                       jjtree.openNodeScope(jjtn004);
       try {
         scalarExpression();
       } catch (Throwable jjte004) {
-                                                      if (jjtc004) {
+if (jjtc004) {
                                                         jjtree.clearNodeScope(jjtn004);
                                                         jjtc004 = false;
                                                       } else {
@@ -762,30 +797,32 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
                                                       }
                                                       {if (true) throw (Error)jjte004;}
       } finally {
-                                                      if (jjtc004) {
+if (jjtc004) {
                                                         jjtree.closeNodeScope(jjtn004,  3);
                                                       }
       }
       break;
+      }
     default:
       jj_la1[12] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
-  }
+}
 
   final public void scalarCommaList() throws ParseException {
-          ASTList jjtn001 = new ASTList(JJTLIST);
+ASTList jjtn001 = new ASTList(JJTLIST);
           boolean jjtc001 = true;
           jjtree.openNodeScope(jjtn001);
     try {
       scalarConstExpression();
       label_3:
       while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case 19:
+        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+        case 19:{
           ;
           break;
+          }
         default:
           jj_la1[13] = jj_gen;
           break label_3;
@@ -794,7 +831,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
         scalarConstExpression();
       }
     } catch (Throwable jjte001) {
-          if (jjtc001) {
+if (jjtc001) {
             jjtree.clearNodeScope(jjtn001);
             jjtc001 = false;
           } else {
@@ -808,14 +845,14 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
           }
           {if (true) throw (Error)jjte001;}
     } finally {
-          if (jjtc001) {
+if (jjtc001) {
             jjtree.closeNodeScope(jjtn001, true);
           }
     }
-  }
+}
 
   final public void conditionExpression() throws ParseException {
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
     case 16:
     case 25:
     case 26:
@@ -841,121 +878,131 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
     case 68:
     case PROPERTY_PATH:
     case INT_LITERAL:
-    case FLOAT_LITERAL:
+    case FLOAT_LITERAL:{
       numericExpression();
       break;
+      }
     case CONCAT:
     case SUBSTRING:
     case TRIM:
     case LOWER:
     case UPPER:
     case SINGLE_QUOTED_STRING:
-    case DOUBLE_QUOTED_STRING:
+    case DOUBLE_QUOTED_STRING:{
       stringExpression();
       break;
-    case NULL:
-                  ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
+      }
+    case NULL:{
+ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
                   boolean jjtc001 = true;
                   jjtree.openNodeScope(jjtn001);
       try {
         jj_consume_token(NULL);
       } finally {
-                  if (jjtc001) {
+if (jjtc001) {
                     jjtree.closeNodeScope(jjtn001,  0);
                   }
       }
       break;
+      }
     case AVG:
     case MIN:
     case MAX:
     case SUM:
-    case COUNT:
+    case COUNT:{
       aggregateExpression();
       break;
+      }
     case CURRENT_DATE:
     case CURRENT_TIME:
-    case CURRENT_TIMESTAMP:
+    case CURRENT_TIMESTAMP:{
       dateTimeFunction();
       break;
+      }
     default:
       jj_la1[14] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
-  }
+}
 
   final public void stringParameter() throws ParseException {
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
     case 66:
     case 67:
     case 68:
-    case PROPERTY_PATH:
+    case PROPERTY_PATH:{
       pathExpression();
       break;
+      }
     case CONCAT:
     case SUBSTRING:
     case TRIM:
     case LOWER:
     case UPPER:
     case SINGLE_QUOTED_STRING:
-    case DOUBLE_QUOTED_STRING:
+    case DOUBLE_QUOTED_STRING:{
       stringExpression();
       break;
+      }
     default:
       jj_la1[15] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
-  }
+}
 
   final public void stringExpression() throws ParseException {
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case SINGLE_QUOTED_STRING:
+    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+    case SINGLE_QUOTED_STRING:{
       jj_consume_token(SINGLE_QUOTED_STRING);
-                             ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
                              boolean jjtc001 = true;
                              jjtree.openNodeScope(jjtn001);
       try {
-                             jjtree.closeNodeScope(jjtn001,  0);
+jjtree.closeNodeScope(jjtn001,  0);
                              jjtc001 = false;
-                             jjtn001.setValue(token_source.literalValue);
+jjtn001.setValue(token_source.literalValue);
       } finally {
-                             if (jjtc001) {
+if (jjtc001) {
                                jjtree.closeNodeScope(jjtn001,  0);
                              }
       }
       break;
-    case DOUBLE_QUOTED_STRING:
+      }
+    case DOUBLE_QUOTED_STRING:{
       jj_consume_token(DOUBLE_QUOTED_STRING);
-                             ASTScalar jjtn002 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn002 = new ASTScalar(JJTSCALAR);
                              boolean jjtc002 = true;
                              jjtree.openNodeScope(jjtn002);
       try {
-                             jjtree.closeNodeScope(jjtn002,  0);
+jjtree.closeNodeScope(jjtn002,  0);
                              jjtc002 = false;
-                             jjtn002.setValue(token_source.literalValue);
+jjtn002.setValue(token_source.literalValue);
       } finally {
-                             if (jjtc002) {
+if (jjtc002) {
                                jjtree.closeNodeScope(jjtn002,  0);
                              }
       }
       break;
+      }
     case CONCAT:
     case SUBSTRING:
     case TRIM:
     case LOWER:
-    case UPPER:
+    case UPPER:{
       functionsReturningStrings();
       break;
+      }
     default:
       jj_la1[16] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
-  }
+}
 
   final public void scalarExpression() throws ParseException {
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
     case 16:
     case 25:
     case 26:
@@ -997,172 +1044,183 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
     case SINGLE_QUOTED_STRING:
     case DOUBLE_QUOTED_STRING:
     case INT_LITERAL:
-    case FLOAT_LITERAL:
+    case FLOAT_LITERAL:{
       conditionExpression();
       break;
-    case TRUE:
+      }
+    case TRUE:{
       jj_consume_token(TRUE);
-                   ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
                    boolean jjtc001 = true;
                    jjtree.openNodeScope(jjtn001);
       try {
-                   jjtree.closeNodeScope(jjtn001,  0);
+jjtree.closeNodeScope(jjtn001,  0);
                    jjtc001 = false;
-                   jjtn001.setValue(true);
+jjtn001.setValue(true);
       } finally {
-                   if (jjtc001) {
+if (jjtc001) {
                      jjtree.closeNodeScope(jjtn001,  0);
                    }
       }
       break;
-    case FALSE:
+      }
+    case FALSE:{
       jj_consume_token(FALSE);
-                    ASTScalar jjtn002 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn002 = new ASTScalar(JJTSCALAR);
                     boolean jjtc002 = true;
                     jjtree.openNodeScope(jjtn002);
       try {
-                    jjtree.closeNodeScope(jjtn002,  0);
+jjtree.closeNodeScope(jjtn002,  0);
                     jjtc002 = false;
-                    jjtn002.setValue(false);
+jjtn002.setValue(false);
       } finally {
-                    if (jjtc002) {
+if (jjtc002) {
                       jjtree.closeNodeScope(jjtn002,  0);
                     }
       }
       break;
+      }
     default:
       jj_la1[17] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
-  }
+}
 
   final public void scalarConstExpression() throws ParseException {
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case SINGLE_QUOTED_STRING:
+    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+    case SINGLE_QUOTED_STRING:{
       jj_consume_token(SINGLE_QUOTED_STRING);
-                                   ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
                                    boolean jjtc001 = true;
                                    jjtree.openNodeScope(jjtn001);
       try {
-                                   jjtree.closeNodeScope(jjtn001,  0);
+jjtree.closeNodeScope(jjtn001,  0);
                                    jjtc001 = false;
-                                   jjtn001.setValue(token_source.literalValue);
+jjtn001.setValue(token_source.literalValue);
       } finally {
-                                   if (jjtc001) {
+if (jjtc001) {
                                      jjtree.closeNodeScope(jjtn001,  0);
                                    }
       }
       break;
-    case DOUBLE_QUOTED_STRING:
+      }
+    case DOUBLE_QUOTED_STRING:{
       jj_consume_token(DOUBLE_QUOTED_STRING);
-                                   ASTScalar jjtn002 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn002 = new ASTScalar(JJTSCALAR);
                                    boolean jjtc002 = true;
                                    jjtree.openNodeScope(jjtn002);
       try {
-                                   jjtree.closeNodeScope(jjtn002,  0);
+jjtree.closeNodeScope(jjtn002,  0);
                                    jjtc002 = false;
-                                   jjtn002.setValue(token_source.literalValue);
+jjtn002.setValue(token_source.literalValue);
       } finally {
-                                   if (jjtc002) {
+if (jjtc002) {
                                      jjtree.closeNodeScope(jjtn002,  0);
                                    }
       }
       break;
-    case 65:
+      }
+    case 65:{
       namedParameter();
       break;
-    case INT_LITERAL:
+      }
+    case INT_LITERAL:{
       jj_consume_token(INT_LITERAL);
-                            ASTScalar jjtn003 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn003 = new ASTScalar(JJTSCALAR);
                             boolean jjtc003 = true;
                             jjtree.openNodeScope(jjtn003);
       try {
-                            jjtree.closeNodeScope(jjtn003,  0);
+jjtree.closeNodeScope(jjtn003,  0);
                             jjtc003 = false;
-                            jjtn003.setValue(token_source.literalValue);
+jjtn003.setValue(token_source.literalValue);
       } finally {
-                            if (jjtc003) {
+if (jjtc003) {
                               jjtree.closeNodeScope(jjtn003,  0);
                             }
       }
       break;
-    case FLOAT_LITERAL:
+      }
+    case FLOAT_LITERAL:{
       jj_consume_token(FLOAT_LITERAL);
-                            ASTScalar jjtn004 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn004 = new ASTScalar(JJTSCALAR);
                             boolean jjtc004 = true;
                             jjtree.openNodeScope(jjtn004);
       try {
-                            jjtree.closeNodeScope(jjtn004,  0);
+jjtree.closeNodeScope(jjtn004,  0);
                             jjtc004 = false;
-                            jjtn004.setValue(token_source.literalValue);
+jjtn004.setValue(token_source.literalValue);
       } finally {
-                            if (jjtc004) {
+if (jjtc004) {
                               jjtree.closeNodeScope(jjtn004,  0);
                             }
       }
       break;
-    case TRUE:
+      }
+    case TRUE:{
       jj_consume_token(TRUE);
-                    ASTScalar jjtn005 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn005 = new ASTScalar(JJTSCALAR);
                     boolean jjtc005 = true;
                     jjtree.openNodeScope(jjtn005);
       try {
-                    jjtree.closeNodeScope(jjtn005,  0);
+jjtree.closeNodeScope(jjtn005,  0);
                     jjtc005 = false;
-                    jjtn005.setValue(true);
+jjtn005.setValue(true);
       } finally {
-                    if (jjtc005) {
+if (jjtc005) {
                       jjtree.closeNodeScope(jjtn005,  0);
                     }
       }
       break;
-    case FALSE:
+      }
+    case FALSE:{
       jj_consume_token(FALSE);
-                    ASTScalar jjtn006 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn006 = new ASTScalar(JJTSCALAR);
                     boolean jjtc006 = true;
                     jjtree.openNodeScope(jjtn006);
       try {
-                    jjtree.closeNodeScope(jjtn006,  0);
+jjtree.closeNodeScope(jjtn006,  0);
                     jjtc006 = false;
-                    jjtn006.setValue(false);
+jjtn006.setValue(false);
       } finally {
-                    if (jjtc006) {
+if (jjtc006) {
                       jjtree.closeNodeScope(jjtn006,  0);
                     }
       }
       break;
+      }
     default:
       jj_la1[18] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
-  }
+}
 
   final public void numericExpression() throws ParseException {
     bitwiseOr();
-  }
+}
 
   final public void bitwiseOr() throws ParseException {
     bitwiseXor();
     label_4:
     while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case 20:
+      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+      case 20:{
         ;
         break;
+        }
       default:
         jj_la1[19] = jj_gen;
         break label_4;
       }
       jj_consume_token(20);
-              ASTBitwiseOr jjtn001 = new ASTBitwiseOr(JJTBITWISEOR);
+ASTBitwiseOr jjtn001 = new ASTBitwiseOr(JJTBITWISEOR);
               boolean jjtc001 = true;
               jjtree.openNodeScope(jjtn001);
       try {
         bitwiseXor();
       } catch (Throwable jjte001) {
-              if (jjtc001) {
+if (jjtc001) {
                 jjtree.clearNodeScope(jjtn001);
                 jjtc001 = false;
               } else {
@@ -1176,33 +1234,34 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
               }
               {if (true) throw (Error)jjte001;}
       } finally {
-              if (jjtc001) {
+if (jjtc001) {
                 jjtree.closeNodeScope(jjtn001,  2);
               }
       }
     }
-  }
+}
 
   final public void bitwiseXor() throws ParseException {
     bitwiseAnd();
     label_5:
     while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case 21:
+      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+      case 21:{
         ;
         break;
+        }
       default:
         jj_la1[20] = jj_gen;
         break label_5;
       }
       jj_consume_token(21);
-              ASTBitwiseXor jjtn001 = new ASTBitwiseXor(JJTBITWISEXOR);
+ASTBitwiseXor jjtn001 = new ASTBitwiseXor(JJTBITWISEXOR);
               boolean jjtc001 = true;
               jjtree.openNodeScope(jjtn001);
       try {
         bitwiseAnd();
       } catch (Throwable jjte001) {
-              if (jjtc001) {
+if (jjtc001) {
                 jjtree.clearNodeScope(jjtn001);
                 jjtc001 = false;
               } else {
@@ -1216,33 +1275,34 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
               }
               {if (true) throw (Error)jjte001;}
       } finally {
-              if (jjtc001) {
+if (jjtc001) {
                 jjtree.closeNodeScope(jjtn001,  2);
               }
       }
     }
-  }
+}
 
   final public void bitwiseAnd() throws ParseException {
     bitwiseShift();
     label_6:
     while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case 22:
+      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+      case 22:{
         ;
         break;
+        }
       default:
         jj_la1[21] = jj_gen;
         break label_6;
       }
       jj_consume_token(22);
-              ASTBitwiseAnd jjtn001 = new ASTBitwiseAnd(JJTBITWISEAND);
+ASTBitwiseAnd jjtn001 = new ASTBitwiseAnd(JJTBITWISEAND);
               boolean jjtc001 = true;
               jjtree.openNodeScope(jjtn001);
       try {
         bitwiseShift();
       } catch (Throwable jjte001) {
-              if (jjtc001) {
+if (jjtc001) {
                 jjtree.clearNodeScope(jjtn001);
                 jjtc001 = false;
               } else {
@@ -1256,36 +1316,37 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
               }
               {if (true) throw (Error)jjte001;}
       } finally {
-              if (jjtc001) {
+if (jjtc001) {
                 jjtree.closeNodeScope(jjtn001,  2);
               }
       }
     }
-  }
+}
 
   final public void bitwiseShift() throws ParseException {
     arithmeticExp();
     label_7:
     while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
       case 23:
-      case 24:
+      case 24:{
         ;
         break;
+        }
       default:
         jj_la1[22] = jj_gen;
         break label_7;
       }
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case 23:
+      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+      case 23:{
         jj_consume_token(23);
-               ASTBitwiseLeftShift jjtn001 = new ASTBitwiseLeftShift(JJTBITWISELEFTSHIFT);
+ASTBitwiseLeftShift jjtn001 = new ASTBitwiseLeftShift(JJTBITWISELEFTSHIFT);
                boolean jjtc001 = true;
                jjtree.openNodeScope(jjtn001);
         try {
           arithmeticExp();
         } catch (Throwable jjte001) {
-               if (jjtc001) {
+if (jjtc001) {
                  jjtree.clearNodeScope(jjtn001);
                  jjtc001 = false;
                } else {
@@ -1299,20 +1360,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
                }
                {if (true) throw (Error)jjte001;}
         } finally {
-               if (jjtc001) {
+if (jjtc001) {
                  jjtree.closeNodeScope(jjtn001,  2);
                }
         }
         break;
-      case 24:
+        }
+      case 24:{
         jj_consume_token(24);
-               ASTBitwiseRightShift jjtn002 = new ASTBitwiseRightShift(JJTBITWISERIGHTSHIFT);
+ASTBitwiseRightShift jjtn002 = new ASTBitwiseRightShift(JJTBITWISERIGHTSHIFT);
                boolean jjtc002 = true;
                jjtree.openNodeScope(jjtn002);
         try {
           arithmeticExp();
         } catch (Throwable jjte002) {
-               if (jjtc002) {
+if (jjtc002) {
                  jjtree.clearNodeScope(jjtn002);
                  jjtc002 = false;
                } else {
@@ -1326,42 +1388,44 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
                }
                {if (true) throw (Error)jjte002;}
         } finally {
-               if (jjtc002) {
+if (jjtc002) {
                  jjtree.closeNodeScope(jjtn002,  2);
                }
         }
         break;
+        }
       default:
         jj_la1[23] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
     }
-  }
+}
 
   final public void arithmeticExp() throws ParseException {
     multiplySubtractExp();
     label_8:
     while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
       case 25:
-      case 26:
+      case 26:{
         ;
         break;
+        }
       default:
         jj_la1[24] = jj_gen;
         break label_8;
       }
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case 25:
+      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+      case 25:{
         jj_consume_token(25);
-              ASTAdd jjtn001 = new ASTAdd(JJTADD);
+ASTAdd jjtn001 = new ASTAdd(JJTADD);
               boolean jjtc001 = true;
               jjtree.openNodeScope(jjtn001);
         try {
           multiplySubtractExp();
         } catch (Throwable jjte001) {
-              if (jjtc001) {
+if (jjtc001) {
                 jjtree.clearNodeScope(jjtn001);
                 jjtc001 = false;
               } else {
@@ -1375,20 +1439,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
               }
               {if (true) throw (Error)jjte001;}
         } finally {
-              if (jjtc001) {
+if (jjtc001) {
                 jjtree.closeNodeScope(jjtn001,  2);
               }
         }
         break;
-      case 26:
+        }
+      case 26:{
         jj_consume_token(26);
-              ASTSubtract jjtn002 = new ASTSubtract(JJTSUBTRACT);
+ASTSubtract jjtn002 = new ASTSubtract(JJTSUBTRACT);
               boolean jjtc002 = true;
               jjtree.openNodeScope(jjtn002);
         try {
           multiplySubtractExp();
         } catch (Throwable jjte002) {
-              if (jjtc002) {
+if (jjtc002) {
                 jjtree.clearNodeScope(jjtn002);
                 jjtc002 = false;
               } else {
@@ -1402,42 +1467,44 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
               }
               {if (true) throw (Error)jjte002;}
         } finally {
-              if (jjtc002) {
+if (jjtc002) {
                 jjtree.closeNodeScope(jjtn002,  2);
               }
         }
         break;
+        }
       default:
         jj_la1[25] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
     }
-  }
+}
 
   final public void multiplySubtractExp() throws ParseException {
     numericTermExt();
     label_9:
     while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
       case 27:
-      case ASTERISK:
+      case ASTERISK:{
         ;
         break;
+        }
       default:
         jj_la1[26] = jj_gen;
         break label_9;
       }
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case ASTERISK:
+      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+      case ASTERISK:{
         jj_consume_token(ASTERISK);
-                     ASTMultiply jjtn001 = new ASTMultiply(JJTMULTIPLY);
+ASTMultiply jjtn001 = new ASTMultiply(JJTMULTIPLY);
                      boolean jjtc001 = true;
                      jjtree.openNodeScope(jjtn001);
         try {
           numericTermExt();
         } catch (Throwable jjte001) {
-                     if (jjtc001) {
+if (jjtc001) {
                        jjtree.clearNodeScope(jjtn001);
                        jjtc001 = false;
                      } else {
@@ -1451,20 +1518,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
                      }
                      {if (true) throw (Error)jjte001;}
         } finally {
-                     if (jjtc001) {
+if (jjtc001) {
                        jjtree.closeNodeScope(jjtn001,  2);
                      }
         }
         break;
-      case 27:
+        }
+      case 27:{
         jj_consume_token(27);
-              ASTDivide jjtn002 = new ASTDivide(JJTDIVIDE);
+ASTDivide jjtn002 = new ASTDivide(JJTDIVIDE);
               boolean jjtc002 = true;
               jjtree.openNodeScope(jjtn002);
         try {
           numericTermExt();
         } catch (Throwable jjte002) {
-              if (jjtc002) {
+if (jjtc002) {
                 jjtree.clearNodeScope(jjtn002);
                 jjtc002 = false;
               } else {
@@ -1478,21 +1546,22 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
               }
               {if (true) throw (Error)jjte002;}
         } finally {
-              if (jjtc002) {
+if (jjtc002) {
                 jjtree.closeNodeScope(jjtn002,  2);
               }
         }
         break;
+        }
       default:
         jj_la1[27] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
     }
-  }
+}
 
   final public void numericTermExt() throws ParseException {
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
     case 16:
     case 25:
     case 26:
@@ -1517,18 +1586,19 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
     case 68:
     case PROPERTY_PATH:
     case INT_LITERAL:
-    case FLOAT_LITERAL:
+    case FLOAT_LITERAL:{
       numericTerm();
       break;
-    case 28:
+      }
+    case 28:{
       jj_consume_token(28);
-              ASTBitwiseNot jjtn001 = new ASTBitwiseNot(JJTBITWISENOT);
+ASTBitwiseNot jjtn001 = new ASTBitwiseNot(JJTBITWISENOT);
               boolean jjtc001 = true;
               jjtree.openNodeScope(jjtn001);
       try {
         numericTerm();
       } catch (Throwable jjte001) {
-              if (jjtc001) {
+if (jjtc001) {
                 jjtree.clearNodeScope(jjtn001);
                 jjtc001 = false;
               } else {
@@ -1542,20 +1612,21 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
               }
               {if (true) throw (Error)jjte001;}
       } finally {
-              if (jjtc001) {
+if (jjtc001) {
                 jjtree.closeNodeScope(jjtn001,  1);
               }
       }
       break;
+      }
     default:
       jj_la1[28] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
-  }
+}
 
   final public void numericTerm() throws ParseException {
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
     case 16:
     case 25:
     case LENGTH:
@@ -1579,26 +1650,28 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
     case 68:
     case PROPERTY_PATH:
     case INT_LITERAL:
-    case FLOAT_LITERAL:
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case 25:
+    case FLOAT_LITERAL:{
+      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+      case 25:{
         jj_consume_token(25);
         break;
+        }
       default:
         jj_la1[29] = jj_gen;
         ;
       }
       numericPrimary();
       break;
-    case 26:
+      }
+    case 26:{
       jj_consume_token(26);
-               ASTNegate jjtn001 = new ASTNegate(JJTNEGATE);
+ASTNegate jjtn001 = new ASTNegate(JJTNEGATE);
                boolean jjtc001 = true;
                jjtree.openNodeScope(jjtn001);
       try {
         numericTerm();
       } catch (Throwable jjte001) {
-               if (jjtc001) {
+if (jjtc001) {
                  jjtree.clearNodeScope(jjtn001);
                  jjtc001 = false;
                } else {
@@ -1612,58 +1685,63 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
                }
                {if (true) throw (Error)jjte001;}
       } finally {
-               if (jjtc001) {
+if (jjtc001) {
                  jjtree.closeNodeScope(jjtn001,  1);
                }
       }
       break;
+      }
     default:
       jj_la1[30] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
-  }
+}
 
   final public void numericPrimary() throws ParseException {
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case 16:
+    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+    case 16:{
       jj_consume_token(16);
       orCondition();
       jj_consume_token(17);
       break;
-    case INT_LITERAL:
+      }
+    case INT_LITERAL:{
       jj_consume_token(INT_LITERAL);
-                           ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn001 = new ASTScalar(JJTSCALAR);
                            boolean jjtc001 = true;
                            jjtree.openNodeScope(jjtn001);
       try {
-                           jjtree.closeNodeScope(jjtn001,  0);
+jjtree.closeNodeScope(jjtn001,  0);
                            jjtc001 = false;
-                           jjtn001.setValue(token_source.literalValue);
+jjtn001.setValue(token_source.literalValue);
       } finally {
-                           if (jjtc001) {
+if (jjtc001) {
                              jjtree.closeNodeScope(jjtn001,  0);
                            }
       }
       break;
-    case FLOAT_LITERAL:
+      }
+    case FLOAT_LITERAL:{
       jj_consume_token(FLOAT_LITERAL);
-                            ASTScalar jjtn002 = new ASTScalar(JJTSCALAR);
+ASTScalar jjtn002 = new ASTScalar(JJTSCALAR);
                             boolean jjtc002 = true;
                             jjtree.openNodeScope(jjtn002);
       try {
-                            jjtree.closeNodeScope(jjtn002,  0);
+jjtree.closeNodeScope(jjtn002,  0);
                             jjtc002 = false;
-                            jjtn002.setValue(token_source.literalValue);
+jjtn002.setValue(token_source.literalValue);
       } finally {
-                            if (jjtc002) {
+if (jjtc002) {
                               jjtree.closeNodeScope(jjtn002,  0);
                             }
       }
       break;
-    case 65:
+      }
+    case 65:{
       namedParameter();
       break;
+      }
     case LENGTH:
     case LOCATE:
     case ABS:
@@ -1678,48 +1756,54 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
     case DAY_OF_WEEK:
     case HOUR:
     case MINUTE:
-    case SECOND:
+    case SECOND:{
       functionsReturningNumerics();
       break;
+      }
     case 66:
     case 67:
     case 68:
-    case PROPERTY_PATH:
+    case PROPERTY_PATH:{
       pathExpression();
       break;
+      }
     default:
       jj_la1[31] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
-  }
+}
 
   final public void functionsReturningStrings() throws ParseException {
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case CONCAT:
+    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+    case CONCAT:{
       concat();
       break;
-    case SUBSTRING:
+      }
+    case SUBSTRING:{
       substring();
       break;
-    case TRIM:
+      }
+    case TRIM:{
       trim();
       break;
-    case LOWER:
+      }
+    case LOWER:{
       lower();
       break;
-    case UPPER:
+      }
+    case UPPER:{
       upper();
       break;
+      }
     default:
       jj_la1[32] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
-  }
+}
 
-  final public void concat() throws ParseException {
-                         /*@bgen(jjtree) Concat */
+  final public void concat() throws ParseException {/*@bgen(jjtree) Concat */
   ASTConcat jjtn000 = new ASTConcat(JJTCONCAT);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
@@ -1729,10 +1813,11 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
       stringParameter();
       label_10:
       while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case 19:
+        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+        case 19:{
           ;
           break;
+          }
         default:
           jj_la1[33] = jj_gen;
           break label_10;
@@ -1742,7 +1827,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
       }
       jj_consume_token(17);
     } catch (Throwable jjte000) {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.clearNodeScope(jjtn000);
             jjtc000 = false;
           } else {
@@ -1756,14 +1841,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
           }
           {if (true) throw (Error)jjte000;}
     } finally {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.closeNodeScope(jjtn000, true);
           }
     }
-  }
+}
 
-  final public void substring() throws ParseException {
-                               /*@bgen(jjtree) Substring */
+  final public void substring() throws ParseException {/*@bgen(jjtree) Substring */
   ASTSubstring jjtn000 = new ASTSubstring(JJTSUBSTRING);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
@@ -1773,18 +1857,19 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
       stringParameter();
       jj_consume_token(19);
       numericExpression();
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case 19:
+      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+      case 19:{
         jj_consume_token(19);
         numericExpression();
         break;
+        }
       default:
         jj_la1[34] = jj_gen;
         ;
       }
       jj_consume_token(17);
     } catch (Throwable jjte000) {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.clearNodeScope(jjtn000);
             jjtc000 = false;
           } else {
@@ -1798,14 +1883,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
           }
           {if (true) throw (Error)jjte000;}
     } finally {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.closeNodeScope(jjtn000, true);
           }
     }
-  }
+}
 
-  final public void trim() throws ParseException {
-                     /*@bgen(jjtree) Trim */
+  final public void trim() throws ParseException {/*@bgen(jjtree) Trim */
   ASTTrim jjtn000 = new ASTTrim(JJTTRIM);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
@@ -1815,7 +1899,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
       stringParameter();
       jj_consume_token(17);
     } catch (Throwable jjte000) {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.clearNodeScope(jjtn000);
             jjtc000 = false;
           } else {
@@ -1829,14 +1913,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
           }
           {if (true) throw (Error)jjte000;}
     } finally {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.closeNodeScope(jjtn000, true);
           }
     }
-  }
+}
 
-  final public void lower() throws ParseException {
-                       /*@bgen(jjtree) Lower */
+  final public void lower() throws ParseException {/*@bgen(jjtree) Lower */
   ASTLower jjtn000 = new ASTLower(JJTLOWER);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
@@ -1846,7 +1929,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
       stringParameter();
       jj_consume_token(17);
     } catch (Throwable jjte000) {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.clearNodeScope(jjtn000);
             jjtc000 = false;
           } else {
@@ -1860,14 +1943,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
           }
           {if (true) throw (Error)jjte000;}
     } finally {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.closeNodeScope(jjtn000, true);
           }
     }
-  }
+}
 
-  final public void upper() throws ParseException {
-                       /*@bgen(jjtree) Upper */
+  final public void upper() throws ParseException {/*@bgen(jjtree) Upper */
   ASTUpper jjtn000 = new ASTUpper(JJTUPPER);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
@@ -1877,7 +1959,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
       stringParameter();
       jj_consume_token(17);
     } catch (Throwable jjte000) {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.clearNodeScope(jjtn000);
             jjtc000 = false;
           } else {
@@ -1891,29 +1973,34 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
           }
           {if (true) throw (Error)jjte000;}
     } finally {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.closeNodeScope(jjtn000, true);
           }
     }
-  }
+}
 
   final public void functionsReturningNumerics() throws ParseException {
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case LENGTH:
+    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+    case LENGTH:{
       length();
       break;
-    case LOCATE:
+      }
+    case LOCATE:{
       locate();
       break;
-    case ABS:
+      }
+    case ABS:{
       abs();
       break;
-    case SQRT:
+      }
+    case SQRT:{
       sqrt();
       break;
-    case MOD:
+      }
+    case MOD:{
       mod();
       break;
+      }
     case YEAR:
     case MONTH:
     case WEEK:
@@ -1923,18 +2010,18 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
     case DAY_OF_WEEK:
     case HOUR:
     case MINUTE:
-    case SECOND:
+    case SECOND:{
       dateTimeExtractingFunction();
       break;
+      }
     default:
       jj_la1[35] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
-  }
+}
 
-  final public void length() throws ParseException {
-                         /*@bgen(jjtree) Length */
+  final public void length() throws ParseException {/*@bgen(jjtree) Length */
   ASTLength jjtn000 = new ASTLength(JJTLENGTH);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
@@ -1944,7 +2031,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
       stringParameter();
       jj_consume_token(17);
     } catch (Throwable jjte000) {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.clearNodeScope(jjtn000);
             jjtc000 = false;
           } else {
@@ -1958,14 +2045,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
           }
           {if (true) throw (Error)jjte000;}
     } finally {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.closeNodeScope(jjtn000, true);
           }
     }
-  }
+}
 
-  final public void locate() throws ParseException {
-                         /*@bgen(jjtree) Locate */
+  final public void locate() throws ParseException {/*@bgen(jjtree) Locate */
   ASTLocate jjtn000 = new ASTLocate(JJTLOCATE);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
@@ -1975,18 +2061,19 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
       stringParameter();
       jj_consume_token(19);
       stringParameter();
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case 19:
+      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+      case 19:{
         jj_consume_token(19);
         numericExpression();
         break;
+        }
       default:
         jj_la1[36] = jj_gen;
         ;
       }
       jj_consume_token(17);
     } catch (Throwable jjte000) {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.clearNodeScope(jjtn000);
             jjtc000 = false;
           } else {
@@ -2000,14 +2087,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
           }
           {if (true) throw (Error)jjte000;}
     } finally {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.closeNodeScope(jjtn000, true);
           }
     }
-  }
+}
 
-  final public void abs() throws ParseException {
-                   /*@bgen(jjtree) Abs */
+  final public void abs() throws ParseException {/*@bgen(jjtree) Abs */
   ASTAbs jjtn000 = new ASTAbs(JJTABS);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
@@ -2017,7 +2103,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
       numericExpression();
       jj_consume_token(17);
     } catch (Throwable jjte000) {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.clearNodeScope(jjtn000);
             jjtc000 = false;
           } else {
@@ -2031,14 +2117,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
           }
           {if (true) throw (Error)jjte000;}
     } finally {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.closeNodeScope(jjtn000, true);
           }
     }
-  }
+}
 
-  final public void sqrt() throws ParseException {
-                     /*@bgen(jjtree) Sqrt */
+  final public void sqrt() throws ParseException {/*@bgen(jjtree) Sqrt */
   ASTSqrt jjtn000 = new ASTSqrt(JJTSQRT);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
@@ -2048,7 +2133,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
       numericExpression();
       jj_consume_token(17);
     } catch (Throwable jjte000) {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.clearNodeScope(jjtn000);
             jjtc000 = false;
           } else {
@@ -2062,14 +2147,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
           }
           {if (true) throw (Error)jjte000;}
     } finally {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.closeNodeScope(jjtn000, true);
           }
     }
-  }
+}
 
-  final public void mod() throws ParseException {
-                   /*@bgen(jjtree) Mod */
+  final public void mod() throws ParseException {/*@bgen(jjtree) Mod */
   ASTMod jjtn000 = new ASTMod(JJTMOD);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
@@ -2081,7 +2165,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
       numericExpression();
       jj_consume_token(17);
     } catch (Throwable jjte000) {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.clearNodeScope(jjtn000);
             jjtc000 = false;
           } else {
@@ -2095,71 +2179,77 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
           }
           {if (true) throw (Error)jjte000;}
     } finally {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.closeNodeScope(jjtn000, true);
           }
     }
-  }
+}
 
   final public void aggregateExpression() throws ParseException {
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case AVG:
+    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+    case AVG:{
       avg();
       break;
-    case MAX:
+      }
+    case MAX:{
       max();
       break;
-    case MIN:
+      }
+    case MIN:{
       min();
       break;
-    case SUM:
+      }
+    case SUM:{
       sum();
       break;
-    case COUNT:
+      }
+    case COUNT:{
       count();
       break;
+      }
     default:
       jj_la1[37] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
-  }
+}
 
-  final public void asterisk() throws ParseException {
-                             /*@bgen(jjtree) Asterisk */
+  final public void asterisk() throws ParseException {/*@bgen(jjtree) Asterisk */
   ASTAsterisk jjtn000 = new ASTAsterisk(JJTASTERISK);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
     try {
       jj_consume_token(ASTERISK);
     } finally {
-      if (jjtc000) {
+if (jjtc000) {
         jjtree.closeNodeScope(jjtn000, true);
       }
     }
-  }
+}
 
-  final public void count() throws ParseException {
-                       /*@bgen(jjtree) Count */
+  final public void count() throws ParseException {/*@bgen(jjtree) Count */
   ASTCount jjtn000 = new ASTCount(JJTCOUNT);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
     try {
       jj_consume_token(COUNT);
       jj_consume_token(16);
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case ASTERISK:
+      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+      case ASTERISK:{
         asterisk();
         break;
+        }
       case 66:
       case 67:
       case 68:
-      case PROPERTY_PATH:
+      case PROPERTY_PATH:{
         pathExpression();
         break;
-      case DISTINCT:
+        }
+      case DISTINCT:{
         distinct();
         break;
+        }
       default:
         jj_la1[38] = jj_gen;
         jj_consume_token(-1);
@@ -2167,7 +2257,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
       }
       jj_consume_token(17);
     } catch (Throwable jjte000) {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.clearNodeScope(jjtn000);
             jjtc000 = false;
           } else {
@@ -2181,14 +2271,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
           }
           {if (true) throw (Error)jjte000;}
     } finally {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.closeNodeScope(jjtn000, true);
           }
     }
-  }
+}
 
-  final public void avg() throws ParseException {
-                   /*@bgen(jjtree) Avg */
+  final public void avg() throws ParseException {/*@bgen(jjtree) Avg */
   ASTAvg jjtn000 = new ASTAvg(JJTAVG);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
@@ -2198,7 +2287,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
       numericExpression();
       jj_consume_token(17);
     } catch (Throwable jjte000) {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.clearNodeScope(jjtn000);
             jjtc000 = false;
           } else {
@@ -2212,14 +2301,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
           }
           {if (true) throw (Error)jjte000;}
     } finally {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.closeNodeScope(jjtn000, true);
           }
     }
-  }
+}
 
-  final public void max() throws ParseException {
-                   /*@bgen(jjtree) Max */
+  final public void max() throws ParseException {/*@bgen(jjtree) Max */
   ASTMax jjtn000 = new ASTMax(JJTMAX);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
@@ -2229,7 +2317,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
       numericExpression();
       jj_consume_token(17);
     } catch (Throwable jjte000) {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.clearNodeScope(jjtn000);
             jjtc000 = false;
           } else {
@@ -2243,14 +2331,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
           }
           {if (true) throw (Error)jjte000;}
     } finally {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.closeNodeScope(jjtn000, true);
           }
     }
-  }
+}
 
-  final public void min() throws ParseException {
-                   /*@bgen(jjtree) Min */
+  final public void min() throws ParseException {/*@bgen(jjtree) Min */
   ASTMin jjtn000 = new ASTMin(JJTMIN);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
@@ -2260,7 +2347,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
       numericExpression();
       jj_consume_token(17);
     } catch (Throwable jjte000) {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.clearNodeScope(jjtn000);
             jjtc000 = false;
           } else {
@@ -2274,14 +2361,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
           }
           {if (true) throw (Error)jjte000;}
     } finally {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.closeNodeScope(jjtn000, true);
           }
     }
-  }
+}
 
-  final public void sum() throws ParseException {
-                   /*@bgen(jjtree) Sum */
+  final public void sum() throws ParseException {/*@bgen(jjtree) Sum */
   ASTSum jjtn000 = new ASTSum(JJTSUM);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
@@ -2291,7 +2377,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
       numericExpression();
       jj_consume_token(17);
     } catch (Throwable jjte000) {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.clearNodeScope(jjtn000);
             jjtc000 = false;
           } else {
@@ -2305,32 +2391,34 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
           }
           {if (true) throw (Error)jjte000;}
     } finally {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.closeNodeScope(jjtn000, true);
           }
     }
-  }
+}
 
   final public void dateTimeFunction() throws ParseException {
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case CURRENT_DATE:
+    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+    case CURRENT_DATE:{
       currentDate();
       break;
-    case CURRENT_TIME:
+      }
+    case CURRENT_TIME:{
       currentTime();
       break;
-    case CURRENT_TIMESTAMP:
+      }
+    case CURRENT_TIMESTAMP:{
       currentTimestamp();
       break;
+      }
     default:
       jj_la1[39] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
-  }
+}
 
-  final public void currentDate() throws ParseException {
-                                   /*@bgen(jjtree) CurrentDate */
+  final public void currentDate() throws ParseException {/*@bgen(jjtree) CurrentDate */
   ASTCurrentDate jjtn000 = new ASTCurrentDate(JJTCURRENTDATE);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
@@ -2339,14 +2427,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
       jj_consume_token(16);
       jj_consume_token(17);
     } finally {
-      if (jjtc000) {
+if (jjtc000) {
         jjtree.closeNodeScope(jjtn000, true);
       }
     }
-  }
+}
 
-  final public void currentTime() throws ParseException {
-                                   /*@bgen(jjtree) CurrentTime */
+  final public void currentTime() throws ParseException {/*@bgen(jjtree) CurrentTime */
   ASTCurrentTime jjtn000 = new ASTCurrentTime(JJTCURRENTTIME);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
@@ -2355,14 +2442,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
       jj_consume_token(16);
       jj_consume_token(17);
     } finally {
-      if (jjtc000) {
+if (jjtc000) {
         jjtree.closeNodeScope(jjtn000, true);
       }
     }
-  }
+}
 
-  final public void currentTimestamp() throws ParseException {
-                                             /*@bgen(jjtree) CurrentTimestamp */
+  final public void currentTimestamp() throws ParseException {/*@bgen(jjtree) CurrentTimestamp */
   ASTCurrentTimestamp jjtn000 = new ASTCurrentTimestamp(JJTCURRENTTIMESTAMP);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
@@ -2371,61 +2457,70 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
       jj_consume_token(16);
       jj_consume_token(17);
     } finally {
-      if (jjtc000) {
+if (jjtc000) {
         jjtree.closeNodeScope(jjtn000, true);
       }
     }
-  }
+}
 
 /* Date/time parts extracting function */
-  final public void dateTimeExtractingFunction() throws ParseException {
-                                                 /*@bgen(jjtree) #Extract( 1) */
+  final public void dateTimeExtractingFunction() throws ParseException {/*@bgen(jjtree) #Extract( 1) */
     ASTExtract jjtn000 = new ASTExtract(JJTEXTRACT);
     boolean jjtc000 = true;
     jjtree.openNodeScope(jjtn000);Token t;
     try {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case YEAR:
+      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+      case YEAR:{
         t = jj_consume_token(YEAR);
         break;
-      case MONTH:
+        }
+      case MONTH:{
         t = jj_consume_token(MONTH);
         break;
-      case WEEK:
+        }
+      case WEEK:{
         t = jj_consume_token(WEEK);
         break;
-      case DAY_OF_YEAR:
+        }
+      case DAY_OF_YEAR:{
         t = jj_consume_token(DAY_OF_YEAR);
         break;
-      case DAY:
+        }
+      case DAY:{
         t = jj_consume_token(DAY);
         break;
-      case DAY_OF_MONTH:
+        }
+      case DAY_OF_MONTH:{
         t = jj_consume_token(DAY_OF_MONTH);
         break;
-      case DAY_OF_WEEK:
+        }
+      case DAY_OF_WEEK:{
         t = jj_consume_token(DAY_OF_WEEK);
         break;
-      case HOUR:
+        }
+      case HOUR:{
         t = jj_consume_token(HOUR);
         break;
-      case MINUTE:
+        }
+      case MINUTE:{
         t = jj_consume_token(MINUTE);
         break;
-      case SECOND:
+        }
+      case SECOND:{
         t = jj_consume_token(SECOND);
         break;
+        }
       default:
         jj_la1[40] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
-        jjtn000.setPartToken(t.image);
+jjtn000.setPartToken(t.image);
       jj_consume_token(16);
       pathExpression();
       jj_consume_token(17);
     } catch (Throwable jjte000) {
-      if (jjtc000) {
+if (jjtc000) {
         jjtree.clearNodeScope(jjtn000);
         jjtc000 = false;
       } else {
@@ -2439,14 +2534,13 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
       }
       {if (true) throw (Error)jjte000;}
     } finally {
-      if (jjtc000) {
+if (jjtc000) {
         jjtree.closeNodeScope(jjtn000,  1);
       }
     }
-  }
+}
 
-  final public void distinct() throws ParseException {
-                             /*@bgen(jjtree) Distinct */
+  final public void distinct() throws ParseException {/*@bgen(jjtree) Distinct */
   ASTDistinct jjtn000 = new ASTDistinct(JJTDISTINCT);
   boolean jjtc000 = true;
   jjtree.openNodeScope(jjtn000);
@@ -2456,7 +2550,7 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
       pathExpression();
       jj_consume_token(17);
     } catch (Throwable jjte000) {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.clearNodeScope(jjtn000);
             jjtc000 = false;
           } else {
@@ -2470,102 +2564,232 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
           }
           {if (true) throw (Error)jjte000;}
     } finally {
-          if (jjtc000) {
+if (jjtc000) {
             jjtree.closeNodeScope(jjtn000, true);
           }
     }
-  }
+}
 
-  final public void namedParameter() throws ParseException {
-        Token t;
+  final public void namedParameter() throws ParseException {Token t;
     jj_consume_token(65);
     t = jj_consume_token(PROPERTY_PATH);
-                                  ASTNamedParameter jjtn001 = new ASTNamedParameter(JJTNAMEDPARAMETER);
+ASTNamedParameter jjtn001 = new ASTNamedParameter(JJTNAMEDPARAMETER);
                                   boolean jjtc001 = true;
                                   jjtree.openNodeScope(jjtn001);
     try {
-                                  jjtree.closeNodeScope(jjtn001,  0);
+jjtree.closeNodeScope(jjtn001,  0);
                                   jjtc001 = false;
-                                  jjtn001.setValue(t.image);
+jjtn001.setValue(t.image);
     } finally {
-                                  if (jjtc001) {
+if (jjtc001) {
                                     jjtree.closeNodeScope(jjtn001,  0);
                                   }
     }
-  }
+}
 
-  final public void pathExpression() throws ParseException {
-   Token t;
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case PROPERTY_PATH:
+  final public void pathExpression() throws ParseException {Token t;
+    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+    case PROPERTY_PATH:{
       t = jj_consume_token(PROPERTY_PATH);
-                                   ASTObjPath jjtn001 = new ASTObjPath(JJTOBJPATH);
+ASTObjPath jjtn001 = new ASTObjPath(JJTOBJPATH);
                                    boolean jjtc001 = true;
                                    jjtree.openNodeScope(jjtn001);
       try {
-                                   jjtree.closeNodeScope(jjtn001,  0);
+jjtree.closeNodeScope(jjtn001,  0);
                                    jjtc001 = false;
-                                   jjtn001.setPath(t.image);
+jjtn001.setPath(t.image);
       } finally {
-                                   if (jjtc001) {
+if (jjtc001) {
                                      jjtree.closeNodeScope(jjtn001,  0);
                                    }
       }
       break;
-    case 66:
+      }
+    case 66:{
       jj_consume_token(66);
-      t = jj_consume_token(PROPERTY_PATH);
-                                   ASTObjPath jjtn002 = new ASTObjPath(JJTOBJPATH);
-                                   boolean jjtc002 = true;
-                                   jjtree.openNodeScope(jjtn002);
+      t = pathToken();
+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 67:
+      }
+    case 67:{
       jj_consume_token(67);
-      t = jj_consume_token(PROPERTY_PATH);
-                                   ASTDbPath jjtn003 = new ASTDbPath(JJTDBPATH);
-                                   boolean jjtc003 = true;
-                                   jjtree.openNodeScope(jjtn003);
+      t = pathToken();
+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 68:
+      }
+    case 68:{
       jj_consume_token(68);
-      t = jj_consume_token(PROPERTY_PATH);
-                                   ASTEnum jjtn004 = new ASTEnum(JJTENUM);
-                                   boolean jjtc004 = true;
-                                   jjtree.openNodeScope(jjtn004);
+      t = pathToken();
+ASTEnum jjtn004 = new ASTEnum(JJTENUM);
+                               boolean jjtc004 = true;
+                               jjtree.openNodeScope(jjtn004);
       try {
-                                   jjtree.closeNodeScope(jjtn004,  0);
-                                   jjtc004 = false;
-                                   jjtn004.setEnumValue(t.image);
+jjtree.closeNodeScope(jjtn004,  0);
+                               jjtc004 = false;
+jjtn004.setEnumValue(t.image);
       } finally {
-                                   if (jjtc004) {
-                                     jjtree.closeNodeScope(jjtn004,  0);
-                                   }
+if (jjtc004) {
+                                 jjtree.closeNodeScope(jjtn004,  0);
+                               }
       }
       break;
+      }
     default:
       jj_la1[41] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
-  }
+}
+
+// this rule returns single token that could be used as a path definition
+  final public Token pathToken() throws ParseException {Token t ;
+    switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+    case PROPERTY_PATH:{
+      t = jj_consume_token(PROPERTY_PATH);
+      break;
+      }
+    case AVG:{
+      t = jj_consume_token(AVG);
+      break;
+      }
+    case MIN:{
+      t = jj_consume_token(MIN);
+      break;
+      }
+    case MAX:{
+      t = jj_consume_token(MAX);
+      break;
+      }
+    case SUM:{
+      t = jj_consume_token(SUM);
+      break;
+      }
+    case COUNT:{
+      t = jj_consume_token(COUNT);
+      break;
+      }
+    case DISTINCT:{
+      t = jj_consume_token(DISTINCT);
+      break;
+      }
+    case CONCAT:{
+      t = jj_consume_token(CONCAT);
+      break;
+      }
+    case SUBSTRING:{
+      t = jj_consume_token(SUBSTRING);
+      break;
+      }
+    case TRIM:{
+      t = jj_consume_token(TRIM);
+      break;
+      }
+    case LOWER:{
+      t = jj_consume_token(LOWER);
+      break;
+      }
+    case UPPER:{
+      t = jj_consume_token(UPPER);
+      break;
+      }
+    case LENGTH:{
+      t = jj_consume_token(LENGTH);
+      break;
+      }
+    case LOCATE:{
+      t = jj_consume_token(LOCATE);
+      break;
+      }
+    case ABS:{
+      t = jj_consume_token(ABS);
+      break;
+      }
+    case SQRT:{
+      t = jj_consume_token(SQRT);
+      break;
+      }
+    case MOD:{
+      t = jj_consume_token(MOD);
+      break;
+      }
+    case CURRENT_DATE:{
+      t = jj_consume_token(CURRENT_DATE);
+      break;
+      }
+    case CURRENT_TIME:{
+      t = jj_consume_token(CURRENT_TIME);
+      break;
+      }
+    case CURRENT_TIMESTAMP:{
+      t = jj_consume_token(CURRENT_TIMESTAMP);
+      break;
+      }
+    case YEAR:{
+      t = jj_consume_token(YEAR);
+      break;
+      }
+    case MONTH:{
+      t = jj_consume_token(MONTH);
+      break;
+      }
+    case DAY:{
+      t = jj_consume_token(DAY);
+      break;
+      }
+    case HOUR:{
+      t = jj_consume_token(HOUR);
+      break;
+      }
+    case MINUTE:{
+      t = jj_consume_token(MINUTE);
+      break;
+      }
+    case SECOND:{
+      t = jj_consume_token(SECOND);
+      break;
+      }
+    case DAY_OF_MONTH:{
+      t = jj_consume_token(DAY_OF_MONTH);
+      break;
+      }
+    case DAY_OF_WEEK:{
+      t = jj_consume_token(DAY_OF_WEEK);
+      break;
+      }
+    case DAY_OF_YEAR:{
+      t = jj_consume_token(DAY_OF_YEAR);
+      break;
+      }
+    default:
+      jj_la1[42] = jj_gen;
+      jj_consume_token(-1);
+      throw new ParseException();
+    }
+{if ("" != null) return t;}
+    throw new Error("Missing return statement in function");
+}
 
   /** Generated Token Manager. */
   public ExpressionParserTokenManager token_source;
@@ -2576,133 +2800,141 @@ 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[42];
+  final private int[] jj_la1 = new int[43];
   static private int[] jj_la1_0;
   static private int[] jj_la1_1;
   static private int[] jj_la1_2;
   static {
-      jj_la1_init_0();
-      jj_la1_init_1();
-      jj_la1_init_2();
-   }
-   private static void jj_la1_init_0() {
-      jj_la1_0 = new int[] {0x2,0x4,0x18,0x16010018,0x60,0x180,0x10000,0x4fff8,0x4fff8,0x16010000,0x18,0x10000,0x4e000,0x80000,0x16010000,0x0,0x0,0x16010000,0x0,0x100000,0x200000,0x400000,0x1800000,0x1800000,0x6000000,0x6000000,0x8000000,0x8000000,0x16010000,0x2000000,0x6010000,0x10000,0x0,0x80000,0x80000,0x0,0x80000,0x0,0x0,0x0,0x0,0x0,};
-   }
-   private static void jj_la1_init_1() {
-      jj_la1_1 = new int[] {0x0,0x0,0x0,0xfffffdfe,0x0,0x0,0x0,0x0,0x0,0xfffffdfe,0x0,0x0,0x0,0x0,0xfffffdf2,0x7c00,0x7c00,0xfffffdfe,0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff8f8000,0x0,0xff8f8000,0xff8f8000,0x7c00,0x0,0x0,0xff8f8000,0x0,0x1f0,0x200,0x700000,0xff800000,0x0,};
-   }
-   private static void jj_la1_init_2() {
-      jj_la1_2 = new int[] {0x0,0x0,0x0,0xe405f,0x0,0x0,0x2,0x0,0x0,0xe405f,0x0,0x2,0x0,0x0,0xe405f,0x2405c,0x24000,0xe405f,0xe4002,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20,0x20,0xc005f,0x0,0xc005f,0xc005f,0x0,0x0,0x0,0x1,0x0,0x0,0x7c,0x0,0x1,0x5c,};
-   }
+	   jj_la1_init_0();
+	   jj_la1_init_1();
+	   jj_la1_init_2();
+	}
+	private static void jj_la1_init_0() {
+	   jj_la1_0 = new int[] {0x2,0x4,0x18,0x16010018,0x60,0x180,0x10000,0x4fff8,0x4fff8,0x16010000,0x18,0x10000,0x4e000,0x80000,0x16010000,0x0,0x0,0x16010000,0x0,0x100000,0x200000,0x400000,0x1800000,0x1800000,0x6000000,0x6000000,0x8000000,0x8000000,0x16010000,0x2000000,0x6010000,0x10000,0x0,0x80000,0x80000,0x0,0x80000,0x0,0x0,0x0,0x0,0x0,0x0,};
+	}
+	private static void jj_la1_init_1() {
+	   jj_la1_1 = new int[] {0x0,0x0,0x0,0xfffffdfe,0x0,0x0,0x0,0x0,0x0,0xfffffdfe,0x0,0x0,0x0,0x0,0xfffffdf2,0x7c00,0x7c00,0xfffffdfe,0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff8f8000,0x0,0xff8f8000,0xff8f8000,0x7c00,0x0,0x0,0xff8f8000,0x0,0x1f0,0x200,0x700000,0xff800000,0x0,0xfdfffff0,};
+	}
+	private static void jj_la1_init_2() {
+	   jj_la1_2 = new int[] {0x0,0x0,0x0,0xe405f,0x0,0x0,0x2,0x0,0x0,0xe405f,0x0,0x2,0x0,0x0,0xe405f,0x2405c,0x24000,0xe405f,0xe4002,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20,0x20,0xc005f,0x0,0xc005f,0xc005f,0x0,0x0,0x0,0x1,0x0,0x0,0x7c,0x0,0x1,0x5c,0x41,};
+	}
 
   /** Constructor with InputStream. */
   public ExpressionParser(java.io.InputStream stream) {
-     this(stream, null);
+	  this(stream, null);
   }
   /** Constructor with InputStream and supplied encoding */
   public ExpressionParser(java.io.InputStream stream, String encoding) {
-    try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
-    token_source = new ExpressionParserTokenManager(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 42; i++) jj_la1[i] = -1;
+	 try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
+	 token_source = new ExpressionParserTokenManager(jj_input_stream);
+	 token = new Token();
+	 jj_ntk = -1;
+	 jj_gen = 0;
+	 for (int i = 0; i < 43; i++) jj_la1[i] = -1;
   }
 
   /** Reinitialise. */
   public void ReInit(java.io.InputStream stream) {
-     ReInit(stream, null);
+	  ReInit(stream, null);
   }
   /** Reinitialise. */
   public void ReInit(java.io.InputStream stream, String encoding) {
-    try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
-    token_source.ReInit(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jjtree.reset();
-    jj_gen = 0;
-    for (int i = 0; i < 42; i++) jj_la1[i] = -1;
+	 try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
+	 token_source.ReInit(jj_input_stream);
+	 token = new Token();
+	 jj_ntk = -1;
+	 jjtree.reset();
+	 jj_gen = 0;
+	 for (int i = 0; i < 43; i++) jj_la1[i] = -1;
   }
 
   /** Constructor. */
   public ExpressionParser(java.io.Reader stream) {
-    jj_input_stream = new JavaCharStream(stream, 1, 1);
-    token_source = new ExpressionParserTokenManager(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 42; i++) jj_la1[i] = -1;
+	 jj_input_stream = new JavaCharStream(stream, 1, 1);
+	 token_source = new ExpressionParserTokenManager(jj_input_stream);
+	 token = new Token();
+	 jj_ntk = -1;
+	 jj_gen = 0;
+	 for (int i = 0; i < 43; i++) jj_la1[i] = -1;
   }
 
   /** Reinitialise. */
   public void ReInit(java.io.Reader stream) {
-    jj_input_stream.ReInit(stream, 1, 1);
-    token_source.ReInit(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jjtree.reset();
-    jj_gen = 0;
-    for (int i = 0; i < 42; i++) jj_la1[i] = -1;
+	if (jj_input_stream == null) {
+	   jj_input_stream = new JavaCharStream(stream, 1, 1);
+	} else {
+	   jj_input_stream.ReInit(stream, 1, 1);
+	}
+	if (token_source == null) {
+ token_source = new ExpressionParserTokenManager(jj_input_stream);
+	}
+
+	 token_source.ReInit(jj_input_stream);
+	 token = new Token();
+	 jj_ntk = -1;
+	 jjtree.reset();
+	 jj_gen = 0;
+	 for (int i = 0; i < 43; i++) jj_la1[i] = -1;
   }
 
   /** Constructor with generated Token Manager. */
   public ExpressionParser(ExpressionParserTokenManager tm) {
-    token_source = tm;
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 42; i++) jj_la1[i] = -1;
+	 token_source = tm;
+	 token = new Token();
+	 jj_ntk = -1;
+	 jj_gen = 0;
+	 for (int i = 0; i < 43; i++) jj_la1[i] = -1;
   }
 
   /** Reinitialise. */
   public void ReInit(ExpressionParserTokenManager tm) {
-    token_source = tm;
-    token = new Token();
-    jj_ntk = -1;
-    jjtree.reset();
-    jj_gen = 0;
-    for (int i = 0; i < 42; i++) jj_la1[i] = -1;
+	 token_source = tm;
+	 token = new Token();
+	 jj_ntk = -1;
+	 jjtree.reset();
+	 jj_gen = 0;
+	 for (int i = 0; i < 43; i++) jj_la1[i] = -1;
   }
 
   private Token jj_consume_token(int kind) throws ParseException {
-    Token oldToken;
-    if ((oldToken = token).next != null) token = token.next;
-    else token = token.next = token_source.getNextToken();
-    jj_ntk = -1;
-    if (token.kind == kind) {
-      jj_gen++;
-      return token;
-    }
-    token = oldToken;
-    jj_kind = kind;
-    throw generateParseException();
+	 Token oldToken;
+	 if ((oldToken = token).next != null) token = token.next;
+	 else token = token.next = token_source.getNextToken();
+	 jj_ntk = -1;
+	 if (token.kind == kind) {
+	   jj_gen++;
+	   return token;
+	 }
+	 token = oldToken;
+	 jj_kind = kind;
+	 throw generateParseException();
   }
 
 
 /** Get the next Token. */
   final public Token getNextToken() {
-    if (token.next != null) token = token.next;
-    else token = token.next = token_source.getNextToken();
-    jj_ntk = -1;
-    jj_gen++;
-    return token;
+	 if (token.next != null) token = token.next;
+	 else token = token.next = token_source.getNextToken();
+	 jj_ntk = -1;
+	 jj_gen++;
+	 return token;
   }
 
 /** Get the specific Token. */
   final public Token getToken(int index) {
-    Token t = token;
-    for (int i = 0; i < index; i++) {
-      if (t.next != null) t = t.next;
-      else t = t.next = token_source.getNextToken();
-    }
-    return t;
+	 Token t = token;
+	 for (int i = 0; i < index; i++) {
+	   if (t.next != null) t = t.next;
+	   else t = t.next = token_source.getNextToken();
+	 }
+	 return t;
   }
 
-  private int jj_ntk() {
-    if ((jj_nt=token.next) == null)
-      return (jj_ntk = (token.next=token_source.getNextToken()).kind);
-    else
-      return (jj_ntk = jj_nt.kind);
+  private int jj_ntk_f() {
+	 if ((jj_nt=token.next) == null)
+	   return (jj_ntk = (token.next=token_source.getNextToken()).kind);
+	 else
+	   return (jj_ntk = jj_nt.kind);
   }
 
   private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();
@@ -2711,39 +2943,46 @@ public class ExpressionParser/*@bgen(jjtree)*/implements ExpressionParserTreeCon
 
   /** Generate ParseException. */
   public ParseException generateParseException() {
-    jj_expentries.clear();
-    boolean[] la1tokens = new boolean[88];
-    if (jj_kind >= 0) {
-      la1tokens[jj_kind] = true;
-      jj_kind = -1;
-    }
-    for (int i = 0; i < 42; i++) {
-      if (jj_la1[i] == jj_gen) {
-        for (int j = 0; j < 32; j++) {
-          if ((jj_la1_0[i] & (1<<j)) != 0) {
-            la1tokens[j] = true;
-          }
-          if ((jj_la1_1[i] & (1<<j)) != 0) {
-            la1tokens[32+j] = true;
-          }
-          if ((jj_la1_2[i] & (1<<j)) != 0) {
-            la1tokens[64+j] = true;
-          }
-        }
-      }
-    }
-    for (int i = 0; i < 88; i++) {
-      if (la1tokens[i]) {
-        jj_expentry = new int[1];
-        jj_expentry[0] = i;
-        jj_expentries.add(jj_expentry);
-      }
-    }
-    int[][] exptokseq = new int[jj_expentries.size()][];
-    for (int i = 0; i < jj_expentries.size(); i++) {
-      exptokseq[i] = jj_expentries.get(i);
-    }
-    return new ParseException(token, exptokseq, tokenImage);
+	 jj_expentries.clear();
+	 boolean[] la1tokens = new boolean[88];
+	 if (jj_kind >= 0) {
+	   la1tokens[jj_kind] = true;
+	   jj_kind = -1;
+	 }
+	 for (int i = 0; i < 43; i++) {
+	   if (jj_la1[i] == jj_gen) {
+		 for (int j = 0; j < 32; j++) {
+		   if ((jj_la1_0[i] & (1<<j)) != 0) {
+			 la1tokens[j] = true;
+		   }
+		   if ((jj_la1_1[i] & (1<<j)) != 0) {
+			 la1tokens[32+j] = true;
+		   }
+		   if ((jj_la1_2[i] & (1<<j)) != 0) {
+			 la1tokens[64+j] = true;
+		   }
+		 }
+	   }
+	 }
+	 for (int i = 0; i < 88; i++) {
+	   if (la1tokens[i]) {
+		 jj_expentry = new int[1];
+		 jj_expentry[0] = i;
+		 jj_expentries.add(jj_expentry);
+	   }
+	 }
+	 int[][] exptokseq = new int[jj_expentries.size()][];
+	 for (int i = 0; i < jj_expentries.size(); i++) {
+	   exptokseq[i] = jj_expentries.get(i);
+	 }
+	 return new ParseException(token, exptokseq, tokenImage);
+  }
+
+  private boolean trace_enabled;
+
+/** Trace enabled. */
+  final public boolean trace_enabled() {
+	 return trace_enabled;
   }
 
   /** Enable tracing. */
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserTokenManager.java b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserTokenManager.java
index 333440b6f..4afd10087 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserTokenManager.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserTokenManager.java
@@ -25,8 +25,8 @@ import java.math.BigInteger;
 import org.apache.cayenne.exp.Expression;
 
 /** Token Manager. */
-public class ExpressionParserTokenManager implements ExpressionParserConstants
-{
+@SuppressWarnings ("unused")
+public class ExpressionParserTokenManager implements ExpressionParserConstants {
       /** Holds the last value computed by a constant token. */
     Object literalValue;
 
@@ -38,18 +38,18 @@ public class ExpressionParserTokenManager implements ExpressionParserConstants
     {
         int ofs = image.length() - 1;
         switch ( image.charAt(ofs) ) {
-            case 'n':   return '\u005cn';
-            case 'r':   return '\u005cr';
-            case 't':   return '\u005ct';
-            case 'b':   return '\u005cb';
-            case 'f':   return '\u005cf';
-            case '\u005c\u005c':  return '\u005c\u005c';
-            case '\u005c'':  return '\u005c'';
-            case '\u005c"':  return '\u005c"';
+            case 'n':   return '\n';
+            case 'r':   return '\r';
+            case 't':   return '\t';
+            case 'b':   return '\b';
+            case 'f':   return '\f';
+            case '\\':  return '\\';
+            case '\'':  return '\'';
+            case '\"':  return '\"';
         }
 
           // Otherwise, it's an octal number.  Find the backslash and convert.
-        while ( image.charAt(--ofs) != '\u005c\u005c' )
+        while ( image.charAt(--ofs) != '\\' )
           {}
         int value = 0;
         while ( ++ofs < image.length() )
@@ -103,8 +103,7 @@ public class ExpressionParserTokenManager implements ExpressionParserConstants
   public  java.io.PrintStream debugStream = System.out;
   /** Set debug output. */
   public  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
-private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
-{
+private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1){
    switch (pos)
    {
       case 0:
@@ -329,8 +328,7 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
          return -1;
    }
 }
-private final int jjStartNfa_0(int pos, long active0, long active1)
-{
+private final int jjStartNfa_0(int pos, long active0, long active1){
    return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1);
 }
 private int jjStopAtPos(int pos, int kind)
@@ -339,8 +337,7 @@ private int jjStopAtPos(int pos, int kind)
    jjmatchedPos = pos;
    return pos + 1;
 }
-private int jjMoveStringLiteralDfa0_0()
-{
+private int jjMoveStringLiteralDfa0_0(){
    switch(curChar)
    {
       case 33:
@@ -419,8 +416,7 @@ private int jjMoveStringLiteralDfa0_0()
          return jjMoveNfa_0(3, 0);
    }
 }
-private int jjMoveStringLiteralDfa1_0(long active0, long active1)
-{
+private int jjMoveStringLiteralDfa1_0(long active0, long active1){
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(0, active0, active1);
@@ -479,8 +475,7 @@ private int jjMoveStringLiteralDfa1_0(long active0, long active1)
    }
    return jjStartNfa_0(0, active0, active1);
 }
-private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1)
-{
+private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1){
    if (((active0 &= old0) | (active1 &= old1)) == 0L)
       return jjStartNfa_0(0, old0, old1);
    try { curChar = input_stream.readChar(); }
@@ -561,8 +556,7 @@ private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long a
    }
    return jjStartNfa_0(1, active0, active1);
 }
-private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1)
-{
+private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1){
    if (((active0 &= old0) | (active1 &= old1)) == 0L)
       return jjStartNfa_0(1, old0, old1);
    try { curChar = input_stream.readChar(); }
@@ -624,8 +618,7 @@ private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long a
    }
    return jjStartNfa_0(2, active0, active1);
 }
-private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1)
-{
+private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1){
    if (((active0 &= old0) | (active1 &= old1)) == 0L)
       return jjStartNfa_0(2, old0, old1);
    try { curChar = input_stream.readChar(); }
@@ -670,8 +663,7 @@ private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long a
    }
    return jjStartNfa_0(3, active0, active1);
 }
-private int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long active1)
-{
+private int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long active1){
    if (((active0 &= old0) | (active1 &= old1)) == 0L)
       return jjStartNfa_0(3, old0, old1);
    try { curChar = input_stream.readChar(); }
@@ -716,8 +708,7 @@ private int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long a
    }
    return jjStartNfa_0(4, active0, active1);
 }
-private int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long active1)
-{
+private int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long active1){
    if (((active0 &= old0) | (active1 &= old1)) == 0L)
       return jjStartNfa_0(4, old0, old1);
    try { curChar = input_stream.readChar(); }
@@ -746,8 +737,7 @@ private int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long a
    }
    return jjStartNfa_0(5, active0, 0L);
 }
-private int jjMoveStringLiteralDfa7_0(long old0, long active0)
-{
+private int jjMoveStringLiteralDfa7_0(long old0, long active0){
    if (((active0 &= old0)) == 0L)
       return jjStartNfa_0(5, old0, 0L);
    try { curChar = input_stream.readChar(); }
@@ -778,8 +768,7 @@ private int jjMoveStringLiteralDfa7_0(long old0, long active0)
    }
    return jjStartNfa_0(6, active0, 0L);
 }
-private int jjMoveStringLiteralDfa8_0(long old0, long active0)
-{
+private int jjMoveStringLiteralDfa8_0(long old0, long active0){
    if (((active0 &= old0)) == 0L)
       return jjStartNfa_0(6, old0, 0L);
    try { curChar = input_stream.readChar(); }
@@ -812,8 +801,7 @@ private int jjMoveStringLiteralDfa8_0(long old0, long active0)
    }
    return jjStartNfa_0(7, active0, 0L);
 }
-private int jjMoveStringLiteralDfa9_0(long old0, long active0)
-{
+private int jjMoveStringLiteralDfa9_0(long old0, long active0){
    if (((active0 &= old0)) == 0L)
       return jjStartNfa_0(7, old0, 0L);
    try { curChar = input_stream.readChar(); }
@@ -838,8 +826,7 @@ private int jjMoveStringLiteralDfa9_0(long old0, long active0)
    }
    return jjStartNfa_0(8, active0, 0L);
 }
-private int jjMoveStringLiteralDfa10_0(long old0, long active0)
-{
+private int jjMoveStringLiteralDfa10_0(long old0, long active0){
    if (((active0 &= old0)) == 0L)
       return jjStartNfa_0(8, old0, 0L);
    try { curChar = input_stream.readChar(); }
@@ -862,8 +849,7 @@ private int jjMoveStringLiteralDfa10_0(long old0, long active0)
    }
    return jjStartNfa_0(9, active0, 0L);
 }
-private int jjMoveStringLiteralDfa11_0(long old0, long active0)
-{
+private int jjMoveStringLiteralDfa11_0(long old0, long active0){
    if (((active0 &= old0)) == 0L)
       return jjStartNfa_0(9, old0, 0L);
    try { curChar = input_stream.readChar(); }
@@ -880,8 +866,7 @@ private int jjMoveStringLiteralDfa11_0(long old0, long active0)
    }
    return jjStartNfa_0(10, active0, 0L);
 }
-private int jjMoveStringLiteralDfa12_0(long old0, long active0)
-{
+private int jjMoveStringLiteralDfa12_0(long old0, long active0){
    if (((active0 &= old0)) == 0L)
       return jjStartNfa_0(10, old0, 0L);
    try { curChar = input_stream.readChar(); }
@@ -898,8 +883,7 @@ private int jjMoveStringLiteralDfa12_0(long old0, long active0)
    }
    return jjStartNfa_0(11, active0, 0L);
 }
-private int jjMoveStringLiteralDfa13_0(long old0, long active0)
-{
+private int jjMoveStringLiteralDfa13_0(long old0, long active0){
    if (((active0 &= old0)) == 0L)
       return jjStartNfa_0(11, old0, 0L);
    try { curChar = input_stream.readChar(); }
@@ -949,7 +933,7 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   else if (curChar == 43)
                   {
@@ -962,13 +946,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   else if (curChar == 43)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAdd(69);
+                     { jjCheckNAdd(69); }
                   }
                   break;
                case 32:
@@ -976,7 +960,7 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   else if (curChar == 43)
                   {
@@ -989,13 +973,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   else if (curChar == 43)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAdd(69);
+                     { jjCheckNAdd(69); }
                   }
                   break;
                case 63:
@@ -1003,7 +987,7 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   else if (curChar == 43)
                   {
@@ -1016,13 +1000,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   else if (curChar == 43)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAdd(69);
+                     { jjCheckNAdd(69); }
                   }
                   break;
                case 5:
@@ -1030,7 +1014,7 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   else if (curChar == 43)
                   {
@@ -1043,13 +1027,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   else if (curChar == 43)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAdd(69);
+                     { jjCheckNAdd(69); }
                   }
                   break;
                case 64:
@@ -1057,7 +1041,7 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   else if (curChar == 43)
                   {
@@ -1070,13 +1054,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   else if (curChar == 43)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAdd(69);
+                     { jjCheckNAdd(69); }
                   }
                   break;
                case 30:
@@ -1084,7 +1068,7 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   else if (curChar == 43)
                   {
@@ -1097,13 +1081,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   else if (curChar == 43)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAdd(69);
+                     { jjCheckNAdd(69); }
                   }
                   break;
                case 29:
@@ -1111,7 +1095,7 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   else if (curChar == 43)
                   {
@@ -1124,13 +1108,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   else if (curChar == 43)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAdd(69);
+                     { jjCheckNAdd(69); }
                   }
                   break;
                case 35:
@@ -1138,7 +1122,7 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   else if (curChar == 43)
                   {
@@ -1151,13 +1135,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   else if (curChar == 43)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAdd(69);
+                     { jjCheckNAdd(69); }
                   }
                   break;
                case 27:
@@ -1165,7 +1149,7 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   else if (curChar == 43)
                   {
@@ -1178,13 +1162,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   else if (curChar == 43)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAdd(69);
+                     { jjCheckNAdd(69); }
                   }
                   break;
                case 33:
@@ -1192,7 +1176,7 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   else if (curChar == 43)
                   {
@@ -1205,13 +1189,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   else if (curChar == 43)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAdd(69);
+                     { jjCheckNAdd(69); }
                   }
                   break;
                case 6:
@@ -1219,7 +1203,7 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   else if (curChar == 43)
                   {
@@ -1232,13 +1216,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   else if (curChar == 43)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAdd(69);
+                     { jjCheckNAdd(69); }
                   }
                   break;
                case 74:
@@ -1246,7 +1230,7 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   else if (curChar == 43)
                   {
@@ -1259,31 +1243,31 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   else if (curChar == 43)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAdd(69);
+                     { jjCheckNAdd(69); }
                   }
                   break;
                case 3:
                   if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddStates(3, 8);
+                     { jjCheckNAddStates(3, 8); }
                   else if (curChar == 46)
-                     jjCheckNAdd(42);
+                     { jjCheckNAdd(42); }
                   if ((0x3fe000000000000L & l) != 0L)
                   {
                      if (kind > 82)
                         kind = 82;
-                     jjCheckNAddTwoStates(39, 40);
+                     { jjCheckNAddTwoStates(39, 40); }
                   }
                   else if (curChar == 48)
                   {
                      if (kind > 82)
                         kind = 82;
-                     jjCheckNAddStates(9, 11);
+                     { jjCheckNAddStates(9, 11); }
                   }
                   break;
                case 31:
@@ -1291,7 +1275,7 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   else if (curChar == 43)
                   {
@@ -1304,13 +1288,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   else if (curChar == 43)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAdd(69);
+                     { jjCheckNAdd(69); }
                   }
                   break;
                case 36:
@@ -1318,7 +1302,7 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   else if (curChar == 43)
                   {
@@ -1331,13 +1315,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   else if (curChar == 43)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAdd(69);
+                     { jjCheckNAdd(69); }
                   }
                   break;
                case 28:
@@ -1345,7 +1329,7 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   else if (curChar == 43)
                   {
@@ -1358,13 +1342,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   else if (curChar == 43)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAdd(69);
+                     { jjCheckNAdd(69); }
                   }
                   break;
                case 34:
@@ -1372,7 +1356,7 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   else if (curChar == 43)
                   {
@@ -1385,13 +1369,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   else if (curChar == 43)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAdd(69);
+                     { jjCheckNAdd(69); }
                   }
                   break;
                case 38:
@@ -1399,112 +1383,112 @@ private int jjMoveNfa_0(int startState, int curPos)
                      break;
                   if (kind > 82)
                      kind = 82;
-                  jjCheckNAddTwoStates(39, 40);
+                  { jjCheckNAddTwoStates(39, 40); }
                   break;
                case 39:
                   if ((0x3ff000000000000L & l) == 0L)
                      break;
                   if (kind > 82)
                      kind = 82;
-                  jjCheckNAddTwoStates(39, 40);
+                  { jjCheckNAddTwoStates(39, 40); }
                   break;
                case 41:
                   if (curChar == 46)
-                     jjCheckNAdd(42);
+                     { jjCheckNAdd(42); }
                   break;
                case 42:
                   if ((0x3ff000000000000L & l) == 0L)
                      break;
                   if (kind > 83)
                      kind = 83;
-                  jjCheckNAddStates(12, 14);
+                  { jjCheckNAddStates(12, 14); }
                   break;
                case 44:
                   if ((0x280000000000L & l) != 0L)
-                     jjCheckNAdd(45);
+                     { jjCheckNAdd(45); }
                   break;
                case 45:
                   if ((0x3ff000000000000L & l) == 0L)
                      break;
                   if (kind > 83)
                      kind = 83;
-                  jjCheckNAddTwoStates(45, 46);
+                  { jjCheckNAddTwoStates(45, 46); }
                   break;
                case 47:
                   if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddStates(3, 8);
+                     { jjCheckNAddStates(3, 8); }
                   break;
                case 48:
                   if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddTwoStates(48, 49);
+                     { jjCheckNAddTwoStates(48, 49); }
                   break;
                case 49:
                   if (curChar != 46)
                      break;
                   if (kind > 83)
                      kind = 83;
-                  jjCheckNAddStates(15, 17);
+                  { jjCheckNAddStates(15, 17); }
                   break;
                case 50:
                   if ((0x3ff000000000000L & l) == 0L)
                      break;
                   if (kind > 83)
                      kind = 83;
-                  jjCheckNAddStates(15, 17);
+                  { jjCheckNAddStates(15, 17); }
                   break;
                case 51:
                   if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddTwoStates(51, 52);
+                     { jjCheckNAddTwoStates(51, 52); }
                   break;
                case 53:
                   if ((0x280000000000L & l) != 0L)
-                     jjCheckNAdd(54);
+                     { jjCheckNAdd(54); }
                   break;
                case 54:
                   if ((0x3ff000000000000L & l) == 0L)
                      break;
                   if (kind > 83)
                      kind = 83;
-                  jjCheckNAddTwoStates(54, 46);
+                  { jjCheckNAddTwoStates(54, 46); }
                   break;
                case 55:
                   if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddTwoStates(55, 46);
+                     { jjCheckNAddTwoStates(55, 46); }
                   break;
                case 56:
                   if (curChar != 48)
                      break;
                   if (kind > 82)
                      kind = 82;
-                  jjCheckNAddStates(9, 11);
+                  { jjCheckNAddStates(9, 11); }
                   break;
                case 57:
                   if ((0xff000000000000L & l) == 0L)
                      break;
                   if (kind > 82)
                      kind = 82;
-                  jjCheckNAddTwoStates(57, 40);
+                  { jjCheckNAddTwoStates(57, 40); }
                   break;
                case 59:
                   if ((0x3ff000000000000L & l) == 0L)
                      break;
                   if (kind > 82)
                      kind = 82;
-                  jjCheckNAddTwoStates(59, 40);
+                  { jjCheckNAddTwoStates(59, 40); }
                   break;
                case 67:
                   if ((0x3ff000000000000L & l) == 0L)
                      break;
                   if (kind > 70)
                      kind = 70;
-                  jjCheckNAddStates(0, 2);
+                  { jjCheckNAddStates(0, 2); }
                   break;
                case 68:
                   if (curChar != 43)
                      break;
                   if (kind > 70)
                      kind = 70;
-                  jjCheckNAdd(69);
+                  { jjCheckNAdd(69); }
                   break;
                case 69:
                   if (curChar == 46)
@@ -1515,14 +1499,14 @@ private int jjMoveNfa_0(int startState, int curPos)
                      break;
                   if (kind > 70)
                      kind = 70;
-                  jjCheckNAddStates(18, 20);
+                  { jjCheckNAddStates(18, 20); }
                   break;
                case 72:
                   if ((0x3ff000000000000L & l) == 0L)
                      break;
                   if (kind > 71)
                      kind = 71;
-                  jjCheckNAddTwoStates(72, 73);
+                  { jjCheckNAddTwoStates(72, 73); }
                   break;
                case 73:
                   if (curChar == 43 && kind > 71)
@@ -1544,13 +1528,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   if ((0x7fffffe87fffffeL & l) != 0L)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   if (curChar == 115)
                      jjstateSet[jjnewStateCnt++] = 25;
@@ -1560,13 +1544,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   if ((0x7fffffe87fffffeL & l) != 0L)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   if (curChar == 110)
                      jjstateSet[jjnewStateCnt++] = 31;
@@ -1576,13 +1560,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   if ((0x7fffffe87fffffeL & l) != 0L)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   if (curChar == 111)
                      jjstateSet[jjnewStateCnt++] = 64;
@@ -1594,13 +1578,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   if ((0x7fffffe87fffffeL & l) != 0L)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   if (curChar == 117)
                      jjstateSet[jjnewStateCnt++] = 4;
@@ -1610,13 +1594,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   if ((0x7fffffe87fffffeL & l) != 0L)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   if (curChar == 119)
                   {
@@ -1629,13 +1613,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   if ((0x7fffffe87fffffeL & l) != 0L)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   if (curChar == 84)
                      jjstateSet[jjnewStateCnt++] = 29;
@@ -1645,13 +1629,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   if ((0x7fffffe87fffffeL & l) != 0L)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   if (curChar == 105)
                      jjstateSet[jjnewStateCnt++] = 28;
@@ -1661,13 +1645,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   if ((0x7fffffe87fffffeL & l) != 0L)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   if (curChar == 114)
                      jjstateSet[jjnewStateCnt++] = 34;
@@ -1677,13 +1661,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   if ((0x7fffffe87fffffeL & l) != 0L)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   if (curChar == 101)
                      jjstateSet[jjnewStateCnt++] = 26;
@@ -1693,13 +1677,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   if ((0x7fffffe87fffffeL & l) != 0L)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   if (curChar == 101)
                      jjstateSet[jjnewStateCnt++] = 32;
@@ -1709,13 +1693,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   if ((0x7fffffe87fffffeL & l) != 0L)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   if (curChar == 114)
                      jjstateSet[jjnewStateCnt++] = 5;
@@ -1725,13 +1709,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   if ((0x7fffffe87fffffeL & l) != 0L)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   break;
                case 3:
@@ -1739,10 +1723,10 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(21, 25);
+                     { jjCheckNAddStates(21, 25); }
                   }
                   if (curChar == 110)
-                     jjAddStates(26, 27);
+                     { jjAddStates(26, 27); }
                   else if (curChar == 99)
                      jjstateSet[jjnewStateCnt++] = 36;
                   else if (curChar == 70)
@@ -1761,13 +1745,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   if ((0x7fffffe87fffffeL & l) != 0L)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   if (curChar == 116)
                      jjstateSet[jjnewStateCnt++] = 30;
@@ -1777,13 +1761,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   if ((0x7fffffe87fffffeL & l) != 0L)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   if (curChar == 117)
                      jjstateSet[jjnewStateCnt++] = 35;
@@ -1793,13 +1777,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   if ((0x7fffffe87fffffeL & l) != 0L)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   if (curChar == 109)
                      jjstateSet[jjnewStateCnt++] = 27;
@@ -1809,13 +1793,13 @@ private int jjMoveNfa_0(int startState, int curPos)
                   {
                      if (kind > 71)
                         kind = 71;
-                     jjCheckNAddTwoStates(72, 73);
+                     { jjCheckNAddTwoStates(72, 73); }
                   }
                   if ((0x7fffffe87fffffeL & l) != 0L)
                   {
                      if (kind > 70)
                         kind = 70;
-                     jjCheckNAddStates(0, 2);
+                     { jjCheckNAddStates(0, 2); }
                   }
                   if (curChar == 114)
                      jjstateSet[jjnewStateCnt++] = 33;
@@ -1922,7 +1906,7 @@ private int jjMoveNfa_0(int startState, int curPos)
                   break;
                case 43:
                   if ((0x2000000020L & l) != 0L)
-                     jjAddStates(28, 29);
+                     { jjAddStates(28, 29); }
                   break;
                case 46:
                   if ((0x5400000054L & l) != 0L && kind > 83)
@@ -1930,22 +1914,22 @@ private int jjMoveNfa_0(int startState, int curPos)
                   break;
                case 52:
                   if ((0x2000000020L & l) != 0L)
-                     jjAddStates(30, 31);
+                     { jjAddStates(30, 31); }
                   break;
                case 58:
                   if ((0x100000001000000L & l) != 0L)
-                     jjCheckNAdd(59);
+                     { jjCheckNAdd(59); }
                   break;
                case 59:
                   if ((0x7e0000007eL & l) == 0L)
                      break;
                   if (kind > 82)
                      kind = 82;
-                  jjCheckNAddTwoStates(59, 40);
+                  { jjCheckNAddTwoStates(59, 40); }
                   break;
                case 60:
                   if (curChar == 110)
-                     jjAddStates(26, 27);
+                     { jjAddStates(26, 27); }
                   break;
                case 61:
                   if (curChar == 108 && kind > 33)
@@ -1964,14 +1948,14 @@ private int jjMoveNfa_0(int startState, int curPos)
                      break;
                   if (kind > 70)
                      kind = 70;
-                  jjCheckNAddStates(21, 25);
+                  { jjCheckNAddStates(21, 25); }
                   break;
                case 67:
                   if ((0x7fffffe87fffffeL & l) == 0L)
                      break;
                   if (kind > 70)
                      kind = 70;
-                  jjCheckNAddStates(0, 2);
+                  { jjCheckNAddStates(0, 2); }
                   break;
                case 70:
                case 71:
@@ -1979,14 +1963,14 @@ private int jjMoveNfa_0(int startState, int curPos)
                      break;
                   if (kind > 70)
                      kind = 70;
-                  jjCheckNAddStates(18, 20);
+                  { jjCheckNAddStates(18, 20); }
                   break;
                case 72:
                   if ((0x7fffffe87fffffeL & l) == 0L)
                      break;
                   if (kind > 71)
                      kind = 71;
-                  jjCheckNAddTwoStates(72, 73);
+                  { jjCheckNAddTwoStates(72, 73); }
                   break;
                default : break;
             }
@@ -1994,7 +1978,7 @@ private int jjMoveNfa_0(int startState, int curPos)
       }
       else
       {
-         int hiByte = (int)(curChar >> 8);
+         int hiByte = (curChar >> 8);
          int i1 = hiByte >> 6;
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
@@ -2003,7 +1987,7 @@ private int jjMoveNfa_0(int startState, int curPos)
          {
             switch(jjstateSet[--i])
             {
-               default : break;
+               default : if (i1 == 0 || l1 == 0 || i2 == 0 ||  l2 == 0) break; else break;
             }
          } while(i != startsAt);
       }
@@ -2020,20 +2004,17 @@ private int jjMoveNfa_0(int startState, int curPos)
       catch(java.io.IOException e) { return curPos; }
    }
 }
-private final int jjStopStringLiteralDfa_1(int pos, long active0, long active1)
-{
+private final int jjStopStringLiteralDfa_1(int pos, long active0, long active1){
    switch (pos)
    {
       default :
          return -1;
    }
 }
-private final int jjStartNfa_1(int pos, long active0, long active1)
-{
+private final int jjStartNfa_1(int pos, long active0, long active1){
    return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0, active1), pos + 1);
 }
-private int jjMoveStringLiteralDfa0_1()
-{
+private int jjMoveStringLiteralDfa0_1(){
    switch(curChar)
    {
       case 39:
@@ -2107,7 +2088,7 @@ private int jjMoveNfa_1(int startState, int curPos)
                         kind = 77;
                   }
                   else if (curChar == 92)
-                     jjAddStates(32, 34);
+                     { jjAddStates(32, 34); }
                   break;
                case 1:
                   if ((0x14404510000000L & l) != 0L && kind > 76)
@@ -2123,7 +2104,7 @@ private int jjMoveNfa_1(int startState, int curPos)
       }
       else
       {
-         int hiByte = (int)(curChar >> 8);
+         int hiByte = (curChar >> 8);
          int i1 = hiByte >> 6;
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
@@ -2136,7 +2117,7 @@ private int jjMoveNfa_1(int startState, int curPos)
                   if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 77)
                      kind = 77;
                   break;
-               default : break;
+               default : if (i1 == 0 || l1 == 0 || i2 == 0 ||  l2 == 0) break; else break;
             }
          } while(i != startsAt);
       }
@@ -2153,20 +2134,17 @@ private int jjMoveNfa_1(int startState, int curPos)
       catch(java.io.IOException e) { return curPos; }
    }
 }
-private final int jjStopStringLiteralDfa_2(int pos, long active0, long active1)
-{
+private final int jjStopStringLiteralDfa_2(int pos, long active0, long active1){
    switch (pos)
    {
       default :
          return -1;
    }
 }
-private final int jjStartNfa_2(int pos, long active0, long active1)
-{
+private final int jjStartNfa_2(int pos, long active0, long active1){
    return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0, active1), pos + 1);
 }
-private int jjMoveStringLiteralDfa0_2()
-{
+private int jjMoveStringLiteralDfa0_2(){
    switch(curChar)
    {
       case 34:
@@ -2234,7 +2212,7 @@ private int jjMoveNfa_2(int startState, int curPos)
                         kind = 80;
                   }
                   else if (curChar == 92)
-                     jjAddStates(32, 34);
+                     { jjAddStates(32, 34); }
                   break;
                case 1:
                   if ((0x14404510000000L & l) != 0L && kind > 79)
@@ -2250,7 +2228,7 @@ private int jjMoveNfa_2(int startState, int curPos)
       }
       else
       {
-         int hiByte = (int)(curChar >> 8);
+         int hiByte = (curChar >> 8);
          int i1 = hiByte >> 6;
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
@@ -2263,7 +2241,7 @@ private int jjMoveNfa_2(int startState, int curPos)
                   if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 80)
                      kind = 80;
                   break;
-               default : break;
+               default : if (i1 == 0 || l1 == 0 || i2 == 0 ||  l2 == 0) break; else break;
             }
          } while(i != startsAt);
       }
@@ -2280,23 +2258,6 @@ private int jjMoveNfa_2(int startState, int curPos)
       catch(java.io.IOException e) { return curPos; }
    }
 }
-static final int[] jjnextStates = {
-   67, 68, 69, 48, 49, 51, 52, 55, 46, 57, 58, 40, 42, 43, 46, 50, 
-   43, 46, 69, 71, 68, 67, 68, 69, 72, 73, 63, 65, 44, 45, 53, 54, 
-   1, 2, 3, 
-};
-private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
-{
-   switch(hiByte)
-   {
-      case 0:
-         return ((jjbitVec2[i2] & l2) != 0L);
-      default :
-         if ((jjbitVec0[i1] & l1) != 0L)
-            return true;
-         return false;
-   }
-}
 
 /** Token literal values. */
 public static final String[] jjstrLiteralImages = {
@@ -2315,83 +2276,6 @@ null, null, null, "\141\166\147", "\155\151\156", "\155\141\170", "\163\165\155"
 "\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 = {
-   "DEFAULT",
-   "WithinSingleQuoteLiteral",
-   "WithinDoubleQuoteLiteral",
-};
-
-/** Lex State array. */
-public static final int[] jjnewLexState = {
-   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 
-   2, -1, -1, 0, -1, -1, 0, -1, -1, -1, -1, -1, -1, 
-};
-static final long[] jjtoToken = {
-   0xfffffffe1fffffffL, 0xe40ffL, 
-};
-static final long[] jjtoSkip = {
-   0x1e0000000L, 0x0L, 
-};
-static final long[] jjtoMore = {
-   0x0L, 0x1bc00L, 
-};
-protected JavaCharStream input_stream;
-private final int[] jjrounds = new int[74];
-private final int[] jjstateSet = new int[148];
-private final StringBuilder jjimage = new StringBuilder();
-private StringBuilder image = jjimage;
-private int jjimageLen;
-private int lengthOfMatch;
-protected char curChar;
-/** Constructor. */
-public ExpressionParserTokenManager(JavaCharStream stream){
-   if (JavaCharStream.staticFlag)
-      throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
-   input_stream = stream;
-}
-
-/** Constructor. */
-public ExpressionParserTokenManager(JavaCharStream stream, int lexState){
-   this(stream);
-   SwitchTo(lexState);
-}
-
-/** Reinitialise parser. */
-public void ReInit(JavaCharStream stream)
-{
-   jjmatchedPos = jjnewStateCnt = 0;
-   curLexState = defaultLexState;
-   input_stream = stream;
-   ReInitRounds();
-}
-private void ReInitRounds()
-{
-   int i;
-   jjround = 0x80000001;
-   for (i = 74; i-- > 0;)
-      jjrounds[i] = 0x80000000;
-}
-
-/** Reinitialise parser. */
-public void ReInit(JavaCharStream stream, int lexState)
-{
-   ReInit(stream);
-   SwitchTo(lexState);
-}
-
-/** Switch to specified lex state. */
-public void SwitchTo(int lexState)
-{
-   if (lexState >= 3 || lexState < 0)
-      throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
-   else
-      curLexState = lexState;
-}
-
 protected Token jjFillToken()
 {
    final Token t;
@@ -2415,6 +2299,23 @@ protected Token jjFillToken()
 
    return t;
 }
+static final int[] jjnextStates = {
+   67, 68, 69, 48, 49, 51, 52, 55, 46, 57, 58, 40, 42, 43, 46, 50, 
+   43, 46, 69, 71, 68, 67, 68, 69, 72, 73, 63, 65, 44, 45, 53, 54, 
+   1, 2, 3, 
+};
+private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
+{
+   switch(hiByte)
+   {
+      case 0:
+         return ((jjbitVec2[i2] & l2) != 0L);
+      default :
+         if ((jjbitVec0[i1] & l1) != 0L)
+            return true;
+         return false;
+   }
+}
 
 int curLexState = 0;
 int defaultLexState = 0;
@@ -2436,9 +2337,10 @@ public Token getNextToken()
    {
       curChar = input_stream.BeginToken();
    }
-   catch(java.io.IOException e)
+   catch(Exception e)
    {
       jjmatchedKind = 0;
+      jjmatchedPos = -1;
       matchedToken = jjFillToken();
       return matchedToken;
    }
@@ -2524,6 +2426,14 @@ public Token getNextToken()
   }
 }
 
+void SkipLexicalActions(Token matchedToken)
+{
+   switch(jjmatchedKind)
+   {
+      default :
+         break;
+   }
+}
 void MoreLexicalActions()
 {
    jjimageLen += (lengthOfMatch = jjmatchedPos + 1);
@@ -2614,4 +2524,94 @@ private void jjCheckNAddStates(int start, int end)
    } while (start++ != end);
 }
 
+    /** Constructor. */
+    public ExpressionParserTokenManager(JavaCharStream stream){
+
+      if (JavaCharStream.staticFlag)
+            throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
+
+    input_stream = stream;
+  }
+
+  /** Constructor. */
+  public ExpressionParserTokenManager (JavaCharStream stream, int lexState){
+    ReInit(stream);
+    SwitchTo(lexState);
+  }
+
+  /** Reinitialise parser. */
+  
+  public void ReInit(JavaCharStream stream)
+  {
+
+
+    jjmatchedPos =
+    jjnewStateCnt =
+    0;
+    curLexState = defaultLexState;
+    input_stream = stream;
+    ReInitRounds();
+  }
+
+  private void ReInitRounds()
+  {
+    int i;
+    jjround = 0x80000001;
+    for (i = 74; i-- > 0;)
+      jjrounds[i] = 0x80000000;
+  }
+
+  /** Reinitialise parser. */
+  public void ReInit(JavaCharStream stream, int lexState)
+  
+  {
+    ReInit(stream);
+    SwitchTo(lexState);
+  }
+
+  /** Switch to specified lex state. */
+  public void SwitchTo(int lexState)
+  {
+    if (lexState >= 3 || lexState < 0)
+      throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
+    else
+      curLexState = lexState;
+  }
+
+
+/** Lexer state names. */
+public static final String[] lexStateNames = {
+   "DEFAULT",
+   "WithinSingleQuoteLiteral",
+   "WithinDoubleQuoteLiteral",
+};
+
+/** Lex State array. */
+public static final int[] jjnewLexState = {
+   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 
+   2, -1, -1, 0, -1, -1, 0, -1, -1, -1, -1, -1, -1, 
+};
+static final long[] jjtoToken = {
+   0xfffffffe1fffffffL, 0xe40ffL, 
+};
+static final long[] jjtoSkip = {
+   0x1e0000000L, 0x0L, 
+};
+static final long[] jjtoSpecial = {
+   0x0L, 0x0L, 
+};
+static final long[] jjtoMore = {
+   0x0L, 0x1bc00L, 
+};
+    protected JavaCharStream  input_stream;
+
+    private final int[] jjrounds = new int[74];
+    private final int[] jjstateSet = new int[2 * 74];
+    private final StringBuilder jjimage = new StringBuilder();
+    private StringBuilder image = jjimage;
+    private int jjimageLen;
+    private int lengthOfMatch;
+    protected int curChar;
 }
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserTreeConstants.java b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserTreeConstants.java
index 97cc9d130..42e2984ce 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserTreeConstants.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ExpressionParserTreeConstants.java
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. ExpressionParserTreeConstants.java Version 5.0 */
+/* Generated By:JavaCC: Do not edit this line. ExpressionParserTreeConstants.java Version 7.0.11 */
 package org.apache.cayenne.exp.parser;
 
 public interface ExpressionParserTreeConstants
@@ -124,4 +124,4 @@ public interface ExpressionParserTreeConstants
     "Enum",
   };
 }
-/* JavaCC - OriginalChecksum=887631d60a8b59c21effca16e8257a84 (do not edit this line) */
+/* JavaCC - OriginalChecksum=8514af4390325feae96e233219fc7ae3 (do not edit this line) */
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/JJTExpressionParserState.java b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/JJTExpressionParserState.java
index 349ac964e..139896c7a 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/JJTExpressionParserState.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/JJTExpressionParserState.java
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. JJTExpressionParserState.java Version 5.0 */
+/* Generated By:JavaCC: Do not edit this line. JJTExpressionParserState.java Version 7.0.11 */
 package org.apache.cayenne.exp.parser;
 
 public class JJTExpressionParserState {
@@ -120,4 +120,4 @@ public class JJTExpressionParserState {
     }
   }
 }
-/* JavaCC - OriginalChecksum=b1c8a6064ef7a507929d26284938a24b (do not edit this line) */
+/* JavaCC - OriginalChecksum=2565d2cc35252acbdc49135562b6fa02 (do not edit this line) */
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/JavaCharStream.java b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/JavaCharStream.java
index 5abf55ac9..435cdbbc3 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/JavaCharStream.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/JavaCharStream.java
@@ -1,5 +1,5 @@
-/* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 4.1 */
-/* JavaCCOptions:STATIC=false */
+/* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 7.0 */
+/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
 /*****************************************************************
  *   Licensed to the Apache Software Foundation (ASF) under one
  *  or more contributor license agreements.  See the NOTICE file
@@ -29,595 +29,697 @@ import java.io.IOException;
  * contain only ASCII characters (with java-like unicode escape processing).
  */
 
-public class JavaCharStream {
-
-    // optimizing internal Exception by reusing the exception per CAY-1667. This exception
-    // never reaches the end user, so we can suppress stack trace creation and make it
-    // efficient
-    private static final IOException END_OF_STREAM_EXCEPTION = new IOException() {
-
-        @Override
-        public synchronized Throwable fillInStackTrace() {
-            return this;
-        }
-    };
-
-    /**
-     * Whether parser is static.
-     */
-    public static final boolean staticFlag = false;
-
-    static final int hexval(char c) throws java.io.IOException {
-        switch (c) {
-            case '0':
-                return 0;
-            case '1':
-                return 1;
-            case '2':
-                return 2;
-            case '3':
-                return 3;
-            case '4':
-                return 4;
-            case '5':
-                return 5;
-            case '6':
-                return 6;
-            case '7':
-                return 7;
-            case '8':
-                return 8;
-            case '9':
-                return 9;
-
-            case 'a':
-            case 'A':
-                return 10;
-            case 'b':
-            case 'B':
-                return 11;
-            case 'c':
-            case 'C':
-                return 12;
-            case 'd':
-            case 'D':
-                return 13;
-            case 'e':
-            case 'E':
-                return 14;
-            case 'f':
-            case 'F':
-                return 15;
-        }
-
-        throw new java.io.IOException(); // Should never come here
-    }
-
-    /**
-     * Position in buffer.
-     */
-    public int bufpos = -1;
-    int bufsize;
-    int available;
-    int tokenBegin;
-    protected int bufline[];
-    protected int bufcolumn[];
-
-    protected int column = 0;
-    protected int line = 1;
-
-    protected boolean prevCharIsCR = false;
-    protected boolean prevCharIsLF = false;
-
-    protected java.io.Reader inputStream;
-
-    protected char[] nextCharBuf;
-    protected char[] buffer;
-    protected int maxNextCharInd = 0;
-    protected int nextCharInd = -1;
-    protected int inBuf = 0;
-    protected int tabSize = 8;
-    private boolean closed;
-
-    protected void setTabSize(int i) {
-        tabSize = i;
-    }
-
-    protected int getTabSize(int i) {
-        return tabSize;
-    }
-
-    protected void ExpandBuff(boolean wrapAround) {
-        char[] newbuffer = new char[bufsize + 2048];
-        int newbufline[] = new int[bufsize + 2048];
-        int newbufcolumn[] = new int[bufsize + 2048];
-
-        try {
-            if (wrapAround) {
-                System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
-                System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos);
-                buffer = newbuffer;
-
-                System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
-                System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
-                bufline = newbufline;
-
-                System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
-                System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
-                bufcolumn = newbufcolumn;
-
-                bufpos += (bufsize - tokenBegin);
-            } else {
-                System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
-                buffer = newbuffer;
-
-                System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
-                bufline = newbufline;
-
-                System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
-                bufcolumn = newbufcolumn;
-
-                bufpos -= tokenBegin;
-            }
-        } catch (Throwable t) {
-            throw new Error(t.getMessage());
-        }
-
-        available = (bufsize += 2048);
-        tokenBegin = 0;
-    }
-
-    protected void FillBuff() throws java.io.IOException {
-        int i;
-        if (maxNextCharInd == nextCharBuf.length)
-            maxNextCharInd = nextCharInd = 0;
-
-        try {
-            // check for closed status to prevent the underlying Reader from
-            // throwing IOException that causes performance degradation
-            if (closed || (i = inputStream.read(nextCharBuf, maxNextCharInd,
-                    nextCharBuf.length - maxNextCharInd)) == -1) {
-                inputStream.close();
-                closed = true;
-                throw END_OF_STREAM_EXCEPTION;
-            } else
-                maxNextCharInd += i;
-            return;
-        } catch (java.io.IOException e) {
-            if (bufpos != 0) {
-                --bufpos;
-                backup(0);
-            } else {
-                bufline[bufpos] = line;
-                bufcolumn[bufpos] = column;
-            }
-            throw e;
-        }
-    }
-
-    protected char ReadByte() throws java.io.IOException {
-        if (++nextCharInd >= maxNextCharInd)
-            FillBuff();
-
-        return nextCharBuf[nextCharInd];
-    }
-
-    /**
-     * @return starting character for token.
-     */
-    public char BeginToken() throws java.io.IOException {
-        if (inBuf > 0) {
-            --inBuf;
-
-            if (++bufpos == bufsize)
-                bufpos = 0;
-
-            tokenBegin = bufpos;
-            return buffer[bufpos];
-        }
-
-        tokenBegin = 0;
-        bufpos = -1;
-
-        return readChar();
-    }
-
-    protected void AdjustBuffSize() {
-        if (available == bufsize) {
-            if (tokenBegin > 2048) {
-                bufpos = 0;
-                available = tokenBegin;
-            } else
-                ExpandBuff(false);
-        } else if (available > tokenBegin)
-            available = bufsize;
-        else if ((tokenBegin - available) < 2048)
-            ExpandBuff(true);
-        else
-            available = tokenBegin;
-    }
-
-    protected void UpdateLineColumn(char c) {
-        column++;
-
-        if (prevCharIsLF) {
-            prevCharIsLF = false;
-            line += (column = 1);
-        } else if (prevCharIsCR) {
-            prevCharIsCR = false;
-            if (c == '\n') {
-                prevCharIsLF = true;
-            } else
-                line += (column = 1);
-        }
-
-        switch (c) {
-            case '\r':
-                prevCharIsCR = true;
-                break;
-            case '\n':
-                prevCharIsLF = true;
-                break;
-            case '\t':
-                column--;
-                column += (tabSize - (column % tabSize));
-                break;
-            default:
-                break;
-        }
-
+public
+class JavaCharStream
+{
+  // optimizing internal Exception by reusing the exception per CAY-1667. This exception
+  // never reaches the end user, so we can suppress stack trace creation and make it
+  // efficient
+  private static final IOException END_OF_STREAM_EXCEPTION = new IOException() {
+
+    @Override
+    public synchronized Throwable fillInStackTrace() {
+      return this;
+    }
+  };
+
+  /** Whether parser is static. */
+  public static final boolean staticFlag = false;
+
+  static final int hexval(char c) throws java.io.IOException {
+    switch(c)
+    {
+       case '0' :
+          return 0;
+       case '1' :
+          return 1;
+       case '2' :
+          return 2;
+       case '3' :
+          return 3;
+       case '4' :
+          return 4;
+       case '5' :
+          return 5;
+       case '6' :
+          return 6;
+       case '7' :
+          return 7;
+       case '8' :
+          return 8;
+       case '9' :
+          return 9;
+
+       case 'a' :
+       case 'A' :
+          return 10;
+       case 'b' :
+       case 'B' :
+          return 11;
+       case 'c' :
+       case 'C' :
+          return 12;
+       case 'd' :
+       case 'D' :
+          return 13;
+       case 'e' :
+       case 'E' :
+          return 14;
+       case 'f' :
+       case 'F' :
+          return 15;
+    }
+
+    throw new java.io.IOException(); // Should never come here
+  }
+
+/* Position in buffer. */
+  public int bufpos = -1;
+  int bufsize;
+  int available;
+  int tokenBegin;
+  protected int bufline[];
+  protected int bufcolumn[];
+
+  protected int column = 0;
+  protected int line = 1;
+
+  protected boolean prevCharIsCR = false;
+  protected boolean prevCharIsLF = false;
+
+  protected java.io.Reader inputStream;
+
+  protected char[] nextCharBuf;
+  protected char[] buffer;
+  protected int maxNextCharInd = 0;
+  protected int nextCharInd = -1;
+  protected int inBuf = 0;
+  protected int tabSize = 1;
+  protected boolean trackLineColumn = true;
+
+  public void setTabSize(int i) { tabSize = i; }
+  public int getTabSize() { return tabSize; }
+
+  protected void ExpandBuff(boolean wrapAround)
+  {
+    char[] newbuffer = new char[bufsize + 2048];
+    int newbufline[] = new int[bufsize + 2048];
+    int newbufcolumn[] = new int[bufsize + 2048];
+
+    try
+    {
+      if (wrapAround)
+      {
+        System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
+        System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos);
+        buffer = newbuffer;
+
+        System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
+        System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
+        bufline = newbufline;
+
+        System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
+        System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
+        bufcolumn = newbufcolumn;
+
+        bufpos += (bufsize - tokenBegin);
+    }
+    else
+    {
+        System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
+        buffer = newbuffer;
+
+        System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
+        bufline = newbufline;
+
+        System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
+        bufcolumn = newbufcolumn;
+
+        bufpos -= tokenBegin;
+      }
+    }
+    catch (Throwable t)
+    {
+      throw new Error(t.getMessage());
+    }
+
+    available = (bufsize += 2048);
+    tokenBegin = 0;
+  }
+
+  protected void FillBuff() throws java.io.IOException
+  {
+    int i;
+    if (maxNextCharInd == 4096)
+      maxNextCharInd = nextCharInd = 0;
+
+    try {
+      if ((i = inputStream.read(nextCharBuf, maxNextCharInd,
+                                          4096 - maxNextCharInd)) == -1)
+      {
+        inputStream.close();
+        throw END_OF_STREAM_EXCEPTION;
+      }
+      else
+         maxNextCharInd += i;
+      return;
+    }
+    catch(java.io.IOException e) {
+      if (bufpos != 0)
+      {
+        --bufpos;
+        backup(0);
+      }
+      else
+      {
         bufline[bufpos] = line;
         bufcolumn[bufpos] = column;
-    }
-
-    /**
-     * Read a character.
-     */
-    public char readChar() throws java.io.IOException {
-        if (inBuf > 0) {
-            --inBuf;
-
-            if (++bufpos == bufsize)
-                bufpos = 0;
-
-            return buffer[bufpos];
-        }
-
-        char c;
-
+      }
+      throw e;
+    }
+  }
+
+  protected char ReadByte() throws java.io.IOException
+  {
+    if (++nextCharInd >= maxNextCharInd)
+      FillBuff();
+
+    return nextCharBuf[nextCharInd];
+  }
+
+/* @return starting character for token. */
+  public char BeginToken() throws java.io.IOException
+  {
+    if (inBuf > 0)
+    {
+      --inBuf;
+
+      if (++bufpos == bufsize)
+        bufpos = 0;
+
+      tokenBegin = bufpos;
+      return buffer[bufpos];
+    }
+
+    tokenBegin = 0;
+    bufpos = -1;
+
+    return readChar();
+  }
+
+  protected void AdjustBuffSize()
+  {
+    if (available == bufsize)
+    {
+      if (tokenBegin > 2048)
+      {
+        bufpos = 0;
+        available = tokenBegin;
+      }
+      else
+        ExpandBuff(false);
+    }
+    else if (available > tokenBegin)
+      available = bufsize;
+    else if ((tokenBegin - available) < 2048)
+      ExpandBuff(true);
+    else
+      available = tokenBegin;
+  }
+
+  protected void UpdateLineColumn(char c)
+  {
+    column++;
+
+    if (prevCharIsLF)
+    {
+      prevCharIsLF = false;
+      line += (column = 1);
+    }
+    else if (prevCharIsCR)
+    {
+      prevCharIsCR = false;
+      if (c == '\n')
+      {
+        prevCharIsLF = true;
+      }
+      else
+        line += (column = 1);
+    }
+
+    switch (c)
+    {
+      case '\r' :
+        prevCharIsCR = true;
+        break;
+      case '\n' :
+        prevCharIsLF = true;
+        break;
+      case '\t' :
+        column--;
+        column += (tabSize - (column % tabSize));
+        break;
+      default :
+        break;
+    }
+
+    bufline[bufpos] = line;
+    bufcolumn[bufpos] = column;
+  }
+
+/* Read a character. */
+  public char readChar() throws java.io.IOException
+  {
+    if (inBuf > 0)
+    {
+      --inBuf;
+
+      if (++bufpos == bufsize)
+        bufpos = 0;
+
+      return buffer[bufpos];
+    }
+
+    char c;
+
+    if (++bufpos == available)
+      AdjustBuffSize();
+
+    if ((buffer[bufpos] = c = ReadByte()) == '\\')
+    {
+      if (trackLineColumn) { UpdateLineColumn(c); }
+
+      int backSlashCnt = 1;
+
+      for (;;) // Read all the backslashes
+      {
         if (++bufpos == available)
-            AdjustBuffSize();
-
-        if ((buffer[bufpos] = c = ReadByte()) == '\\') {
-            UpdateLineColumn(c);
-
-            int backSlashCnt = 1;
-
-            for (; ; ) // Read all the backslashes
+          AdjustBuffSize();
+
+        try
+        {
+          if ((buffer[bufpos] = c = ReadByte()) != '\\')
+          {
+            if (trackLineColumn) { UpdateLineColumn(c); }
+            // found a non-backslash char.
+            if ((c == 'u') && ((backSlashCnt & 1) == 1))
             {
-                if (++bufpos == available)
-                    AdjustBuffSize();
-
-                try {
-                    if ((buffer[bufpos] = c = ReadByte()) != '\\') {
-                        UpdateLineColumn(c);
-                        // found a non-backslash char.
-                        if ((c == 'u') && ((backSlashCnt & 1) == 1)) {
-                            if (--bufpos < 0)
-                                bufpos = bufsize - 1;
-
-                            break;
-                        }
-
-                        backup(backSlashCnt);
-                        return '\\';
-                    }
-                } catch (java.io.IOException e) {
-                    // We are returning one backslash so we should only backup (count-1)
-                    if (backSlashCnt > 1)
-                        backup(backSlashCnt - 1);
-
-                    return '\\';
-                }
-
-                UpdateLineColumn(c);
-                backSlashCnt++;
-            }
+              if (--bufpos < 0)
+                bufpos = bufsize - 1;
 
-            // Here, we have seen an odd number of backslash's followed by a 'u'
-            try {
-                while ((c = ReadByte()) == 'u')
-                    ++column;
-
-                buffer[bufpos] = c = (char) (hexval(c) << 12 |
-                        hexval(ReadByte()) << 8 |
-                        hexval(ReadByte()) << 4 |
-                        hexval(ReadByte()));
-
-                column += 4;
-            } catch (java.io.IOException e) {
-                throw new Error("Invalid escape character at line " + line +
-                        " column " + column + ".");
+              break;
             }
 
-            if (backSlashCnt == 1)
-                return c;
-            else {
-                backup(backSlashCnt - 1);
-                return '\\';
-            }
-        } else {
-            UpdateLineColumn(c);
-            return c;
+            backup(backSlashCnt);
+            return '\\';
+          }
         }
-    }
-
-    /**
-     * Get end column.
-     */
-    public int getEndColumn() {
-        return bufcolumn[bufpos];
-    }
-
-    /**
-     * Get end line.
-     */
-    public int getEndLine() {
-        return bufline[bufpos];
-    }
-
-    /**
-     * @return column of token start
-     */
-    public int getBeginColumn() {
-        return bufcolumn[tokenBegin];
-    }
-
-    /**
-     * @return line number of token start
-     */
-    public int getBeginLine() {
-        return bufline[tokenBegin];
-    }
+        catch(java.io.IOException e)
+        {
+	  // We are returning one backslash so we should only backup (count-1)
+          if (backSlashCnt > 1)
+            backup(backSlashCnt-1);
 
-    /**
-     * Retreat.
-     */
-    public void backup(int amount) {
-
-        inBuf += amount;
-        if ((bufpos -= amount) < 0)
-            bufpos += bufsize;
-    }
-
-    /**
-     * Constructor.
-     */
-    public JavaCharStream(java.io.Reader dstream, int startline, int startcolumn, int buffersize) {
-        inputStream = dstream;
-        line = startline;
-        column = startcolumn - 1;
-
-        available = bufsize = buffersize;
-        buffer = new char[buffersize];
-        bufline = new int[buffersize];
-        bufcolumn = new int[buffersize];
-        nextCharBuf = new char[buffersize];
-    }
-
-    /**
-     * Constructor.
-     */
-    public JavaCharStream(java.io.Reader dstream, int startline, int startcolumn) {
-        this(dstream, startline, startcolumn, 4096);
-    }
-
-    /**
-     * Constructor.
-     */
-    public JavaCharStream(java.io.Reader dstream) {
-        this(dstream, 1, 1, 4096);
-    }
-
-    /**
-     * Reinitialise.
-     */
-    public void ReInit(java.io.Reader dstream) {
-        ReInit(dstream, 1, 1, 4096);
-    }
-
-    /**
-     * Constructor.
-     */
-    public JavaCharStream(java.io.InputStream dstream, String encoding, int startline,
-                          int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException {
-        this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
-    }
-
-    /**
-     * Constructor.
-     */
-    public JavaCharStream(java.io.InputStream dstream, int startline,
-                          int startcolumn, int buffersize) {
-        this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
-    }
-
-    /**
-     * Constructor.
-     */
-    public JavaCharStream(java.io.InputStream dstream, String encoding, int startline,
-                          int startcolumn) throws java.io.UnsupportedEncodingException {
-        this(dstream, encoding, startline, startcolumn, 4096);
-    }
-
-    /**
-     * Constructor.
-     */
-    public JavaCharStream(java.io.InputStream dstream, int startline,
-                          int startcolumn) {
-        this(dstream, startline, startcolumn, 4096);
-    }
-
-    /**
-     * Constructor.
-     */
-    public JavaCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException {
-        this(dstream, encoding, 1, 1, 4096);
-    }
-
-    /**
-     * Constructor.
-     */
-    public JavaCharStream(java.io.InputStream dstream) {
-        this(dstream, 1, 1, 4096);
-    }
-
-    /**
-     * Reinitialise.
-     */
-    public void ReInit(java.io.Reader dstream, int startline, int startcolumn, int buffersize) {
-        inputStream = dstream;
-        line = startline;
-        column = startcolumn - 1;
-
-        if (buffer == null || buffersize != buffer.length) {
-            available = bufsize = buffersize;
-            buffer = new char[buffersize];
-            bufline = new int[buffersize];
-            bufcolumn = new int[buffersize];
-            nextCharBuf = new char[buffersize];
+          return '\\';
         }
-        prevCharIsLF = prevCharIsCR = false;
-        tokenBegin = inBuf = maxNextCharInd = 0;
-        nextCharInd = bufpos = -1;
-    }
-
-    /**
-     * Reinitialise.
-     */
-    public void ReInit(java.io.Reader dstream, int startline, int startcolumn) {
-        ReInit(dstream, startline, startcolumn, 4096);
-    }
-
-    /**
-     * Reinitialise.
-     */
-    public void ReInit(java.io.InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException {
-        ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
-    }
-
-    /**
-     * Reinitialise.
-     */
-    public void ReInit(java.io.InputStream dstream, int startline, int startcolumn, int buffersize) {
-        ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
-    }
-
-    /**
-     * Reinitialise.
-     */
-    public void ReInit(java.io.InputStream dstream, String encoding, int startline, int startcolumn) throws java.io.UnsupportedEncodingException {
-        ReInit(dstream, encoding, startline, startcolumn, 4096);
-    }
-
-    /**
-     * Reinitialise.
-     */
-    public void ReInit(java.io.InputStream dstream, int startline, int startcolumn) {
-        ReInit(dstream, startline, startcolumn, 4096);
-    }
 
-    /**
-     * Reinitialise.
-     */
-    public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException {
-        ReInit(dstream, encoding, 1, 1, 4096);
-    }
+        if (trackLineColumn) { UpdateLineColumn(c); }
+        backSlashCnt++;
+      }
+
+      // Here, we have seen an odd number of backslash's followed by a 'u'
+      try
+      {
+        while ((c = ReadByte()) == 'u')
+          ++column;
+
+        buffer[bufpos] = c = (char)(hexval(c) << 12 |
+                                    hexval(ReadByte()) << 8 |
+                                    hexval(ReadByte()) << 4 |
+                                    hexval(ReadByte()));
+
+        column += 4;
+      }
+      catch(java.io.IOException e)
+      {
+        throw new Error("Invalid escape character at line " + line +
+                                         " column " + column + ".");
+      }
+
+      if (backSlashCnt == 1)
+        return c;
+      else
+      {
+        backup(backSlashCnt - 1);
+        return '\\';
+      }
+    }
+    else
+    {
+      UpdateLineColumn(c);
+      return c;
+    }
+  }
+
+  /*
+   * @deprecated
+   * @see #getEndColumn
+   */
+  @Deprecated
+  public int getColumn() {
+    return bufcolumn[bufpos];
+  }
+
+  /*
+   * @deprecated
+   * @see #getEndLine
+   * @return the line number.
+   */
+  @Deprecated
+  public int getLine() {
+    return bufline[bufpos];
+  }
+
+/** Get end column.
+ * @return the end column or -1
+ */
+  public int getEndColumn() {
+    return bufcolumn[bufpos];
+  }
 
-    /**
-     * Reinitialise.
-     */
-    public void ReInit(java.io.InputStream dstream) {
-        ReInit(dstream, 1, 1, 4096);
-    }
+/** Get end line.
+ * @return the end line number or -1
+ */
+  public int getEndLine() {
+    return bufline[bufpos];
+  }
+
+/** Get the beginning column.
+ * @return column of token start */
+  public int getBeginColumn() {
+    return bufcolumn[tokenBegin];
+  }
+
+/** @return line number of token start */
+  public int getBeginLine() {
+    return bufline[tokenBegin];
+  }
+
+/** Retreat. */
+  public void backup(int amount) {
+
+    inBuf += amount;
+    if ((bufpos -= amount) < 0)
+      bufpos += bufsize;
+  }
+
+/** Constructor.
+ * @param dstream the underlying data source.
+ * @param startline line number of the first character of the stream, mostly for error messages.
+ * @param startcolumn column number of the first character of the stream.
+ * @param buffersize size of the buffer
+ */
+  public JavaCharStream(java.io.Reader dstream,
+                 int startline, int startcolumn, int buffersize)
+  {
+    inputStream = dstream;
+    line = startline;
+    column = startcolumn - 1;
+
+    available = bufsize = buffersize;
+    buffer = new char[buffersize];
+    bufline = new int[buffersize];
+    bufcolumn = new int[buffersize];
+    nextCharBuf = new char[4096];
+  }
+
+/** Constructor.
+ * @param dstream the underlying data source.
+ * @param startline line number of the first character of the stream, mostly for error messages.
+ * @param startcolumn column number of the first character of the stream.
+ */
+  public JavaCharStream(java.io.Reader dstream,
+                                        int startline, int startcolumn)
+  {
+    this(dstream, startline, startcolumn, 4096);
+  }
+
+/** Constructor.
+ * @param dstream the underlying data source.
+ * @param startline line number of the first character of the stream, mostly for error messages.
+ */
+  public JavaCharStream(java.io.Reader dstream)
+  {
+    this(dstream, 1, 1, 4096);
+  }
+/* Reinitialise. */
+  public void ReInit(java.io.Reader dstream,
+                 int startline, int startcolumn, int buffersize)
+  {
+    inputStream = dstream;
+    line = startline;
+    column = startcolumn - 1;
+
+    if (buffer == null || buffersize != buffer.length)
+    {
+      available = bufsize = buffersize;
+      buffer = new char[buffersize];
+      bufline = new int[buffersize];
+      bufcolumn = new int[buffersize];
+      nextCharBuf = new char[4096];
+    }
+    prevCharIsLF = prevCharIsCR = false;
+    tokenBegin = inBuf = maxNextCharInd = 0;
+    nextCharInd = bufpos = -1;
+  }
+
+/* Reinitialise. */
+  public void ReInit(java.io.Reader dstream,
+                                        int startline, int startcolumn)
+  {
+    ReInit(dstream, startline, startcolumn, 4096);
+  }
+
+/* Reinitialise. */
+  public void ReInit(java.io.Reader dstream)
+  {
+    ReInit(dstream, 1, 1, 4096);
+  }
+/** Constructor. */
+  public JavaCharStream(java.io.InputStream dstream, String encoding, int startline,
+  int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
+  {
+    this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
+  }
+
+/** Constructor.
+ * @param dstream the underlying data source.
+ * @param startline line number of the first character of the stream, mostly for error messages.
+ * @param startcolumn column number of the first character of the stream.
+ * @param buffersize size of the buffer
+ */
+  public JavaCharStream(java.io.InputStream dstream, int startline,
+  int startcolumn, int buffersize)
+  {
+    this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
+  }
+
+/** Constructor.
+ * @param dstream the underlying data source.
+ * @param encoding the character encoding of the data stream.
+ * @param startline line number of the first character of the stream, mostly for error messages.
+ * @param startcolumn column number of the first character of the stream.
+ * @throws UnsupportedEncodingException encoding is invalid or unsupported.
+ */
+  public JavaCharStream(java.io.InputStream dstream, String encoding, int startline,
+                        int startcolumn) throws java.io.UnsupportedEncodingException
+  {
+    this(dstream, encoding, startline, startcolumn, 4096);
+  }
+
+/** Constructor.
+ * @param dstream the underlying data source.
+ * @param startline line number of the first character of the stream, mostly for error messages.
+ * @param startcolumn column number of the first character of the stream.
+ */
+  public JavaCharStream(java.io.InputStream dstream, int startline,
+                        int startcolumn)
+  {
+    this(dstream, startline, startcolumn, 4096);
+  }
+
+/** Constructor.
+ * @param dstream the underlying data source.
+ * @param encoding the character encoding of the data stream.
+ * @throws UnsupportedEncodingException encoding is invalid or unsupported.
+ */
+  public JavaCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
+  {
+    this(dstream, encoding, 1, 1, 4096);
+  }
+
+  /** Constructor.
+   * @param dstream the underlying data source.
+   */
+  public JavaCharStream(java.io.InputStream dstream)
+  {
+    this(dstream, 1, 1, 4096);
+  }
+
+/** Reinitialise.
+ * @param dstream the underlying data source.
+ * @param encoding the character encoding of the data stream.
+ * @param startline line number of the first character of the stream, mostly for error messages.
+ * @param startcolumn column number of the first character of the stream.
+ * @param buffersize size of the buffer
+ */
+  public void ReInit(java.io.InputStream dstream, String encoding, int startline,
+  int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
+  {
+    ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
+  }
+
+/** Reinitialise.
+ * @param dstream the underlying data source.
+ * @param startline line number of the first character of the stream, mostly for error messages.
+ * @param startcolumn column number of the first character of the stream.
+ * @param buffersize size of the buffer
+ */
+  public void ReInit(java.io.InputStream dstream, int startline,
+  int startcolumn, int buffersize)
+  {
+    ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
+  }
+/** Reinitialise.
+ * @param dstream the underlying data source.
+ * @param encoding the character encoding of the data stream.
+ * @param startline line number of the first character of the stream, mostly for error messages.
+ * @param startcolumn column number of the first character of the stream.
+ * @throws UnsupportedEncodingException encoding is invalid or unsupported.
+ */
+  public void ReInit(java.io.InputStream dstream, String encoding, int startline,
+                     int startcolumn) throws java.io.UnsupportedEncodingException
+  {
+    ReInit(dstream, encoding, startline, startcolumn, 4096);
+  }
+/** Reinitialise.
+ * @param dstream the underlying data source.
+ * @param startline line number of the first character of the stream, mostly for error messages.
+ * @param startcolumn column number of the first character of the stream.
+ */
+  public void ReInit(java.io.InputStream dstream, int startline,
+                     int startcolumn)
+  {
+    ReInit(dstream, startline, startcolumn, 4096);
+  }
+/** Reinitialise.
+ * @param dstream the underlying data source.
+ * @param encoding the character encoding of the data stream.
+ * @throws UnsupportedEncodingException encoding is invalid or unsupported.
+ */
+  public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
+  {
+    ReInit(dstream, encoding, 1, 1, 4096);
+  }
 
-    /**
-     * @return token image as String
-     */
-    public String GetImage() {
-        if (bufpos >= tokenBegin)
-            return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
+/** Reinitialise.
+ * @param dstream the underlying data source.
+ */
+  public void ReInit(java.io.InputStream dstream)
+  {
+    ReInit(dstream, 1, 1, 4096);
+  }
+
+  /** Get the token timage.
+   * @return token image as String */
+  public String GetImage()
+  {
+    if (bufpos >= tokenBegin)
+      return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
+    else
+      return new String(buffer, tokenBegin, bufsize - tokenBegin) +
+                              new String(buffer, 0, bufpos + 1);
+  }
+
+  /** Get the suffix as an array of characters.
+   * @param len the length of the array to return.
+   * @return suffix */
+  public char[] GetSuffix(int len)
+  {
+    char[] ret = new char[len];
+
+    if ((bufpos + 1) >= len)
+      System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
+    else
+    {
+      System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
+                                                        len - bufpos - 1);
+      System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
+    }
+
+    return ret;
+  }
+
+  /** Set buffers back to null when finished. */
+  public void Done()
+  {
+    nextCharBuf = null;
+    buffer = null;
+    bufline = null;
+    bufcolumn = null;
+  }
+
+  /**
+   * Method to adjust line and column numbers for the start of a token.
+   *
+   * @param newLine the new line number.
+   * @param newCol the new column number.
+   */
+  public void adjustBeginLineColumn(int newLine, int newCol)
+  {
+    int start = tokenBegin;
+    int len;
+
+    if (bufpos >= tokenBegin)
+    {
+      len = bufpos - tokenBegin + inBuf + 1;
+    }
+    else
+    {
+      len = bufsize - tokenBegin + bufpos + 1 + inBuf;
+    }
+
+    int i = 0, j = 0, k = 0;
+    int nextColDiff = 0, columnDiff = 0;
+
+    while (i < len && bufline[j = start % bufsize] == bufline[k = ++start % bufsize])
+    {
+      bufline[j] = newLine;
+      nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
+      bufcolumn[j] = newCol + columnDiff;
+      columnDiff = nextColDiff;
+      i++;
+    }
+
+    if (i < len)
+    {
+      bufline[j] = newLine++;
+      bufcolumn[j] = newCol + columnDiff;
+
+      while (i++ < len)
+      {
+        if (bufline[j = start % bufsize] != bufline[++start % bufsize])
+          bufline[j] = newLine++;
         else
-            return new String(buffer, tokenBegin, bufsize - tokenBegin) +
-                    new String(buffer, 0, bufpos + 1);
+          bufline[j] = newLine;
+      }
     }
 
-    /**
-     * @return suffix
-     */
-    public char[] GetSuffix(int len) {
-        char[] ret = new char[len];
-
-        if ((bufpos + 1) >= len)
-            System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
-        else {
-            System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
-                    len - bufpos - 1);
-            System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
-        }
-
-        return ret;
-    }
-
-    /**
-     * Set buffers back to null when finished.
-     */
-    public void Done() {
-        nextCharBuf = null;
-        buffer = null;
-        bufline = null;
-        bufcolumn = null;
-    }
-
-    /**
-     * Method to adjust line and column numbers for the start of a token.
-     */
-    public void adjustBeginLineColumn(int newLine, int newCol) {
-        int start = tokenBegin;
-        int len;
-
-        if (bufpos >= tokenBegin) {
-            len = bufpos - tokenBegin + inBuf + 1;
-        } else {
-            len = bufsize - tokenBegin + bufpos + 1 + inBuf;
-        }
-
-        int i = 0, j = 0, k = 0;
-        int nextColDiff = 0, columnDiff = 0;
-
-        while (i < len && bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) {
-            bufline[j] = newLine;
-            nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
-            bufcolumn[j] = newCol + columnDiff;
-            columnDiff = nextColDiff;
-            i++;
-        }
-
-        if (i < len) {
-            bufline[j] = newLine++;
-            bufcolumn[j] = newCol + columnDiff;
-
-            while (i++ < len) {
-                if (bufline[j = start % bufsize] != bufline[++start % bufsize])
-                    bufline[j] = newLine++;
-                else
-                    bufline[j] = newLine;
-            }
-        }
-
-        line = bufline[j];
-        column = bufcolumn[j];
-    }
+    line = bufline[j];
+    column = bufcolumn[j];
+  }
+  boolean getTrackLineColumn() { return trackLineColumn; }
+  void setTrackLineColumn(boolean tlc) { trackLineColumn = tlc; }
 
 }
-/* JavaCC - OriginalChecksum=42728d5d6de379c28d8e61854c22fc66 (do not edit this line) */
+/* JavaCC - OriginalChecksum=f2d42bc71c7315546fcc1bd80e3b43b4 (do not edit this line) */
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ParseException.java b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ParseException.java
index d8c439e41..f20110b8f 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ParseException.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ParseException.java
@@ -1,5 +1,5 @@
-/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 5.0 */
-/* JavaCCOptions:KEEP_LINE_COL=null */
+/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 7.0 */
+/* JavaCCOptions:KEEP_LINE_COLUMN=true */
 /*****************************************************************
  *   Licensed to the Apache Software Foundation (ASF) under one
  *  or more contributor license agreements.  See the NOTICE file
@@ -40,6 +40,11 @@ public class ParseException extends Exception {
    */
   private static final long serialVersionUID = 1L;
 
+  /**
+   * The end of line string for this machine.
+   */
+  protected static String EOL = System.getProperty("line.separator", "\n");
+
   /**
    * This constructor is used by the method "generateParseException"
    * in the generated parser.  Calling this constructor generates
@@ -80,7 +85,7 @@ public class ParseException extends Exception {
   /**
    * This is the last token that has been consumed successfully.  If
    * this object has been created due to a parse error, the token
-   * followng this token will (therefore) be the first error token.
+   * following this token will (therefore) be the first error token.
    */
   public Token currentToken;
 
@@ -108,8 +113,8 @@ public class ParseException extends Exception {
   private static String initialise(Token currentToken,
                            int[][] expectedTokenSequences,
                            String[] tokenImage) {
-    String eol = System.getProperty("line.separator", "\n");
-    StringBuffer expected = new StringBuffer();
+
+    StringBuilder expected = new StringBuilder();
     int maxSize = 0;
     for (int i = 0; i < expectedTokenSequences.length; i++) {
       if (maxSize < expectedTokenSequences[i].length) {
@@ -121,7 +126,7 @@ public class ParseException extends Exception {
       if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
         expected.append("...");
       }
-      expected.append(eol).append("    ");
+      expected.append(EOL).append("    ");
     }
     String retval = "Encountered \"";
     Token tok = currentToken.next;
@@ -137,21 +142,26 @@ public class ParseException extends Exception {
       retval += " \"";
       tok = tok.next;
     }
-    retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
-    retval += "." + eol;
-    if (expectedTokenSequences.length == 1) {
-      retval += "Was expecting:" + eol + "    ";
+    if (currentToken.next != null) {
+      retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
+    }
+    retval += "." + EOL;
+    
+    
+    if (expectedTokenSequences.length == 0) {
+        // Nothing to add here
     } else {
-      retval += "Was expecting one of:" + eol + "    ";
+	    if (expectedTokenSequences.length == 1) {
+	      retval += "Was expecting:" + EOL + "    ";
+	    } else {
+	      retval += "Was expecting one of:" + EOL + "    ";
+	    }
+	    retval += expected.toString();
     }
-    retval += expected.toString();
+    
     return retval;
   }
 
-  /**
-   * The end of line string for this machine.
-   */
-  protected String eol = System.getProperty("line.separator", "\n");
 
   /**
    * Used to convert raw characters to their escaped version
@@ -159,13 +169,11 @@ public class ParseException extends Exception {
    * string literal.
    */
   static String add_escapes(String str) {
-      StringBuffer retval = new StringBuffer();
+      StringBuilder retval = new StringBuilder();
       char ch;
       for (int i = 0; i < str.length(); i++) {
         switch (str.charAt(i))
         {
-           case 0 :
-              continue;
            case '\b':
               retval.append("\\b");
               continue;
@@ -204,4 +212,4 @@ public class ParseException extends Exception {
    }
 
 }
-/* JavaCC - OriginalChecksum=eb8dac072dfd4dad1a11088427fd2da3 (do not edit this line) */
+/* JavaCC - OriginalChecksum=7691b3e8db296ac7fb754fa94b972967 (do not edit this line) */
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/TokenMgrError.java b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/TokenMgrError.java
index c7850b17e..1289469eb 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/TokenMgrError.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/TokenMgrError.java
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 5.0 */
+/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 7.0 */
 /* JavaCCOptions: */
 /*****************************************************************
  *   Licensed to the Apache Software Foundation (ASF) under one
@@ -40,22 +40,22 @@ public class TokenMgrError extends Error
   /**
    * Lexical error occurred.
    */
-  static final int LEXICAL_ERROR = 0;
+  public static final int LEXICAL_ERROR = 0;
 
   /**
    * An attempt was made to create a second instance of a static token manager.
    */
-  static final int STATIC_LEXER_ERROR = 1;
+  public static final int STATIC_LEXER_ERROR = 1;
 
   /**
    * Tried to change to an invalid lexical state.
    */
-  static final int INVALID_LEXICAL_STATE = 2;
+  public static final int INVALID_LEXICAL_STATE = 2;
 
   /**
    * Detected (and bailed out of) an infinite loop in the token manager.
    */
-  static final int LOOP_DETECTED = 3;
+  public static final int LOOP_DETECTED = 3;
 
   /**
    * Indicates the reason why the exception is thrown. It will have
@@ -68,13 +68,11 @@ public class TokenMgrError extends Error
    * equivalents in the given string
    */
   protected static final String addEscapes(String str) {
-    StringBuffer retval = new StringBuffer();
+    StringBuilder retval = new StringBuilder();
     char ch;
     for (int i = 0; i < str.length(); i++) {
       switch (str.charAt(i))
       {
-        case 0 :
-          continue;
         case '\b':
           retval.append("\\b");
           continue;
@@ -117,19 +115,21 @@ public class TokenMgrError extends Error
    * token manager to indicate a lexical error.
    * Parameters :
    *    EOFSeen     : indicates if EOF caused the lexical error
-   *    curLexState : lexical state in which this error occurred
+   *    lexState    : lexical state in which this error occurred
    *    errorLine   : line number when the error occurred
    *    errorColumn : column number when the error occurred
    *    errorAfter  : prefix that was seen before this error occurred
    *    curchar     : the offending character
    * Note: You can customize the lexical error message by modifying this method.
    */
-  protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
-    return("Lexical error at line " +
-          errorLine + ", column " +
-          errorColumn + ".  Encountered: " +
-          (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") +
-          "after : \"" + addEscapes(errorAfter) + "\"");
+  protected static String LexicalErr(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, int curChar) {
+    char curChar1 = (char)curChar;
+    return("Lexical error at line " + //
+          errorLine + ", column " + //
+          errorColumn + ".  Encountered: " + //
+          (EOFSeen ? "<EOF>" : ("'" + addEscapes(String.valueOf(curChar)) + "' (" + (int)curChar + "),")) + //
+          (errorAfter == null || errorAfter.length() == 0 ? "" : " after prefix \"" + addEscapes(errorAfter) + "\"")) + //
+          (lexState == 0 ? "" : " (in lexical state " + lexState + ")");
   }
 
   /**
@@ -141,6 +141,7 @@ public class TokenMgrError extends Error
    *
    * from this method for such cases in the release version of your parser.
    */
+  @Override
   public String getMessage() {
     return super.getMessage();
   }
@@ -160,8 +161,8 @@ public class TokenMgrError extends Error
   }
 
   /** Full Constructor. */
-  public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
-    this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
+  public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, int curChar, int reason) {
+    this(LexicalErr(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
   }
 }
-/* JavaCC - OriginalChecksum=347e14790694eecc248c9f72c50d0b1d (do not edit this line) */
+/* JavaCC - OriginalChecksum=5088d3d182ac63ec68e3c489b6f0b93c (do not edit this line) */
diff --git a/cayenne-server/src/main/jjtree/org/apache/cayenne/exp/parser/ExpressionParser.jjt b/cayenne-server/src/main/jjtree/org/apache/cayenne/exp/parser/ExpressionParser.jjt
index 39dddea45..0d12673bb 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
@@ -421,7 +421,7 @@ void dateTimeExtractingFunction() #Extract(1) : {
 
 void distinct() #Distinct : { }
 {
-	<DISTINCT> "(" ( pathExpression() ) ")"
+	<DISTINCT> "(" pathExpression() ")"
 }
 
 TOKEN_MGR_DECLS:
@@ -578,21 +578,64 @@ void pathExpression() : {
    Token t;
 }
 {
-   (
              t = <PROPERTY_PATH> { jjtThis.setPath(t.image); } #ObjPath(0)
    |
-     "obj:"  t = <PROPERTY_PATH> { jjtThis.setPath(t.image); } #ObjPath(0)
+     "obj:"  t = pathToken() { jjtThis.setPath(t.image); } #ObjPath(0)
    |
-     "db:"   t = <PROPERTY_PATH> { jjtThis.setPath(t.image); } #DbPath(0)
+     "db:"   t = pathToken() { jjtThis.setPath(t.image); } #DbPath(0)
    |
-     "enum:" t = <PROPERTY_PATH> { jjtThis.setEnumValue(t.image); } #Enum(0)
-   )
+     "enum:" t = pathToken() { jjtThis.setEnumValue(t.image); } #Enum(0)
 }
 
 TOKEN : {
     <ASTERISK: "*">
 }
 
+// this rule returns single token that could be used as a path definition
+Token pathToken() : {
+    Token t ;
+}
+{
+    (
+      t = <PROPERTY_PATH>
+
+    | t = <AVG>
+    | t = <MIN>
+    | t = <MAX>
+    | t = <SUM>
+    | t = <COUNT>
+    | t = <DISTINCT>
+
+    | t = <CONCAT>
+    | t = <SUBSTRING>
+    | t = <TRIM>
+    | t = <LOWER>
+    | t = <UPPER>
+
+    | t = <LENGTH>
+    | t = <LOCATE>
+    | t = <ABS>
+    | t = <SQRT>
+    | t = <MOD>
+
+    | t = <CURRENT_DATE>
+    | t = <CURRENT_TIME>
+    | t = <CURRENT_TIMESTAMP>
+
+    | t = <YEAR>
+    | t = <MONTH>
+    | t = <DAY>
+    | t = <HOUR>
+    | t = <MINUTE>
+    | t = <SECOND>
+    | t = <DAY_OF_MONTH>
+    | t = <DAY_OF_WEEK>
+    | t = <DAY_OF_YEAR>
+
+    )
+    {return t;}
+}
+
 TOKEN : {
 	<PROPERTY_PATH: <IDENTIFIER> ( "." <IDENTIFIER>) *>
 }
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/exp/ExpressionTest.java b/cayenne-server/src/test/java/org/apache/cayenne/exp/ExpressionTest.java
index 9f7ae88c2..7a289ca27 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/exp/ExpressionTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/exp/ExpressionTest.java
@@ -19,6 +19,7 @@
 package org.apache.cayenne.exp;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -26,7 +27,9 @@ import java.util.Date;
 import java.util.List;
 
 import org.apache.cayenne.ObjectId;
+import org.apache.cayenne.exp.parser.ASTDbPath;
 import org.apache.cayenne.exp.parser.ASTFalse;
+import org.apache.cayenne.exp.parser.ASTObjPath;
 import org.apache.cayenne.exp.parser.SimpleNode;
 import org.apache.cayenne.testdo.testmap.Artist;
 import org.junit.Test;
@@ -442,4 +445,23 @@ public class ExpressionTest {
 		assertEquals("true and true", transformed.toString());
 	}
 
+	@Test
+	public void testObjPathFunctionName() throws IOException {
+		Expression exp = ExpressionFactory.exp("obj:year.month.day.avg");
+		assertTrue(exp instanceof ASTObjPath);
+
+		StringBuilder buffer = new StringBuilder();
+		exp.appendAsString(buffer);
+		assertEquals("year.month.day.avg", buffer.toString());
+	}
+
+	@Test
+	public void testDbPathFunctionName() throws IOException {
+		Expression exp = ExpressionFactory.exp("db:year.month.day.avg");
+		assertTrue(exp instanceof ASTDbPath);
+
+		StringBuilder buffer = new StringBuilder();
+		exp.appendAsString(buffer);
+		assertEquals("db:year.month.day.avg", buffer.toString());
+	}
 }