Persistence filters allow unquoted units (#4681)

* allow filters without quotes around units

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
pull/4693/head
Mark Herwege 2025-04-02 20:07:52 +02:00 committed by GitHub
parent a670ddf2ef
commit 69aaf40e0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 10 deletions

View File

@ -32,7 +32,7 @@ FilterDetails:
;
ThresholdFilter:
'>' (relative?='%')? value=DECIMAL unit=STRING?
'>' (relative?='%')? value=DECIMAL unit=(UNIT|STRING)?
;
TimeFilter:
@ -40,27 +40,27 @@ TimeFilter:
;
EqualsFilter:
'=' values+=STRING (',' values+=STRING)*
'=' values+=STRING (',' values+=STRING)*
;
NotEqualsFilter:
'!' values+=STRING (',' values+=STRING)*
'!' values+=STRING (',' values+=STRING)*
;
IncludeFilter:
'[]' lower=DECIMAL upper=DECIMAL unit=STRING?
'[]' lower=DECIMAL upper=DECIMAL unit=(UNIT|STRING)?
;
NotIncludeFilter:
'][' lower=DECIMAL upper=DECIMAL unit=STRING?
'][' lower=DECIMAL upper=DECIMAL unit=(UNIT|STRING)?
;
PersistenceConfiguration:
items+=(AllConfig | ItemConfig | GroupConfig | ItemExcludeConfig | GroupExcludeConfig)
(',' items+=(AllConfig | ItemConfig | GroupConfig | ItemExcludeConfig | GroupExcludeConfig))*
(',' items+=(AllConfig | ItemConfig | GroupConfig | ItemExcludeConfig | GroupExcludeConfig))*
((':' ('strategy' '=' strategies+=[Strategy|ID] (',' strategies+=[Strategy|ID])*)?
('filter' '=' filters+=[Filter|ID] (',' filters+=[Filter|ID])*)?)
('filter' '=' filters+=[Filter|ID] (',' filters+=[Filter|ID])*)?)
| ';')
;
@ -78,17 +78,21 @@ GroupConfig:
;
ItemExcludeConfig:
'!' itemExclude=ID
'!' itemExclude=ID
;
GroupExcludeConfig:
'!' groupExclude=ID '*'
'!' groupExclude=ID '*'
;
AliasConfiguration:
item=ID '->' alias=(ID|STRING)
item=ID '->' alias=(ID|STRING)
;
DECIMAL returns ecore::EBigDecimal :
'-'? INT ('.' INT)?
;
UNIT:
(('^' INT)|'²'|'³'|'/'|'*'|'·'|'°'|'µ'|'%'|'‰'|'Ω'|'Å'|'('|')'|ID)+
;