<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:xtext="http://www.eclipse.org/2008/Xtext">
  <xtext:Grammar name="org.openhab.model.Items" usedGrammars="/1">
    <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="items">
      <ePackage href="http://www.openhab.org/model/Items#/"/>
    </metamodelDeclarations>
    <rules xsi:type="xtext:ParserRule" name="ItemModel">
      <type metamodel="/0/@metamodelDeclarations.0">
        <classifier xsi:type="ecore:EClass" href="http://www.openhab.org/model/Items#//ItemModel"/>
      </type>
      <alternatives xsi:type="xtext:Assignment" cardinality="*" feature="items" operator="+=">
        <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.1"/>
      </alternatives>
    </rules>
    <rules xsi:type="xtext:ParserRule" name="ModelItem">
      <type metamodel="/0/@metamodelDeclarations.0">
        <classifier xsi:type="ecore:EClass" href="http://www.openhab.org/model/Items#//ModelItem"/>
      </type>
      <alternatives xsi:type="xtext:Group">
        <elements xsi:type="xtext:Alternatives">
          <elements xsi:type="xtext:RuleCall" rule="/0/@rules.4"/>
          <elements xsi:type="xtext:RuleCall" rule="/0/@rules.2"/>
        </elements>
        <elements xsi:type="xtext:Assignment" feature="name" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
        </elements>
        <elements xsi:type="xtext:Assignment" cardinality="?" feature="label" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.2"/>
        </elements>
        <elements xsi:type="xtext:Group" cardinality="?">
          <elements xsi:type="xtext:Keyword" value="&lt;"/>
          <elements xsi:type="xtext:Assignment" feature="icon" operator="=">
            <terminal xsi:type="xtext:Alternatives">
              <elements xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
              <elements xsi:type="xtext:RuleCall" rule="/1/@rules.2"/>
            </terminal>
          </elements>
          <elements xsi:type="xtext:Keyword" value=">"/>
        </elements>
        <elements xsi:type="xtext:Group" cardinality="?">
          <elements xsi:type="xtext:Keyword" value="("/>
          <elements xsi:type="xtext:Assignment" feature="groups" operator="+=">
            <terminal xsi:type="xtext:CrossReference">
              <type metamodel="/0/@metamodelDeclarations.0">
                <classifier xsi:type="ecore:EClass" href="http://www.openhab.org/model/Items#//ModelGroupItem"/>
              </type>
              <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
            </terminal>
          </elements>
          <elements xsi:type="xtext:Group" cardinality="*">
            <elements xsi:type="xtext:Keyword" value=","/>
            <elements xsi:type="xtext:Assignment" feature="groups" operator="+=">
              <terminal xsi:type="xtext:CrossReference">
                <type metamodel="/0/@metamodelDeclarations.0">
                  <classifier xsi:type="ecore:EClass" href="http://www.openhab.org/model/Items#//ModelGroupItem"/>
                </type>
                <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
              </terminal>
            </elements>
          </elements>
          <elements xsi:type="xtext:Keyword" value=")"/>
        </elements>
        <elements xsi:type="xtext:Group" cardinality="*">
          <elements xsi:type="xtext:Keyword" value="{"/>
          <elements xsi:type="xtext:Assignment" feature="bindings" operator="+=">
            <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.6"/>
          </elements>
          <elements xsi:type="xtext:Group" cardinality="*">
            <elements xsi:type="xtext:Keyword" value=","/>
            <elements xsi:type="xtext:Assignment" feature="bindings" operator="+=">
              <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.6"/>
            </elements>
          </elements>
          <elements xsi:type="xtext:Keyword" value="}"/>
        </elements>
      </alternatives>
    </rules>
    <rules xsi:type="xtext:ParserRule" name="ModelGroupItem">
      <type metamodel="/0/@metamodelDeclarations.0">
        <classifier xsi:type="ecore:EClass" href="http://www.openhab.org/model/Items#//ModelGroupItem"/>
      </type>
      <alternatives xsi:type="xtext:Group">
        <elements xsi:type="xtext:Keyword" value="Group"/>
        <elements xsi:type="xtext:Action">
          <type metamodel="/0/@metamodelDeclarations.0">
            <classifier xsi:type="ecore:EClass" href="http://www.openhab.org/model/Items#//ModelGroupItem"/>
          </type>
        </elements>
        <elements xsi:type="xtext:Group" cardinality="?">
          <elements xsi:type="xtext:Keyword" value=":"/>
          <elements xsi:type="xtext:Assignment" feature="type" operator="=">
            <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.5"/>
          </elements>
          <elements xsi:type="xtext:Group" cardinality="?">
            <elements xsi:type="xtext:Keyword" value=":"/>
            <elements xsi:type="xtext:Assignment" feature="function" operator="=">
              <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.3"/>
            </elements>
            <elements xsi:type="xtext:Group" cardinality="?">
              <elements xsi:type="xtext:Keyword" value="("/>
              <elements xsi:type="xtext:Assignment" feature="args" operator="+=">
                <terminal xsi:type="xtext:Alternatives">
                  <elements xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
                  <elements xsi:type="xtext:RuleCall" rule="/1/@rules.2"/>
                </terminal>
              </elements>
              <elements xsi:type="xtext:Group" cardinality="*">
                <elements xsi:type="xtext:Keyword" value=","/>
                <elements xsi:type="xtext:Assignment" feature="args" operator="+=">
                  <terminal xsi:type="xtext:Alternatives">
                    <elements xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
                    <elements xsi:type="xtext:RuleCall" rule="/1/@rules.2"/>
                  </terminal>
                </elements>
              </elements>
              <elements xsi:type="xtext:Keyword" value=")"/>
            </elements>
          </elements>
        </elements>
      </alternatives>
    </rules>
    <rules xsi:type="xtext:EnumRule" name="ModelGroupFunction">
      <type metamodel="/0/@metamodelDeclarations.0">
        <classifier xsi:type="ecore:EEnum" href="http://www.openhab.org/model/Items#//ModelGroupFunction"/>
      </type>
      <alternatives xsi:type="xtext:Alternatives">
        <elements xsi:type="xtext:EnumLiteralDeclaration">
          <enumLiteral href="http://www.openhab.org/model/Items#//ModelGroupFunction/AND"/>
          <literal value="AND"/>
        </elements>
        <elements xsi:type="xtext:EnumLiteralDeclaration">
          <enumLiteral href="http://www.openhab.org/model/Items#//ModelGroupFunction/OR"/>
          <literal value="OR"/>
        </elements>
        <elements xsi:type="xtext:EnumLiteralDeclaration">
          <enumLiteral href="http://www.openhab.org/model/Items#//ModelGroupFunction/AVG"/>
          <literal value="AVG"/>
        </elements>
        <elements xsi:type="xtext:EnumLiteralDeclaration">
          <enumLiteral href="http://www.openhab.org/model/Items#//ModelGroupFunction/MAX"/>
          <literal value="MAX"/>
        </elements>
        <elements xsi:type="xtext:EnumLiteralDeclaration">
          <enumLiteral href="http://www.openhab.org/model/Items#//ModelGroupFunction/MIN"/>
          <literal value="MIN"/>
        </elements>
      </alternatives>
    </rules>
    <rules xsi:type="xtext:ParserRule" name="ModelNormalItem">
      <type metamodel="/0/@metamodelDeclarations.0">
        <classifier xsi:type="ecore:EClass" href="http://www.openhab.org/model/Items#//ModelNormalItem"/>
      </type>
      <alternatives xsi:type="xtext:Assignment" feature="type" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.5"/>
      </alternatives>
    </rules>
    <rules xsi:type="xtext:ParserRule" name="ModelItemType">
      <type metamodel="/1/@metamodelDeclarations.0">
        <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
      </type>
      <alternatives xsi:type="xtext:Alternatives">
        <elements xsi:type="xtext:Keyword" value="Switch"/>
        <elements xsi:type="xtext:Keyword" value="Rollershutter"/>
        <elements xsi:type="xtext:Keyword" value="Number"/>
        <elements xsi:type="xtext:Keyword" value="String"/>
        <elements xsi:type="xtext:Keyword" value="Dimmer"/>
        <elements xsi:type="xtext:Keyword" value="Contact"/>
        <elements xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
      </alternatives>
    </rules>
    <rules xsi:type="xtext:ParserRule" name="ModelBinding">
      <type metamodel="/0/@metamodelDeclarations.0">
        <classifier xsi:type="ecore:EClass" href="http://www.openhab.org/model/Items#//ModelBinding"/>
      </type>
      <alternatives xsi:type="xtext:Group">
        <elements xsi:type="xtext:Assignment" feature="type" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.0"/>
        </elements>
        <elements xsi:type="xtext:Keyword" value="="/>
        <elements xsi:type="xtext:Assignment" feature="configuration" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="/1/@rules.2"/>
        </elements>
      </alternatives>
    </rules>
  </xtext:Grammar>
  <xtext:Grammar name="org.eclipse.xtext.common.Terminals" definesHiddenTokens="true" hiddenTokens="/1/@rules.5 /1/@rules.3 /1/@rules.4">
    <metamodelDeclarations xsi:type="xtext:ReferencedMetamodel" alias="ecore">
      <ePackage href="http://www.eclipse.org/emf/2002/Ecore#/"/>
    </metamodelDeclarations>
    <rules xsi:type="xtext:TerminalRule" name="ID">
      <type metamodel="/1/@metamodelDeclarations.0">
        <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
      </type>
      <alternatives xsi:type="xtext:Group">
        <elements xsi:type="xtext:Keyword" cardinality="?" value="^"/>
        <elements xsi:type="xtext:Alternatives">
          <elements xsi:type="xtext:CharacterRange">
            <left value="a"/>
            <right value="z"/>
          </elements>
          <elements xsi:type="xtext:CharacterRange">
            <left value="A"/>
            <right value="Z"/>
          </elements>
          <elements xsi:type="xtext:Keyword" value="_"/>
        </elements>
        <elements xsi:type="xtext:Alternatives" cardinality="*">
          <elements xsi:type="xtext:CharacterRange">
            <left value="a"/>
            <right value="z"/>
          </elements>
          <elements xsi:type="xtext:CharacterRange">
            <left value="A"/>
            <right value="Z"/>
          </elements>
          <elements xsi:type="xtext:Keyword" value="_"/>
          <elements xsi:type="xtext:CharacterRange">
            <left value="0"/>
            <right value="9"/>
          </elements>
        </elements>
      </alternatives>
    </rules>
    <rules xsi:type="xtext:TerminalRule" name="INT">
      <type metamodel="/1/@metamodelDeclarations.0">
        <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
      </type>
      <alternatives xsi:type="xtext:CharacterRange" cardinality="+">
        <left value="0"/>
        <right value="9"/>
      </alternatives>
    </rules>
    <rules xsi:type="xtext:TerminalRule" name="STRING">
      <type metamodel="/1/@metamodelDeclarations.0">
        <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
      </type>
      <alternatives xsi:type="xtext:Alternatives">
        <elements xsi:type="xtext:Group">
          <elements xsi:type="xtext:Keyword" value="&quot;"/>
          <elements xsi:type="xtext:Alternatives" cardinality="*">
            <elements xsi:type="xtext:Group">
              <elements xsi:type="xtext:Keyword" value="\"/>
              <elements xsi:type="xtext:Alternatives">
                <elements xsi:type="xtext:Keyword" value="b"/>
                <elements xsi:type="xtext:Keyword" value="t"/>
                <elements xsi:type="xtext:Keyword" value="n"/>
                <elements xsi:type="xtext:Keyword" value="f"/>
                <elements xsi:type="xtext:Keyword" value="r"/>
                <elements xsi:type="xtext:Keyword" value="&quot;"/>
                <elements xsi:type="xtext:Keyword" value="'"/>
                <elements xsi:type="xtext:Keyword" value="\"/>
              </elements>
            </elements>
            <elements xsi:type="xtext:NegatedToken">
              <terminal xsi:type="xtext:Alternatives">
                <elements xsi:type="xtext:Keyword" value="\"/>
                <elements xsi:type="xtext:Keyword" value="&quot;"/>
              </terminal>
            </elements>
          </elements>
          <elements xsi:type="xtext:Keyword" value="&quot;"/>
        </elements>
        <elements xsi:type="xtext:Group">
          <elements xsi:type="xtext:Keyword" value="'"/>
          <elements xsi:type="xtext:Alternatives" cardinality="*">
            <elements xsi:type="xtext:Group">
              <elements xsi:type="xtext:Keyword" value="\"/>
              <elements xsi:type="xtext:Alternatives">
                <elements xsi:type="xtext:Keyword" value="b"/>
                <elements xsi:type="xtext:Keyword" value="t"/>
                <elements xsi:type="xtext:Keyword" value="n"/>
                <elements xsi:type="xtext:Keyword" value="f"/>
                <elements xsi:type="xtext:Keyword" value="r"/>
                <elements xsi:type="xtext:Keyword" value="&quot;"/>
                <elements xsi:type="xtext:Keyword" value="'"/>
                <elements xsi:type="xtext:Keyword" value="\"/>
              </elements>
            </elements>
            <elements xsi:type="xtext:NegatedToken">
              <terminal xsi:type="xtext:Alternatives">
                <elements xsi:type="xtext:Keyword" value="\"/>
                <elements xsi:type="xtext:Keyword" value="'"/>
              </terminal>
            </elements>
          </elements>
          <elements xsi:type="xtext:Keyword" value="'"/>
        </elements>
      </alternatives>
    </rules>
    <rules xsi:type="xtext:TerminalRule" name="ML_COMMENT">
      <type metamodel="/1/@metamodelDeclarations.0">
        <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
      </type>
      <alternatives xsi:type="xtext:Group">
        <elements xsi:type="xtext:Keyword" value="/*"/>
        <elements xsi:type="xtext:UntilToken">
          <terminal xsi:type="xtext:Keyword" value="*/"/>
        </elements>
      </alternatives>
    </rules>
    <rules xsi:type="xtext:TerminalRule" name="SL_COMMENT">
      <type metamodel="/1/@metamodelDeclarations.0">
        <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
      </type>
      <alternatives xsi:type="xtext:Group">
        <elements xsi:type="xtext:Keyword" value="//"/>
        <elements xsi:type="xtext:NegatedToken" cardinality="*">
          <terminal xsi:type="xtext:Alternatives">
            <elements xsi:type="xtext:Keyword" value="&#xA;"/>
            <elements xsi:type="xtext:Keyword" value="&#xD;"/>
          </terminal>
        </elements>
        <elements xsi:type="xtext:Group" cardinality="?">
          <elements xsi:type="xtext:Keyword" cardinality="?" value="&#xD;"/>
          <elements xsi:type="xtext:Keyword" value="&#xA;"/>
        </elements>
      </alternatives>
    </rules>
    <rules xsi:type="xtext:TerminalRule" name="WS">
      <type metamodel="/1/@metamodelDeclarations.0">
        <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
      </type>
      <alternatives xsi:type="xtext:Alternatives" cardinality="+">
        <elements xsi:type="xtext:Keyword" value=" "/>
        <elements xsi:type="xtext:Keyword" value="&#x9;"/>
        <elements xsi:type="xtext:Keyword" value="&#xD;"/>
        <elements xsi:type="xtext:Keyword" value="&#xA;"/>
      </alternatives>
    </rules>
    <rules xsi:type="xtext:TerminalRule" name="ANY_OTHER">
      <type metamodel="/1/@metamodelDeclarations.0">
        <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
      </type>
      <alternatives xsi:type="xtext:Wildcard"/>
    </rules>
  </xtext:Grammar>
</xmi:XMI>
