aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main/javacc/SDParser.jj
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2022-02-25 10:04:38 +0100
committerJon Bratseth <bratseth@gmail.com>2022-02-25 10:04:38 +0100
commitb3fe47f779805ee472d8f110af54f16e8a0caa76 (patch)
treee4144c52d9f184b330ba5716811b223ed31a6bbf /config-model/src/main/javacc/SDParser.jj
parent9c4ec908885fce1220574efd6018672e65d4360c (diff)
Add strict type checking option to query profiles
Diffstat (limited to 'config-model/src/main/javacc/SDParser.jj')
-rw-r--r--config-model/src/main/javacc/SDParser.jj15
1 files changed, 13 insertions, 2 deletions
diff --git a/config-model/src/main/javacc/SDParser.jj b/config-model/src/main/javacc/SDParser.jj
index 4cbee4a8503..f18107f574a 100644
--- a/config-model/src/main/javacc/SDParser.jj
+++ b/config-model/src/main/javacc/SDParser.jj
@@ -11,7 +11,6 @@
options {
UNICODE_INPUT = true;
CACHE_TOKENS = false;
- STATIC = false;
DEBUG_PARSER = false;
ERROR_REPORTING = true;
FORCE_LA_CHECK = true;
@@ -1983,7 +1982,8 @@ void rankProfileItem(RankProfile profile) : { }
| rankDegradation(profile)
| constants(profile)
| matchFeatures(profile)
- | summaryFeatures(profile) )
+ | summaryFeatures(profile)
+ | strict(profile) )
}
/**
@@ -2218,6 +2218,15 @@ void summaryFeatures(RankProfile profile) :
}
}
+void strict(RankProfile profile) :
+{}
+{
+ <STRICT> <COLON> (
+ ( <TRUE> { profile.setStrict(true); } ) |
+ ( <FALSE> { profile.setStrict(false); } )
+ )
+}
+
/**
* This rule consumes a match-features block of a rank profile.
*
@@ -2672,6 +2681,7 @@ String identifier() : { }
| <LITERAL>
| <LOCALE>
| <LONG>
+ | <LOOSE>
| <LOWERBOUND>
| <LOWERCASE>
| <MACRO>
@@ -2719,6 +2729,7 @@ String identifier() : { }
| <STATIC>
| <STEMMING>
| <STRENGTH>
+ | <STRICT>
| <STRING>
| <STRUCT>
| <SUBSTRING>