@@ -5587,7 +5587,6 @@ Function Function() #Function:
5587
5587
{
5588
5588
(
5589
5589
"{" <K_FN> function = InternalFunction(true) "}"
5590
- | LOOKAHEAD( SimpleFunction(), { getAsBoolean(Feature.allowComplexParsing) }) function = SimpleFunction()
5591
5590
| LOOKAHEAD(3) function = SpecialStringFunctionWithNamedParameters()
5592
5591
| function = InternalFunction(false)
5593
5592
)
@@ -5623,57 +5622,6 @@ Function SpecialStringFunctionWithNamedParameters() :
5623
5622
}
5624
5623
}
5625
5624
5626
- // a simplified function with only one parameter
5627
- // useful for parsing nested functions fast
5628
- Function SimpleFunction():
5629
- {
5630
- Function function = new Function();
5631
- ObjectNames name;
5632
- Expression expr=null;
5633
- Expression attributeExpression = null;
5634
- Column attributeColumn = null;
5635
- }
5636
- {
5637
- name = RelObjectNames()
5638
- "("
5639
- [
5640
- (
5641
- "*" { expr = new AllColumns(); }
5642
- |
5643
- LOOKAHEAD( AllTableColumns() ) expr=AllTableColumns()
5644
- |
5645
- LOOKAHEAD( 3 ) expr = ParenthesedSelect()
5646
- |
5647
- LOOKAHEAD( SimpleFunction() ) expr = SimpleFunction()
5648
- |
5649
- LOOKAHEAD( RegularCondition() ) expr = RegularCondition()
5650
- |
5651
- LOOKAHEAD( SimpleExpressionList() ) expr = SimpleExpressionList()
5652
- )
5653
- ]
5654
- ")"
5655
- {
5656
- function.setName(name.getNames());
5657
- if (expr!=null) {
5658
- function.setParameters(expr);
5659
- }
5660
- }
5661
-
5662
- [ LOOKAHEAD(2) "." (
5663
- // tricky lookahead since we do need to support the following constructs
5664
- // schema.f1().f2() - Function with Function Column
5665
- // schema.f1().f2.f3 - Function with Attribute Column
5666
- LOOKAHEAD( Function() ) attributeExpression=Function() { function.setAttribute(attributeExpression); }
5667
- |
5668
- attributeColumn=Column() { function.setAttribute(attributeColumn); }
5669
- )
5670
- ]
5671
-
5672
- {
5673
- return function;
5674
- }
5675
- }
5676
-
5677
5625
Function InternalFunction(boolean escaped):
5678
5626
{
5679
5627
Token prefixToken = null;
@@ -5701,6 +5649,10 @@ Function InternalFunction(boolean escaped):
5701
5649
)
5702
5650
]
5703
5651
(
5652
+ "*" { expr = new AllColumns(); expressionList = new ExpressionList(expr); }
5653
+ |
5654
+ LOOKAHEAD( AllTableColumns() ) expr=AllTableColumns() { expressionList = new ExpressionList(expr); }
5655
+ |
5704
5656
LOOKAHEAD(3) expressionList=ExpressionList() [ orderByList = OrderByElements() { retval.setOrderByElements(orderByList); } ]
5705
5657
|
5706
5658
expr = Select() { expressionList = new ExpressionList(expr); }
0 commit comments