avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From froehl...@apache.org
Subject cvs commit: jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/parser BasicSQLParser.java
Date Thu, 29 Nov 2001 13:30:47 GMT
froehlich    01/11/29 05:30:47

  Modified:    apps/db/src/java/org/apache/avalon/db/basic/parser
                        BasicSQLParser.java
  Log:
  first successful run of the sql parser, yippie ;-)
  
  Revision  Changes    Path
  1.2       +17 -17    jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/parser/BasicSQLParser.java
  
  Index: BasicSQLParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/basic/parser/BasicSQLParser.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BasicSQLParser.java	2001/11/29 13:06:26	1.1
  +++ BasicSQLParser.java	2001/11/29 13:30:47	1.2
  @@ -36,7 +36,7 @@
       public static void main(String args[]) {
           BasicSQLParser parser = new BasicSQLParser(System.in);
           try {
  -            parser.Test((String)args[0]);
  +            parser.Test();
           } catch(ParseException pe) {
               pe.printStackTrace();
           }
  @@ -45,19 +45,19 @@
   /**
    * Test Method for command line input
    */
  -  static final public void Test(String sql) throws ParseException {
  -    parseSQLString(sql);
  +  static final public void Test() throws ParseException {
  +    parseSQLString();
       jj_consume_token(52);
     }
   
  -  static final public String parseSQLString(String sql) throws ParseException {
  +  static final public String parseSQLString() throws ParseException {
       String stm;
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
       case SELECT:
  -      stm = Select(sql);
  +      stm = Select();
         break;
       case UPDATE:
  -      stm = Update(sql);
  +      stm = Update();
         break;
       default:
         jj_la1[0] = jj_gen;
  @@ -69,14 +69,14 @@
       throw new Error("Missing return statement in function");
     }
   
  -  static final public String Select(String sql) throws ParseException {
  +  static final public String Select() throws ParseException {
       String stm;
       Token token;
       ArrayList columns = new ArrayList();
       jj_consume_token(SELECT);
  -    getColumns(columns);
       token = jj_consume_token(SELECT);
  -            stm = token.image;
  +                           stm = token.image;
  +    getColumns(columns);
       jj_consume_token(FROM);
       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
       case 0:
  @@ -90,7 +90,7 @@
       throw new Error("Missing return statement in function");
     }
   
  -  static final public String Update(String sql) throws ParseException {
  +  static final public String Update() throws ParseException {
        String stm;
        Token token;
       jj_consume_token(UPDATE);
  @@ -100,31 +100,31 @@
       throw new Error("Missing return statement in function");
     }
   
  -  static final public void Rollback(String sql) throws ParseException {
  +  static final public void Rollback() throws ParseException {
       jj_consume_token(0);
     }
   
  -  static final public void Insert(String sql) throws ParseException {
  +  static final public void Insert() throws ParseException {
       jj_consume_token(0);
     }
   
  -  static final public void Grant(String sql) throws ParseException {
  +  static final public void Grant() throws ParseException {
       jj_consume_token(0);
     }
   
  -  static final public void Drop(String sql) throws ParseException {
  +  static final public void Drop() throws ParseException {
       jj_consume_token(0);
     }
   
  -  static final public void Delete(String sql) throws ParseException {
  +  static final public void Delete() throws ParseException {
       jj_consume_token(0);
     }
   
  -  static final public void Commit(String sql) throws ParseException {
  +  static final public void Commit() throws ParseException {
       jj_consume_token(0);
     }
   
  -  static final public void Alter(String sql) throws ParseException {
  +  static final public void Alter() throws ParseException {
       jj_consume_token(0);
     }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message