|
From: <ste...@us...> - 2009-05-07 10:41:11
|
Revision: 4260
http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4260&view=rev
Author: steverstrong
Date: 2009-05-07 10:40:59 +0000 (Thu, 07 May 2009)
Log Message:
-----------
Fix for test HQL.Ast.BulkManipulation.SimpleInsert
Modified Paths:
--------------
trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/SqlGenerator.cs
trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/SqlGenerator.g
trunk/nhibernate/src/NHibernate.Test/HQL/Ast/BulkManipulation.cs
Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/SqlGenerator.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/SqlGenerator.cs 2009-05-07 05:49:01 UTC (rev 4259)
+++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/SqlGenerator.cs 2009-05-07 10:40:59 UTC (rev 4260)
@@ -1,6321 +1,6363 @@
-// $ANTLR 3.1.2 C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g 2009-05-05 16:13:08
-
-// The variable 'variable' is assigned but its value is never used.
-#pragma warning disable 168, 219
-// Unreachable code detected.
-#pragma warning disable 162
-namespace NHibernate.Hql.Ast.ANTLR
-{
-
-using NHibernate.Hql.Ast.ANTLR.Tree;
-
-
-using System;
-using Antlr.Runtime;
-using Antlr.Runtime.Tree;using IList = System.Collections.IList;
-using ArrayList = System.Collections.ArrayList;
-using Stack = Antlr.Runtime.Collections.StackList;
-
-using IDictionary = System.Collections.IDictionary;
-using Hashtable = System.Collections.Hashtable;
-
-/**
- * SQL Generator Tree Parser, providing SQL rendering of SQL ASTs produced by the previous phase, HqlSqlWalker. All
- * syntax decoration such as extra spaces, lack of spaces, extra parens, etc. should be added by this class.
- * <br>
- * This grammar processes the HQL/SQL AST and produces an SQL string. The intent is to move dialect-specific
- * code into a sub-class that will override some of the methods, just like the other two grammars in this system.
- * @author Joshua Davis (jo...@hi...)
- */
-public partial class SqlGenerator : TreeParser
-{
- public static readonly string[] tokenNames = new string[]
- {
- "<invalid>",
- "<EOR>",
- "<DOWN>",
- "<UP>",
- "ALL",
- "ANY",
- "AND",
- "AS",
- "ASCENDING",
- "AVG",
- "BETWEEN",
- "CLASS",
- "COUNT",
- "DELETE",
- "DESCENDING",
- "DOT",
- "DISTINCT",
- "ELEMENTS",
- "ESCAPE",
- "EXISTS",
- "FALSE",
- "FETCH",
- "FROM",
- "FULL",
- "GROUP",
- "HAVING",
- "IN",
- "INDICES",
- "INNER",
- "INSERT",
- "INTO",
- "IS",
- "JOIN",
- "LEFT",
- "LIKE",
- "MAX",
- "MIN",
- "NEW",
- "NOT",
- "NULL",
- "OR",
- "ORDER",
- "OUTER",
- "PROPERTIES",
- "RIGHT",
- "SELECT",
- "SET",
- "SOME",
- "SUM",
- "TRUE",
- "UNION",
- "UPDATE",
- "VERSIONED",
- "WHERE",
- "LITERAL_by",
- "CASE",
- "END",
- "ELSE",
- "THEN",
- "WHEN",
- "ON",
- "WITH",
- "BOTH",
- "EMPTY",
- "LEADING",
- "MEMBER",
- "OBJECT",
- "OF",
- "TRAILING",
- "AGGREGATE",
- "ALIAS",
- "CONSTRUCTOR",
- "CASE2",
- "EXPR_LIST",
- "FILTER_ENTITY",
- "IN_LIST",
- "INDEX_OP",
- "IS_NOT_NULL",
- "IS_NULL",
- "METHOD_CALL",
- "NOT_BETWEEN",
- "NOT_IN",
- "NOT_LIKE",
- "ORDER_ELEMENT",
- "QUERY",
- "RANGE",
- "ROW_STAR",
- "SELECT_FROM",
- "UNARY_MINUS",
- "UNARY_PLUS",
- "VECTOR_EXPR",
- "WEIRD_IDENT",
- "CONSTANT",
- "NUM_INT",
- "NUM_DOUBLE",
- "NUM_FLOAT",
- "NUM_LONG",
- "JAVA_CONSTANT",
- "COMMA",
- "EQ",
- "OPEN",
- "CLOSE",
- "NE",
- "SQL_NE",
- "LT",
- "GT",
- "LE",
- "GE",
- "CONCAT",
- "PLUS",
- "MINUS",
- "STAR",
- "DIV",
- "OPEN_BRACKET",
- "CLOSE_BRACKET",
- "COLON",
- "PARAM",
- "QUOTED_String",
- "IDENT",
- "ID_START_LETTER",
- "ID_LETTER",
- "ESCqs",
- "WS",
- "EXPONENT",
- "FLOAT_SUFFIX",
- "HEX_DIGIT",
- "'ascending'",
- "'descending'",
- "FROM_FRAGMENT",
- "IMPLIED_FROM",
- "JOIN_FRAGMENT",
- "SELECT_CLAUSE",
- "LEFT_OUTER",
- "RIGHT_OUTER",
- "ALIAS_REF",
- "PROPERTY_REF",
- "SQL_TOKEN",
- "SELECT_COLUMNS",
- "SELECT_EXPR",
- "THETA_JOINS",
- "FILTERS",
- "METHOD_NAME",
- "NAMED_PARAM",
- "BOGUS"
- };
-
- public const int SELECT_COLUMNS = 137;
- public const int EXPONENT = 123;
- public const int LT = 104;
- public const int STAR = 111;
- public const int FLOAT_SUFFIX = 124;
- public const int FILTERS = 140;
- public const int LITERAL_by = 54;
- public const int PROPERTY_REF = 135;
- public const int THETA_JOINS = 139;
- public const int CASE = 55;
- public const int NEW = 37;
- public const int FILTER_ENTITY = 74;
- public const int PARAM = 116;
- public const int COUNT = 12;
- public const int NOT = 38;
- public const int EOF = -1;
- public const int UNARY_PLUS = 89;
- public const int QUOTED_String = 117;
- public const int WEIRD_IDENT = 91;
- public const int ESCqs = 121;
- public const int OPEN_BRACKET = 113;
- public const int FULL = 23;
- public const int ORDER_ELEMENT = 83;
- public const int INSERT = 29;
- public const int ESCAPE = 18;
- public const int IS_NULL = 78;
- public const int FROM_FRAGMENT = 128;
- public const int NAMED_PARAM = 142;
- public const int BOTH = 62;
- public const int SELECT_CLAUSE = 131;
- public const int EQ = 99;
- public const int VERSIONED = 52;
- public const int SELECT = 45;
- public const int INTO = 30;
- public const int NE = 102;
- public const int GE = 107;
- public const int ID_LETTER = 120;
- public const int CONCAT = 108;
- public const int NULL = 39;
- public const int ELSE = 57;
- public const int SELECT_FROM = 87;
- public const int TRAILING = 68;
- public const int ON = 60;
- public const int NUM_LONG = 96;
- public const int NUM_DOUBLE = 94;
- public const int UNARY_MINUS = 88;
- public const int DELETE = 13;
- public const int INDICES = 27;
- public const int OF = 67;
- public const int METHOD_CALL = 79;
- public const int LEADING = 64;
- public const int METHOD_NAME = 141;
- public const int EMPTY = 63;
- public const int T__126 = 126;
- public const int GROUP = 24;
- public const int T__127 = 127;
- public const int WS = 122;
- public const int FETCH = 21;
- public const int VECTOR_EXPR = 90;
- public const int NOT_IN = 81;
- public const int SELECT_EXPR = 138;
- public const int NUM_INT = 93;
- public const int OR = 40;
- public const int ALIAS = 70;
- public const int JAVA_CONSTANT = 97;
- public const int CONSTANT = 92;
- public const int GT = 105;
- public const int QUERY = 84;
- public const int INDEX_OP = 76;
- public const int NUM_FLOAT = 95;
- public const int FROM = 22;
- public const int END = 56;
- public const int FALSE = 20;
- public const int DISTINCT = 16;
- public const int CONSTRUCTOR = 71;
- public const int CLOSE_BRACKET = 114;
- public const int WHERE = 53;
- public const int CLASS = 11;
- public const int MEMBER = 65;
- public const int INNER = 28;
- public const int PROPERTIES = 43;
- public const int BOGUS = 143;
- public const int ORDER = 41;
- public const int MAX = 35;
- public const int UPDATE = 51;
- public const int JOIN_FRAGMENT = 130;
- public const int SQL_NE = 103;
- public const int AND = 6;
- public const int SUM = 48;
- public const int ASCENDING = 8;
- public const int EXPR_LIST = 73;
- public const int AS = 7;
- public const int THEN = 58;
- public const int IN = 26;
- public const int OBJECT = 66;
- public const int COMMA = 98;
- public const int IS = 31;
- public const int SQL_TOKEN = 136;
- public const int AVG = 9;
- public const int LEFT = 33;
- public const int SOME = 47;
- public const int ALL = 4;
- public const int IMPLIED_FROM = 129;
- public const int IDENT = 118;
- public const int PLUS = 109;
- public const int CASE2 = 72;
- public const int EXISTS = 19;
- public const int DOT = 15;
- public const int LIKE = 34;
- public const int WITH = 61;
- public const int OUTER = 42;
- public const int ID_START_LETTER = 119;
- public const int LEFT_OUTER = 132;
- public const int ROW_STAR = 86;
- public const int NOT_LIKE = 82;
- public const int HEX_DIGIT = 125;
- public const int NOT_BETWEEN = 80;
- public const int RANGE = 85;
- public const int RIGHT_OUTER = 133;
- public const int RIGHT = 44;
- public const int SET = 46;
- public const int HAVING = 25;
- public const int MIN = 36;
- public const int MINUS = 110;
- public const int IS_NOT_NULL = 77;
- public const int ELEMENTS = 17;
- public const int TRUE = 49;
- public const int JOIN = 32;
- public const int UNION = 50;
- public const int IN_LIST = 75;
- public const int COLON = 115;
- public const int OPEN = 100;
- public const int ANY = 5;
- public const int CLOSE = 101;
- public const int WHEN = 59;
- public const int ALIAS_REF = 134;
- public const int DIV = 112;
- public const int DESCENDING = 14;
- public const int BETWEEN = 10;
- public const int AGGREGATE = 69;
- public const int LE = 106;
-
- // delegates
- // delegators
-
-
-
- public SqlGenerator(ITreeNodeStream input)
- : this(input, new RecognizerSharedState()) {
- }
-
- public SqlGenerator(ITreeNodeStream input, RecognizerSharedState state)
- : base(input, state) {
- InitializeCyclicDFAs();
-
-
- }
-
-
- override public string[] TokenNames {
- get { return SqlGenerator.tokenNames; }
- }
-
- override public string GrammarFileName {
- get { return "C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g"; }
- }
-
-
-
- // $ANTLR start "statement"
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:27:1: statement : ( selectStatement | updateStatement | deleteStatement | insertStatement );
- public void statement() // throws RecognitionException [1]
- {
- try
- {
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:28:2: ( selectStatement | updateStatement | deleteStatement | insertStatement )
- int alt1 = 4;
- switch ( input.LA(1) )
- {
- case SELECT:
- {
- alt1 = 1;
- }
- break;
- case UPDATE:
- {
- alt1 = 2;
- }
- break;
- case DELETE:
- {
- alt1 = 3;
- }
- break;
- case INSERT:
- {
- alt1 = 4;
- }
- break;
- default:
- if ( state.backtracking > 0 ) {state.failed = true; return ;}
- NoViableAltException nvae_d1s0 =
- new NoViableAltException("", 1, 0, input);
-
- throw nvae_d1s0;
- }
-
- switch (alt1)
- {
- case 1 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:28:4: selectStatement
- {
- PushFollow(FOLLOW_selectStatement_in_statement57);
- selectStatement();
- state.followingStackPointer--;
- if (state.failed) return ;
-
- }
- break;
- case 2 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:29:4: updateStatement
- {
- PushFollow(FOLLOW_updateStatement_in_statement62);
- updateStatement();
- state.followingStackPointer--;
- if (state.failed) return ;
-
- }
- break;
- case 3 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:30:4: deleteStatement
- {
- PushFollow(FOLLOW_deleteStatement_in_statement67);
- deleteStatement();
- state.followingStackPointer--;
- if (state.failed) return ;
-
- }
- break;
- case 4 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:31:4: insertStatement
- {
- PushFollow(FOLLOW_insertStatement_in_statement72);
- insertStatement();
- state.followingStackPointer--;
- if (state.failed) return ;
-
- }
- break;
-
- }
- }
- catch (RecognitionException re)
- {
- ReportError(re);
- Recover(input,re);
- }
- finally
- {
- }
- return ;
- }
- // $ANTLR end "statement"
-
-
- // $ANTLR start "selectStatement"
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:34:1: selectStatement : ^( SELECT selectClause from ( ^( WHERE whereExpr ) )? ( ^( GROUP groupExprs ( ^( HAVING booleanExpr[false] ) )? ) )? ( ^( ORDER orderExprs ) )? ) ;
- public void selectStatement() // throws RecognitionException [1]
- {
- try
- {
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:35:2: ( ^( SELECT selectClause from ( ^( WHERE whereExpr ) )? ( ^( GROUP groupExprs ( ^( HAVING booleanExpr[false] ) )? ) )? ( ^( ORDER orderExprs ) )? ) )
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:35:4: ^( SELECT selectClause from ( ^( WHERE whereExpr ) )? ( ^( GROUP groupExprs ( ^( HAVING booleanExpr[false] ) )? ) )? ( ^( ORDER orderExprs ) )? )
- {
- Match(input,SELECT,FOLLOW_SELECT_in_selectStatement84); if (state.failed) return ;
-
- if ( (state.backtracking==0) )
- {
- Out("select ");
- }
-
- Match(input, Token.DOWN, null); if (state.failed) return ;
- PushFollow(FOLLOW_selectClause_in_selectStatement90);
- selectClause();
- state.followingStackPointer--;
- if (state.failed) return ;
- PushFollow(FOLLOW_from_in_selectStatement94);
- from();
- state.followingStackPointer--;
- if (state.failed) return ;
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:38:3: ( ^( WHERE whereExpr ) )?
- int alt2 = 2;
- int LA2_0 = input.LA(1);
-
- if ( (LA2_0 == WHERE) )
- {
- alt2 = 1;
- }
- switch (alt2)
- {
- case 1 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:38:5: ^( WHERE whereExpr )
- {
- Match(input,WHERE,FOLLOW_WHERE_in_selectStatement101); if (state.failed) return ;
-
- if ( (state.backtracking==0) )
- {
- Out(" where ");
- }
-
- Match(input, Token.DOWN, null); if (state.failed) return ;
- PushFollow(FOLLOW_whereExpr_in_selectStatement105);
- whereExpr();
- state.followingStackPointer--;
- if (state.failed) return ;
-
- Match(input, Token.UP, null); if (state.failed) return ;
-
- }
- break;
-
- }
-
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:39:3: ( ^( GROUP groupExprs ( ^( HAVING booleanExpr[false] ) )? ) )?
- int alt4 = 2;
- int LA4_0 = input.LA(1);
-
- if ( (LA4_0 == GROUP) )
- {
- alt4 = 1;
- }
- switch (alt4)
- {
- case 1 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:39:5: ^( GROUP groupExprs ( ^( HAVING booleanExpr[false] ) )? )
- {
- Match(input,GROUP,FOLLOW_GROUP_in_selectStatement117); if (state.failed) return ;
-
- if ( (state.backtracking==0) )
- {
- Out(" group by ");
- }
-
- Match(input, Token.DOWN, null); if (state.failed) return ;
- PushFollow(FOLLOW_groupExprs_in_selectStatement121);
- groupExprs();
- state.followingStackPointer--;
- if (state.failed) return ;
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:39:47: ( ^( HAVING booleanExpr[false] ) )?
- int alt3 = 2;
- int LA3_0 = input.LA(1);
-
- if ( (LA3_0 == HAVING) )
- {
- alt3 = 1;
- }
- switch (alt3)
- {
- case 1 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:39:49: ^( HAVING booleanExpr[false] )
- {
- Match(input,HAVING,FOLLOW_HAVING_in_selectStatement126); if (state.failed) return ;
-
- if ( (state.backtracking==0) )
- {
- Out(" having ");
- }
-
- Match(input, Token.DOWN, null); if (state.failed) return ;
- PushFollow(FOLLOW_booleanExpr_in_selectStatement130);
- booleanExpr(false);
- state.followingStackPointer--;
- if (state.failed) return ;
-
- Match(input, Token.UP, null); if (state.failed) return ;
-
- }
- break;
-
- }
-
-
- Match(input, Token.UP, null); if (state.failed) return ;
-
- }
- break;
-
- }
-
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:40:3: ( ^( ORDER orderExprs ) )?
- int alt5 = 2;
- int LA5_0 = input.LA(1);
-
- if ( (LA5_0 == ORDER) )
- {
- alt5 = 1;
- }
- switch (alt5)
- {
- case 1 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:40:5: ^( ORDER orderExprs )
- {
- Match(input,ORDER,FOLLOW_ORDER_in_selectStatement147); if (state.failed) return ;
-
- if ( (state.backtracking==0) )
- {
- Out(" order by ");
- }
-
- Match(input, Token.DOWN, null); if (state.failed) return ;
- PushFollow(FOLLOW_orderExprs_in_selectStatement151);
- orderExprs();
- state.followingStackPointer--;
- if (state.failed) return ;
-
- Match(input, Token.UP, null); if (state.failed) return ;
-
- }
- break;
-
- }
-
-
- Match(input, Token.UP, null); if (state.failed) return ;
-
- }
-
- }
- catch (RecognitionException re)
- {
- ReportError(re);
- Recover(input,re);
- }
- finally
- {
- }
- return ;
- }
- // $ANTLR end "selectStatement"
-
-
- // $ANTLR start "updateStatement"
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:47:1: updateStatement : ^( UPDATE ^( FROM fromTable ) setClause ( whereClause )? ) ;
- public void updateStatement() // throws RecognitionException [1]
- {
- try
- {
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:48:2: ( ^( UPDATE ^( FROM fromTable ) setClause ( whereClause )? ) )
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:48:4: ^( UPDATE ^( FROM fromTable ) setClause ( whereClause )? )
- {
- Match(input,UPDATE,FOLLOW_UPDATE_in_updateStatement174); if (state.failed) return ;
-
- if ( (state.backtracking==0) )
- {
- Out("update ");
- }
-
- Match(input, Token.DOWN, null); if (state.failed) return ;
- Match(input,FROM,FOLLOW_FROM_in_updateStatement182); if (state.failed) return ;
-
- Match(input, Token.DOWN, null); if (state.failed) return ;
- PushFollow(FOLLOW_fromTable_in_updateStatement184);
- fromTable();
- state.followingStackPointer--;
- if (state.failed) return ;
-
- Match(input, Token.UP, null); if (state.failed) return ;
- PushFollow(FOLLOW_setClause_in_updateStatement190);
- setClause();
- state.followingStackPointer--;
- if (state.failed) return ;
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:51:3: ( whereClause )?
- int alt6 = 2;
- int LA6_0 = input.LA(1);
-
- if ( (LA6_0 == WHERE) )
- {
- alt6 = 1;
- }
- switch (alt6)
- {
- case 1 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:51:4: whereClause
- {
- PushFollow(FOLLOW_whereClause_in_updateStatement195);
- whereClause();
- state.followingStackPointer--;
- if (state.failed) return ;
-
- }
- break;
-
- }
-
-
- Match(input, Token.UP, null); if (state.failed) return ;
-
- }
-
- }
- catch (RecognitionException re)
- {
- ReportError(re);
- Recover(input,re);
- }
- finally
- {
- }
- return ;
- }
- // $ANTLR end "updateStatement"
-
-
- // $ANTLR start "deleteStatement"
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:55:1: deleteStatement : ^( DELETE from ( whereClause )? ) ;
- public void deleteStatement() // throws RecognitionException [1]
- {
- try
- {
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:57:2: ( ^( DELETE from ( whereClause )? ) )
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:57:4: ^( DELETE from ( whereClause )? )
- {
- Match(input,DELETE,FOLLOW_DELETE_in_deleteStatement214); if (state.failed) return ;
-
- if ( (state.backtracking==0) )
- {
- Out("delete");
- }
-
- Match(input, Token.DOWN, null); if (state.failed) return ;
- PushFollow(FOLLOW_from_in_deleteStatement220);
- from();
- state.followingStackPointer--;
- if (state.failed) return ;
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:59:3: ( whereClause )?
- int alt7 = 2;
- int LA7_0 = input.LA(1);
-
- if ( (LA7_0 == WHERE) )
- {
- alt7 = 1;
- }
- switch (alt7)
- {
- case 1 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:59:4: whereClause
- {
- PushFollow(FOLLOW_whereClause_in_deleteStatement225);
- whereClause();
- state.followingStackPointer--;
- if (state.failed) return ;
-
- }
- break;
-
- }
-
-
- Match(input, Token.UP, null); if (state.failed) return ;
-
- }
-
- }
- catch (RecognitionException re)
- {
- ReportError(re);
- Recover(input,re);
- }
- finally
- {
- }
- return ;
- }
- // $ANTLR end "deleteStatement"
-
-
- // $ANTLR start "insertStatement"
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:63:1: insertStatement : ^( INSERT i= INTO selectStatement ) ;
- public void insertStatement() // throws RecognitionException [1]
- {
- IASTNode i = null;
-
- try
- {
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:64:2: ( ^( INSERT i= INTO selectStatement ) )
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:64:4: ^( INSERT i= INTO selectStatement )
- {
- Match(input,INSERT,FOLLOW_INSERT_in_insertStatement242); if (state.failed) return ;
-
- if ( (state.backtracking==0) )
- {
- Out( "insert " );
- }
-
- Match(input, Token.DOWN, null); if (state.failed) return ;
- i=(IASTNode)Match(input,INTO,FOLLOW_INTO_in_insertStatement250); if (state.failed) return ;
- if ( (state.backtracking==0) )
- {
- Out( i ); Out( " " );
- }
- PushFollow(FOLLOW_selectStatement_in_insertStatement256);
- selectStatement();
- state.followingStackPointer--;
- if (state.failed) return ;
-
- Match(input, Token.UP, null); if (state.failed) return ;
-
- }
-
- }
- catch (RecognitionException re)
- {
- ReportError(re);
- Recover(input,re);
- }
- finally
- {
- }
- return ;
- }
- // $ANTLR end "insertStatement"
-
-
- // $ANTLR start "setClause"
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:70:1: setClause : ^( SET comparisonExpr[false] ( comparisonExpr[false] )* ) ;
- public void setClause() // throws RecognitionException [1]
- {
- try
- {
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:73:2: ( ^( SET comparisonExpr[false] ( comparisonExpr[false] )* ) )
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:73:4: ^( SET comparisonExpr[false] ( comparisonExpr[false] )* )
- {
- Match(input,SET,FOLLOW_SET_in_setClause276); if (state.failed) return ;
-
- if ( (state.backtracking==0) )
- {
- Out(" set ");
- }
-
- Match(input, Token.DOWN, null); if (state.failed) return ;
- PushFollow(FOLLOW_comparisonExpr_in_setClause280);
- comparisonExpr(false);
- state.followingStackPointer--;
- if (state.failed) return ;
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:73:51: ( comparisonExpr[false] )*
- do
- {
- int alt8 = 2;
- int LA8_0 = input.LA(1);
-
- if ( (LA8_0 == BETWEEN || LA8_0 == EXISTS || LA8_0 == IN || LA8_0 == LIKE || (LA8_0 >= IS_NOT_NULL && LA8_0 <= IS_NULL) || (LA8_0 >= NOT_BETWEEN && LA8_0 <= NOT_LIKE) || LA8_0 == EQ || LA8_0 == NE || (LA8_0 >= LT && LA8_0 <= GE)) )
- {
- alt8 = 1;
- }
-
-
- switch (alt8)
- {
- case 1 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:73:53: comparisonExpr[false]
- {
- if ( (state.backtracking==0) )
- {
- Out(", ");
- }
- PushFollow(FOLLOW_comparisonExpr_in_setClause287);
- comparisonExpr(false);
- state.followingStackPointer--;
- if (state.failed) return ;
-
- }
- break;
-
- default:
- goto loop8;
- }
- } while (true);
-
- loop8:
- ; // Stops C# compiler whining that label 'loop8' has no statements
-
-
- Match(input, Token.UP, null); if (state.failed) return ;
-
- }
-
- }
- catch (RecognitionException re)
- {
- ReportError(re);
- Recover(input,re);
- }
- finally
- {
- }
- return ;
- }
- // $ANTLR end "setClause"
-
-
- // $ANTLR start "whereClause"
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:76:1: whereClause : ^( WHERE whereClauseExpr ) ;
- public void whereClause() // throws RecognitionException [1]
- {
- try
- {
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:77:2: ( ^( WHERE whereClauseExpr ) )
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:77:4: ^( WHERE whereClauseExpr )
- {
- Match(input,WHERE,FOLLOW_WHERE_in_whereClause305); if (state.failed) return ;
-
- if ( (state.backtracking==0) )
- {
- Out(" where ");
- }
-
- Match(input, Token.DOWN, null); if (state.failed) return ;
- PushFollow(FOLLOW_whereClauseExpr_in_whereClause309);
- whereClauseExpr();
- state.followingStackPointer--;
- if (state.failed) return ;
-
- Match(input, Token.UP, null); if (state.failed) return ;
-
- }
-
- }
- catch (RecognitionException re)
- {
- ReportError(re);
- Recover(input,re);
- }
- finally
- {
- }
- return ;
- }
- // $ANTLR end "whereClause"
-
-
- // $ANTLR start "whereClauseExpr"
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:80:1: whereClauseExpr : ( ( SQL_TOKEN )=> conditionList | booleanExpr[ false ] );
- public void whereClauseExpr() // throws RecognitionException [1]
- {
- try
- {
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:81:2: ( ( SQL_TOKEN )=> conditionList | booleanExpr[ false ] )
- int alt9 = 2;
- int LA9_0 = input.LA(1);
-
- if ( (LA9_0 == SQL_TOKEN) )
- {
- int LA9_1 = input.LA(2);
-
- if ( (LA9_1 == DOWN) && (synpred1_SqlGenerator()) )
- {
- alt9 = 1;
- }
- else if ( (LA9_1 == UP) )
- {
- alt9 = 2;
- }
- else
- {
- if ( state.backtracking > 0 ) {state.failed = true; return ;}
- NoViableAltException nvae_d9s1 =
- new NoViableAltException("", 9, 1, input);
-
- throw nvae_d9s1;
- }
- }
- else if ( (LA9_0 == AND || LA9_0 == BETWEEN || LA9_0 == EXISTS || LA9_0 == IN || LA9_0 == LIKE || LA9_0 == NOT || LA9_0 == OR || (LA9_0 >= IS_NOT_NULL && LA9_0 <= IS_NULL) || (LA9_0 >= NOT_BETWEEN && LA9_0 <= NOT_LIKE) || LA9_0 == EQ || LA9_0 == NE || (LA9_0 >= LT && LA9_0 <= GE)) )
- {
- alt9 = 2;
- }
- else
- {
- if ( state.backtracking > 0 ) {state.failed = true; return ;}
- NoViableAltException nvae_d9s0 =
- new NoViableAltException("", 9, 0, input);
-
- throw nvae_d9s0;
- }
- switch (alt9)
- {
- case 1 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:81:4: ( SQL_TOKEN )=> conditionList
- {
- PushFollow(FOLLOW_conditionList_in_whereClauseExpr328);
- conditionList();
- state.followingStackPointer--;
- if (state.failed) return ;
-
- }
- break;
- case 2 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:82:4: booleanExpr[ false ]
- {
- PushFollow(FOLLOW_booleanExpr_in_whereClauseExpr333);
- booleanExpr(false);
- state.followingStackPointer--;
- if (state.failed) return ;
-
- }
- break;
-
- }
- }
- catch (RecognitionException re)
- {
- ReportError(re);
- Recover(input,re);
- }
- finally
- {
- }
- return ;
- }
- // $ANTLR end "whereClauseExpr"
-
-
- // $ANTLR start "orderExprs"
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:85:1: orderExprs : ( expr ) (dir= orderDirection )? ( orderExprs )? ;
- public void orderExprs() // throws RecognitionException [1]
- {
- SqlGenerator.orderDirection_return dir = default(SqlGenerator.orderDirection_return);
-
-
- try
- {
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:87:2: ( ( expr ) (dir= orderDirection )? ( orderExprs )? )
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:87:4: ( expr ) (dir= orderDirection )? ( orderExprs )?
- {
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:87:4: ( expr )
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:87:6: expr
- {
- PushFollow(FOLLOW_expr_in_orderExprs349);
- expr();
- state.followingStackPointer--;
- if (state.failed) return ;
-
- }
-
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:87:13: (dir= orderDirection )?
- int alt10 = 2;
- int LA10_0 = input.LA(1);
-
- if ( (LA10_0 == ASCENDING || LA10_0 == DESCENDING) )
- {
- alt10 = 1;
- }
- switch (alt10)
- {
- case 1 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:87:14: dir= orderDirection
- {
- PushFollow(FOLLOW_orderDirection_in_orderExprs356);
- dir = orderDirection();
- state.followingStackPointer--;
- if (state.failed) return ;
- if ( (state.backtracking==0) )
- {
- Out(" "); Out(((dir != null) ? ((IASTNode)dir.Start) : null));
- }
-
- }
- break;
-
- }
-
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:87:66: ( orderExprs )?
- int alt11 = 2;
- int LA11_0 = input.LA(1);
-
- if ( ((LA11_0 >= ALL && LA11_0 <= ANY) || LA11_0 == COUNT || LA11_0 == DOT || LA11_0 == FALSE || LA11_0 == NULL || LA11_0 == SELECT || LA11_0 == SOME || LA11_0 == TRUE || LA11_0 == CASE || LA11_0 == AGGREGATE || LA11_0 == CASE2 || LA11_0 == INDEX_OP || LA11_0 == METHOD_CALL || LA11_0 == UNARY_MINUS || LA11_0 == VECTOR_EXPR || (LA11_0 >= CONSTANT && LA11_0 <= JAVA_CONSTANT) || (LA11_0 >= PLUS && LA11_0 <= DIV) || (LA11_0 >= PARAM && LA11_0 <= IDENT) || LA11_0 == ALIAS_REF || LA11_0 == SQL_TOKEN || LA11_0 == NAMED_PARAM) )
- {
- alt11 = 1;
- }
- switch (alt11)
- {
- case 1 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:87:68: orderExprs
- {
- if ( (state.backtracking==0) )
- {
- Out(", ");
- }
- PushFollow(FOLLOW_orderExprs_in_orderExprs366);
- orderExprs();
- state.followingStackPointer--;
- if (state.failed) return ;
-
- }
- break;
-
- }
-
-
- }
-
- }
- catch (RecognitionException re)
- {
- ReportError(re);
- Recover(input,re);
- }
- finally
- {
- }
- return ;
- }
- // $ANTLR end "orderExprs"
-
-
- // $ANTLR start "groupExprs"
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:90:1: groupExprs : expr ( groupExprs )? ;
- public void groupExprs() // throws RecognitionException [1]
- {
- try
- {
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:92:2: ( expr ( groupExprs )? )
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:92:4: expr ( groupExprs )?
- {
- PushFollow(FOLLOW_expr_in_groupExprs381);
- expr();
- state.followingStackPointer--;
- if (state.failed) return ;
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:92:9: ( groupExprs )?
- int alt12 = 2;
- int LA12_0 = input.LA(1);
-
- if ( ((LA12_0 >= ALL && LA12_0 <= ANY) || LA12_0 == COUNT || LA12_0 == DOT || LA12_0 == FALSE || LA12_0 == NULL || LA12_0 == SELECT || LA12_0 == SOME || LA12_0 == TRUE || LA12_0 == CASE || LA12_0 == AGGREGATE || LA12_0 == CASE2 || LA12_0 == INDEX_OP || LA12_0 == METHOD_CALL || LA12_0 == UNARY_MINUS || LA12_0 == VECTOR_EXPR || (LA12_0 >= CONSTANT && LA12_0 <= JAVA_CONSTANT) || (LA12_0 >= PLUS && LA12_0 <= DIV) || (LA12_0 >= PARAM && LA12_0 <= IDENT) || LA12_0 == ALIAS_REF || LA12_0 == SQL_TOKEN || LA12_0 == NAMED_PARAM) )
- {
- alt12 = 1;
- }
- switch (alt12)
- {
- case 1 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:92:11: groupExprs
- {
- if ( (state.backtracking==0) )
- {
- Out(" , ");
- }
- PushFollow(FOLLOW_groupExprs_in_groupExprs387);
- groupExprs();
- state.followingStackPointer--;
- if (state.failed) return ;
-
- }
- break;
-
- }
-
-
- }
-
- }
- catch (RecognitionException re)
- {
- ReportError(re);
- Recover(input,re);
- }
- finally
- {
- }
- return ;
- }
- // $ANTLR end "groupExprs"
-
- public class orderDirection_return : TreeRuleReturnScope
- {
- };
-
- // $ANTLR start "orderDirection"
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:95:1: orderDirection : ( ASCENDING | DESCENDING );
- public SqlGenerator.orderDirection_return orderDirection() // throws RecognitionException [1]
- {
- SqlGenerator.orderDirection_return retval = new SqlGenerator.orderDirection_return();
- retval.Start = input.LT(1);
-
- try
- {
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:96:2: ( ASCENDING | DESCENDING )
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:
- {
- if ( input.LA(1) == ASCENDING || input.LA(1) == DESCENDING )
- {
- input.Consume();
- state.errorRecovery = false;state.failed = false;
- }
- else
- {
- if ( state.backtracking > 0 ) {state.failed = true; return retval;}
- MismatchedSetException mse = new MismatchedSetException(null,input);
- throw mse;
- }
-
-
- }
-
- }
- catch (RecognitionException re)
- {
- ReportError(re);
- Recover(input,re);
- }
- finally
- {
- }
- return retval;
- }
- // $ANTLR end "orderDirection"
-
-
- // $ANTLR start "whereExpr"
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:100:1: whereExpr : ( filters ( thetaJoins )? ( booleanExpr[ true ] )? | thetaJoins ( booleanExpr[ true ] )? | booleanExpr[false] );
- public void whereExpr() // throws RecognitionException [1]
- {
- try
- {
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:104:2: ( filters ( thetaJoins )? ( booleanExpr[ true ] )? | thetaJoins ( booleanExpr[ true ] )? | booleanExpr[false] )
- int alt16 = 3;
- switch ( input.LA(1) )
- {
- case FILTERS:
- {
- alt16 = 1;
- }
- break;
- case THETA_JOINS:
- {
- alt16 = 2;
- }
- break;
- case AND:
- case BETWEEN:
- case EXISTS:
- case IN:
- case LIKE:
- case NOT:
- case OR:
- case IS_NOT_NULL:
- case IS_NULL:
- case NOT_BETWEEN:
- case NOT_IN:
- case NOT_LIKE:
- case EQ:
- case NE:
- case LT:
- case GT:
- case LE:
- case GE:
- case SQL_TOKEN:
- {
- alt16 = 3;
- }
- break;
- default:
- if ( state.backtracking > 0 ) {state.failed = true; return ;}
- NoViableAltException nvae_d16s0 =
- new NoViableAltException("", 16, 0, input);
-
- throw nvae_d16s0;
- }
-
- switch (alt16)
- {
- case 1 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:104:4: filters ( thetaJoins )? ( booleanExpr[ true ] )?
- {
- PushFollow(FOLLOW_filters_in_whereExpr422);
- filters();
- state.followingStackPointer--;
- if (state.failed) return ;
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:105:3: ( thetaJoins )?
- int alt13 = 2;
- int LA13_0 = input.LA(1);
-
- if ( (LA13_0 == THETA_JOINS) )
- {
- alt13 = 1;
- }
- switch (alt13)
- {
- case 1 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:105:5: thetaJoins
- {
- if ( (state.backtracking==0) )
- {
- Out(" and ");
- }
- PushFollow(FOLLOW_thetaJoins_in_whereExpr430);
- thetaJoins();
- state.followingStackPointer--;
- if (state.failed) return ;
-
- }
- break;
-
- }
-
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:106:3: ( booleanExpr[ true ] )?
- int alt14 = 2;
- int LA14_0 = input.LA(1);
-
- if ( (LA14_0 == AND || LA14_0 == BETWEEN || LA14_0 == EXISTS || LA14_0 == IN || LA14_0 == LIKE || LA14_0 == NOT || LA14_0 == OR || (LA14_0 >= IS_NOT_NULL && LA14_0 <= IS_NULL) || (LA14_0 >= NOT_BETWEEN && LA14_0 <= NOT_LIKE) || LA14_0 == EQ || LA14_0 == NE || (LA14_0 >= LT && LA14_0 <= GE) || LA14_0 == SQL_TOKEN) )
- {
- alt14 = 1;
- }
- switch (alt14)
- {
- case 1 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:106:5: booleanExpr[ true ]
- {
- if ( (state.backtracking==0) )
- {
- Out(" and ");
- }
- PushFollow(FOLLOW_booleanExpr_in_whereExpr441);
- booleanExpr(true);
- state.followingStackPointer--;
- if (state.failed) return ;
-
- }
- break;
-
- }
-
-
- }
- break;
- case 2 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:107:4: thetaJoins ( booleanExpr[ true ] )?
- {
- PushFollow(FOLLOW_thetaJoins_in_whereExpr451);
- thetaJoins();
- state.followingStackPointer--;
- if (state.failed) return ;
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:108:3: ( booleanExpr[ true ] )?
- int alt15 = 2;
- int LA15_0 = input.LA(1);
-
- if ( (LA15_0 == AND || LA15_0 == BETWEEN || LA15_0 == EXISTS || LA15_0 == IN || LA15_0 == LIKE || LA15_0 == NOT || LA15_0 == OR || (LA15_0 >= IS_NOT_NULL && LA15_0 <= IS_NULL) || (LA15_0 >= NOT_BETWEEN && LA15_0 <= NOT_LIKE) || LA15_0 == EQ || LA15_0 == NE || (LA15_0 >= LT && LA15_0 <= GE) || LA15_0 == SQL_TOKEN) )
- {
- alt15 = 1;
- }
- switch (alt15)
- {
- case 1 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:108:5: booleanExpr[ true ]
- {
- if ( (state.backtracking==0) )
- {
- Out(" and ");
- }
- PushFollow(FOLLOW_booleanExpr_in_whereExpr459);
- booleanExpr(true);
- state.followingStackPointer--;
- if (state.failed) return ;
-
- }
- break;
-
- }
-
-
- }
- break;
- case 3 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:109:4: booleanExpr[false]
- {
- PushFollow(FOLLOW_booleanExpr_in_whereExpr470);
- booleanExpr(false);
- state.followingStackPointer--;
- if (state.failed) return ;
-
- }
- break;
-
- }
- }
- catch (RecognitionException re)
- {
- ReportError(re);
- Recover(input,re);
- }
- finally
- {
- }
- return ;
- }
- // $ANTLR end "whereExpr"
-
-
- // $ANTLR start "filters"
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:112:1: filters : ^( FILTERS conditionList ) ;
- public void filters() // throws RecognitionException [1]
- {
- try
- {
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:113:2: ( ^( FILTERS conditionList ) )
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:113:4: ^( FILTERS conditionList )
- {
- Match(input,FILTERS,FOLLOW_FILTERS_in_filters483); if (state.failed) return ;
-
- Match(input, Token.DOWN, null); if (state.failed) return ;
- PushFollow(FOLLOW_conditionList_in_filters485);
- conditionList();
- state.followingStackPointer--;
- if (state.failed) return ;
-
- Match(input, Token.UP, null); if (state.failed) return ;
-
- }
-
- }
- catch (RecognitionException re)
- {
- ReportError(re);
- Recover(input,re);
- }
- finally
- {
- }
- return ;
- }
- // $ANTLR end "filters"
-
-
- // $ANTLR start "thetaJoins"
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:116:1: thetaJoins : ^( THETA_JOINS conditionList ) ;
- public void thetaJoins() // throws RecognitionException [1]
- {
- try
- {
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:117:2: ( ^( THETA_JOINS conditionList ) )
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:117:4: ^( THETA_JOINS conditionList )
- {
- Match(input,THETA_JOINS,FOLLOW_THETA_JOINS_in_thetaJoins499); if (state.failed) return ;
-
- Match(input, Token.DOWN, null); if (state.failed) return ;
- PushFollow(FOLLOW_conditionList_in_thetaJoins501);
- conditionList();
- state.followingStackPointer--;
- if (state.failed) return ;
-
- Match(input, Token.UP, null); if (state.failed) return ;
-
- }
-
- }
- catch (RecognitionException re)
- {
- ReportError(re);
- Recover(input,re);
- }
- finally
- {
- }
- return ;
- }
- // $ANTLR end "thetaJoins"
-
-
- // $ANTLR start "conditionList"
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:120:1: conditionList : sqlToken ( conditionList )? ;
- public void conditionList() // throws RecognitionException [1]
- {
- try
- {
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:121:2: ( sqlToken ( conditionList )? )
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:121:4: sqlToken ( conditionList )?
- {
- PushFollow(FOLLOW_sqlToken_in_conditionList514);
- sqlToken();
- state.followingStackPointer--;
- if (state.failed) return ;
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:121:13: ( conditionList )?
- int alt17 = 2;
- int LA17_0 = input.LA(1);
-
- if ( (LA17_0 == SQL_TOKEN) )
- {
- alt17 = 1;
- }
- switch (alt17)
- {
- case 1 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:121:15: conditionList
- {
- if ( (state.backtracking==0) )
- {
- Out(" and ");
- }
- PushFollow(FOLLOW_conditionList_in_conditionList520);
- conditionList();
- state.followingStackPointer--;
- if (state.failed) return ;
-
- }
- break;
-
- }
-
-
- }
-
- }
- catch (RecognitionException re)
- {
- ReportError(re);
- Recover(input,re);
- }
- finally
- {
- }
- return ;
- }
- // $ANTLR end "conditionList"
-
-
- // $ANTLR start "selectClause"
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:124:1: selectClause : ^( SELECT_CLAUSE ( distinctOrAll )? ( selectColumn )+ ) ;
- public void selectClause() // throws RecognitionException [1]
- {
- try
- {
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:125:2: ( ^( SELECT_CLAUSE ( distinctOrAll )? ( selectColumn )+ ) )
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:125:4: ^( SELECT_CLAUSE ( distinctOrAll )? ( selectColumn )+ )
- {
- Match(input,SELECT_CLAUSE,FOLLOW_SELECT_CLAUSE_in_selectClause535); if (state.failed) return ;
-
- Match(input, Token.DOWN, null); if (state.failed) return ;
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:125:20: ( distinctOrAll )?
- int alt18 = 2;
- int LA18_0 = input.LA(1);
-
- if ( (LA18_0 == ALL || LA18_0 == DISTINCT) )
- {
- alt18 = 1;
- }
- switch (alt18)
- {
- case 1 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:125:21: distinctOrAll
- {
- PushFollow(FOLLOW_distinctOrAll_in_selectClause538);
- distinctOrAll();
- state.followingStackPointer--;
- if (state.failed) return ;
-
- }
- break;
-
- }
-
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:125:37: ( selectColumn )+
- int cnt19 = 0;
- do
- {
- int alt19 = 2;
- int LA19_0 = input.LA(1);
-
- if ( (LA19_0 == COUNT || LA19_0 == DOT || LA19_0 == FALSE || LA19_0 == SELECT || LA19_0 == TRUE || LA19_0 == CASE || LA19_0 == AGGREGATE || (LA19_0 >= CONSTRUCTOR && LA19_0 <= CASE2) || LA19_0 == METHOD_CALL || LA19_0 == UNARY_MINUS || (LA19_0 >= CONSTANT && LA19_0 <= JAVA_CONSTANT) || (LA19_0 >= PLUS && LA19_0 <= DIV) || (LA19_0 >= PARAM && LA19_0 <= IDENT) || LA19_0 == ALIAS_REF || LA19_0 == SQL_TOKEN || LA19_0 == SELECT_EXPR) )
- {
- alt19 = 1;
- }
-
-
- switch (alt19)
- {
- case 1 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:125:39: selectColumn
- {
- PushFollow(FOLLOW_selectColumn_in_selectClause544);
- selectColumn();
- state.followingStackPointer--;
- if (state.failed) return ;
-
- }
- break;
-
- default:
- if ( cnt19 >= 1 ) goto loop19;
- if ( state.backtracking > 0 ) {state.failed = true; return ;}
- EarlyExitException eee19 =
- new EarlyExitException(19, input);
- throw eee19;
- }
- cnt19++;
- } while (true);
-
- loop19:
- ; // Stops C# compiler whinging that label 'loop19' has no statements
-
-
- Match(input, Token.UP, null); if (state.failed) return ;
-
- }
-
- }
- catch (RecognitionException re)
- {
- ReportError(re);
- Recover(input,re);
- }
- finally
- {
- }
- return ;
- }
- // $ANTLR end "selectClause"
-
-
- // $ANTLR start "selectColumn"
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:128:1: selectColumn : p= selectExpr (sc= SELECT_COLUMNS )? ;
- public void selectColumn() // throws RecognitionException [1]
- {
- IASTNode sc = null;
- SqlGenerator.selectExpr_return p = default(SqlGenerator.selectExpr_return);
-
-
- try
- {
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:129:2: (p= selectExpr (sc= SELECT_COLUMNS )? )
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:129:4: p= selectExpr (sc= SELECT_COLUMNS )?
- {
- PushFollow(FOLLOW_selectExpr_in_selectColumn562);
- p = selectExpr();
- state.followingStackPointer--;
- if (state.failed) return ;
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:129:17: (sc= SELECT_COLUMNS )?
- int alt20 = 2;
- int LA20_0 = input.LA(1);
-
- if ( (LA20_0 == SELECT_COLUMNS) )
- {
- alt20 = 1;
- }
- switch (alt20)
- {
- case 1 :
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:129:18: sc= SELECT_COLUMNS
- {
- sc=(IASTNode)Match(input,SELECT_COLUMNS,FOLLOW_SELECT_COLUMNS_in_selectColumn567); if (state.failed) return ;
- if ( (state.backtracking==0) )
- {
- Out(sc);
- }
-
- }
- break;
-
- }
-
- if ( (state.backtracking==0) )
- {
- Separator( (sc != null) ? sc : ((p != null) ? ((IASTNode)p.Start) : null) ,", ");
- }
-
- }
-
- }
- catch (RecognitionException re)
- {
- ReportError(re);
- Recover(input,re);
- }
- finally
- {
- }
- return ;
- }
- // $ANTLR end "selectColumn"
-
- public class selectExpr_return : TreeRuleReturnScope
- {
- };
-
- // $ANTLR start "selectExpr"
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:132:1: selectExpr : (e= selectAtom | count | ^( CONSTRUCTOR ( DOT | IDENT ) ( selectColumn )+ ) | methodCall | aggregate | c= constant | arithmeticExpr | param= PARAM | selectStatement );
- public SqlGenerator.selectExpr_return selectExpr() // throws RecognitionException [1]
- {
- SqlGenerator.selectExpr_return retval = new SqlGenerator.selectExpr_return();
- retval.Start = input.LT(1);
-
- IASTNode param = null;
- SqlGenerator.selectAtom_return e = default(SqlGenerator.selectAtom_return);
-
- SqlGenerator.constant_return c = default(SqlGenerator.constant_return);
-
-
- try
- {
- // C:\\CSharp\\NH\\nhibernate\\src\\NHibernate\\Hql\\Ast\\ANTLR\\SqlGenerator.g:133:2: (e= selectAtom | count | ^( CONSTRUCTOR ( DOT | IDENT ) ( selectColumn )+ ) | methodCall | aggregate | c= constant | arithmeticExpr | param= PARAM | selectStatement )
- int alt22 = 9;
- switch ( input.LA(1) )
- {
- case DOT:
- case ALIAS_REF:
- case SQL_TOKEN:
- case SELE...
[truncated message content] |