diff --git a/bundles/org.openhab.core.model.item/src/org/openhab/core/model/Items.xtext b/bundles/org.openhab.core.model.item/src/org/openhab/core/model/Items.xtext index 02ca3871528..13cfaf86af3 100644 --- a/bundles/org.openhab.core.model.item/src/org/openhab/core/model/Items.xtext +++ b/bundles/org.openhab.core.model.item/src/org/openhab/core/model/Items.xtext @@ -16,7 +16,7 @@ ItemModel: ModelItem: (ModelNormalItem | ModelGroupItem) name=ID (label=STRING)? - ('<' icon=(ID|STRING) '>')? + ('<' icon=Icon '>')? ('(' groups+=ID (',' groups+=ID)* ')')? ('[' tags+=(ID|STRING) (',' tags+=(ID|STRING))* ']')? ('{' bindings+=ModelBinding (',' bindings+=ModelBinding)* '}')? @@ -64,6 +64,22 @@ NUMBER returns ecore::EBigDecimal: ('-')? ID ('.' ID )? ; +Icon: + (IconSource ':' IconSet? ':' IconName) | (IconSet ':' IconName) | IconName +; + +IconSource: + ID +; + +IconSet: + ID +; + +IconName: + ID +; + terminal ID: '^'?('a'..'z'|'A'..'Z'|'_'|'0'..'9') ('a'..'z'|'A'..'Z'|'_'|'-'|'0'..'9')*; terminal STRING: