summaryrefslogtreecommitdiffstats
path: root/integration
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2022-05-28 12:56:13 +0200
committerJon Bratseth <bratseth@gmail.com>2022-05-28 12:56:13 +0200
commitb6488bc8a9f72c7ddfc1b83b7a7290c56e42b8e0 (patch)
treee71bdab77bfaafc121608b0b2cb354c89aecafe1 /integration
parentbbbaa8122275d8b7628105cd18593563dff8ff87 (diff)
Grammar fixes
Diffstat (limited to 'integration')
-rw-r--r--integration/intellij/src/main/bnf/ai/vespa/intellij/schema/parser/sd.bnf10
-rw-r--r--integration/intellij/src/main/java/ai/vespa/intellij/schema/SdSyntaxHighlighter.java3
-rw-r--r--integration/intellij/src/main/jflex/ai/vespa/intellij/schema/lexer/sd.flex3
3 files changed, 9 insertions, 7 deletions
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 88925e0ee5e..972a8262347 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
@@ -241,7 +241,7 @@ InnerConstantDefinition ::= ( ("constant" '(' IdentifierVal ')') | IdentifierVal
(':')? ( TensorType | "double" )?
(':')? ( TensorValue | FLOAT_REG | INTEGER_REG | (file ':' FilePath) | (uri ':' UriPath))
-RankFeature ::= IdentifierVal (Arguments)? ( '.' IdentifierVal )?
+RankFeature ::= IdentifierVal (Arguments)? ( '.' IdentifierVal )*
{ mixin="ai.vespa.intellij.schema.psi.impl.SdNamedElementImpl"
implements=["ai.vespa.intellij.schema.psi.SdDeclaration" "ai.vespa.intellij.schema.psi.SdNamedElement"]
}
@@ -315,7 +315,7 @@ private IndexingStuff ::= WordWrapper | INTEGER_REG | FLOAT_REG | STRING_REG | (
':' | ('|' IndexingStatementOptions) | ';' | '.' | '(' | ')' | ArithmeticOperator | ComparisonOperator
// Attribute
AttributeDefinition ::= attribute ((':' SimpleAttributeProperty) | ('{' (ComplexAttributeProperty | SimpleAttributeProperty)+ '}'))
-SimpleAttributeProperty ::= fast-search | fast-access | paged | mutable | enable-bit-vectors | enable-only-bit-vector | WordWrapper // Does not support zero-or-one occurrences
+SimpleAttributeProperty ::= fast-search | fast-rank | fast-access | paged | mutable | enable-bit-vectors | enable-only-bit-vector | WordWrapper // Does not support zero-or-one occurrences
ComplexAttributeProperty ::= AliasDefinition | SortingDefinition | DistanceMetricDef // Does not support zero-or-one occurrences
DistanceMetricDef ::= distance-metric ':' IdentifierWithDashVal
// Alias
@@ -328,7 +328,7 @@ RankingSetting ::= filter | normal | literal | WordWrapper
// Indexing Rewrite
IndexingRewriteState ::= indexing-rewrite ':' none
// Query Command
-QueryCommandDefinition ::= query-command ':' (DottedIdentifier | STRING_REG | WordWrapper)
+QueryCommandDefinition ::= query-command ':' (IdentifierWithDashVal | STRING_REG | WordWrapper)
// Summary
SummaryDefinition ::= summary IdentifierWithDashVal? (type FieldTypeName)? ((':' SummaryBodyOptions) | ( '{' SummaryBody '}'))
{ mixin="ai.vespa.intellij.schema.psi.impl.SdSummaryDefinitionMixin" }
@@ -394,10 +394,10 @@ KeywordOrIdentifier ::= schema | search | document | struct | field | type | ind
// Note- in this form, those keywords can't be use as identifier-with-dash!
KeywordNotIdentifier ::= struct-field | document-summary | omit-summary-features | from-disk | rank-profile | rank-type |
num-threads-per-search | termwise-limit | ignore-default-rank-features | min-hits-per-thread |
- num-search-partition | match-phase | max-hits | second-phase | rerank-count | min-groups |
+ num-search-partitions | match-phase | max-hits | second-phase | rerank-count | min-groups |
first-phase | keep-rank-count | rank-score-drop-limit | rank-properties | summary-features |
match-features | rank-features |
- exact-terminator | max-length | gram-size | fast-search | fast-access | distance-metric |
+ exact-terminator | max-length | gram-size | fast-search | fast-rank | fast-access | distance-metric |
indexing-rewrite | query-command | matched-elements-only | lower-bound | upper-bound |
dense-posting-list-threshold | enable-bm25 | max-links-per-node | neighbors-to-explore-at-insert |
multi-threaded-indexing | create-if-nonexistent | remove-if-zero | raw-as-base64-in-summary |
diff --git a/integration/intellij/src/main/java/ai/vespa/intellij/schema/SdSyntaxHighlighter.java b/integration/intellij/src/main/java/ai/vespa/intellij/schema/SdSyntaxHighlighter.java
index de0d58c63a0..35e26451672 100644
--- a/integration/intellij/src/main/java/ai/vespa/intellij/schema/SdSyntaxHighlighter.java
+++ b/integration/intellij/src/main/java/ai/vespa/intellij/schema/SdSyntaxHighlighter.java
@@ -153,7 +153,7 @@ public class SdSyntaxHighlighter extends SyntaxHighlighterBase {
constants.add(SdTypes.NUM_THREADS_PER_SEARCH);
constants.add(SdTypes.TERMWISE_LIMIT);
constants.add(SdTypes.MIN_HITS_PER_THREAD);
- constants.add(SdTypes.NUM_SEARCH_PARTITION);
+ constants.add(SdTypes.NUM_SEARCH_PARTITIONS);
constants.add(SdTypes.KEEP_RANK_COUNT);
constants.add(SdTypes.RANK_SCORE_DROP_LIMIT);
constants.add(SdTypes.RERANK_COUNT);
@@ -174,6 +174,7 @@ public class SdSyntaxHighlighter extends SyntaxHighlighterBase {
constants.add(SdTypes.SET_LANGUAGE);
constants.add(SdTypes.LOWERCASE);
constants.add(SdTypes.FAST_SEARCH);
+ constants.add(SdTypes.FAST_RANK);
constants.add(SdTypes.FAST_ACCESS);
constants.add(SdTypes.PAGED);
constants.add(SdTypes.MUTABLE);
diff --git a/integration/intellij/src/main/jflex/ai/vespa/intellij/schema/lexer/sd.flex b/integration/intellij/src/main/jflex/ai/vespa/intellij/schema/lexer/sd.flex
index e73b3e1b643..84dcbfe1d44 100644
--- a/integration/intellij/src/main/jflex/ai/vespa/intellij/schema/lexer/sd.flex
+++ b/integration/intellij/src/main/jflex/ai/vespa/intellij/schema/lexer/sd.flex
@@ -93,6 +93,7 @@ WORD = \w+
"gram-size" { return GRAM_SIZE; }
"fast-search" { return FAST_SEARCH; }
+ "fast-rank" { return FAST_RANK; }
"fast-access" { return FAST_ACCESS; }
"alias" { return ALIAS; }
"sorting" { return SORTING; }
@@ -158,7 +159,7 @@ WORD = \w+
"termwise-limit" { return TERMWISE_LIMIT; }
"ignore-default-rank-features" { return IGNORE_DEFAULT_RANK_FEATURES; }
"min-hits-per-thread" { return MIN_HITS_PER_THREAD; }
- "num-search-partition" { return NUM_SEARCH_PARTITION; }
+ "num-search-partitions" { return NUM_SEARCH_PARTITIONS; }
"constants" { return CONSTANTS; }
"second-phase" { return SECOND_PHASE; }
"rerank-count" { return RERANK_COUNT; }