// $ANTLR start "aggregateDistinctAll" // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:585:1: aggregateDistinctAll : ( ( DISTINCT | ALL )? ( path | collectionExpr ) ) ; public HqlParser.aggregateDistinctAll_return aggregateDistinctAll() // throws RecognitionException [1] { HqlParser.aggregateDistinctAll_return retval = new HqlParser.aggregateDistinctAll_return(); retval.Start = input.LT(1); IASTNode root_0 = null; IToken set258 = null; HqlParser.path_return path259 = default(HqlParser.path_return); HqlParser.collectionExpr_return collectionExpr260 = default(HqlParser.collectionExpr_return); IASTNode set258_tree=null; try { // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:586:2: ( ( ( DISTINCT | ALL )? ( path | collectionExpr ) ) ) // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:586:4: ( ( DISTINCT | ALL )? ( path | collectionExpr ) ) { root_0 = (IASTNode)adaptor.GetNilNode(); // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:586:4: ( ( DISTINCT | ALL )? ( path | collectionExpr ) ) // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:586:6: ( DISTINCT | ALL )? ( path | collectionExpr ) { // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:586:6: ( DISTINCT | ALL )? int alt91 = 2; int LA91_0 = input.LA(1); if ( (LA91_0 == ALL || LA91_0 == DISTINCT) ) { alt91 = 1; } switch (alt91) { case 1 : // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g: { set258 = (IToken)input.LT(1); if ( input.LA(1) == ALL || input.LA(1) == DISTINCT ) { input.Consume(); adaptor.AddChild(root_0, (IASTNode)adaptor.Create(set258)); state.errorRecovery = false; } else { MismatchedSetException mse = new MismatchedSetException(null,input); throw mse; } } break; } // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:586:26: ( path | collectionExpr ) int alt92 = 2; int LA92_0 = input.LA(1); if ( (LA92_0 == IDENT) ) { alt92 = 1; } else if ( (LA92_0 == ELEMENTS || LA92_0 == INDICES) ) { alt92 = 2; } else { NoViableAltException nvae_d92s0 = new NoViableAltException("", 92, 0, input); throw nvae_d92s0; } switch (alt92) { case 1 : // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:586:28: path { PushFollow(FOLLOW_path_in_aggregateDistinctAll3143); path259 = path(); state.followingStackPointer--; adaptor.AddChild(root_0, path259.Tree); } break; case 2 : // /Users/Steve/Projects/NHibernate/Branches/2.1.x/nhibernate/src/NHibernate/Hql/Ast/ANTLR/Hql.g:586:35: collectionExpr { PushFollow(FOLLOW_collectionExpr_in_aggregateDistinctAll3147); collectionExpr260 = collectionExpr(); state.followingStackPointer--; adaptor.AddChild(root_0, collectionExpr260.Tree); } break; } } } retval.Stop = input.LT(-1); retval.Tree = (IASTNode)adaptor.RulePostProcessing(root_0); adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop); } catch (RecognitionException re) { ReportError(re); Recover(input,re); // Conversion of the second argument necessary, but harmless retval.Tree = (IASTNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re); } finally { } return retval; }
// $ANTLR start "aggregateDistinctAll" // Hql.g:603:1: aggregateDistinctAll : ( ( DISTINCT | ALL )? ( path | collectionExpr ) ) ; public HqlParser.aggregateDistinctAll_return aggregateDistinctAll() // throws RecognitionException [1] { HqlParser.aggregateDistinctAll_return retval = new HqlParser.aggregateDistinctAll_return(); retval.Start = input.LT(1); IASTNode root_0 = null; IToken set271 = null; HqlParser.path_return path272 = default(HqlParser.path_return); HqlParser.collectionExpr_return collectionExpr273 = default(HqlParser.collectionExpr_return); IASTNode set271_tree=null; try { // Hql.g:604:2: ( ( ( DISTINCT | ALL )? ( path | collectionExpr ) ) ) // Hql.g:604:4: ( ( DISTINCT | ALL )? ( path | collectionExpr ) ) { root_0 = (IASTNode)adaptor.GetNilNode(); // Hql.g:604:4: ( ( DISTINCT | ALL )? ( path | collectionExpr ) ) // Hql.g:604:6: ( DISTINCT | ALL )? ( path | collectionExpr ) { // Hql.g:604:6: ( DISTINCT | ALL )? int alt97 = 2; int LA97_0 = input.LA(1); if ( (LA97_0 == ALL || LA97_0 == DISTINCT) ) { alt97 = 1; } switch (alt97) { case 1 : // Hql.g: { set271 = (IToken)input.LT(1); if ( input.LA(1) == ALL || input.LA(1) == DISTINCT ) { input.Consume(); adaptor.AddChild(root_0, (IASTNode)adaptor.Create(set271)); state.errorRecovery = false; } else { MismatchedSetException mse = new MismatchedSetException(null,input); throw mse; } } break; } // Hql.g:604:26: ( path | collectionExpr ) int alt98 = 2; int LA98_0 = input.LA(1); if ( (LA98_0 == IDENT) ) { alt98 = 1; } else if ( (LA98_0 == ELEMENTS || LA98_0 == INDICES) ) { alt98 = 2; } else { NoViableAltException nvae_d98s0 = new NoViableAltException("", 98, 0, input); throw nvae_d98s0; } switch (alt98) { case 1 : // Hql.g:604:28: path { PushFollow(FOLLOW_path_in_aggregateDistinctAll3242); path272 = path(); state.followingStackPointer--; adaptor.AddChild(root_0, path272.Tree); } break; case 2 : // Hql.g:604:35: collectionExpr { PushFollow(FOLLOW_collectionExpr_in_aggregateDistinctAll3246); collectionExpr273 = collectionExpr(); state.followingStackPointer--; adaptor.AddChild(root_0, collectionExpr273.Tree); } break; } } } retval.Stop = input.LT(-1); retval.Tree = (IASTNode)adaptor.RulePostProcessing(root_0); adaptor.SetTokenBoundaries(retval.Tree, (IToken) retval.Start, (IToken) retval.Stop); } catch (RecognitionException re) { ReportError(re); Recover(input,re); // Conversion of the second argument necessary, but harmless retval.Tree = (IASTNode)adaptor.ErrorNode(input, (IToken) retval.Start, input.LT(-1), re); } finally { } return retval; }