diff options
Diffstat (limited to 'config-model/src/main/javacc/SchemaParser.jj')
-rw-r--r-- | config-model/src/main/javacc/SchemaParser.jj | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/config-model/src/main/javacc/SchemaParser.jj b/config-model/src/main/javacc/SchemaParser.jj index aef91e34239..f298293ed57 100644 --- a/config-model/src/main/javacc/SchemaParser.jj +++ b/config-model/src/main/javacc/SchemaParser.jj @@ -181,6 +181,7 @@ TOKEN : | < GRAM: "gram" > | < GRAM_SIZE: "gram-size" > | < MAX_LENGTH: "max-length" > +| < MAX_OCCURRENCES: "max-occurrences" > | < PREFIX: "prefix" > | < SUBSTRING: "substring" > | < SUFFIX: "suffix" > @@ -1361,7 +1362,7 @@ void matchType(ParsedMatchSettings matchInfo) : { } */ void matchItem(ParsedMatchSettings matchInfo) : { } { - ( matchType(matchInfo) | exactTerminator(matchInfo) | gramSize(matchInfo) | matchSize(matchInfo) ) + ( matchType(matchInfo) | exactTerminator(matchInfo) | gramSize(matchInfo) | matchSize(matchInfo) | maxTermOccurrences(matchInfo)) } void exactTerminator(ParsedMatchSettings matchInfo) : @@ -1396,6 +1397,16 @@ void matchSize(ParsedMatchSettings matchInfo) : } } +void maxTermOccurrences(ParsedMatchSettings matchInfo) : +{ + int maxTermOccurrences; +} +{ + <MAX_OCCURRENCES> <COLON> maxTermOccurrences = integer() { + matchInfo.setMaxTermOccurrences(maxTermOccurrences); + } +} + /** * Consumes a rank statement of a field element. * |