User: dsundstrom
  Date: 02/04/14 10:28:56

  Modified:    src/main/org/jboss/ejb/plugins/cmp/ejbql BasicVisitor.java
                        JBossQLParser.jjt
  Log:
  Added LCASE and UCASE functions to JBossQL.
  
  Revision  Changes    Path
  1.2       +17 -1     jboss/src/main/org/jboss/ejb/plugins/cmp/ejbql/BasicVisitor.java
  
  Index: BasicVisitor.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/cmp/ejbql/BasicVisitor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BasicVisitor.java 26 Feb 2002 23:16:40 -0000      1.1
  +++ BasicVisitor.java 14 Apr 2002 17:28:55 -0000      1.2
  @@ -13,7 +13,7 @@
    * extensions translate just a few elements of the tree.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Dain Sundstrom</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */                            
   public class BasicVisitor implements JBossQLParserVisitor {
      public Object visit(SimpleNode node, Object data) {
  @@ -296,6 +296,22 @@
         node.jjtGetChild(1).jjtAccept(this, data);
         buf.append(", ");
         node.jjtGetChild(2).jjtAccept(this, data);
  +      buf.append(")");
  +      return data;
  +   }
  +
  +   public Object visit(ASTLCase node, Object data) {
  +      BlockStringBuffer buf = (BlockStringBuffer)data;
  +      buf.append("LCASE(");
  +      node.jjtGetChild(0).jjtAccept(this, data);
  +      buf.append(")");
  +      return data;
  +   }
  +
  +   public Object visit(ASTUCase node, Object data) {
  +      BlockStringBuffer buf = (BlockStringBuffer)data;
  +      buf.append("UCASE(");
  +      node.jjtGetChild(0).jjtAccept(this, data);
         buf.append(")");
         return data;
      }
  
  
  
  1.3       +13 -1     jboss/src/main/org/jboss/ejb/plugins/cmp/ejbql/JBossQLParser.jjt
  
  Index: JBossQLParser.jjt
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/cmp/ejbql/JBossQLParser.jjt,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JBossQLParser.jjt 14 Apr 2002 16:26:24 -0000      1.2
  +++ JBossQLParser.jjt 14 Apr 2002 17:28:55 -0000      1.3
  @@ -46,7 +46,7 @@
    * This class parses JBossQL into an abstract syntax tree.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Dain Sundstrom</a>
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */                            
   public class JBossQLParser {
      private Catalog catalog;
  @@ -524,6 +524,16 @@
            ArithmeticExpression() <COMMA>
            ArithmeticExpression() <RPAREN>
      ) #Substring
  +////////////////////// New or changed elements /////////////////////////////
  +|
  +   (
  +      <UCASE> <LPAREN> StringExpression() <RPAREN>
  +   ) #UCase
  +|
  +   (
  +      <LCASE> <LPAREN> StringExpression() <RPAREN>
  +   ) #LCase
  +////////////////////////////////////////////////////////////////////////////
   }
   
   void FunctionsReturningNumerics() #void :
  @@ -825,7 +835,9 @@
   |  < ASC: "ASC" >
   |  < BY: "BY" >
   |  < DESC: "DESC" >
  +|  < LCASE: "LCASE" >
   |  < ORDER: "ORDER" >
  +|  < UCASE: "UCASE" >
   ////////////////////////////////////////////////////////////////////////////
   }
   
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to