summaryrefslogtreecommitdiffstats
path: root/integration
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2022-05-30 12:25:04 +0200
committerJon Bratseth <bratseth@gmail.com>2022-05-30 12:25:04 +0200
commitce25459c89b83e093b581cbd4564f88060352982 (patch)
treef2e1390e89dbc5ddaa9ec11091a3d2a5609eb7a2 /integration
parent26ef377d00cd8d1229996423e4e3ef34679e7ca5 (diff)
Grammar fixes
Diffstat (limited to 'integration')
-rw-r--r--integration/intellij/src/main/bnf/ai/vespa/intellij/schema/parser/sd.bnf2
-rw-r--r--integration/intellij/src/test/applications/rankprofilemodularity/test.sd1
-rw-r--r--integration/intellij/src/test/applications/rankprofilemodularity/test/outside_schema1.profile1
-rw-r--r--integration/intellij/src/test/applications/rankprofilemodularity/test/outside_schema2.profile1
-rw-r--r--integration/intellij/src/test/applications/schemainheritance/child.sd1
-rw-r--r--integration/intellij/src/test/applications/schemainheritance/importedschema.sd1
-rw-r--r--integration/intellij/src/test/applications/schemainheritance/parent.sd1
-rw-r--r--integration/intellij/src/test/applications/simple/simple.sd1
-rw-r--r--integration/intellij/src/test/applications/syntax/syntax.sd29
9 files changed, 37 insertions, 1 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 e7ee550a741..efe790d78e7 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
@@ -323,7 +323,7 @@ IndexingExpression ::= (input ( DottedIdentifier | IndexingStuff )+ )+ |
IndexingStuff+ |
( WordWrapper? BlockStart (NL | IndexingStatement)* BlockEnd) |
// TODO: Parse advanced indexing statements properly
-private IndexingStuff ::= WordWrapper | AnyNumber | STRING_REG |
+private IndexingStuff ::= WordWrapper | AnyNumber | STRING_REG | BlockStart | BlockEnd |
':' | '.' | '(' | ')' | ArithmeticOperator | ComparisonOperator
// Attribute
diff --git a/integration/intellij/src/test/applications/rankprofilemodularity/test.sd b/integration/intellij/src/test/applications/rankprofilemodularity/test.sd
index 013881248c1..f9ccf29a94e 100644
--- a/integration/intellij/src/test/applications/rankprofilemodularity/test.sd
+++ b/integration/intellij/src/test/applications/rankprofilemodularity/test.sd
@@ -1,3 +1,4 @@
+# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
schema test {
document test {
diff --git a/integration/intellij/src/test/applications/rankprofilemodularity/test/outside_schema1.profile b/integration/intellij/src/test/applications/rankprofilemodularity/test/outside_schema1.profile
index af27290c5f7..2e5f56fd18b 100644
--- a/integration/intellij/src/test/applications/rankprofilemodularity/test/outside_schema1.profile
+++ b/integration/intellij/src/test/applications/rankprofilemodularity/test/outside_schema1.profile
@@ -1,3 +1,4 @@
+# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
rank-profile outside_schema1 inherits in_schema1 {
function fo1() {
diff --git a/integration/intellij/src/test/applications/rankprofilemodularity/test/outside_schema2.profile b/integration/intellij/src/test/applications/rankprofilemodularity/test/outside_schema2.profile
index 8cf3fcfbb78..7dd41859d03 100644
--- a/integration/intellij/src/test/applications/rankprofilemodularity/test/outside_schema2.profile
+++ b/integration/intellij/src/test/applications/rankprofilemodularity/test/outside_schema2.profile
@@ -1,3 +1,4 @@
+# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
rank-profile outside_schema2 {
function fo2() {
diff --git a/integration/intellij/src/test/applications/schemainheritance/child.sd b/integration/intellij/src/test/applications/schemainheritance/child.sd
index ff09bad4442..d4ab271bdef 100644
--- a/integration/intellij/src/test/applications/schemainheritance/child.sd
+++ b/integration/intellij/src/test/applications/schemainheritance/child.sd
@@ -1,3 +1,4 @@
+# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
schema child inherits parent {
document child inherits parent {
diff --git a/integration/intellij/src/test/applications/schemainheritance/importedschema.sd b/integration/intellij/src/test/applications/schemainheritance/importedschema.sd
index 1b5acff8a26..29802ab99cc 100644
--- a/integration/intellij/src/test/applications/schemainheritance/importedschema.sd
+++ b/integration/intellij/src/test/applications/schemainheritance/importedschema.sd
@@ -1,3 +1,4 @@
+# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
schema importedschema {
document importedschema {
diff --git a/integration/intellij/src/test/applications/schemainheritance/parent.sd b/integration/intellij/src/test/applications/schemainheritance/parent.sd
index ba666313af1..c2dea4071a3 100644
--- a/integration/intellij/src/test/applications/schemainheritance/parent.sd
+++ b/integration/intellij/src/test/applications/schemainheritance/parent.sd
@@ -1,3 +1,4 @@
+# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
schema parent {
document parent {
diff --git a/integration/intellij/src/test/applications/simple/simple.sd b/integration/intellij/src/test/applications/simple/simple.sd
index 21e683b3ee4..ff56944440b 100644
--- a/integration/intellij/src/test/applications/simple/simple.sd
+++ b/integration/intellij/src/test/applications/simple/simple.sd
@@ -1,3 +1,4 @@
+# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
schema simple {
document simple {
diff --git a/integration/intellij/src/test/applications/syntax/syntax.sd b/integration/intellij/src/test/applications/syntax/syntax.sd
new file mode 100644
index 00000000000..1e1087b45e1
--- /dev/null
+++ b/integration/intellij/src/test/applications/syntax/syntax.sd
@@ -0,0 +1,29 @@
+# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+# A collection of syntax we can visually check is parsed correctly
+schema syntax {
+ document syntax {
+ field mystring type string {
+ }
+ }
+
+ field myarray1 type array<string> {
+ indexing: input mystring | split ";" | for_each { trim } | attribute
+ }
+
+ field myarray2 type array<string> {
+ indexing: input mystring | split ";" | for_each { trim } | attribute
+ index: enable-bm25
+ }
+
+ field myarray2 type array<string> {
+ indexing {
+ input mystring | split ";" | for_each {
+ trim
+ }
+ | attribute;
+ }
+ index: enable-bm25
+ }
+
+} \ No newline at end of file