summaryrefslogtreecommitdiffstats
path: root/integration
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2022-05-30 16:15:41 +0200
committerJon Bratseth <bratseth@gmail.com>2022-05-30 16:15:41 +0200
commitc1f6b0c54d8a8fd7b2b0cd880095e268fc97a5db (patch)
tree522683a44492d0d9b90cffebe55d534e85fd53f0 /integration
parent96efafff86e7135478b40bcbfbdadbe48ffc4ee7 (diff)
Syntax fixes
Diffstat (limited to 'integration')
-rw-r--r--integration/intellij/src/main/bnf/ai/vespa/intellij/schema/parser/sd.bnf4
-rw-r--r--integration/intellij/src/main/jflex/ai/vespa/intellij/schema/lexer/sd.flex2
2 files changed, 3 insertions, 3 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 d331acb04ef..2e2df7ef410 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
@@ -34,7 +34,7 @@
SYMBOL = 'regexp:[!$|:{}().\[\]]'
COMMA = 'regexp:[,]'
INTEGER_REG = 'regexp:[0-9]+'
- FLOAT_REG = 'regexp:[0-9]+[.][0-9]+([eE][0-9]+)?'
+ FLOAT_REG = 'regexp:[0-9]+[.][0-9]+([eE][-]?[0-9]+)?'
STRING_REG = 'regexp:\"([^\"\\]*(\\.[^\"\\]*)*)\"'
STRING_REG_SINGLE_QUOTE = "regexp:'([^'\\]*(\\.[^'\\]*)*)'"
WORD_REG = 'regexp:\w+'
@@ -140,7 +140,7 @@ FunctionCallOrLambdaExpr ::= IdentifierVal ClauseStart RankingExpression ( Comma
ParenthesisedExpr ::= ClauseStart RankingExpression ClauseEnd
-PrimitiveExpr ::= ( AnyNumber | IdentifierVal | RankFeature | STRING_REG )
+PrimitiveExpr ::= ( AnyNumber | ('$')?IdentifierVal | RankFeature | STRING_REG | STRING_REG_SINGLE_QUOTE )
SliceExpr ::= RankingExpression ( SliceKey | SliceIndex | FullTensorAddress )
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 b5486d6f77f..071033509d9 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
@@ -39,7 +39,7 @@ COMMA= [,]
//BLOCK_START= \{
//BLOCK_END= \}
INTEGER = [0-9]+
-FLOAT = {INTEGER}[.][0-9]+([eE][0-9]+)?
+FLOAT = {INTEGER}[.][0-9]+([eE][-]?[0-9]+)?
STRING = \"([^\"\\]*(\\.[^\"\\]*)*)\"
STRING_SINGLE_QUOTE = '([^'\\]*(\\.[^'\\]*)*)'
WORD = \w+