From: <pa...@us...> - 2011-04-11 17:42:06
|
Revision: 5668 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5668&view=rev Author: patearl Date: 2011-04-11 17:41:57 +0000 (Mon, 11 Apr 2011) Log Message: ----------- HQL: Support SKIP and TAKE. Support having clause without group by. Throw exception on unexpected trailing input. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlLexer.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlParser.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlSqlWalker.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/SqlGenerator.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlSqlWalker.g trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/SqlGenerator.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/SqlGenerator.g trunk/nhibernate/src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1990/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/Hql/Ast/LimitClauseFixture.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs 2011-04-11 17:04:42 UTC (rev 5667) +++ trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs 2011-04-11 17:41:57 UTC (rev 5668) @@ -29,6 +29,13 @@ RegisterKeyword("xml"); } + public override SqlString GetLimitString(SqlString querySqlString, int offset, int limit) + { + return GetLimitString(querySqlString, + offset == 0 ? null : new SqlString(offset.ToString()), + limit == int.MaxValue ? null : new SqlString(limit.ToString())); + } + /// <summary> /// Add a <c>LIMIT</c> clause to the given SQL <c>SELECT</c> /// </summary> @@ -43,17 +50,29 @@ /// </remarks> public override SqlString GetLimitString(SqlString querySqlString, int offset, int limit, int? offsetParameterIndex, int? limitParameterIndex) { + object limitObject = limitParameterIndex == null ? Parameter.Placeholder : Parameter.WithIndex(limitParameterIndex.Value); + object offsetObject = null; + if (offset != 0) + offsetObject = offsetParameterIndex == null ? Parameter.Placeholder : Parameter.WithIndex(offsetParameterIndex.Value); + return GetLimitString(querySqlString, offsetObject, limitObject); + } + + private SqlString GetLimitString(SqlString querySqlString, object offset, object limit) + { + if (offset == null && limit == null) + return querySqlString; + SqlStringBuilder result = new SqlStringBuilder(); - if (offset == 0) + if (offset == null) { int insertPoint = this.GetAfterSelectInsertPoint(querySqlString); return result .Add(querySqlString.Substring(0, insertPoint)) .Add(" TOP (") - .Add(limitParameterIndex == null ? Parameter.Placeholder : Parameter.WithIndex(limitParameterIndex.Value)) - .Add(")") + .AddObject(limit) + .Add(") ") .Add(querySqlString.Substring(insertPoint)) .ToSqlString(); } @@ -84,10 +103,12 @@ sortExpressions = new[] {new SqlString("CURRENT_TIMESTAMP"),}; } - result - .Add("SELECT TOP (") - .Add(limitParameterIndex == null ? Parameter.Placeholder : Parameter.WithIndex(limitParameterIndex.Value)) - .Add(") ") + result.Add("SELECT "); + + if (limit != null) + result.Add("TOP (").AddObject(limit).Add(") "); + + result .Add(StringHelper.Join(", ", columnsOrAliases)) .Add(" FROM (") .Add(select) @@ -99,7 +120,7 @@ .Add(") as __hibernate_sort_row ") .Add(fromAndWhere) .Add(") as query WHERE query.__hibernate_sort_row > ") - .Add(offsetParameterIndex == null ? Parameter.Placeholder : Parameter.WithIndex(offsetParameterIndex.Value)) + .AddObject(offset) .Add(" ORDER BY query.__hibernate_sort_row"); return result.ToSqlString(); Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlLexer.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlLexer.cs 2011-04-11 17:04:42 UTC (rev 5667) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlLexer.cs 2011-04-11 17:41:57 UTC (rev 5668) @@ -1,4 +1,4 @@ -// $ANTLR 3.2 Sep 23, 2009 12:02:23 Hql.g 2011-01-13 10:47:55 +// $ANTLR 3.2 Sep 23, 2009 12:02:23 Hql.g 2011-04-11 10:19:40 // The variable 'variable' is assigned but its value is never used. #pragma warning disable 168, 219 @@ -17,136 +17,138 @@ namespace NHibernate.Hql.Ast.ANTLR { public partial class HqlLexer : Lexer { - public const int LT = 105; - public const int EXPONENT = 128; - public const int STAR = 116; - public const int FLOAT_SUFFIX = 129; - public const int LITERAL_by = 54; - public const int CASE = 55; + public const int LT = 107; + public const int EXPONENT = 130; + public const int STAR = 118; + public const int FLOAT_SUFFIX = 131; + public const int LITERAL_by = 56; + public const int CASE = 57; public const int NEW = 37; - public const int FILTER_ENTITY = 74; - public const int PARAM = 121; + public const int FILTER_ENTITY = 76; + public const int PARAM = 123; 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 = 122; - public const int ESCqs = 126; - public const int WEIRD_IDENT = 91; - public const int OPEN_BRACKET = 118; + public const int UNARY_PLUS = 91; + public const int QUOTED_String = 124; + public const int ESCqs = 128; + public const int WEIRD_IDENT = 93; + public const int OPEN_BRACKET = 120; public const int FULL = 23; - public const int ORDER_ELEMENT = 83; - public const int IS_NULL = 78; + public const int ORDER_ELEMENT = 85; + public const int IS_NULL = 80; public const int ESCAPE = 18; public const int INSERT = 29; - public const int BOTH = 62; - public const int NUM_DECIMAL = 95; - public const int VERSIONED = 52; - public const int EQ = 100; + public const int BOTH = 64; + public const int NUM_DECIMAL = 97; + public const int VERSIONED = 54; + public const int EQ = 102; public const int SELECT = 45; public const int INTO = 30; - public const int NE = 103; - public const int GE = 108; - public const int CONCAT = 109; - public const int ID_LETTER = 125; + public const int NE = 105; + public const int GE = 110; + public const int TAKE = 50; + public const int CONCAT = 111; + public const int ID_LETTER = 127; 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 = 97; - public const int NUM_DOUBLE = 94; - public const int UNARY_MINUS = 88; + public const int ELSE = 59; + public const int SELECT_FROM = 89; + public const int TRAILING = 70; + public const int ON = 62; + public const int NUM_LONG = 99; + public const int NUM_DOUBLE = 96; + public const int UNARY_MINUS = 90; 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 EMPTY = 63; + public const int OF = 69; + public const int METHOD_CALL = 81; + public const int LEADING = 66; + public const int SKIP = 47; + public const int EMPTY = 65; public const int GROUP = 24; - public const int WS = 127; + public const int WS = 129; public const int FETCH = 21; - public const int VECTOR_EXPR = 90; - public const int NOT_IN = 81; - public const int NUM_INT = 93; + public const int VECTOR_EXPR = 92; + public const int NOT_IN = 83; + public const int NUM_INT = 95; public const int OR = 40; - public const int ALIAS = 70; - public const int JAVA_CONSTANT = 98; - public const int CONSTANT = 92; - public const int GT = 106; - public const int QUERY = 84; - public const int BNOT = 110; - public const int INDEX_OP = 76; - public const int NUM_FLOAT = 96; + public const int ALIAS = 72; + public const int JAVA_CONSTANT = 100; + public const int CONSTANT = 94; + public const int GT = 108; + public const int QUERY = 86; + public const int BNOT = 112; + public const int INDEX_OP = 78; + public const int NUM_FLOAT = 98; public const int FROM = 22; - public const int END = 56; + public const int END = 58; public const int FALSE = 20; public const int DISTINCT = 16; - public const int T__131 = 131; - public const int CONSTRUCTOR = 71; - public const int T__132 = 132; - public const int CLOSE_BRACKET = 119; - public const int WHERE = 53; + public const int CONSTRUCTOR = 73; + public const int T__133 = 133; + public const int T__134 = 134; + public const int CLOSE_BRACKET = 121; + public const int WHERE = 55; public const int CLASS = 11; - public const int MEMBER = 65; + public const int MEMBER = 67; public const int INNER = 28; public const int PROPERTIES = 43; public const int ORDER = 41; public const int MAX = 35; - public const int UPDATE = 51; - public const int SQL_NE = 104; + public const int UPDATE = 53; + public const int SQL_NE = 106; public const int AND = 6; - public const int SUM = 48; + public const int SUM = 49; public const int ASCENDING = 8; - public const int EXPR_LIST = 73; + public const int EXPR_LIST = 75; public const int AS = 7; public const int IN = 26; - public const int THEN = 58; - public const int OBJECT = 66; - public const int COMMA = 99; + public const int THEN = 60; + public const int OBJECT = 68; + public const int COMMA = 101; public const int IS = 31; public const int AVG = 9; public const int LEFT = 33; - public const int SOME = 47; + public const int SOME = 48; public const int ALL = 4; - public const int BOR = 111; - public const int IDENT = 123; - public const int CASE2 = 72; - public const int BXOR = 112; - public const int PLUS = 114; + public const int BOR = 113; + public const int IDENT = 125; + public const int CASE2 = 74; + public const int BXOR = 114; + public const int PLUS = 116; public const int EXISTS = 19; public const int DOT = 15; - public const int WITH = 61; + public const int WITH = 63; public const int LIKE = 34; public const int OUTER = 42; - public const int ID_START_LETTER = 124; - public const int ROW_STAR = 86; - public const int NOT_LIKE = 82; - public const int RANGE = 85; - public const int NOT_BETWEEN = 80; - public const int HEX_DIGIT = 130; + public const int ID_START_LETTER = 126; + public const int ROW_STAR = 88; + public const int NOT_LIKE = 84; + public const int RANGE = 87; + public const int NOT_BETWEEN = 82; + public const int HEX_DIGIT = 132; public const int SET = 46; public const int RIGHT = 44; public const int HAVING = 25; public const int MIN = 36; - public const int IS_NOT_NULL = 77; - public const int MINUS = 115; + public const int IS_NOT_NULL = 79; + public const int MINUS = 117; public const int ELEMENTS = 17; - public const int BAND = 113; - public const int TRUE = 49; + public const int BAND = 115; + public const int TRUE = 51; public const int JOIN = 32; - public const int IN_LIST = 75; - public const int UNION = 50; - public const int OPEN = 101; - public const int COLON = 120; + public const int IN_LIST = 77; + public const int UNION = 52; + public const int OPEN = 103; + public const int COLON = 122; public const int ANY = 5; - public const int CLOSE = 102; - public const int WHEN = 59; - public const int DIV = 117; + public const int CLOSE = 104; + public const int WHEN = 61; + public const int DIV = 119; public const int DESCENDING = 14; - public const int AGGREGATE = 69; + public const int AGGREGATE = 71; public const int BETWEEN = 10; - public const int LE = 107; + public const int LE = 109; // delegates // delegators @@ -1177,6 +1179,30 @@ } // $ANTLR end "SET" + // $ANTLR start "SKIP" + public void mSKIP() // throws RecognitionException [2] + { + try + { + int _type = SKIP; + int _channel = DEFAULT_TOKEN_CHANNEL; + // Hql.g:51:6: ( 'skip' ) + // Hql.g:51:8: 'skip' + { + Match("skip"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "SKIP" + // $ANTLR start "SOME" public void mSOME() // throws RecognitionException [2] { @@ -1184,8 +1210,8 @@ { int _type = SOME; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:51:6: ( 'some' ) - // Hql.g:51:8: 'some' + // Hql.g:52:6: ( 'some' ) + // Hql.g:52:8: 'some' { Match("some"); if (state.failed) return ; @@ -1208,8 +1234,8 @@ { int _type = SUM; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:52:5: ( 'sum' ) - // Hql.g:52:7: 'sum' + // Hql.g:53:5: ( 'sum' ) + // Hql.g:53:7: 'sum' { Match("sum"); if (state.failed) return ; @@ -1225,6 +1251,30 @@ } // $ANTLR end "SUM" + // $ANTLR start "TAKE" + public void mTAKE() // throws RecognitionException [2] + { + try + { + int _type = TAKE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // Hql.g:54:6: ( 'take' ) + // Hql.g:54:8: 'take' + { + Match("take"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "TAKE" + // $ANTLR start "TRUE" public void mTRUE() // throws RecognitionException [2] { @@ -1232,8 +1282,8 @@ { int _type = TRUE; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:53:6: ( 'true' ) - // Hql.g:53:8: 'true' + // Hql.g:55:6: ( 'true' ) + // Hql.g:55:8: 'true' { Match("true"); if (state.failed) return ; @@ -1256,8 +1306,8 @@ { int _type = UNION; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:54:7: ( 'union' ) - // Hql.g:54:9: 'union' + // Hql.g:56:7: ( 'union' ) + // Hql.g:56:9: 'union' { Match("union"); if (state.failed) return ; @@ -1280,8 +1330,8 @@ { int _type = UPDATE; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:55:8: ( 'update' ) - // Hql.g:55:10: 'update' + // Hql.g:57:8: ( 'update' ) + // Hql.g:57:10: 'update' { Match("update"); if (state.failed) return ; @@ -1304,8 +1354,8 @@ { int _type = VERSIONED; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:56:11: ( 'versioned' ) - // Hql.g:56:13: 'versioned' + // Hql.g:58:11: ( 'versioned' ) + // Hql.g:58:13: 'versioned' { Match("versioned"); if (state.failed) return ; @@ -1328,8 +1378,8 @@ { int _type = WHERE; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:57:7: ( 'where' ) - // Hql.g:57:9: 'where' + // Hql.g:59:7: ( 'where' ) + // Hql.g:59:9: 'where' { Match("where"); if (state.failed) return ; @@ -1352,8 +1402,8 @@ { int _type = LITERAL_by; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:58:12: ( 'by' ) - // Hql.g:58:14: 'by' + // Hql.g:60:12: ( 'by' ) + // Hql.g:60:14: 'by' { Match("by"); if (state.failed) return ; @@ -1376,8 +1426,8 @@ { int _type = CASE; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:59:6: ( 'case' ) - // Hql.g:59:8: 'case' + // Hql.g:61:6: ( 'case' ) + // Hql.g:61:8: 'case' { Match("case"); if (state.failed) return ; @@ -1400,8 +1450,8 @@ { int _type = END; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:60:5: ( 'end' ) - // Hql.g:60:7: 'end' + // Hql.g:62:5: ( 'end' ) + // Hql.g:62:7: 'end' { Match("end"); if (state.failed) return ; @@ -1424,8 +1474,8 @@ { int _type = ELSE; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:61:6: ( 'else' ) - // Hql.g:61:8: 'else' + // Hql.g:63:6: ( 'else' ) + // Hql.g:63:8: 'else' { Match("else"); if (state.failed) return ; @@ -1448,8 +1498,8 @@ { int _type = THEN; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:62:6: ( 'then' ) - // Hql.g:62:8: 'then' + // Hql.g:64:6: ( 'then' ) + // Hql.g:64:8: 'then' { Match("then"); if (state.failed) return ; @@ -1472,8 +1522,8 @@ { int _type = WHEN; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:63:6: ( 'when' ) - // Hql.g:63:8: 'when' + // Hql.g:65:6: ( 'when' ) + // Hql.g:65:8: 'when' { Match("when"); if (state.failed) return ; @@ -1496,8 +1546,8 @@ { int _type = ON; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:64:4: ( 'on' ) - // Hql.g:64:6: 'on' + // Hql.g:66:4: ( 'on' ) + // Hql.g:66:6: 'on' { Match("on"); if (state.failed) return ; @@ -1520,8 +1570,8 @@ { int _type = WITH; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:65:6: ( 'with' ) - // Hql.g:65:8: 'with' + // Hql.g:67:6: ( 'with' ) + // Hql.g:67:8: 'with' { Match("with"); if (state.failed) return ; @@ -1544,8 +1594,8 @@ { int _type = BOTH; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:66:6: ( 'both' ) - // Hql.g:66:8: 'both' + // Hql.g:68:6: ( 'both' ) + // Hql.g:68:8: 'both' { Match("both"); if (state.failed) return ; @@ -1568,8 +1618,8 @@ { int _type = EMPTY; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:67:7: ( 'empty' ) - // Hql.g:67:9: 'empty' + // Hql.g:69:7: ( 'empty' ) + // Hql.g:69:9: 'empty' { Match("empty"); if (state.failed) return ; @@ -1592,8 +1642,8 @@ { int _type = LEADING; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:68:9: ( 'leading' ) - // Hql.g:68:11: 'leading' + // Hql.g:70:9: ( 'leading' ) + // Hql.g:70:11: 'leading' { Match("leading"); if (state.failed) return ; @@ -1616,8 +1666,8 @@ { int _type = MEMBER; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:69:8: ( 'member' ) - // Hql.g:69:10: 'member' + // Hql.g:71:8: ( 'member' ) + // Hql.g:71:10: 'member' { Match("member"); if (state.failed) return ; @@ -1640,8 +1690,8 @@ { int _type = OBJECT; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:70:8: ( 'object' ) - // Hql.g:70:10: 'object' + // Hql.g:72:8: ( 'object' ) + // Hql.g:72:10: 'object' { Match("object"); if (state.failed) return ; @@ -1664,8 +1714,8 @@ { int _type = OF; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:71:4: ( 'of' ) - // Hql.g:71:6: 'of' + // Hql.g:73:4: ( 'of' ) + // Hql.g:73:6: 'of' { Match("of"); if (state.failed) return ; @@ -1688,8 +1738,8 @@ { int _type = TRAILING; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:72:10: ( 'trailing' ) - // Hql.g:72:12: 'trailing' + // Hql.g:74:10: ( 'trailing' ) + // Hql.g:74:12: 'trailing' { Match("trailing"); if (state.failed) return ; @@ -1705,15 +1755,15 @@ } // $ANTLR end "TRAILING" - // $ANTLR start "T__131" - public void mT__131() // throws RecognitionException [2] + // $ANTLR start "T__133" + public void mT__133() // throws RecognitionException [2] { try { - int _type = T__131; + int _type = T__133; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:73:8: ( 'ascending' ) - // Hql.g:73:10: 'ascending' + // Hql.g:75:8: ( 'ascending' ) + // Hql.g:75:10: 'ascending' { Match("ascending"); if (state.failed) return ; @@ -1727,17 +1777,17 @@ { } } - // $ANTLR end "T__131" + // $ANTLR end "T__133" - // $ANTLR start "T__132" - public void mT__132() // throws RecognitionException [2] + // $ANTLR start "T__134" + public void mT__134() // throws RecognitionException [2] { try { - int _type = T__132; + int _type = T__134; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:74:8: ( 'descending' ) - // Hql.g:74:10: 'descending' + // Hql.g:76:8: ( 'descending' ) + // Hql.g:76:10: 'descending' { Match("descending"); if (state.failed) return ; @@ -1751,7 +1801,7 @@ { } } - // $ANTLR end "T__132" + // $ANTLR end "T__134" // $ANTLR start "EQ" public void mEQ() // throws RecognitionException [2] @@ -1760,8 +1810,8 @@ { int _type = EQ; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:672:3: ( '=' ) - // Hql.g:672:5: '=' + // Hql.g:684:3: ( '=' ) + // Hql.g:684:5: '=' { Match('='); if (state.failed) return ; @@ -1783,8 +1833,8 @@ { int _type = LT; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:673:3: ( '<' ) - // Hql.g:673:5: '<' + // Hql.g:685:3: ( '<' ) + // Hql.g:685:5: '<' { Match('<'); if (state.failed) return ; @@ -1806,8 +1856,8 @@ { int _type = GT; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:674:3: ( '>' ) - // Hql.g:674:5: '>' + // Hql.g:686:3: ( '>' ) + // Hql.g:686:5: '>' { Match('>'); if (state.failed) return ; @@ -1829,8 +1879,8 @@ { int _type = SQL_NE; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:675:7: ( '<>' ) - // Hql.g:675:9: '<>' + // Hql.g:687:7: ( '<>' ) + // Hql.g:687:9: '<>' { Match("<>"); if (state.failed) return ; @@ -1853,7 +1903,7 @@ { int _type = NE; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:676:3: ( '!=' | '^=' ) + // Hql.g:688:3: ( '!=' | '^=' ) int alt1 = 2; int LA1_0 = input.LA(1); @@ -1876,7 +1926,7 @@ switch (alt1) { case 1 : - // Hql.g:676:5: '!=' + // Hql.g:688:5: '!=' { Match("!="); if (state.failed) return ; @@ -1884,7 +1934,7 @@ } break; case 2 : - // Hql.g:676:12: '^=' + // Hql.g:688:12: '^=' { Match("^="); if (state.failed) return ; @@ -1909,8 +1959,8 @@ { int _type = LE; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:677:3: ( '<=' ) - // Hql.g:677:5: '<=' + // Hql.g:689:3: ( '<=' ) + // Hql.g:689:5: '<=' { Match("<="); if (state.failed) return ; @@ -1933,8 +1983,8 @@ { int _type = GE; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:678:3: ( '>=' ) - // Hql.g:678:5: '>=' + // Hql.g:690:3: ( '>=' ) + // Hql.g:690:5: '>=' { Match(">="); if (state.failed) return ; @@ -1957,8 +2007,8 @@ { int _type = BOR; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:680:5: ( '|' ) - // Hql.g:680:8: '|' + // Hql.g:692:5: ( '|' ) + // Hql.g:692:8: '|' { Match('|'); if (state.failed) return ; @@ -1980,8 +2030,8 @@ { int _type = BXOR; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:681:6: ( '^' ) - // Hql.g:681:8: '^' + // Hql.g:693:6: ( '^' ) + // Hql.g:693:8: '^' { Match('^'); if (state.failed) return ; @@ -2003,8 +2053,8 @@ { int _type = BAND; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:682:6: ( '&' ) - // Hql.g:682:8: '&' + // Hql.g:694:6: ( '&' ) + // Hql.g:694:8: '&' { Match('&'); if (state.failed) return ; @@ -2026,8 +2076,8 @@ { int _type = BNOT; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:683:6: ( '!' ) - // Hql.g:683:8: '!' + // Hql.g:695:6: ( '!' ) + // Hql.g:695:8: '!' { Match('!'); if (state.failed) return ; @@ -2049,8 +2099,8 @@ { int _type = COMMA; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:685:6: ( ',' ) - // Hql.g:685:8: ',' + // Hql.g:697:6: ( ',' ) + // Hql.g:697:8: ',' { Match(','); if (state.failed) return ; @@ -2072,8 +2122,8 @@ { int _type = OPEN; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:687:5: ( '(' ) - // Hql.g:687:7: '(' + // Hql.g:699:5: ( '(' ) + // Hql.g:699:7: '(' { Match('('); if (state.failed) return ; @@ -2095,8 +2145,8 @@ { int _type = CLOSE; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:688:6: ( ')' ) - // Hql.g:688:8: ')' + // Hql.g:700:6: ( ')' ) + // Hql.g:700:8: ')' { Match(')'); if (state.failed) return ; @@ -2118,8 +2168,8 @@ { int _type = OPEN_BRACKET; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:689:13: ( '[' ) - // Hql.g:689:15: '[' + // Hql.g:701:13: ( '[' ) + // Hql.g:701:15: '[' { Match('['); if (state.failed) return ; @@ -2141,8 +2191,8 @@ { int _type = CLOSE_BRACKET; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:690:14: ( ']' ) - // Hql.g:690:16: ']' + // Hql.g:702:14: ( ']' ) + // Hql.g:702:16: ']' { Match(']'); if (state.failed) return ; @@ -2164,8 +2214,8 @@ { int _type = CONCAT; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:692:7: ( '||' ) - // Hql.g:692:9: '||' + // Hql.g:704:7: ( '||' ) + // Hql.g:704:9: '||' { Match("||"); if (state.failed) return ; @@ -2188,8 +2238,8 @@ { int _type = PLUS; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:693:5: ( '+' ) - // Hql.g:693:7: '+' + // Hql.g:705:5: ( '+' ) + // Hql.g:705:7: '+' { Match('+'); if (state.failed) return ; @@ -2211,8 +2261,8 @@ { int _type = MINUS; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:694:6: ( '-' ) - // Hql.g:694:8: '-' + // Hql.g:706:6: ( '-' ) + // Hql.g:706:8: '-' { Match('-'); if (state.failed) return ; @@ -2234,8 +2284,8 @@ { int _type = STAR; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:695:5: ( '*' ) - // Hql.g:695:7: '*' + // Hql.g:707:5: ( '*' ) + // Hql.g:707:7: '*' { Match('*'); if (state.failed) return ; @@ -2257,8 +2307,8 @@ { int _type = DIV; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:696:4: ( '/' ) - // Hql.g:696:6: '/' + // Hql.g:708:4: ( '/' ) + // Hql.g:708:6: '/' { Match('/'); if (state.failed) return ; @@ -2280,8 +2330,8 @@ { int _type = COLON; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:697:6: ( ':' ) - // Hql.g:697:8: ':' + // Hql.g:709:6: ( ':' ) + // Hql.g:709:8: ':' { Match(':'); if (state.failed) return ; @@ -2303,8 +2353,8 @@ { int _type = PARAM; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:698:6: ( '?' ) - // Hql.g:698:8: '?' + // Hql.g:710:6: ( '?' ) + // Hql.g:710:8: '?' { Match('?'); if (state.failed) return ; @@ -2326,11 +2376,11 @@ { int _type = IDENT; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:701:2: ( ID_START_LETTER ( ID_LETTER )* ) - // Hql.g:701:4: ID_START_LETTER ( ID_LETTER )* + // Hql.g:713:2: ( ID_START_LETTER ( ID_LETTER )* ) + // Hql.g:713:4: ID_START_LETTER ( ID_LETTER )* { mID_START_LETTER(); if (state.failed) return ; - // Hql.g:701:20: ( ID_LETTER )* + // Hql.g:713:20: ( ID_LETTER )* do { int alt2 = 2; @@ -2345,7 +2395,7 @@ switch (alt2) { case 1 : - // Hql.g:701:22: ID_LETTER + // Hql.g:713:22: ID_LETTER { mID_LETTER(); if (state.failed) return ; @@ -2377,7 +2427,7 @@ { try { - // Hql.g:706:5: ( '_' | '$' | 'a' .. 'z' | 'A' .. 'Z' | '\\u0080' .. '\\ufffe' ) + // Hql.g:718:5: ( '_' | '$' | 'a' .. 'z' | 'A' .. 'Z' | '\\u0080' .. '\\ufffe' ) // Hql.g: { if ( input.LA(1) == '$' || (input.LA(1) >= 'A' && input.LA(1) <= 'Z') || input.LA(1) == '_' || (input.LA(1) >= 'a' && input.LA(1) <= 'z') || (input.LA(1) >= '\u0080' && input.LA(1) <= '\uFFFE') ) @@ -2407,7 +2457,7 @@ { try { - // Hql.g:715:5: ( ID_START_LETTER | '0' .. '9' ) + // Hql.g:727:5: ( ID_START_LETTER | '0' .. '9' ) // Hql.g: { if ( input.LA(1) == '$' || (input.LA(1) >= '0' && input.LA(1) <= '9') || (input.LA(1) >= 'A' && input.LA(1) <= 'Z') || input.LA(1) == '_' || (input.LA(1) >= 'a' && input.LA(1) <= 'z') || (input.LA(1) >= '\u0080' && input.LA(1) <= '\uFFFE') ) @@ -2439,11 +2489,11 @@ { int _type = QUOTED_String; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:720:4: ( '\\'' ( ( ESCqs )=> ESCqs | ~ '\\'' )* '\\'' ) - // Hql.g:720:6: '\\'' ( ( ESCqs )=> ESCqs | ~ '\\'' )* '\\'' + // Hql.g:732:4: ( '\\'' ( ( ESCqs )=> ESCqs | ~ '\\'' )* '\\'' ) + // Hql.g:732:6: '\\'' ( ( ESCqs )=> ESCqs | ~ '\\'' )* '\\'' { Match('\''); if (state.failed) return ; - // Hql.g:720:11: ( ( ESCqs )=> ESCqs | ~ '\\'' )* + // Hql.g:732:11: ( ( ESCqs )=> ESCqs | ~ '\\'' )* do { int alt3 = 3; @@ -2469,14 +2519,14 @@ switch (alt3) { case 1 : - // Hql.g:720:13: ( ESCqs )=> ESCqs + // Hql.g:732:13: ( ESCqs )=> ESCqs { mESCqs(); if (state.failed) return ; } break; case 2 : - // Hql.g:720:31: ~ '\\'' + // Hql.g:732:31: ~ '\\'' { if ( (input.LA(1) >= '\u0000' && input.LA(1) <= '&') || (input.LA(1) >= '(' && input.LA(1) <= '\uFFFF') ) { @@ -2520,8 +2570,8 @@ { try { - // Hql.g:725:2: ( '\\'' '\\'' ) - // Hql.g:726:3: '\\'' '\\'' + // Hql.g:737:2: ( '\\'' '\\'' ) + // Hql.g:738:3: '\\'' '\\'' { Match('\''); if (state.failed) return ; Match('\''); if (state.failed) return ; @@ -2542,10 +2592,10 @@ { int _type = WS; int _channel = DEFAULT_TOKEN_CHANNEL; - // Hql.g:729:5: ( ( ' ' | '\\t' | '\\r' '\\n' | '\\n' | '\\r' ) ) - // Hql.g:729:9: ( ' ' | '\\t' | '\\r' '\\n' | '\\n' | '\\r' ) + // Hql.g:741:5: ( ( ' ' | '\\t' | '\\r' '\\n' | '\\n' | '\\r' ) ) + // Hql.g:741:9: ( ' ' | '\\t' | '\\r' '\\n' | '\\n' | '\\r' ) { - // Hql.g:729:9: ( ' ' | '\\t' | '\\r' '\\n' | '\\n' | '\\r' ) + // Hql.g:741:9: ( ' ' | '\\t' | '\\r' '\\n' | '\\n' | '\\r' ) int alt4 = 5; switch ( input.LA(1) ) { @@ -2588,21 +2638,21 @@ switch (alt4) { case 1 : - // Hql.g:729:13: ' ' + // Hql.g:741:13: ' ' { Match(' '); if (state.failed) return ; } break; case 2 : - // Hql.g:730:7: '\\t' + // Hql.g:742:7: '\\t' { Match('\t'); if (state.failed) return ; } break; case 3 : - // Hql.g:731:7: '\\r' '\\n' + // Hql.g:743:7: '\\r' '\\n' { Match('\r'); if (state.failed) return ; Match('\n'); if (state.failed) return ; @@ -2610,14 +2660,14 @@ } break; case 4 : - // Hql.g:732:7: '\\n' + // Hql.g:744:7: '\\n' { Match('\n'); if (state.failed) return ; } break; case 5 : - // Hql.g:733:7: '\\r' + // Hql.g:745:7: '\\r' { Match('\r'); if (state.failed) return ; @@ -2655,7 +2705,7 @@ IToken f4 = null; bool isDecimal=false; IToken t=null; - // Hql.g:742:2: ( '.' ( ( '0' .. '9' )+ ( EXPONENT )? (f1= FLOAT_SUFFIX )? )? | ( '0' ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? | ( '1' .. '9' ) ( '0' .. '9' )* ) ( ( 'l' ) | {...}? ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? | f4= FLOAT_SUFFIX ) )? ) + // Hql.g:754:2: ( '.' ( ( '0' .. '9' )+ ( EXPONENT )? (f1= FLOAT_SUFFIX )? )? | ( '0' ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? | ( '1' .. '9' ) ( '0' .. '9' )* ) ( ( 'l' ) | {...}? ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? | f4= FLOAT_SUFFIX ) )? ) int alt20 = 2; int LA20_0 = input.LA(1); @@ -2678,14 +2728,14 @@ switch (alt20) { case 1 : - // Hql.g:742:6: '.' ( ( '0' .. '9' )+ ( EXPONENT )? (f1= FLOAT_SUFFIX )? )? + // Hql.g:754:6: '.' ( ( '0' .. '9' )+ ( EXPONENT )? (f1= FLOAT_SUFFIX )? )? { Match('.'); if (state.failed) return ; if ( (state.backtracking==0) ) { _type = DOT; } - // Hql.g:743:4: ( ( '0' .. '9' )+ ( EXPONENT )? (f1= FLOAT_SUFFIX )? )? + // Hql.g:755:4: ( ( '0' .. '9' )+ ( EXPONENT )? (f1= FLOAT_SUFFIX )? )? int alt8 = 2; int LA8_0 = input.LA(1); @@ -2696,9 +2746,9 @@ switch (alt8) { case 1 : - // Hql.g:743:6: ( '0' .. '9' )+ ( EXPONENT )? (f1= FLOAT_SUFFIX )? + // Hql.g:755:6: ( '0' .. '9' )+ ( EXPONENT )? (f1= FLOAT_SUFFIX )? { - // Hql.g:743:6: ( '0' .. '9' )+ + // Hql.g:755:6: ( '0' .. '9' )+ int cnt5 = 0; do { @@ -2714,7 +2764,7 @@ switch (alt5) { case 1 : - // Hql.g:743:7: '0' .. '9' + // Hql.g:755:7: '0' .. '9' { MatchRange('0','9'); if (state.failed) return ; @@ -2734,7 +2784,7 @@ loop5: ; // Stops C# compiler whining that label 'loop5' has no statements - // Hql.g:743:18: ( EXPONENT )? + // Hql.g:755:18: ( EXPONENT )? int alt6 = 2; int LA6_0 = input.LA(1); @@ -2745,7 +2795,7 @@ switch (alt6) { case 1 : - // Hql.g:743:19: EXPONENT + // Hql.g:755:19: EXPONENT { mEXPONENT(); if (state.failed) return ; @@ -2754,7 +2804,7 @@ } - // Hql.g:743:30: (f1= FLOAT_SUFFIX )? + // Hql.g:755:30: (f1= FLOAT_SUFFIX )? int alt7 = 2; int LA7_0 = input.LA(1); @@ -2765,11 +2815,11 @@ switch (alt7) { case 1 : - // Hql.g:743:31: f1= FLOAT_SUFFIX + // Hql.g:755:31: f1= FLOAT_SUFFIX { - int f1Start1018 = CharIndex; + int f1Start1034 = CharIndex; mFLOAT_SUFFIX(); if (state.failed) return ; - f1 = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, f1Start1018, CharIndex-1); + f1 = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, f1Start1034, CharIndex-1); if ( (state.backtracking==0) ) { t=f1; @@ -2807,9 +2857,9 @@ } break; case 2 : - // Hql.g:759:4: ( '0' ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? | ( '1' .. '9' ) ( '0' .. '9' )* ) ( ( 'l' ) | {...}? ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? | f4= FLOAT_SUFFIX ) )? + // Hql.g:771:4: ( '0' ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? | ( '1' .. '9' ) ( '0' .. '9' )* ) ( ( 'l' ) | {...}? ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? | f4= FLOAT_SUFFIX ) )? { - // Hql.g:759:4: ( '0' ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? | ( '1' .. '9' ) ( '0' .. '9' )* ) + // Hql.g:771:4: ( '0' ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? | ( '1' .. '9' ) ( '0' .. '9' )* ) int alt13 = 2; int LA13_0 = input.LA(1); @@ -2832,14 +2882,14 @@ switch (alt13) { case 1 : - // Hql.g:759:6: '0' ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? + // Hql.g:771:6: '0' ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? { Match('0'); if (state.failed) return ; if ( (state.backtracking==0) ) { isDecimal = true; } - // Hql.g:760:4: ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? + // Hql.g:772:4: ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? int alt11 = 3; int LA11_0 = input.LA(1); @@ -2854,16 +2904,16 @@ switch (alt11) { case 1 : - // Hql.g:760:6: ( 'x' ) ( HEX_DIGIT )+ + // Hql.g:772:6: ( 'x' ) ( HEX_DIGIT )+ { - // Hql.g:760:6: ( 'x' ) - // Hql.g:760:7: 'x' + // Hql.g:772:6: ( 'x' ) + // Hql.g:772:7: 'x' { Match('x'); if (state.failed) return ; } - // Hql.g:761:5: ( HEX_DIGIT )+ + // Hql.g:773:5: ( HEX_DIGIT )+ int cnt9 = 0; do { @@ -2929,7 +2979,7 @@ switch (alt9) { case 1 : - // Hql.g:768:7: HEX_DIGIT + // Hql.g:780:7: HEX_DIGIT { mHEX_DIGIT(); if (state.failed) return ; @@ -2953,9 +3003,9 @@ } break; case 2 : - // Hql.g:770:6: ( '0' .. '7' )+ + // Hql.g:782:6: ( '0' .. '7' )+ { - // Hql.g:770:6: ( '0' .. '7' )+ + // Hql.g:782:6: ( '0' .. '7' )+ int cnt10 = 0; do { @@ -2971,7 +3021,7 @@ switch (alt10) { case 1 : - // Hql.g:770:7: '0' .. '7' + // Hql.g:782:7: '0' .. '7' { MatchRange('0','7'); if (state.failed) return ; @@ -3001,16 +3051,16 @@ } break; case 2 : - // Hql.g:772:5: ( '1' .. '9' ) ( '0' .. '9' )* + // Hql.g:784:5: ( '1' .. '9' ) ( '0' .. '9' )* { - // Hql.g:772:5: ( '1' .. '9' ) - // Hql.g:772:6: '1' .. '9' + // Hql.g:784:5: ( '1' .. '9' ) + // Hql.g:784:6: '1' .. '9' { MatchRange('1','9'); if (state.failed) return ; } - // Hql.g:772:16: ( '0' .. '9' )* + // Hql.g:784:16: ( '0' .. '9' )* do { int alt12 = 2; @@ -3025,7 +3075,7 @@ switch (alt12) { case 1 : - // Hql.g:772:17: '0' .. '9' + // Hql.g:784:17: '0' .. '9' { MatchRange('0','9'); if (state.failed) return ; @@ -3050,7 +3100,7 @@ } - // Hql.g:774:3: ( ( 'l' ) | {...}? ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? | f4= FLOAT_SUFFIX ) )? + // Hql.g:786:3: ( ( 'l' ) | {...}? ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? | f4= FLOAT_SUFFIX ) )? int alt19 = 3; int LA19_0 = input.LA(1); @@ -3065,10 +3115,10 @@ switch (alt19) { case 1 : - // Hql.g:774:5: ( 'l' ) + // Hql.g:786:5: ( 'l' ) { - // Hql.g:774:5: ( 'l' ) - // Hql.g:774:6: 'l' + // Hql.g:786:5: ( 'l' ) + // Hql.g:786:6: 'l' { Match('l'); if (state.failed) return ; @@ -3082,14 +3132,14 @@ } break; case 2 : - // Hql.g:777:5: {...}? ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? | f4= FLOAT_SUFFIX ) + // Hql.g:789:5: {...}? ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? | f4= FLOAT_SUFFIX ) { if ( !((isDecimal)) ) { if ( state.backtracking > 0 ) {state.failed = true; return ;} throw new FailedPredicateException(input, "NUM_INT", "isDecimal"); } - // Hql.g:778:4: ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? | f4= FLOAT_SUFFIX ) + // Hql.g:790:4: ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? | f4= FLOAT_SUFFIX ) int alt18 = 3; switch ( input.LA(1) ) { @@ -3121,10 +3171,10 @@ switch (alt18) { case 1 : - // Hql.g:778:8: '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? + // Hql.g:790:8: '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? { Match('.'); if (state.failed) return ; - // Hql.g:778:12: ( '0' .. '9' )* + // Hql.g:790:12: ( '0' .. '9' )* do { int alt14 = 2; @@ -3139,7 +3189,7 @@ switch (alt14) { case 1 : - // Hql.g:778:13: '0' .. '9' + // Hql.g:790:13: '0' .. '9' { MatchRange('0','9'); if (state.failed) return ; @@ -3154,7 +3204,7 @@ loop14: ; // Stops C# compiler whining that label 'loop14' has no statements - // Hql.g:778:24: ( EXPONENT )? + // Hql.g:790:24: ( EXPONENT )? int alt15 = 2; int LA15_0 = input.LA(1); @@ -3165,7 +3215,7 @@ switch (alt15) { case 1 : - // Hql.g:778:25: EXPONENT + // Hql.g:790:25: EXPONENT { mEXPONENT(); if (state.failed) return ; @@ -3174,7 +3224,7 @@ } - // Hql.g:778:36: (f2= FLOAT_SUFFIX )? + // Hql.g:790:36: (f2= FLOAT_SUFFIX )? int alt16 = 2; int LA16_0 = input.LA(1); @@ -3185,11 +3235,11 @@ switch (alt16) { case 1 : - // Hql.g:778:37: f2= FLOAT_SUFFIX + // Hql.g:790:37: f2= FLOAT_SUFFIX { - int f2Start1220 = CharIndex; + int f2Start1236 = CharIndex; mFLOAT_SUFFIX(); if (state.failed) return ; - f2 = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, f2Start1220, CharIndex-1); + f2 = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, f2Start1236, CharIndex-1); if ( (state.backtracking==0) ) { t=f2; @@ -3204,10 +3254,10 @@ } break; case 2 : - // Hql.g:779:8: EXPONENT (f3= FLOAT_SUFFIX )? + // Hql.g:791:8: EXPONENT (f3= FLOAT_SUFFIX )? { mEXPONENT(); if (state.failed) return ; - // Hql.g:779:17: (f3= FLOAT_SUFFIX )? + // Hql.g:791:17: (f3= FLOAT_SUFFIX )? int alt17 = 2; int LA17_0 = input.LA(1); @@ -3218,11 +3268,11 @@ switch (alt17) { case 1 : - // Hql.g:779:18: f3= FLOAT_SUFFIX + // Hql.g:791:18: f3= FLOAT_SUFFIX { - int f3Start1238 = CharIndex; + int f3Start1254 = CharIndex; mFLOAT_SUFFIX(); if (state.failed) return ; - f3 = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, f3Start1238, CharIndex-1); + f3 = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, f3Start1254, CharIndex-1); if ( (state.backtracking==0) ) { t=f3; @@ -3237,11 +3287,11 @@ } break; case 3 : - // Hql.g:780:8: f4= FLOAT_SUFFIX + // Hql.g:792:8: f4= FLOAT_SUFFIX { - int f4Start1253 = CharIndex; + int f4Start1269 = CharIndex; mFLOAT_SUFFIX(); if (state.failed) return ; - f4 = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, f4Start1253, CharIndex-1); + f4 = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, f4Start1269, CharIndex-1); if ( (state.backtracking==0) ) { t=f4; @@ -3294,8 +3344,8 @@ { try { - // Hql.g:802:2: ( ( '0' .. '9' | 'a' .. 'f' ) ) - // Hql.g:802:4: ( '0' .. '9' | 'a' .. 'f' ) + // Hql.g:814:2: ( ( '0' .. '9' | 'a' .. 'f' ) ) + // Hql.g:814:4: ( '0' .. '9' | 'a' .. 'f' ) { if ( (input.LA(1) >= '0' && input.LA(1) <= '9') || (input.LA(1) >= 'a' && input.LA(1) <= 'f') ) { @@ -3324,17 +3374,17 @@ { try { - // Hql.g:808:2: ( ( 'e' ) ( '+' | '-' )? ( '0' .. '9' )+ ) - // Hql.g:808:4: ( 'e' ) ( '+' | '-' )? ( '0' .. '9' )+ + // Hql.g:820:2: ( ( 'e' ) ( '+' | '-' )? ( '0' .. '9' )+ ) + // Hql.g:820:4: ( 'e' ) ( '+' | '-' )? ( '0' .. '9' )+ { - // Hql.g:808:4: ( 'e' ) - // Hql.g:808:5: 'e' + // Hql.g:820:4: ( 'e' ) + // Hql.g:820:5: 'e' { Match('e'); if (state.failed) return ; } - // Hql.g:808:10: ( '+' | '-' )? + // Hql.g:820:10: ( '+' | '-' )? int alt21 = 2; int LA21_0 = input.LA(1); @@ -3365,7 +3415,7 @@ } - // Hql.g:808:21: ( '0' .. '9' )+ + // Hql.g:820:21: ( '0' .. '9' )+ int cnt22 = 0; do { @@ -3381,7 +3431,7 @@ switch (alt22) { case 1 : - // Hql.g:808:22: '0' .. '9' + // Hql.g:820:22: '0' .. '9' { MatchRange('0','9'); if (state.failed) return ; @@ -3416,7 +3466,7 @@ { try { - // Hql.g:813:2: ( 'f' | 'd' | 'm' ) + // Hql.g:825:2: ( 'f' | 'd' | 'm' ) // Hql.g: { if ( input.LA(1) == 'd' || input.LA(1) == 'f' || input.LA(1) == 'm' ) @@ -3443,8 +3493,8 @@ override public void mTokens() // throws RecognitionException { - // Hql.g:1:8: ( ALL | ANY | AND | AS | ASCENDING | AVG | BETWEEN | CLASS | COUNT | DELETE | DESCENDING | 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 | T__131 | T__132 | EQ | LT | GT | SQL_NE | NE | LE | GE | BOR | BXOR | BAND | BNOT | COMMA | OPEN | CLOSE | OPEN_BRACKET | CLOSE_BRACKET | CONCAT | PLUS | MINUS | STAR | DIV | COLON | PARAM | IDENT | QUOTED_String | WS | NUM_INT ) - int alt23 = 93; + // Hql.g:1:8: ( ALL | ANY | AND | AS | ASCENDING | AVG | BETWEEN | CLASS | COUNT | DELETE | DESCENDING | 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 | SKIP | SOME | SUM | TAKE | TRUE | UNION | UPDATE | VERSIONED | WHERE | LITERAL_by | CASE | END | ELSE | THEN | WHEN | ON | WITH | BOTH | EMPTY | LEADING | MEMBER | OBJECT | OF | TRAILING | T__133 | T__134 | EQ | LT | GT | SQL_NE | NE | LE | GE | BOR | BXOR | BAND | BNOT | COMMA | OPEN | CLOSE | OPEN_BRACKET | CLOSE_BRACKET | CONCAT | PLUS | MINUS | STAR | DIV | COLON | PARAM | IDENT | QUOTED_String | WS | NUM_INT ) + int alt23 = 95; alt23 = dfa23.Predict(input); switch (alt23) { @@ -3743,358 +3793,372 @@ } break; case 43 : - // Hql.g:1:255: SOME + // Hql.g:1:255: SKIP { - mSOME(); if (state.failed) return ; + mSKIP(); if (state.failed) return ; } break; case 44 : - // Hql.g:1:260: SUM + // Hql.g:1:260: SOME { - mSUM(); if (state.failed) return ; + mSOME(); if (state.failed) return ; } break; case 45 : - // Hql.g:1:264: TRUE + // Hql.g:1:265: SUM { - mTRUE(); if (state.failed) return ; + mSUM(); if (state.failed) return ; } break; case 46 : - // Hql.g:1:269: UNION + // Hql.g:1:269: TAKE { - mUNION(); if (state.failed) return ; + mTAKE(); if (state.failed) return ; } break; case 47 : - // Hql.g:1:275: UPDATE + // Hql.g:1:274: TRUE { - mUPDATE(); if (state.failed) return ; + mTRUE(); if (state.failed) return ; } break; case 48 : - // Hql.g:1:282: VERSIONED + ... [truncated message content] |