diff options
-rw-r--r-- | container-search/src/main/antlr4/com/yahoo/search/yql/yqlplus.g4 | 2 | ||||
-rw-r--r-- | container-search/src/test/java/com/yahoo/search/yql/YqlParserTestCase.java | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/container-search/src/main/antlr4/com/yahoo/search/yql/yqlplus.g4 b/container-search/src/main/antlr4/com/yahoo/search/yql/yqlplus.g4 index 8a6f2cf9e87..b7d443ea56c 100644 --- a/container-search/src/main/antlr4/com/yahoo/search/yql/yqlplus.g4 +++ b/container-search/src/main/antlr4/com/yahoo/search/yql/yqlplus.g4 @@ -131,7 +131,7 @@ options { * LEXER RULES *------------------------------------------------------------------*/ -ID : ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|':')* +ID : ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|':'|'-')* ; LONG_INT : '-'?'0'..'9'+ ('L'|'l') diff --git a/container-search/src/test/java/com/yahoo/search/yql/YqlParserTestCase.java b/container-search/src/test/java/com/yahoo/search/yql/YqlParserTestCase.java index 750afa2a37c..24c8e040051 100644 --- a/container-search/src/test/java/com/yahoo/search/yql/YqlParserTestCase.java +++ b/container-search/src/test/java/com/yahoo/search/yql/YqlParserTestCase.java @@ -693,6 +693,12 @@ public class YqlParserTestCase { } @Test + public void testSourcesWithDash() { + assertSources("select foo from source-a where price <= 500;", + Arrays.asList("source-a")); + } + + @Test public void testWildCardSources() { assertSources("select foo from sources * where price <= 500;", Collections.<String>emptyList()); |