From: <fab...@us...> - 2009-04-22 19:10:07
|
Revision: 4197 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4197&view=rev Author: fabiomaulo Date: 2009-04-22 19:09:39 +0000 (Wed, 22 Apr 2009) Log Message: ----------- First approximation to integration with new AST parser Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Hql/Classic/QueryTranslator.cs trunk/nhibernate/src/NHibernate/Loader/Collection/CollectionLoader.cs trunk/nhibernate/src/NHibernate/Loader/Criteria/CriteriaLoader.cs trunk/nhibernate/src/NHibernate/Loader/Custom/CustomLoader.cs trunk/nhibernate/src/NHibernate/Loader/Loader.cs trunk/nhibernate/src/NHibernate/Loader/OuterJoinLoader.cs trunk/nhibernate/src/NHibernate/NHibernate.csproj trunk/nhibernate/src/NHibernate/SqlCommand/JoinFragment.cs trunk/nhibernate/src/NHibernate/Util/ReflectHelper.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/lib/net/2.0/Antlr3.Runtime.dll trunk/nhibernate/lib/net/3.5/Antlr3.Runtime.dll trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/ASTQueryTranslatorFactory.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/CaseInsensitiveStringStream.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/CollectionProperties.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/DetailedSemanticException.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/ErrorCounter.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/HqlLexer.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlParser.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlSqlWalker.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlSqlWalker.g trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlToken.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/IErrorReporter.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/IParseErrorHandler.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/InvalidPathException.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/InvalidWithClauseException.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Loader/QueryLoader.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/AbstractExplicitParameterSpecification.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/AggregatedIndexCollectionSelectorParameterSpecifications.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/CollectionFilterKeyParameterSpecification.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/DynamicFilterParameterSpecification.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/ExplicitParameterSpecification.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/IParameterSpecification.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/NamedParameterSpecification.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/ParameterTranslationsImpl.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Parameters/PositionalParameterSpecification.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/QuerySyntaxException.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/QueryTranslatorImpl.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/SemanticException.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/SessionFactoryHelperExtensions.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/SqlGenerator.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/SqlGenerator.g trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/TODO.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/ASTFactory.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/ASTNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/ASTTreeAdaptor.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/AbstractNullnessCheckNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/AbstractRestrictableStatement.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/AbstractSelectExpression.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/AbstractStatement.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/AggregateNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/BetweenOperatorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/BinaryArithmeticOperatorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/BinaryLogicOperatorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/BooleanLiteralNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/Case2Node.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/CaseNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/CollectionFunction.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/ConstructorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/CountNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/DotNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/FromClause.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/FromElement.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/FromElementFactory.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/FromElementType.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/FromReferenceNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/HqlSqlWalkerNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/HqlSqlWalkerTreeAdapter.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/HqlSqlWalkerTreeNodeStream.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/HqlTreeAdapter.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IASTFactory.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IASTNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IBinaryOperatorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IDisplayableNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IExpectedTypeAwareNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IInitializableNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IOperatorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IParameterContainer.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IPathNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IResolvableNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IRestrictableStatement.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/ISelectExpression.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/ISessionFactoryAwareNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IStatement.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IUnaryOperatorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IdentNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/ImpliedFromElement.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/InLogicOperatorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IndexNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IntoClause.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IsNotNullLogicOperatorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/IsNullLogicOperatorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/JavaConstantNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/LiteralNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/MethodNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/OrderByClause.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/ParameterNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/QueryNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/SelectClause.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/SelectExpressionImpl.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/SelectExpressionList.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/SqlFragment.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/SqlNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/UnaryArithmeticNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Tree/UnaryLogicOperatorNode.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/ASTAppender.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/ASTIterator.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/ASTPrinter.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/ASTUtil.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/AliasGenerator.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/CollectingNodeVisitor.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/ColumnHelper.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/IVisitationStrategy.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/JoinProcessor.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/LiteralProcessor.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/NodeTraverser.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/NullableDictionary.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/PathHelper.cs trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Util/SyntheticAndFactory.cs trunk/nhibernate/src/NHibernate.Test/HQL/Ast/ParsingFixture.cs trunk/nhibernate/src/NHibernate.Test/HQL/Ast/TestQueries.xml trunk/nhibernate/src/NHibernate.Test/HQL/Ast/TestQueriesWithResults.xml Added: trunk/nhibernate/lib/net/2.0/Antlr3.Runtime.dll =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/lib/net/2.0/Antlr3.Runtime.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/nhibernate/lib/net/3.5/Antlr3.Runtime.dll =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/lib/net/3.5/Antlr3.Runtime.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/ASTQueryTranslatorFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/ASTQueryTranslatorFactory.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/ASTQueryTranslatorFactory.cs 2009-04-22 19:09:39 UTC (rev 4197) @@ -0,0 +1,25 @@ +using System.Collections.Generic; +using NHibernate.Engine; + +namespace NHibernate.Hql.Ast.ANTLR +{ + /// <summary> + /// Generates translators which uses the Antlr-based parser to perform + /// the translation. + /// + /// Author: Gavin King + /// Ported by: Steve Strong + /// </summary> + public class ASTQueryTranslatorFactory : IQueryTranslatorFactory + { + public IQueryTranslator CreateQueryTranslator(string queryIdentifier, string queryString, IDictionary<string, IFilter> filters, ISessionFactoryImplementor factory) + { + return new QueryTranslatorImpl(queryIdentifier, queryString, filters, factory); + } + + public IFilterTranslator CreateFilterTranslator(string queryIdentifier, string queryString, IDictionary<string, IFilter> filters, ISessionFactoryImplementor factory) + { + return new QueryTranslatorImpl(queryIdentifier, queryString, filters, factory); + } + } +} Added: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/CaseInsensitiveStringStream.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/CaseInsensitiveStringStream.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/CaseInsensitiveStringStream.cs 2009-04-22 19:09:39 UTC (rev 4197) @@ -0,0 +1,39 @@ +using System; +using Antlr.Runtime; + +namespace NHibernate.Hql.Ast.ANTLR +{ + /// <summary> + /// Look ahead for tokenizing is all lowercase, whereas the original case of an input stream is preserved. + /// Copied from http://www.antlr.org/wiki/pages/viewpage.action?pageId=1782 + ///</summary> + public class CaseInsensitiveStringStream : ANTLRStringStream + { + public CaseInsensitiveStringStream(char[] data, int numberOfActualCharsInArray) : base(data, numberOfActualCharsInArray) { } + + public CaseInsensitiveStringStream() { } + + public CaseInsensitiveStringStream(string input) : base(input) { } + + // Only the lookahead is converted to lowercase. The original case is preserved in the stream. + public override int LA(int i) + { + if (i == 0) + { + return 0; + } + + if (i < 0) + { + i++; + } + + if (((p + i) - 1) >= n) + { + return (int)CharStreamConstants.EOF; + } + + return Char.ToLowerInvariant(data[(p + i) - 1]); // This is how "case insensitive" is defined, i.e., could also use a special culture... + } + } +} Added: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/CollectionProperties.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/CollectionProperties.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/CollectionProperties.cs 2009-04-22 19:09:39 UTC (rev 4197) @@ -0,0 +1,56 @@ +using System.Collections.Generic; +using NHibernate.Persister.Collection; + +namespace NHibernate.Hql.Ast.ANTLR +{ + /// <summary> + /// Provides a map of collection function names to the corresponding property names. + /// Authoer: josh + /// Ported by: Steve Strong + /// </summary> + public static class CollectionProperties + { + + public static Dictionary<string, string> HQL_COLLECTION_PROPERTIES; + + private static readonly string COLLECTION_INDEX_LOWER = CollectionPropertyNames.Index.ToLowerInvariant(); + + static CollectionProperties() + { + HQL_COLLECTION_PROPERTIES = new Dictionary<string, string>(); + HQL_COLLECTION_PROPERTIES.Add(CollectionPropertyNames.Elements.ToLowerInvariant(), CollectionPropertyNames.Elements); + HQL_COLLECTION_PROPERTIES.Add(CollectionPropertyNames.Indices.ToLowerInvariant(), CollectionPropertyNames.Indices); + HQL_COLLECTION_PROPERTIES.Add(CollectionPropertyNames.Size.ToLowerInvariant(), CollectionPropertyNames.Size); + HQL_COLLECTION_PROPERTIES.Add(CollectionPropertyNames.MaxIndex.ToLowerInvariant(), CollectionPropertyNames.MaxIndex); + HQL_COLLECTION_PROPERTIES.Add(CollectionPropertyNames.MinIndex.ToLowerInvariant(), CollectionPropertyNames.MinIndex); + HQL_COLLECTION_PROPERTIES.Add(CollectionPropertyNames.MaxElement.ToLowerInvariant(), CollectionPropertyNames.MaxElement); + HQL_COLLECTION_PROPERTIES.Add(CollectionPropertyNames.MinElement.ToLowerInvariant(), CollectionPropertyNames.MinElement); + HQL_COLLECTION_PROPERTIES.Add(COLLECTION_INDEX_LOWER, CollectionPropertyNames.Index); + } + + public static bool IsCollectionProperty(string name) + { + string key = name.ToLowerInvariant(); + // CollectionPropertyMapping processes everything except 'index'. + if (COLLECTION_INDEX_LOWER == key) + { + return false; + } + else + { + return HQL_COLLECTION_PROPERTIES.ContainsKey(key); + } + } + + public static string GetNormalizedPropertyName(string name) + { + return (string)HQL_COLLECTION_PROPERTIES[name]; + } + + public static bool IsAnyCollectionProperty(string name) + { + string key = name.ToLowerInvariant(); + return HQL_COLLECTION_PROPERTIES.ContainsKey(key); + } + } +} Added: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/DetailedSemanticException.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/DetailedSemanticException.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/DetailedSemanticException.cs 2009-04-22 19:09:39 UTC (rev 4197) @@ -0,0 +1,16 @@ +using System; + +namespace NHibernate.Hql.Ast.ANTLR +{ + public class DetailedSemanticException : SemanticException + { + public DetailedSemanticException(string message) : base(message) + { + } + + public DetailedSemanticException(string message, Exception inner) + : base(message, inner) + { + } + } +} Added: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/ErrorCounter.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/ErrorCounter.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/ErrorCounter.cs 2009-04-22 19:09:39 UTC (rev 4197) @@ -0,0 +1,86 @@ +using System.Collections.Generic; +using System.Text; +using Antlr.Runtime; +using log4net; + +namespace NHibernate.Hql.Ast.ANTLR +{ + /// <summary> + /// An error handler that counts parsing errors and warnings. + /// </summary> + public class ErrorCounter : IParseErrorHandler + { + private static readonly ILog log = LogManager.GetLogger(typeof(ErrorCounter)); + private static readonly ILog hqlLog = LogManager.GetLogger("NHibernate.Hql.Parser"); + + private readonly List<string> _errorList = new List<string>(); + private readonly List<string> _warningList = new List<string>(); + private readonly List<RecognitionException> _recognitionExceptions = new List<RecognitionException>(); + + public void ReportError(RecognitionException e) + { + ReportError( e.ToString() ); + _recognitionExceptions.Add( e ); + if ( log.IsDebugEnabled ) { + log.Debug( e.ToString(), e ); + } + } + + public void ReportError(string message) + { + hqlLog.Error( message ); + _errorList.Add( message ); + } + + public int GetErrorCount() + { + return _errorList.Count; + } + + public void ReportWarning(string message) + { + hqlLog.Debug( message ); + _warningList.Add( message ); + } + + private string GetErrorString() + { + bool first = true; + StringBuilder buf = new StringBuilder(); + foreach (string error in _errorList) + { + buf.Append(error); + + if (!first) buf.Append('\n'); + + first = false; + + } + return buf.ToString(); + } + + public void ThrowQueryException() + { + if ( GetErrorCount() > 0 ) + { + if ( _recognitionExceptions.Count > 0 ) + { + throw QuerySyntaxException.Convert(_recognitionExceptions[0] ); + } + else + { + throw new QueryException( GetErrorString() ); + } + } + else + { + // all clear + if ( log.IsDebugEnabled ) + { + log.Debug( "throwQueryException() : no errors" ); + } + } + } + } + +} Added: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlLexer.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlLexer.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Generated/HqlLexer.cs 2009-04-22 19:09:39 UTC (rev 4197) @@ -0,0 +1,4586 @@ +// $ANTLR 3.1.2 /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g 2009-04-17 11:12:37 + +// 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 System; +using Antlr.Runtime; +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; + +public partial class HqlLexer : Lexer { + public const int EXPR_LIST = 73; + public const int EXISTS = 19; + public const int COMMA = 98; + public const int FETCH = 21; + public const int MINUS = 110; + public const int AS = 7; + public const int END = 56; + public const int INTO = 30; + public const int FALSE = 20; + public const int ELEMENTS = 17; + public const int THEN = 58; + public const int ALIAS = 70; + public const int ON = 60; + public const int DOT = 15; + public const int ORDER = 41; + public const int AND = 6; + public const int CONSTANT = 92; + public const int UNARY_MINUS = 88; + public const int METHOD_CALL = 79; + public const int RIGHT = 44; + public const int CONCAT = 108; + public const int PROPERTIES = 43; + public const int SELECT = 45; + public const int LE = 106; + public const int BETWEEN = 10; + public const int NUM_INT = 93; + public const int BOTH = 62; + public const int PLUS = 109; + public const int VERSIONED = 52; + public const int MEMBER = 65; + public const int UNION = 50; + public const int DISTINCT = 16; + public const int RANGE = 85; + public const int FILTER_ENTITY = 74; + public const int IDENT = 118; + public const int WHEN = 59; + public const int DESCENDING = 14; + public const int WS = 122; + public const int NEW = 37; + public const int EQ = 99; + public const int LT = 104; + public const int ESCqs = 121; + public const int OF = 67; + public const int UPDATE = 51; + public const int SELECT_FROM = 87; + public const int LITERAL_by = 54; + public const int FLOAT_SUFFIX = 124; + public const int ANY = 5; + public const int UNARY_PLUS = 89; + public const int NUM_FLOAT = 95; + public const int GE = 107; + public const int CASE = 55; + public const int OPEN_BRACKET = 113; + public const int ELSE = 57; + public const int OPEN = 100; + public const int COUNT = 12; + public const int NULL = 39; + public const int COLON = 115; + public const int DIV = 112; + public const int HAVING = 25; + public const int ALL = 4; + public const int SET = 46; + public const int INSERT = 29; + public const int TRUE = 49; + public const int CASE2 = 72; + public const int IS_NOT_NULL = 77; + public const int WHERE = 53; + public const int AGGREGATE = 69; + public const int VECTOR_EXPR = 90; + public const int LEADING = 64; + public const int CLOSE_BRACKET = 114; + public const int NUM_DOUBLE = 94; + public const int T__126 = 126; + public const int INNER = 28; + public const int QUERY = 84; + public const int ORDER_ELEMENT = 83; + public const int OR = 40; + public const int FULL = 23; + public const int INDICES = 27; + public const int IS_NULL = 78; + public const int GROUP = 24; + public const int ESCAPE = 18; + public const int T__127 = 127; + public const int PARAM = 116; + public const int ID_LETTER = 120; + public const int INDEX_OP = 76; + public const int HEX_DIGIT = 125; + public const int LEFT = 33; + public const int TRAILING = 68; + public const int JOIN = 32; + public const int NOT_BETWEEN = 80; + public const int SUM = 48; + public const int ROW_STAR = 86; + public const int OUTER = 42; + public const int NOT_IN = 81; + public const int FROM = 22; + public const int DELETE = 13; + public const int OBJECT = 66; + public const int MAX = 35; + public const int NOT_LIKE = 82; + public const int EMPTY = 63; + public const int QUOTED_String = 117; + public const int ASCENDING = 8; + public const int NUM_LONG = 96; + public const int IS = 31; + public const int SQL_NE = 103; + public const int IN_LIST = 75; + public const int WEIRD_IDENT = 91; + public const int NE = 102; + public const int GT = 105; + public const int MIN = 36; + public const int LIKE = 34; + public const int WITH = 61; + public const int IN = 26; + public const int CONSTRUCTOR = 71; + public const int SOME = 47; + public const int CLASS = 11; + public const int EXPONENT = 123; + public const int ID_START_LETTER = 119; + public const int EOF = -1; + public const int CLOSE = 101; + public const int AVG = 9; + public const int STAR = 111; + public const int NOT = 38; + public const int JAVA_CONSTANT = 97; + + // delegates + // delegators + + public HqlLexer() + { + InitializeCyclicDFAs(); + } + public HqlLexer(ICharStream input) + : this(input, null) { + } + public HqlLexer(ICharStream input, RecognizerSharedState state) + : base(input, state) { + InitializeCyclicDFAs(); + + } + + override public string GrammarFileName + { + get { return "/Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g";} + } + + // $ANTLR start "ALL" + public void mALL() // throws RecognitionException [2] + { + try + { + int _type = ALL; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:9:5: ( 'all' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:9:7: 'all' + { + Match("all"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "ALL" + + // $ANTLR start "ANY" + public void mANY() // throws RecognitionException [2] + { + try + { + int _type = ANY; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:10:5: ( 'any' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:10:7: 'any' + { + Match("any"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "ANY" + + // $ANTLR start "AND" + public void mAND() // throws RecognitionException [2] + { + try + { + int _type = AND; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:11:5: ( 'and' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:11:7: 'and' + { + Match("and"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "AND" + + // $ANTLR start "AS" + public void mAS() // throws RecognitionException [2] + { + try + { + int _type = AS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:12:4: ( 'as' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:12:6: 'as' + { + Match("as"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "AS" + + // $ANTLR start "ASCENDING" + public void mASCENDING() // throws RecognitionException [2] + { + try + { + int _type = ASCENDING; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:13:11: ( 'asc' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:13:13: 'asc' + { + Match("asc"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "ASCENDING" + + // $ANTLR start "AVG" + public void mAVG() // throws RecognitionException [2] + { + try + { + int _type = AVG; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:14:5: ( 'avg' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:14:7: 'avg' + { + Match("avg"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "AVG" + + // $ANTLR start "BETWEEN" + public void mBETWEEN() // throws RecognitionException [2] + { + try + { + int _type = BETWEEN; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:15:9: ( 'between' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:15:11: 'between' + { + Match("between"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "BETWEEN" + + // $ANTLR start "CLASS" + public void mCLASS() // throws RecognitionException [2] + { + try + { + int _type = CLASS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:16:7: ( 'class' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:16:9: 'class' + { + Match("class"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "CLASS" + + // $ANTLR start "COUNT" + public void mCOUNT() // throws RecognitionException [2] + { + try + { + int _type = COUNT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:17:7: ( 'count' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:17:9: 'count' + { + Match("count"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "COUNT" + + // $ANTLR start "DELETE" + public void mDELETE() // throws RecognitionException [2] + { + try + { + int _type = DELETE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:18:8: ( 'delete' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:18:10: 'delete' + { + Match("delete"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "DELETE" + + // $ANTLR start "DESCENDING" + public void mDESCENDING() // throws RecognitionException [2] + { + try + { + int _type = DESCENDING; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:19:12: ( 'desc' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:19:14: 'desc' + { + Match("desc"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "DESCENDING" + + // $ANTLR start "DISTINCT" + public void mDISTINCT() // throws RecognitionException [2] + { + try + { + int _type = DISTINCT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:20:10: ( 'distinct' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:20:12: 'distinct' + { + Match("distinct"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "DISTINCT" + + // $ANTLR start "ELEMENTS" + public void mELEMENTS() // throws RecognitionException [2] + { + try + { + int _type = ELEMENTS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:21:10: ( 'elements' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:21:12: 'elements' + { + Match("elements"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "ELEMENTS" + + // $ANTLR start "ESCAPE" + public void mESCAPE() // throws RecognitionException [2] + { + try + { + int _type = ESCAPE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:22:8: ( 'escape' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:22:10: 'escape' + { + Match("escape"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "ESCAPE" + + // $ANTLR start "EXISTS" + public void mEXISTS() // throws RecognitionException [2] + { + try + { + int _type = EXISTS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:23:8: ( 'exists' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:23:10: 'exists' + { + Match("exists"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "EXISTS" + + // $ANTLR start "FALSE" + public void mFALSE() // throws RecognitionException [2] + { + try + { + int _type = FALSE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:24:7: ( 'false' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:24:9: 'false' + { + Match("false"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "FALSE" + + // $ANTLR start "FETCH" + public void mFETCH() // throws RecognitionException [2] + { + try + { + int _type = FETCH; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:25:7: ( 'fetch' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:25:9: 'fetch' + { + Match("fetch"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "FETCH" + + // $ANTLR start "FROM" + public void mFROM() // throws RecognitionException [2] + { + try + { + int _type = FROM; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:26:6: ( 'from' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:26:8: 'from' + { + Match("from"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "FROM" + + // $ANTLR start "FULL" + public void mFULL() // throws RecognitionException [2] + { + try + { + int _type = FULL; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:27:6: ( 'full' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:27:8: 'full' + { + Match("full"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "FULL" + + // $ANTLR start "GROUP" + public void mGROUP() // throws RecognitionException [2] + { + try + { + int _type = GROUP; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:28:7: ( 'group' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:28:9: 'group' + { + Match("group"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "GROUP" + + // $ANTLR start "HAVING" + public void mHAVING() // throws RecognitionException [2] + { + try + { + int _type = HAVING; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:29:8: ( 'having' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:29:10: 'having' + { + Match("having"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "HAVING" + + // $ANTLR start "IN" + public void mIN() // throws RecognitionException [2] + { + try + { + int _type = IN; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:30:4: ( 'in' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:30:6: 'in' + { + Match("in"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "IN" + + // $ANTLR start "INDICES" + public void mINDICES() // throws RecognitionException [2] + { + try + { + int _type = INDICES; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:31:9: ( 'indices' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:31:11: 'indices' + { + Match("indices"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "INDICES" + + // $ANTLR start "INNER" + public void mINNER() // throws RecognitionException [2] + { + try + { + int _type = INNER; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:32:7: ( 'inner' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:32:9: 'inner' + { + Match("inner"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "INNER" + + // $ANTLR start "INSERT" + public void mINSERT() // throws RecognitionException [2] + { + try + { + int _type = INSERT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:33:8: ( 'insert' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:33:10: 'insert' + { + Match("insert"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "INSERT" + + // $ANTLR start "INTO" + public void mINTO() // throws RecognitionException [2] + { + try + { + int _type = INTO; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:34:6: ( 'into' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:34:8: 'into' + { + Match("into"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "INTO" + + // $ANTLR start "IS" + public void mIS() // throws RecognitionException [2] + { + try + { + int _type = IS; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:35:4: ( 'is' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:35:6: 'is' + { + Match("is"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "IS" + + // $ANTLR start "JOIN" + public void mJOIN() // throws RecognitionException [2] + { + try + { + int _type = JOIN; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:36:6: ( 'join' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:36:8: 'join' + { + Match("join"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "JOIN" + + // $ANTLR start "LEFT" + public void mLEFT() // throws RecognitionException [2] + { + try + { + int _type = LEFT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:37:6: ( 'left' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:37:8: 'left' + { + Match("left"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "LEFT" + + // $ANTLR start "LIKE" + public void mLIKE() // throws RecognitionException [2] + { + try + { + int _type = LIKE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:38:6: ( 'like' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:38:8: 'like' + { + Match("like"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "LIKE" + + // $ANTLR start "MAX" + public void mMAX() // throws RecognitionException [2] + { + try + { + int _type = MAX; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:39:5: ( 'max' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:39:7: 'max' + { + Match("max"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "MAX" + + // $ANTLR start "MIN" + public void mMIN() // throws RecognitionException [2] + { + try + { + int _type = MIN; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:40:5: ( 'min' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:40:7: 'min' + { + Match("min"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "MIN" + + // $ANTLR start "NEW" + public void mNEW() // throws RecognitionException [2] + { + try + { + int _type = NEW; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:41:5: ( 'new' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:41:7: 'new' + { + Match("new"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "NEW" + + // $ANTLR start "NOT" + public void mNOT() // throws RecognitionException [2] + { + try + { + int _type = NOT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:42:5: ( 'not' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:42:7: 'not' + { + Match("not"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "NOT" + + // $ANTLR start "NULL" + public void mNULL() // throws RecognitionException [2] + { + try + { + int _type = NULL; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:43:6: ( 'null' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:43:8: 'null' + { + Match("null"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "NULL" + + // $ANTLR start "OR" + public void mOR() // throws RecognitionException [2] + { + try + { + int _type = OR; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:44:4: ( 'or' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:44:6: 'or' + { + Match("or"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "OR" + + // $ANTLR start "ORDER" + public void mORDER() // throws RecognitionException [2] + { + try + { + int _type = ORDER; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:45:7: ( 'order' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:45:9: 'order' + { + Match("order"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "ORDER" + + // $ANTLR start "OUTER" + public void mOUTER() // throws RecognitionException [2] + { + try + { + int _type = OUTER; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:46:7: ( 'outer' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:46:9: 'outer' + { + Match("outer"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "OUTER" + + // $ANTLR start "PROPERTIES" + public void mPROPERTIES() // throws RecognitionException [2] + { + try + { + int _type = PROPERTIES; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:47:12: ( 'properties' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:47:14: 'properties' + { + Match("properties"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "PROPERTIES" + + // $ANTLR start "RIGHT" + public void mRIGHT() // throws RecognitionException [2] + { + try + { + int _type = RIGHT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:48:7: ( 'right' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:48:9: 'right' + { + Match("right"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "RIGHT" + + // $ANTLR start "SELECT" + public void mSELECT() // throws RecognitionException [2] + { + try + { + int _type = SELECT; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:49:8: ( 'select' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:49:10: 'select' + { + Match("select"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "SELECT" + + // $ANTLR start "SET" + public void mSET() // throws RecognitionException [2] + { + try + { + int _type = SET; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:50:5: ( 'set' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:50:7: 'set' + { + Match("set"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "SET" + + // $ANTLR start "SOME" + public void mSOME() // throws RecognitionException [2] + { + try + { + int _type = SOME; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:51:6: ( 'some' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:51:8: 'some' + { + Match("some"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "SOME" + + // $ANTLR start "SUM" + public void mSUM() // throws RecognitionException [2] + { + try + { + int _type = SUM; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:52:5: ( 'sum' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:52:7: 'sum' + { + Match("sum"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "SUM" + + // $ANTLR start "TRUE" + public void mTRUE() // throws RecognitionException [2] + { + try + { + int _type = TRUE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:53:6: ( 'true' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:53:8: 'true' + { + Match("true"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "TRUE" + + // $ANTLR start "UNION" + public void mUNION() // throws RecognitionException [2] + { + try + { + int _type = UNION; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:54:7: ( 'union' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:54:9: 'union' + { + Match("union"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "UNION" + + // $ANTLR start "UPDATE" + public void mUPDATE() // throws RecognitionException [2] + { + try + { + int _type = UPDATE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:55:8: ( 'update' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:55:10: 'update' + { + Match("update"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "UPDATE" + + // $ANTLR start "VERSIONED" + public void mVERSIONED() // throws RecognitionException [2] + { + try + { + int _type = VERSIONED; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:56:11: ( 'versioned' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:56:13: 'versioned' + { + Match("versioned"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "VERSIONED" + + // $ANTLR start "WHERE" + public void mWHERE() // throws RecognitionException [2] + { + try + { + int _type = WHERE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:57:7: ( 'where' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:57:9: 'where' + { + Match("where"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "WHERE" + + // $ANTLR start "LITERAL_by" + public void mLITERAL_by() // throws RecognitionException [2] + { + try + { + int _type = LITERAL_by; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:58:12: ( 'by' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:58:14: 'by' + { + Match("by"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "LITERAL_by" + + // $ANTLR start "CASE" + public void mCASE() // throws RecognitionException [2] + { + try + { + int _type = CASE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:59:6: ( 'case' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:59:8: 'case' + { + Match("case"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "CASE" + + // $ANTLR start "END" + public void mEND() // throws RecognitionException [2] + { + try + { + int _type = END; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:60:5: ( 'end' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:60:7: 'end' + { + Match("end"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "END" + + // $ANTLR start "ELSE" + public void mELSE() // throws RecognitionException [2] + { + try + { + int _type = ELSE; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:61:6: ( 'else' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:61:8: 'else' + { + Match("else"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "ELSE" + + // $ANTLR start "THEN" + public void mTHEN() // throws RecognitionException [2] + { + try + { + int _type = THEN; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:62:6: ( 'then' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:62:8: 'then' + { + Match("then"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "THEN" + + // $ANTLR start "WHEN" + public void mWHEN() // throws RecognitionException [2] + { + try + { + int _type = WHEN; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:63:6: ( 'when' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:63:8: 'when' + { + Match("when"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "WHEN" + + // $ANTLR start "ON" + public void mON() // throws RecognitionException [2] + { + try + { + int _type = ON; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:64:4: ( 'on' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:64:6: 'on' + { + Match("on"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "ON" + + // $ANTLR start "WITH" + public void mWITH() // throws RecognitionException [2] + { + try + { + int _type = WITH; + int _channel = DEFAULT_TOKEN_CHANNEL; + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:65:6: ( 'with' ) + // /Users/Steve/Projects/uNhAddins/Trunk/ANTLR-HQL/ANTLR-HQL/Hql.g:65:8: 'with' + { + Match("with"); if (state.failed) return ; + + + } + + state.type = _type; + state.channel = _channel; + } + finally + { + } + } + // $ANTLR end "WITH" + + // $ANTLR start "BOTH" + public void mBOTH() // throws RecognitionException [2] ... [truncated message content] |