Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   // $ANTLR 3.4 D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g 2011-10-30 20:15:37
   
   package org.firebirdsql.jdbc.parser;
   
   
   import org.antlr.runtime.*;
   import java.util.Stack;
   import java.util.List;
   import java.util.ArrayList;
  import java.util.Map;
  import java.util.HashMap;
  
  
  
  @SuppressWarnings({"all""warnings""unchecked"})
  public class JaybirdSqlParser extends Parser {
      public static final String[] tokenNames = new String[] {
          "<invalid>""<EOR>""<DOWN>""<UP>""ALL""AS""AVG""BOTH""CAST""CHARACTER""COLLATE""COMMA""COUNT""CURRENT_DATE""CURRENT_ROLE""CURRENT_TIME""CURRENT_TIMESTAMP""CURRENT_USER""DB_KEY""DEFAULT""DELETE""DISTINCT""EXECUTE""EXTRACT""FOR""FROM""GENERIC_ID""GEN_ID""INSERT""INTEGER""INTO""KW_BIGINT""KW_BLOB""KW_CHAR""KW_DATE""KW_DECIMAL""KW_DOUBLE""KW_FLOAT""KW_INT""KW_INTEGER""KW_NUMERIC""KW_PRECISION""KW_SIZE""KW_SMALLINT""KW_TIME""KW_TIMESTAMP""KW_VARCHAR""LEADING""LEFT_PAREN""MATCHING""MAXIMUM""MINIMUM""NEXT""NULL""OR""PROCEDURE""QUOTED_ID""REAL""RETURNING""RIGHT_PAREN""SEGMENT""SELECT""SET""SL_COMMENT""STRING""SUBSTRING""SUB_TYPE""SUM""TRAILING""TRIM""UPDATE""VALUE""VALUES""WS""'*'""'+'""'-'""'.'""'/'""':'""'='""'?'""'['""']'""'||'"
      };
  
      public static final int EOF=-1;
      public static final int T__74=74;
      public static final int T__75=75;
      public static final int T__76=76;
      public static final int T__77=77;
      public static final int T__78=78;
      public static final int T__79=79;
      public static final int T__80=80;
      public static final int T__81=81;
      public static final int T__82=82;
      public static final int T__83=83;
      public static final int T__84=84;
      public static final int ALL=4;
      public static final int AS=5;
      public static final int AVG=6;
      public static final int BOTH=7;
      public static final int CAST=8;
      public static final int CHARACTER=9;
      public static final int COLLATE=10;
      public static final int COMMA=11;
      public static final int COUNT=12;
      public static final int CURRENT_DATE=13;
      public static final int CURRENT_ROLE=14;
      public static final int CURRENT_TIME=15;
      public static final int CURRENT_TIMESTAMP=16;
      public static final int CURRENT_USER=17;
      public static final int DB_KEY=18;
      public static final int DEFAULT=19;
      public static final int DELETE=20;
      public static final int DISTINCT=21;
      public static final int EXECUTE=22;
      public static final int EXTRACT=23;
      public static final int FOR=24;
      public static final int FROM=25;
      public static final int GENERIC_ID=26;
      public static final int GEN_ID=27;
      public static final int INSERT=28;
      public static final int INTEGER=29;
      public static final int INTO=30;
      public static final int KW_BIGINT=31;
      public static final int KW_BLOB=32;
      public static final int KW_CHAR=33;
      public static final int KW_DATE=34;
      public static final int KW_DECIMAL=35;
      public static final int KW_DOUBLE=36;
      public static final int KW_FLOAT=37;
      public static final int KW_INT=38;
      public static final int KW_INTEGER=39;
      public static final int KW_NUMERIC=40;
      public static final int KW_PRECISION=41;
      public static final int KW_SIZE=42;
      public static final int KW_SMALLINT=43;
      public static final int KW_TIME=44;
      public static final int KW_TIMESTAMP=45;
      public static final int KW_VARCHAR=46;
      public static final int LEADING=47;
      public static final int LEFT_PAREN=48;
      public static final int MATCHING=49;
      public static final int MAXIMUM=50;
      public static final int MINIMUM=51;
      public static final int NEXT=52;
      public static final int NULL=53;
      public static final int OR=54;
      public static final int PROCEDURE=55;
      public static final int QUOTED_ID=56;
      public static final int REAL=57;
      public static final int RETURNING=58;
      public static final int RIGHT_PAREN=59;
      public static final int SEGMENT=60;
      public static final int SELECT=61;
      public static final int SET=62;
      public static final int SL_COMMENT=63;
      public static final int STRING=64;
      public static final int SUBSTRING=65;
      public static final int SUB_TYPE=66;
      public static final int SUM=67;
      public static final int TRAILING=68;
      public static final int TRIM=69;
     public static final int UPDATE=70;
     public static final int VALUE=71;
     public static final int VALUES=72;
     public static final int WS=73;
 
     // delegates
     public Parser[] getDelegates() {
         return new Parser[] {};
     }
 
     // delegators
 
 
     public JaybirdSqlParser(TokenStream input) {
         this(inputnew RecognizerSharedState());
     }
     public JaybirdSqlParser(TokenStream inputRecognizerSharedState state) {
         super(inputstate);
         this.. = new HashMap[139+1];
          
 
     }
 
 protected TreeAdaptor adaptor = new CommonTreeAdaptor();
 
 public void setTreeAdaptor(TreeAdaptor adaptor) {
     this. = adaptor;
 }
     return ;
 }
     public String[] getTokenNames() { return .; }
     public String getGrammarFileName() { return "D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g"; }
 
 
     	private boolean _inReturning;
     	protected boolean _defaultValues;
     	
     	protected int _mismatchCount;
     	protected java.util.ArrayList _errorMessages = new java.util.ArrayList();
     	
     	
     	public boolean hasReturning() {
     		return .getReturningColumns().size() == 0;
     	}
     	
     		return ;
     	}
     	
     	public int getMismatchCount() {
     		return ;
     	}
     	
     	public java.util.Collection getErrorMessages() {
     		return ;
     	}
     	
     	public String getColumn(int index) {
     		return (String).getColumns().get(index);
     	}
     	
     	public String getValue(int index) {
     		return (String).getValues().get(index);
     	}
     	
     	public String getTableName() {
     		return .getTableName();
     	}
     	
       public boolean mismatchIsUnwantedToken(IntStream inputint ttype) {
         boolean result = super.mismatchIsUnwantedToken(inputttype);
         ++;
         return result;
       }
 
       public boolean mismatchIsMissingToken(IntStream inputBitSet follow) {
         boolean result = super.mismatchIsMissingToken(inputfollow);
         ++;
         return result;
       }
 
     	public void emitErrorMessage(String msg) {
     		.add(msg);
     	}
 
 
     public static class statement_return extends ParserRuleReturnScope {
         CommonTree tree;
         public Object getTree() { return ; }
     };
 
 
     // $ANTLR start "statement"
     // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:185:1: statement : ( insertStatement | deleteStatement | updateStatement | updateOrInsertStatement );
     public final JaybirdSqlParser.statement_return statement() throws RecognitionException {
         retval.start = .LT(1);
 
         int statement_StartIndex = .index();
 
         CommonTree root_0 = null;
 
         JaybirdSqlParser.insertStatement_return insertStatement1 =null;
 
         JaybirdSqlParser.deleteStatement_return deleteStatement2 =null;
 
         JaybirdSqlParser.updateStatement_return updateStatement3 =null;
 
         JaybirdSqlParser.updateOrInsertStatement_return updateOrInsertStatement4 =null;
 
 
 
         try {
             if ( .>0 && alreadyParsedRule(, 1) ) { return retval; }
 
             // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:186:3: ( insertStatement | deleteStatement | updateStatement | updateOrInsertStatement )
             int alt1=4;
             switch ( .LA(1) ) {
             case :
                 {
                 alt1=1;
                 }
                 break;
             case :
                 {
                 alt1=2;
                 }
                 break;
             case :
                 {
                 int LA1_3 = .LA(2);
 
                 if ( (LA1_3==) ) {
                     alt1=4;
                 }
                 else if ( (LA1_3==||LA1_3==) ) {
                     alt1=3;
                 }
                 else {
                     if (.>0) {.=truereturn retval;}
                     NoViableAltException nvae =
                         new NoViableAltException("", 1, 3, );
 
                     throw nvae;
 
                 }
                 }
                 break;
             default:
                 if (.>0) {.=truereturn retval;}
                 NoViableAltException nvae =
                     new NoViableAltException("", 1, 0, );
 
                 throw nvae;
 
             }
 
             switch (alt1) {
                 case 1 :
                     // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:186:5: insertStatement
                     {
                     root_0 = (CommonTree).nil();
 
 
                     pushFollow();
                     insertStatement1=insertStatement();
 
                     .--;
                     if (.return retval;
                     if ( .==0 ) .addChild(root_0insertStatement1.getTree());
 
                     }
                     break;
                 case 2 :
                     // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:187:5: deleteStatement
                     {
                     root_0 = (CommonTree).nil();
 
 
                     pushFollow();
                     deleteStatement2=deleteStatement();
 
                     .--;
                     if (.return retval;
                     if ( .==0 ) .addChild(root_0deleteStatement2.getTree());
 
                     }
                     break;
                 case 3 :
                     // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:188:5: updateStatement
                     {
                     root_0 = (CommonTree).nil();
 
 
                     pushFollow();
                     updateStatement3=updateStatement();
 
                     .--;
                     if (.return retval;
                     if ( .==0 ) .addChild(root_0updateStatement3.getTree());
 
                     }
                     break;
                 case 4 :
                     // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:190:5: updateOrInsertStatement
                     {
                     root_0 = (CommonTree).nil();
 
 
                     pushFollow();
                     updateOrInsertStatement4=updateOrInsertStatement();
 
                     .--;
                     if (.return retval;
                     if ( .==0 ) .addChild(root_0updateOrInsertStatement4.getTree());
 
                     }
                     break;
 
             }
             retval.stop = .LT(-1);
 
 
             if ( .==0 ) {
 
             retval.tree = (CommonTree).rulePostProcessing(root_0);
             .setTokenBoundaries(retval.treeretval.startretval.stop);
             }
         }
         catch (RecognitionException re) {
             reportError(re);
             recover(,re);
     	retval.tree = (CommonTree).errorNode(retval.start.LT(-1), re);
 
         }
 
         finally {
         	// do for sure before leaving
             if ( .>0 ) { memoize(, 1, statement_StartIndex); }
 
         }
         return retval;
     }
     // $ANTLR end "statement"
 
 
     public static class deleteStatement_return extends ParserRuleReturnScope {
         CommonTree tree;
         public Object getTree() { return ; }
     };
 
 
     // $ANTLR start "deleteStatement"
     // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:210:1: deleteStatement : DELETE FROM tableName ;
         retval.start = .LT(1);
 
         int deleteStatement_StartIndex = .index();
 
         CommonTree root_0 = null;
 
         Token DELETE5=null;
         Token FROM6=null;
         JaybirdSqlParser.tableName_return tableName7 =null;
 
 
         CommonTree DELETE5_tree=null;
         CommonTree FROM6_tree=null;
 
         try {
             if ( .>0 && alreadyParsedRule(, 2) ) { return retval; }
 
             // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:210:17: ( DELETE FROM tableName )
             // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:211:4: DELETE FROM tableName
             {
             root_0 = (CommonTree).nil();
 
 
             DELETE5=(Token)match(,,); if (.return retval;
             if ( .==0 ) {
             DELETE5_tree = 
             (CommonTree).create(DELETE5)
             ;
             .addChild(root_0DELETE5_tree);
             }
 
             FROM6=(Token)match(,,); if (.return retval;
             if ( .==0 ) {
             FROM6_tree = 
             (CommonTree).create(FROM6)
             ;
             .addChild(root_0FROM6_tree);
             }
 
             tableName7=tableName();
 
             .--;
             if (.return retval;
             if ( .==0 ) .addChild(root_0tableName7.getTree());
 
             if ( .==0 ) {
             			}
 
             }
 
             retval.stop = .LT(-1);
 
 
             if ( .==0 ) {
 
             retval.tree = (CommonTree).rulePostProcessing(root_0);
             .setTokenBoundaries(retval.treeretval.startretval.stop);
             }
         }
         catch (RecognitionException re) {
             reportError(re);
             recover(,re);
     	retval.tree = (CommonTree).errorNode(retval.start.LT(-1), re);
 
         }
 
         finally {
         	// do for sure before leaving
             if ( .>0 ) { memoize(, 2, deleteStatement_StartIndex); }
 
         }
         return retval;
     }
     // $ANTLR end "deleteStatement"
 
 
     public static class updateStatement_return extends ParserRuleReturnScope {
         CommonTree tree;
         public Object getTree() { return ; }
     };
 
 
     // $ANTLR start "updateStatement"
     // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:234:1: updateStatement : UPDATE tableName SET assignments ;
         retval.start = .LT(1);
 
         int updateStatement_StartIndex = .index();
 
         CommonTree root_0 = null;
 
         Token UPDATE8=null;
         Token SET10=null;
         JaybirdSqlParser.tableName_return tableName9 =null;
 
         JaybirdSqlParser.assignments_return assignments11 =null;
 
 
         CommonTree UPDATE8_tree=null;
         CommonTree SET10_tree=null;
 
         try {
             if ( .>0 && alreadyParsedRule(, 3) ) { return retval; }
 
             // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:234:17: ( UPDATE tableName SET assignments )
             // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:235:4: UPDATE tableName SET assignments
             {
             root_0 = (CommonTree).nil();
 
 
             UPDATE8=(Token)match(,,); if (.return retval;
             if ( .==0 ) {
             UPDATE8_tree = 
             (CommonTree).create(UPDATE8)
             ;
             .addChild(root_0UPDATE8_tree);
             }
 
             tableName9=tableName();
 
             .--;
             if (.return retval;
             if ( .==0 ) .addChild(root_0tableName9.getTree());
 
             SET10=(Token)match(,,); if (.return retval;
             if ( .==0 ) {
             SET10_tree = 
             (CommonTree).create(SET10)
             ;
             .addChild(root_0SET10_tree);
             }
 
             assignments11=assignments();
 
             .--;
             if (.return retval;
             if ( .==0 ) .addChild(root_0assignments11.getTree());
 
             if ( .==0 ) {
             			}
 
             }
 
             retval.stop = .LT(-1);
 
 
             if ( .==0 ) {
 
             retval.tree = (CommonTree).rulePostProcessing(root_0);
             .setTokenBoundaries(retval.treeretval.startretval.stop);
             }
         }
         catch (RecognitionException re) {
             reportError(re);
             recover(,re);
     	retval.tree = (CommonTree).errorNode(retval.start.LT(-1), re);
 
         }
 
         finally {
         	// do for sure before leaving
             if ( .>0 ) { memoize(, 3, updateStatement_StartIndex); }
 
         }
         return retval;
     }
     // $ANTLR end "updateStatement"
 
 
     public static class assignments_return extends ParserRuleReturnScope {
         CommonTree tree;
         public Object getTree() { return ; }
     };
 
 
     // $ANTLR start "assignments"
     // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:241:1: assignments : assignment ( ',' assignment )* ;
         retval.start = .LT(1);
 
         int assignments_StartIndex = .index();
 
         CommonTree root_0 = null;
 
         Token char_literal13=null;
         JaybirdSqlParser.assignment_return assignment12 =null;
 
         JaybirdSqlParser.assignment_return assignment14 =null;
 
 
         CommonTree char_literal13_tree=null;
 
         try {
             if ( .>0 && alreadyParsedRule(, 4) ) { return retval; }
 
             // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:241:13: ( assignment ( ',' assignment )* )
             // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:241:15: assignment ( ',' assignment )*
             {
             root_0 = (CommonTree).nil();
 
 
             assignment12=assignment();
 
             .--;
             if (.return retval;
             if ( .==0 ) .addChild(root_0assignment12.getTree());
 
             // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:241:26: ( ',' assignment )*
             loop2:
             do {
                 int alt2=2;
                 int LA2_0 = .LA(1);
 
                 if ( (LA2_0==) ) {
                     alt2=1;
                 }
 
 
                 switch (alt2) {
             	case 1 :
             	    // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:241:27: ',' assignment
             	    {
             	    char_literal13=(Token)match(,,); if (.return retval;
             	    if ( .==0 ) {
             	    char_literal13_tree = 
             	    (CommonTree).create(char_literal13)
             	    ;
             	    .addChild(root_0char_literal13_tree);
             	    }
 
             	    pushFollow();
             	    assignment14=assignment();
 
             	    .--;
             	    if (.return retval;
             	    if ( .==0 ) .addChild(root_0assignment14.getTree());
 
             	    }
             	    break;
 
             	default :
             	    break loop2;
                 }
             } while (true);
 
 
             }
 
             retval.stop = .LT(-1);
 
 
             if ( .==0 ) {
 
             retval.tree = (CommonTree).rulePostProcessing(root_0);
             .setTokenBoundaries(retval.treeretval.startretval.stop);
             }
         }
         catch (RecognitionException re) {
             reportError(re);
             recover(,re);
     	retval.tree = (CommonTree).errorNode(retval.start.LT(-1), re);
 
         }
 
         finally {
         	// do for sure before leaving
             if ( .>0 ) { memoize(, 4, assignments_StartIndex); }
 
         }
         return retval;
     }
     // $ANTLR end "assignments"
 
 
     public static class assignment_return extends ParserRuleReturnScope {
         CommonTree tree;
         public Object getTree() { return ; }
     };
 
 
     // $ANTLR start "assignment"
     // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:244:1: assignment : columnName '=' value ;
         retval.start = .LT(1);
 
         int assignment_StartIndex = .index();
 
         CommonTree root_0 = null;
 
         Token char_literal16=null;
         JaybirdSqlParser.columnName_return columnName15 =null;
 
         JaybirdSqlParser.value_return value17 =null;
 
 
         CommonTree char_literal16_tree=null;
 
         try {
             if ( .>0 && alreadyParsedRule(, 5) ) { return retval; }
 
             // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:244:12: ( columnName '=' value )
             // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:244:14: columnName '=' value
             {
             root_0 = (CommonTree).nil();
 
 
             columnName15=columnName();
 
             .--;
             if (.return retval;
             if ( .==0 ) .addChild(root_0columnName15.getTree());
 
             char_literal16=(Token)match(,80,); if (.return retval;
             if ( .==0 ) {
             char_literal16_tree = 
             (CommonTree).create(char_literal16)
             ;
             .addChild(root_0char_literal16_tree);
             }
 
             pushFollow();
             value17=value();
 
             .--;
             if (.return retval;
             if ( .==0 ) .addChild(root_0value17.getTree());
 
             }
 
             retval.stop = .LT(-1);
 
 
             if ( .==0 ) {
 
             retval.tree = (CommonTree).rulePostProcessing(root_0);
             .setTokenBoundaries(retval.treeretval.startretval.stop);
             }
         }
         catch (RecognitionException re) {
             reportError(re);
             recover(,re);
     	retval.tree = (CommonTree).errorNode(retval.start.LT(-1), re);
 
         }
 
         finally {
         	// do for sure before leaving
             if ( .>0 ) { memoize(, 5, assignment_StartIndex); }
 
         }
         return retval;
     }
     // $ANTLR end "assignment"
 
 
     public static class updateOrInsertStatement_return extends ParserRuleReturnScope {
         CommonTree tree;
         public Object getTree() { return ; }
     };
 
 
     // $ANTLR start "updateOrInsertStatement"
     // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:260:1: updateOrInsertStatement : UPDATE OR INSERT INTO tableName ( insertColumns )? insertValues ( matchingClause )? ( returningClause )? ;
         retval.start = .LT(1);
 
         int updateOrInsertStatement_StartIndex = .index();
 
         CommonTree root_0 = null;
 
         Token UPDATE18=null;
         Token OR19=null;
         Token INSERT20=null;
         Token INTO21=null;
         JaybirdSqlParser.tableName_return tableName22 =null;
 
         JaybirdSqlParser.insertColumns_return insertColumns23 =null;
 
         JaybirdSqlParser.insertValues_return insertValues24 =null;
 
         JaybirdSqlParser.matchingClause_return matchingClause25 =null;
 
         JaybirdSqlParser.returningClause_return returningClause26 =null;
 
 
         CommonTree UPDATE18_tree=null;
         CommonTree OR19_tree=null;
         CommonTree INSERT20_tree=null;
         CommonTree INTO21_tree=null;
 
         try {
             if ( .>0 && alreadyParsedRule(, 6) ) { return retval; }
 
             // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:261:3: ( UPDATE OR INSERT INTO tableName ( insertColumns )? insertValues ( matchingClause )? ( returningClause )? )
             // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:261:5: UPDATE OR INSERT INTO tableName ( insertColumns )? insertValues ( matchingClause )? ( returningClause )?
             {
             root_0 = (CommonTree).nil();
 
 
             UPDATE18=(Token)match(,,); if (.return retval;
             if ( .==0 ) {
             UPDATE18_tree = 
             (CommonTree).create(UPDATE18)
             ;
             .addChild(root_0UPDATE18_tree);
             }
 
             OR19=(Token)match(,,); if (.return retval;
             if ( .==0 ) {
             OR19_tree = 
             (CommonTree).create(OR19)
             ;
             .addChild(root_0OR19_tree);
             }
 
             INSERT20=(Token)match(,,); if (.return retval;
             if ( .==0 ) {
             INSERT20_tree = 
             (CommonTree).create(INSERT20)
             ;
             .addChild(root_0INSERT20_tree);
             }
 
             INTO21=(Token)match(,,); if (.return retval;
             if ( .==0 ) {
             INTO21_tree = 
             (CommonTree).create(INTO21)
             ;
             .addChild(root_0INTO21_tree);
             }
 
             tableName22=tableName();
 
             .--;
             if (.return retval;
             if ( .==0 ) .addChild(root_0tableName22.getTree());
 
             // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:261:37: ( insertColumns )?
             int alt3=2;
             int LA3_0 = .LA(1);
 
             if ( (LA3_0==) ) {
                 alt3=1;
             }
             switch (alt3) {
                 case 1 :
                     // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:261:37: insertColumns
                     {
                     pushFollow();
                     insertColumns23=insertColumns();
 
                     .--;
                     if (.return retval;
                     if ( .==0 ) .addChild(root_0insertColumns23.getTree());
 
                     }
                     break;
 
             }
 
 
             insertValues24=insertValues();
 
             .--;
             if (.return retval;
             if ( .==0 ) .addChild(root_0insertValues24.getTree());
 
             // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:262:18: ( matchingClause )?
             int alt4=2;
             int LA4_0 = .LA(1);
 
             if ( (LA4_0==) ) {
                 alt4=1;
             }
             switch (alt4) {
                 case 1 :
                     // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:262:18: matchingClause
                     {
                     pushFollow();
                     matchingClause25=matchingClause();
 
                     .--;
                     if (.return retval;
                     if ( .==0 ) .addChild(root_0matchingClause25.getTree());
 
                     }
                     break;
 
             }
 
 
             // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:262:34: ( returningClause )?
             int alt5=2;
             int LA5_0 = .LA(1);
 
             if ( (LA5_0==) ) {
                 alt5=1;
             }
             switch (alt5) {
                 case 1 :
                     // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:262:34: returningClause
                     {
                     pushFollow();
                     returningClause26=returningClause();
 
                     .--;
                     if (.return retval;
                     if ( .==0 ) .addChild(root_0returningClause26.getTree());
 
                     }
                     break;
 
             }
 
 
             if ( .==0 ) {
             			}
 
             }
 
             retval.stop = .LT(-1);
 
 
             if ( .==0 ) {
 
             retval.tree = (CommonTree).rulePostProcessing(root_0);
             .setTokenBoundaries(retval.treeretval.startretval.stop);
             }
         }
         catch (RecognitionException re) {
             reportError(re);
             recover(,re);
     	retval.tree = (CommonTree).errorNode(retval.start.LT(-1), re);
 
         }
 
         finally {
         	// do for sure before leaving
             if ( .>0 ) { memoize(, 6, updateOrInsertStatement_StartIndex); }
 
         }
         return retval;
     }
     // $ANTLR end "updateOrInsertStatement"
 
 
     public static class matchingClause_return extends ParserRuleReturnScope {
         CommonTree tree;
         public Object getTree() { return ; }
     };
 
 
     // $ANTLR start "matchingClause"
     // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:268:1: matchingClause : MATCHING columnList ;
         retval.start = .LT(1);
 
         int matchingClause_StartIndex = .index();
 
         CommonTree root_0 = null;
 
         Token MATCHING27=null;
         JaybirdSqlParser.columnList_return columnList28 =null;
 
 
         CommonTree MATCHING27_tree=null;
 
         try {
             if ( .>0 && alreadyParsedRule(, 7) ) { return retval; }
 
             // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:268:16: ( MATCHING columnList )
             // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:268:18: MATCHING columnList
             {
             root_0 = (CommonTree).nil();
 
 
             MATCHING27=(Token)match(,,); if (.return retval;
             if ( .==0 ) {
             MATCHING27_tree = 
             (CommonTree).create(MATCHING27)
             ;
             .addChild(root_0MATCHING27_tree);
             }
 
             columnList28=columnList();
 
             .--;
             if (.return retval;
             if ( .==0 ) .addChild(root_0columnList28.getTree());
 
             }
 
             retval.stop = .LT(-1);
 
 
             if ( .==0 ) {
 
             retval.tree = (CommonTree).rulePostProcessing(root_0);
             .setTokenBoundaries(retval.treeretval.startretval.stop);
             }
         }
         catch (RecognitionException re) {
             reportError(re);
             recover(,re);
     	retval.tree = (CommonTree).errorNode(retval.start.LT(-1), re);
 
         }
 
         finally {
         	// do for sure before leaving
             if ( .>0 ) { memoize(, 7, matchingClause_StartIndex); }
 
         }
         return retval;
     }
     // $ANTLR end "matchingClause"
 
 
     public static class insertStatement_return extends ParserRuleReturnScope {
         CommonTree tree;
         public Object getTree() { return ; }
     };
 
 
     // $ANTLR start "insertStatement"
     // D:\\Users\\rrokytskyy\\workspace\\client-java\\src\\main\\org\\firebirdsql\\jdbc\\parser\\JaybirdSql.g:279:1: insertStatement : INSERT INTO tableName ( insertColumns )? ( insertValues ( returningClause )? | selectClause | defaultValuesClause ( returningClause )? ) ;
        retval.start = .LT(1);
        int insertStatement_StartIndex = .index();
        CommonTree root_0 = null;
        Token INSERT29=null;
        Token INTO30=null;
        JaybirdSqlParser.tableName_return tableName31 =null;