diff options
author | Jon Bratseth <bratseth@gmail.com> | 2022-04-25 18:32:59 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2022-04-25 18:32:59 +0200 |
commit | 70b52e53733914702e38f82cb0308e8024fbacef (patch) | |
tree | 134f8f319ca94908c577d04dd979f180b22c9245 /integration/intellij | |
parent | 2d2a7d4a0bd306c7f9056fe80514af2e3a7d2661 (diff) |
Faster lambda parsing
Diffstat (limited to 'integration/intellij')
-rw-r--r-- | integration/intellij/build.gradle | 2 | ||||
-rw-r--r-- | integration/intellij/pom.xml | 2 | ||||
-rw-r--r-- | integration/intellij/src/main/bnf/ai/vespa/intellij/schema/parser/sd.bnf | 8 |
3 files changed, 7 insertions, 5 deletions
diff --git a/integration/intellij/build.gradle b/integration/intellij/build.gradle index 6bc385a983c..1c2dae46d87 100644 --- a/integration/intellij/build.gradle +++ b/integration/intellij/build.gradle @@ -36,7 +36,7 @@ compileJava { } group 'ai.vespa' -version '1.1.4' // Also update pom.xml version if this is changed +version '1.1.5' // Also update pom.xml version if this is changed sourceCompatibility = 11 diff --git a/integration/intellij/pom.xml b/integration/intellij/pom.xml index 07488ed3d93..1c973b84d37 100644 --- a/integration/intellij/pom.xml +++ b/integration/intellij/pom.xml @@ -9,7 +9,7 @@ <relativePath>../parent/pom.xml</relativePath> </parent> <artifactId>vespa-intellij</artifactId> <!-- Not used - plugin is build by gradle --> - <version>1.1.4</version> <!-- See copy-zip below, which depends on this being the same as the v. in build.gradle --> + <version>1.1.5</version> <!-- See copy-zip below, which depends on this being the same as the v. in build.gradle --> <description> Maven wrapper for the gradle build of this IntelliJ plugin. </description> diff --git a/integration/intellij/src/main/bnf/ai/vespa/intellij/schema/parser/sd.bnf b/integration/intellij/src/main/bnf/ai/vespa/intellij/schema/parser/sd.bnf index cb4bc024c86..b0e0e5e61dc 100644 --- a/integration/intellij/src/main/bnf/ai/vespa/intellij/schema/parser/sd.bnf +++ b/integration/intellij/src/main/bnf/ai/vespa/intellij/schema/parser/sd.bnf @@ -111,7 +111,7 @@ AnnotationFieldDefinition ::= field IdentifierVal type FieldTypeName '{' '}' // The *Expr alternatives are consumed greedily so order matters. //------------------------- RankingExpression ::= LiteralTensorExpr | FilePathExpr | ParenthesisedExpr | BooleanExpr | ArithmeticExpr | IfFunctionExpr | - QueryDefinitionExpr | FunctionCallExpr | InListRankingExpr | PrimitiveExpr | SliceExpr | LambdaExpr + QueryDefinitionExpr | FunctionCallOrLambdaExpr | InListRankingExpr | PrimitiveExpr | SliceExpr FilePathExpr ::= file ':' (FilePath | WordWrapper) @@ -129,7 +129,9 @@ ArithmeticOperator ::= '+' | '-' | '*' | '/' | '%' | '^' | "||" | "&&" QueryDefinitionExpr ::= QueryDefinition | ItemRawScoreDefinition -FunctionCallExpr ::= IdentifierWithDashVal '(' RankingExpression (COMMA RankingExpression)* ')' ('.' IdentifierWithDashVal)? +// Rough parsing but hard to do better due to greediness: If this is a lambda arg expressions must be identifiers +FunctionCallOrLambdaExpr ::= IdentifierWithDashVal '(' RankingExpression (COMMA RankingExpression)* ')' ('.' IdentifierWithDashVal)? + ParenthesisedExpr? // This turns the function call into a lambda ParenthesisedExpr ::= '(' RankingExpression ')' @@ -152,7 +154,7 @@ TensorValue ::= CellAddress ':' RankingExpression CellAddress ::= Label | FullTensorAddress -LambdaExp ::= FunctionCallExpr ParenthesisedExpr +LambdaExpr ::= IdentifierWithDashVal '(' IdentifierVal (COMMA IdentifierVal)* ')' ParenthesisedExpr //------------------------- //-- Rank Profile rules --- |