Author: porcelli
Date: 2009-04-22 14:40:40 -0400 (Wed, 22 Apr 2009)
New Revision: 16404
Modified:
core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/phase/hql/parse/HQL.g
Log:
improvements on parsing using semantic predicates (avoid Java heap space message)
Modified:
core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/phase/hql/parse/HQL.g
===================================================================
---
core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/phase/hql/parse/HQL.g 2009-04-22
17:46:26 UTC (rev 16403)
+++
core/branches/antlr3/src/main/antlr3/org/hibernate/sql/ast/phase/hql/parse/HQL.g 2009-04-22
18:40:40 UTC (rev 16404)
@@ -814,8 +814,8 @@
inList
: collectionExpression
-> ^(IN_LIST collectionExpression)
- | LEFT_PAREN ( expression (COMMA expression)* | subQuery ) RIGHT_PAREN
- -> ^(IN_LIST expression* subQuery?)
+ | LEFT_PAREN (
{((validateIdentifierKey("select")|validateIdentifierKey("from")))}?=>
subQuery | concatenation (COMMA concatenation)* ) RIGHT_PAREN
+ -> ^(IN_LIST concatenation* subQuery?)
;
betweenList
@@ -1090,7 +1090,7 @@
| constant
| parameterSpecification { if (enableParameterUsage.peek().equals(Boolean.FALSE)) throw
new RecognitionException( ); }
//validate using Scopes if it is enabled or not to use parameterSpecification.. if not
generate an exception
- | LEFT_PAREN! (expressionOrVector | subQuery) RIGHT_PAREN!
+ | LEFT_PAREN!
({((validateIdentifierKey("select")|validateIdentifierKey("from")))}?=>
subQuery|expressionOrVector) RIGHT_PAREN!
;
parameterSpecification
Show replies by date