<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar 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" name="org.eclipselabs.mscript.language.Mscript" definesHiddenTokens="true" hiddenTokens="//@rules.120 //@rules.118 //@rules.119">
  <metamodelDeclarations xsi:type="xtext:ReferencedMetamodel">
    <ePackage href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#/"/>
  </metamodelDeclarations>
  <metamodelDeclarations xsi:type="xtext:ReferencedMetamodel">
    <ePackage href="http://www.eclipselabs.org/mscript/AST/1.0.0#/"/>
  </metamodelDeclarations>
  <metamodelDeclarations xsi:type="xtext:ReferencedMetamodel" alias="ecore">
    <ePackage href="http://www.eclipse.org/emf/2002/Ecore#/"/>
  </metamodelDeclarations>
  <rules xsi:type="xtext:ParserRule" name="Module">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//Module"/>
    </type>
    <alternatives xsi:type="xtext:Assignment" cardinality="*" feature="definitions" operator="+=">
      <terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="Definition">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//Definition"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.2"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.8"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="DataTypeDefinition">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//DataTypeDefinition"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.3"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.6"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.5"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="EnumerationDefinition">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//EnumerationDefinition"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Keyword" value="enum"/>
      <elements xsi:type="xtext:Assignment" feature="name" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="{"/>
      <elements xsi:type="xtext:Group" cardinality="?">
        <elements xsi:type="xtext:Assignment" feature="literalDeclarations" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.4"/>
        </elements>
        <elements xsi:type="xtext:Group" cardinality="*">
          <elements xsi:type="xtext:Keyword" value=","/>
          <elements xsi:type="xtext:Assignment" feature="literalDeclarations" operator="+=">
            <terminal xsi:type="xtext:RuleCall" rule="//@rules.4"/>
          </elements>
        </elements>
      </elements>
      <elements xsi:type="xtext:Keyword" value="}"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="EnumerationLiteralDeclaration">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//EnumerationLiteralDeclaration"/>
    </type>
    <alternatives xsi:type="xtext:Assignment" feature="name" operator="=">
      <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="TypeAliasDefinition">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//TypeAliasDefinition"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Keyword" value="type"/>
      <elements xsi:type="xtext:Assignment" feature="name" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="="/>
      <elements xsi:type="xtext:Assignment" feature="type" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.20"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value=";"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="RecordDefinition">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//RecordDefinition"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Keyword" value="record"/>
      <elements xsi:type="xtext:Assignment" feature="name" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="{"/>
      <elements xsi:type="xtext:Assignment" cardinality="*" feature="fieldDeclarations" operator="+=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.7"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="}"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="RecordFieldDeclaration">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//RecordFieldDeclaration"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Assignment" feature="name" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value=":"/>
      <elements xsi:type="xtext:Assignment" feature="type" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.19"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value=";"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="FunctionDefinition">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//FunctionDefinition"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Assignment" cardinality="?" feature="kind" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.9"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="func"/>
      <elements xsi:type="xtext:Assignment" feature="name" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
      </elements>
      <elements xsi:type="xtext:Group" cardinality="?">
        <elements xsi:type="xtext:Keyword" value="&lt;"/>
        <elements xsi:type="xtext:Assignment" feature="templateParameterDeclarations" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.10"/>
        </elements>
        <elements xsi:type="xtext:Group" cardinality="*">
          <elements xsi:type="xtext:Keyword" value=","/>
          <elements xsi:type="xtext:Assignment" feature="templateParameterDeclarations" operator="+=">
            <terminal xsi:type="xtext:RuleCall" rule="//@rules.10"/>
          </elements>
        </elements>
        <elements xsi:type="xtext:Keyword" value=">"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="("/>
      <elements xsi:type="xtext:Group" cardinality="?">
        <elements xsi:type="xtext:Assignment" feature="inputParameterDeclarations" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.11"/>
        </elements>
        <elements xsi:type="xtext:Group" cardinality="*">
          <elements xsi:type="xtext:Keyword" value=","/>
          <elements xsi:type="xtext:Assignment" feature="inputParameterDeclarations" operator="+=">
            <terminal xsi:type="xtext:RuleCall" rule="//@rules.11"/>
          </elements>
        </elements>
      </elements>
      <elements xsi:type="xtext:Keyword" value=")"/>
      <elements xsi:type="xtext:Keyword" value="->"/>
      <elements xsi:type="xtext:Assignment" feature="outputParameterDeclarations" operator="+=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.12"/>
      </elements>
      <elements xsi:type="xtext:Group" cardinality="*">
        <elements xsi:type="xtext:Keyword" value=","/>
        <elements xsi:type="xtext:Assignment" feature="outputParameterDeclarations" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.12"/>
        </elements>
      </elements>
      <elements xsi:type="xtext:Keyword" value="{"/>
      <elements xsi:type="xtext:Alternatives" cardinality="*">
        <elements xsi:type="xtext:Assignment" feature="checks" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.13"/>
        </elements>
        <elements xsi:type="xtext:Assignment" feature="assertions" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.15"/>
        </elements>
        <elements xsi:type="xtext:Assignment" feature="functionObjectDeclarations" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.17"/>
        </elements>
        <elements xsi:type="xtext:Assignment" feature="stateVariableDeclarations" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.16"/>
        </elements>
        <elements xsi:type="xtext:Assignment" feature="equations" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.18"/>
        </elements>
      </elements>
      <elements xsi:type="xtext:Keyword" value="}"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:EnumRule" name="FunctionKind">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EEnum" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//FunctionKind"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:EnumLiteralDeclaration">
        <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//FunctionKind/Stateful"/>
        <literal value="stateful"/>
      </elements>
      <elements xsi:type="xtext:EnumLiteralDeclaration">
        <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//FunctionKind/Continuous"/>
        <literal value="continuous"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="TemplateParameterDeclaration">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//TemplateParameterDeclaration"/>
    </type>
    <alternatives xsi:type="xtext:Assignment" feature="name" operator="=">
      <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="InputParameterDeclaration">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//InputParameterDeclaration"/>
    </type>
    <alternatives xsi:type="xtext:Assignment" feature="name" operator="=">
      <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="OutputParameterDeclaration">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//OutputParameterDeclaration"/>
    </type>
    <alternatives xsi:type="xtext:Assignment" feature="name" operator="=">
      <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="Check">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//Check"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Keyword" value="check"/>
      <elements xsi:type="xtext:Group" cardinality="?">
        <elements xsi:type="xtext:Keyword" value="&lt;"/>
        <elements xsi:type="xtext:Assignment" feature="templateArguments" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
        </elements>
        <elements xsi:type="xtext:Group" cardinality="*">
          <elements xsi:type="xtext:Keyword" value=","/>
          <elements xsi:type="xtext:Assignment" feature="templateArguments" operator="+=">
            <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
          </elements>
        </elements>
        <elements xsi:type="xtext:Keyword" value=">"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="("/>
      <elements xsi:type="xtext:Group" cardinality="?">
        <elements xsi:type="xtext:Assignment" feature="inputParameterTypes" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.19"/>
        </elements>
        <elements xsi:type="xtext:Group" cardinality="*">
          <elements xsi:type="xtext:Keyword" value=","/>
          <elements xsi:type="xtext:Assignment" feature="inputParameterTypes" operator="+=">
            <terminal xsi:type="xtext:RuleCall" rule="//@rules.19"/>
          </elements>
        </elements>
      </elements>
      <elements xsi:type="xtext:Keyword" value=")"/>
      <elements xsi:type="xtext:Keyword" value="->"/>
      <elements xsi:type="xtext:Assignment" feature="outputParameterTypes" operator="+=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.19"/>
      </elements>
      <elements xsi:type="xtext:Group" cardinality="*">
        <elements xsi:type="xtext:Keyword" value=","/>
        <elements xsi:type="xtext:Assignment" feature="outputParameterTypes" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.19"/>
        </elements>
      </elements>
      <elements xsi:type="xtext:Keyword" value=";"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:EnumRule" name="AssertionStatusKind">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EEnum" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//AssertionStatusKind"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:EnumLiteralDeclaration">
        <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//AssertionStatusKind/Info"/>
        <literal value="info"/>
      </elements>
      <elements xsi:type="xtext:EnumLiteralDeclaration">
        <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//AssertionStatusKind/Warning"/>
        <literal value="warning"/>
      </elements>
      <elements xsi:type="xtext:EnumLiteralDeclaration">
        <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//AssertionStatusKind/Error"/>
        <literal value="error"/>
      </elements>
      <elements xsi:type="xtext:EnumLiteralDeclaration">
        <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//AssertionStatusKind/Fatal"/>
        <literal value="fatal"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="Assertion">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//Assertion"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Assignment" cardinality="?" feature="static" operator="?=">
        <terminal xsi:type="xtext:Keyword" value="static"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="assert"/>
      <elements xsi:type="xtext:Assignment" feature="condition" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value=":"/>
      <elements xsi:type="xtext:Assignment" feature="statusKind" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.14"/>
      </elements>
      <elements xsi:type="xtext:Assignment" feature="message" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value=";"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="StateVariableDeclaration">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//StateVariableDeclaration"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Keyword" value="var"/>
      <elements xsi:type="xtext:Assignment" feature="name" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value=";"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="FunctionObjectDeclaration">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//FunctionObjectDeclaration"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Keyword" value="fob"/>
      <elements xsi:type="xtext:Assignment" feature="name" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value=":"/>
      <elements xsi:type="xtext:Assignment" feature="functionName" operator="=">
        <terminal xsi:type="xtext:CrossReference">
          <type metamodel="//@metamodelDeclarations.1">
            <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//FunctionDefinition"/>
          </type>
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.107"/>
        </terminal>
      </elements>
      <elements xsi:type="xtext:Group" cardinality="?">
        <elements xsi:type="xtext:Keyword" value="&lt;"/>
        <elements xsi:type="xtext:Assignment" feature="templateArguments" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
        </elements>
        <elements xsi:type="xtext:Group" cardinality="*">
          <elements xsi:type="xtext:Keyword" value=","/>
          <elements xsi:type="xtext:Assignment" feature="templateArguments" operator="+=">
            <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
          </elements>
        </elements>
        <elements xsi:type="xtext:Keyword" value=">"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value=";"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="Equation">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//Equation"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Assignment" cardinality="?" feature="initial" operator="?=">
        <terminal xsi:type="xtext:Keyword" value="initial"/>
      </elements>
      <elements xsi:type="xtext:Assignment" feature="leftHandSide" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="="/>
      <elements xsi:type="xtext:Assignment" feature="rightHandSide" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value=";"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="DataTypeSpecifier">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//DataTypeSpecifier"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:Assignment" feature="definedType" operator="=">
        <terminal xsi:type="xtext:Alternatives">
          <elements xsi:type="xtext:RuleCall" rule="//@rules.20"/>
          <elements xsi:type="xtext:RuleCall" rule="//@rules.28"/>
        </terminal>
      </elements>
      <elements xsi:type="xtext:Assignment" feature="type" operator="=">
        <terminal xsi:type="xtext:CrossReference">
          <type metamodel="//@metamodelDeclarations.0">
            <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//DataType"/>
          </type>
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.113"/>
        </terminal>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="PrimitiveType">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//PrimitiveType"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.21"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.26"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.27"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="NumericType">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//NumericType"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.22"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.23"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.24"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.25"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="RealType">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//RealType"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Action">
        <type metamodel="//@metamodelDeclarations.0">
          <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//RealType"/>
        </type>
      </elements>
      <elements xsi:type="xtext:Keyword" value="real"/>
      <elements xsi:type="xtext:Assignment" feature="unit" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.100"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="IntegerType">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//IntegerType"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Action">
        <type metamodel="//@metamodelDeclarations.0">
          <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//IntegerType"/>
        </type>
      </elements>
      <elements xsi:type="xtext:Keyword" value="int"/>
      <elements xsi:type="xtext:Assignment" feature="unit" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.100"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="ComplexType">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//ComplexType"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Action">
        <type metamodel="//@metamodelDeclarations.0">
          <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//ComplexType"/>
        </type>
      </elements>
      <elements xsi:type="xtext:Keyword" value="complex"/>
      <elements xsi:type="xtext:Assignment" feature="unit" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.100"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="GaussianType">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//GaussianType"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Action">
        <type metamodel="//@metamodelDeclarations.0">
          <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//GaussianType"/>
        </type>
      </elements>
      <elements xsi:type="xtext:Keyword" value="gauss"/>
      <elements xsi:type="xtext:Assignment" feature="unit" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.100"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="BooleanType">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//BooleanType"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Action">
        <type metamodel="//@metamodelDeclarations.0">
          <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//BooleanType"/>
        </type>
      </elements>
      <elements xsi:type="xtext:Keyword" value="bool"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="StringType">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//StringType"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Action">
        <type metamodel="//@metamodelDeclarations.0">
          <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//StringType"/>
        </type>
      </elements>
      <elements xsi:type="xtext:Keyword" value="string"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="ArrayType">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//ArrayType"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.29"/>
      <elements xsi:type="xtext:Group">
        <elements xsi:type="xtext:Group" predicated="true">
          <elements xsi:type="xtext:Alternatives">
            <elements xsi:type="xtext:Assignment" feature="definedElementType" operator="=">
              <terminal xsi:type="xtext:RuleCall" rule="//@rules.20"/>
            </elements>
            <elements xsi:type="xtext:Assignment" feature="elementType" operator="=">
              <terminal xsi:type="xtext:CrossReference">
                <type metamodel="//@metamodelDeclarations.0">
                  <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//DataType"/>
                </type>
                <terminal xsi:type="xtext:RuleCall" rule="//@rules.113"/>
              </terminal>
            </elements>
          </elements>
        </elements>
        <elements xsi:type="xtext:Keyword" value="["/>
        <elements xsi:type="xtext:Assignment" feature="dimensions" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.30"/>
        </elements>
        <elements xsi:type="xtext:Group" cardinality="*">
          <elements xsi:type="xtext:Keyword" value=","/>
          <elements xsi:type="xtext:Assignment" feature="dimensions" operator="+=">
            <terminal xsi:type="xtext:RuleCall" rule="//@rules.30"/>
          </elements>
        </elements>
        <elements xsi:type="xtext:Keyword" value="]"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="TensorType">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//TensorType"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Assignment" feature="definedElementType" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.21"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="["/>
      <elements xsi:type="xtext:Assignment" feature="dimensions" operator="+=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.30"/>
      </elements>
      <elements xsi:type="xtext:Group" cardinality="*">
        <elements xsi:type="xtext:Keyword" value=","/>
        <elements xsi:type="xtext:Assignment" feature="dimensions" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.30"/>
        </elements>
      </elements>
      <elements xsi:type="xtext:Keyword" value="]"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="ArrayDimension">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//ArrayDimension"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Action">
        <type metamodel="//@metamodelDeclarations.0">
          <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//ArrayDimension"/>
        </type>
      </elements>
      <elements xsi:type="xtext:Assignment" cardinality="?" feature="size" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="Expression">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Expression"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.32"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.35"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.36"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.38"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="LetExpression">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//LetExpression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Keyword" value="let"/>
      <elements xsi:type="xtext:Assignment" feature="variableDeclarations" operator="+=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.33"/>
      </elements>
      <elements xsi:type="xtext:Group" cardinality="*">
        <elements xsi:type="xtext:Keyword" value=","/>
        <elements xsi:type="xtext:Assignment" feature="variableDeclarations" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.33"/>
        </elements>
      </elements>
      <elements xsi:type="xtext:Keyword" value="in"/>
      <elements xsi:type="xtext:Assignment" feature="targetExpression" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="LetExpressionVariableDeclaration">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//LetExpressionVariableDeclaration"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Alternatives">
        <elements xsi:type="xtext:Assignment" feature="parts" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.34"/>
        </elements>
        <elements xsi:type="xtext:Group">
          <elements xsi:type="xtext:Keyword" value="("/>
          <elements xsi:type="xtext:Assignment" feature="parts" operator="+=">
            <terminal xsi:type="xtext:RuleCall" rule="//@rules.34"/>
          </elements>
          <elements xsi:type="xtext:Group" cardinality="+">
            <elements xsi:type="xtext:Keyword" value=","/>
            <elements xsi:type="xtext:Assignment" feature="parts" operator="+=">
              <terminal xsi:type="xtext:RuleCall" rule="//@rules.34"/>
            </elements>
          </elements>
          <elements xsi:type="xtext:Keyword" value=")"/>
        </elements>
      </elements>
      <elements xsi:type="xtext:Keyword" value="="/>
      <elements xsi:type="xtext:Assignment" feature="assignedExpression" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="LetExpressionVariableDeclarationPart">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//LetExpressionVariableDeclarationPart"/>
    </type>
    <alternatives xsi:type="xtext:Assignment" feature="name" operator="=">
      <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="IfExpression">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//IfExpression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Assignment" cardinality="?" feature="static" operator="?=">
        <terminal xsi:type="xtext:Keyword" value="static"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="if"/>
      <elements xsi:type="xtext:Assignment" feature="condition" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="then"/>
      <elements xsi:type="xtext:Assignment" feature="thenExpression" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="else"/>
      <elements xsi:type="xtext:Assignment" feature="elseExpression" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="SwitchExpression">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//SwitchExpression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Assignment" cardinality="?" feature="static" operator="?=">
        <terminal xsi:type="xtext:Keyword" value="static"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="switch"/>
      <elements xsi:type="xtext:Assignment" feature="controlExpression" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
      <elements xsi:type="xtext:Assignment" cardinality="*" feature="cases" operator="+=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.37"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="default"/>
      <elements xsi:type="xtext:Keyword" value=":"/>
      <elements xsi:type="xtext:Assignment" feature="defaultExpression" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="SwitchCase">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//SwitchCase"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Keyword" value="case"/>
      <elements xsi:type="xtext:Assignment" feature="caseExpression" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.39"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value=":"/>
      <elements xsi:type="xtext:Assignment" feature="resultExpression" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="RangeExpression">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Expression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.39"/>
      <elements xsi:type="xtext:Group" cardinality="?">
        <elements xsi:type="xtext:Action" feature="operands" operator="+=">
          <type metamodel="//@metamodelDeclarations.1">
            <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//RangeExpression"/>
          </type>
        </elements>
        <elements xsi:type="xtext:Keyword" value=":"/>
        <elements xsi:type="xtext:Assignment" feature="operands" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.39"/>
        </elements>
        <elements xsi:type="xtext:Group" cardinality="?">
          <elements xsi:type="xtext:Keyword" value=":"/>
          <elements xsi:type="xtext:Assignment" feature="operands" operator="+=">
            <terminal xsi:type="xtext:RuleCall" rule="//@rules.39"/>
          </elements>
        </elements>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="ImpliesExpression">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Expression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.40"/>
      <elements xsi:type="xtext:Group" cardinality="?">
        <elements xsi:type="xtext:Action" feature="leftOperand" operator="=">
          <type metamodel="//@metamodelDeclarations.1">
            <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//ImpliesExpression"/>
          </type>
        </elements>
        <elements xsi:type="xtext:Keyword" value="=>"/>
        <elements xsi:type="xtext:Assignment" feature="rightOperand" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.40"/>
        </elements>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="LogicalOrExpression">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Expression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.41"/>
      <elements xsi:type="xtext:Group" cardinality="*">
        <elements xsi:type="xtext:Action" feature="leftOperand" operator="=">
          <type metamodel="//@metamodelDeclarations.1">
            <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//LogicalOrExpression"/>
          </type>
        </elements>
        <elements xsi:type="xtext:Keyword" value="||"/>
        <elements xsi:type="xtext:Assignment" feature="rightOperand" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.41"/>
        </elements>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="LogicalAndExpression">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Expression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.42"/>
      <elements xsi:type="xtext:Group" cardinality="*">
        <elements xsi:type="xtext:Action" feature="leftOperand" operator="=">
          <type metamodel="//@metamodelDeclarations.1">
            <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//LogicalAndExpression"/>
          </type>
        </elements>
        <elements xsi:type="xtext:Keyword" value="&amp;&amp;"/>
        <elements xsi:type="xtext:Assignment" feature="rightOperand" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.42"/>
        </elements>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="EqualityExpression">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Expression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.44"/>
      <elements xsi:type="xtext:Group" cardinality="*">
        <elements xsi:type="xtext:Action" feature="leftOperand" operator="=">
          <type metamodel="//@metamodelDeclarations.1">
            <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//EqualityExpression"/>
          </type>
        </elements>
        <elements xsi:type="xtext:Assignment" feature="operator" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.43"/>
        </elements>
        <elements xsi:type="xtext:Assignment" feature="rightOperand" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.44"/>
        </elements>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:EnumRule" name="EqualityOperator">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EEnum" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//EqualityOperator"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:EnumLiteralDeclaration">
        <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//EqualityOperator/EqualTo"/>
        <literal value="=="/>
      </elements>
      <elements xsi:type="xtext:EnumLiteralDeclaration">
        <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//EqualityOperator/NotEqualTo"/>
        <literal value="!="/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="RelationalExpression">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Expression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.46"/>
      <elements xsi:type="xtext:Group" cardinality="?" predicated="true">
        <elements xsi:type="xtext:Alternatives">
          <elements xsi:type="xtext:Group">
            <elements xsi:type="xtext:Action" feature="leftOperand" operator="=">
              <type metamodel="//@metamodelDeclarations.1">
                <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//RelationalExpression"/>
              </type>
            </elements>
            <elements xsi:type="xtext:Assignment" feature="operator" operator="=">
              <terminal xsi:type="xtext:RuleCall" rule="//@rules.45"/>
            </elements>
            <elements xsi:type="xtext:Assignment" feature="rightOperand" operator="=">
              <terminal xsi:type="xtext:RuleCall" rule="//@rules.46"/>
            </elements>
          </elements>
          <elements xsi:type="xtext:Group">
            <elements xsi:type="xtext:Action" feature="expression" operator="=">
              <type metamodel="//@metamodelDeclarations.1">
                <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//TypeTestExpression"/>
              </type>
            </elements>
            <elements xsi:type="xtext:Keyword" value="is"/>
            <elements xsi:type="xtext:Assignment" feature="type" operator="=">
              <terminal xsi:type="xtext:RuleCall" rule="//@rules.19"/>
            </elements>
          </elements>
        </elements>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:EnumRule" name="RelationalOperator">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EEnum" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//RelationalOperator"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:EnumLiteralDeclaration">
        <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//RelationalOperator/LessThan"/>
        <literal value="&lt;"/>
      </elements>
      <elements xsi:type="xtext:EnumLiteralDeclaration">
        <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//RelationalOperator/LessThanOrEqualTo"/>
        <literal value="&lt;="/>
      </elements>
      <elements xsi:type="xtext:EnumLiteralDeclaration">
        <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//RelationalOperator/GreaterThan"/>
        <literal value=">"/>
      </elements>
      <elements xsi:type="xtext:EnumLiteralDeclaration">
        <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//RelationalOperator/GreaterThanOrEqualTo"/>
        <literal value=">="/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="AdditiveExpression">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Expression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.48"/>
      <elements xsi:type="xtext:Group" cardinality="*">
        <elements xsi:type="xtext:Action" feature="leftOperand" operator="=">
          <type metamodel="//@metamodelDeclarations.1">
            <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//AdditiveExpression"/>
          </type>
        </elements>
        <elements xsi:type="xtext:Assignment" feature="operator" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.47"/>
        </elements>
        <elements xsi:type="xtext:Assignment" feature="rightOperand" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.48"/>
        </elements>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:EnumRule" name="AdditiveOperator">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EEnum" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//AdditiveOperator"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:EnumLiteralDeclaration">
        <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//AdditiveOperator/Add"/>
        <literal value="+"/>
      </elements>
      <elements xsi:type="xtext:EnumLiteralDeclaration">
        <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//AdditiveOperator/Subtract"/>
        <literal value="-"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="MultiplicativeExpression">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Expression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.50"/>
      <elements xsi:type="xtext:Group" cardinality="*">
        <elements xsi:type="xtext:Action" feature="leftOperand" operator="=">
          <type metamodel="//@metamodelDeclarations.1">
            <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//MultiplicativeExpression"/>
          </type>
        </elements>
        <elements xsi:type="xtext:Assignment" feature="operator" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.49"/>
        </elements>
        <elements xsi:type="xtext:Assignment" feature="rightOperand" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.50"/>
        </elements>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:EnumRule" name="MultiplicativeOperator">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EEnum" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//MultiplicativeOperator"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:EnumLiteralDeclaration">
        <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//MultiplicativeOperator/Multiply"/>
        <literal value="*"/>
      </elements>
      <elements xsi:type="xtext:EnumLiteralDeclaration">
        <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//MultiplicativeOperator/Divide"/>
        <literal value="/"/>
      </elements>
      <elements xsi:type="xtext:EnumLiteralDeclaration">
        <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//MultiplicativeOperator/ElementWiseMultiply"/>
        <literal value=".*"/>
      </elements>
      <elements xsi:type="xtext:EnumLiteralDeclaration">
        <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//MultiplicativeOperator/ElementWiseDivide"/>
        <literal value="./"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="PowerExpression">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Expression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.52"/>
      <elements xsi:type="xtext:Group" cardinality="?">
        <elements xsi:type="xtext:Action" feature="operand" operator="=">
          <type metamodel="//@metamodelDeclarations.1">
            <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//PowerExpression"/>
          </type>
        </elements>
        <elements xsi:type="xtext:Assignment" feature="operator" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.51"/>
        </elements>
        <elements xsi:type="xtext:Assignment" feature="exponent" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.52"/>
        </elements>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:EnumRule" name="PowerOperator">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EEnum" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//PowerOperator"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:EnumLiteralDeclaration">
        <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//PowerOperator/Power"/>
        <literal value="^"/>
      </elements>
      <elements xsi:type="xtext:EnumLiteralDeclaration">
        <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//PowerOperator/ElementWisePower"/>
        <literal value=".^"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="UnaryExpression">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Expression"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.54"/>
      <elements xsi:type="xtext:Group">
        <elements xsi:type="xtext:Action">
          <type metamodel="//@metamodelDeclarations.1">
            <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//UnaryExpression"/>
          </type>
        </elements>
        <elements xsi:type="xtext:Assignment" feature="operator" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.53"/>
        </elements>
        <elements xsi:type="xtext:Assignment" feature="operand" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.54"/>
        </elements>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:EnumRule" name="UnaryOperator">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EEnum" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//UnaryOperator"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:EnumLiteralDeclaration">
        <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//UnaryOperator/Negate"/>
        <literal value="-"/>
      </elements>
      <elements xsi:type="xtext:EnumLiteralDeclaration">
        <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//UnaryOperator/LogicalNot"/>
        <literal value="!"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="PostfixExpression">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Expression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.56"/>
      <elements xsi:type="xtext:Group" cardinality="?">
        <elements xsi:type="xtext:Action" feature="operand" operator="=">
          <type metamodel="//@metamodelDeclarations.1">
            <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//PostfixExpression"/>
          </type>
        </elements>
        <elements xsi:type="xtext:Assignment" feature="operator" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.55"/>
        </elements>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:EnumRule" name="PostfixOperator">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EEnum" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//PostfixOperator"/>
    </type>
    <alternatives xsi:type="xtext:EnumLiteralDeclaration">
      <enumLiteral href="http://www.eclipselabs.org/mscript/AST/1.0.0#//PostfixOperator/Transpose"/>
      <literal value="'"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="ArrayElementAccess">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Expression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.57"/>
      <elements xsi:type="xtext:Group" cardinality="*">
        <elements xsi:type="xtext:Action" feature="array" operator="=">
          <type metamodel="//@metamodelDeclarations.1">
            <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//ArrayElementAccess"/>
          </type>
        </elements>
        <elements xsi:type="xtext:Keyword" value="["/>
        <elements xsi:type="xtext:Assignment" feature="subscripts" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.61"/>
        </elements>
        <elements xsi:type="xtext:Group" cardinality="*">
          <elements xsi:type="xtext:Keyword" value=","/>
          <elements xsi:type="xtext:Assignment" feature="subscripts" operator="+=">
            <terminal xsi:type="xtext:RuleCall" rule="//@rules.61"/>
          </elements>
        </elements>
        <elements xsi:type="xtext:Keyword" value="]"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="MemberFeatureCall">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Expression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.62"/>
      <elements xsi:type="xtext:Alternatives" cardinality="*">
        <elements xsi:type="xtext:Group">
          <elements xsi:type="xtext:Action" feature="target" operator="=">
            <type metamodel="//@metamodelDeclarations.1">
              <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//MemberVariableAccess"/>
            </type>
          </elements>
          <elements xsi:type="xtext:Keyword" value="."/>
          <elements xsi:type="xtext:Assignment" feature="memberVariable" operator="=">
            <terminal xsi:type="xtext:CrossReference">
              <type metamodel="//@metamodelDeclarations.1">
                <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//CallableElement"/>
              </type>
              <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
            </terminal>
          </elements>
        </elements>
        <elements xsi:type="xtext:Group">
          <elements xsi:type="xtext:Action" feature="arguments" operator="+=">
            <type metamodel="//@metamodelDeclarations.1">
              <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//FunctionCall"/>
            </type>
          </elements>
          <elements xsi:type="xtext:Keyword" value="."/>
          <elements xsi:type="xtext:Assignment" feature="feature" operator="=">
            <terminal xsi:type="xtext:CrossReference">
              <type metamodel="//@metamodelDeclarations.1">
                <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//CallableElement"/>
              </type>
              <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
            </terminal>
          </elements>
          <elements xsi:type="xtext:Keyword" value="("/>
          <elements xsi:type="xtext:Group" cardinality="?">
            <elements xsi:type="xtext:Assignment" feature="arguments" operator="+=">
              <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
            </elements>
            <elements xsi:type="xtext:Group" cardinality="*">
              <elements xsi:type="xtext:Keyword" value=","/>
              <elements xsi:type="xtext:Assignment" feature="arguments" operator="+=">
                <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
              </elements>
            </elements>
          </elements>
          <elements xsi:type="xtext:Keyword" value=")"/>
        </elements>
        <elements xsi:type="xtext:Group">
          <elements xsi:type="xtext:Action" feature="target" operator="=">
            <type metamodel="//@metamodelDeclarations.1">
              <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//IterationCall"/>
            </type>
          </elements>
          <elements xsi:type="xtext:Keyword" value="."/>
          <elements xsi:type="xtext:Assignment" feature="identifier" operator="=">
            <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
          </elements>
          <elements xsi:type="xtext:Keyword" value="("/>
          <elements xsi:type="xtext:Assignment" feature="variables" operator="+=">
            <terminal xsi:type="xtext:RuleCall" rule="//@rules.59"/>
          </elements>
          <elements xsi:type="xtext:Group" cardinality="*">
            <elements xsi:type="xtext:Keyword" value=","/>
            <elements xsi:type="xtext:Assignment" feature="variables" operator="+=">
              <terminal xsi:type="xtext:RuleCall" rule="//@rules.59"/>
            </elements>
          </elements>
          <elements xsi:type="xtext:Group" cardinality="?">
            <elements xsi:type="xtext:Keyword" value=";"/>
            <elements xsi:type="xtext:Assignment" feature="accumulator" operator="=">
              <terminal xsi:type="xtext:RuleCall" rule="//@rules.60"/>
            </elements>
          </elements>
          <elements xsi:type="xtext:Group" cardinality="?">
            <elements xsi:type="xtext:Keyword" value=";"/>
            <elements xsi:type="xtext:Assignment" feature="breakCondition" operator="=">
              <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
            </elements>
          </elements>
          <elements xsi:type="xtext:Keyword" value="|"/>
          <elements xsi:type="xtext:Assignment" feature="expression" operator="=">
            <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
          </elements>
          <elements xsi:type="xtext:Keyword" value=")"/>
        </elements>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="AssignableMemberFeatureCall">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Expression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.63"/>
      <elements xsi:type="xtext:Group" cardinality="*">
        <elements xsi:type="xtext:Action" feature="target" operator="=">
          <type metamodel="//@metamodelDeclarations.1">
            <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//MemberVariableAccess"/>
          </type>
        </elements>
        <elements xsi:type="xtext:Keyword" value="."/>
        <elements xsi:type="xtext:Assignment" feature="memberVariable" operator="=">
          <terminal xsi:type="xtext:CrossReference">
            <type metamodel="//@metamodelDeclarations.1">
              <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//CallableElement"/>
            </type>
            <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
          </terminal>
        </elements>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="IterationVariable">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//IterationVariable"/>
    </type>
    <alternatives xsi:type="xtext:Assignment" feature="name" operator="=">
      <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="IterationAccumulator">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//IterationAccumulator"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Assignment" feature="name" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="="/>
      <elements xsi:type="xtext:Assignment" feature="initializer" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="ArraySubscript">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//ArraySubscript"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:Assignment" feature="slice" operator="?=">
        <terminal xsi:type="xtext:Keyword" value=":"/>
      </elements>
      <elements xsi:type="xtext:Assignment" feature="expression" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="PrimaryExpression">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Expression"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.64"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.70"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.80"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.85"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.81"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.83"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.86"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.87"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.88"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="AssignablePrimaryExpression">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Expression"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.70"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.86"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="Literal">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Literal"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.65"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.68"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.69"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="NumericLiteral">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//NumericLiteral"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.66"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.67"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="RealLiteral">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//RealLiteral"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Assignment" feature="value" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.108"/>
      </elements>
      <elements xsi:type="xtext:Assignment" cardinality="?" feature="modifier" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
      </elements>
      <elements xsi:type="xtext:Assignment" feature="unit" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.100"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="IntegerLiteral">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//IntegerLiteral"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Assignment" feature="value" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.110"/>
      </elements>
      <elements xsi:type="xtext:Assignment" cardinality="?" feature="modifier" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
      </elements>
      <elements xsi:type="xtext:Assignment" feature="unit" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.100"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="BooleanLiteral">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//BooleanLiteral"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Action">
        <type metamodel="//@metamodelDeclarations.0">
          <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//BooleanLiteral"/>
        </type>
      </elements>
      <elements xsi:type="xtext:Alternatives">
        <elements xsi:type="xtext:Assignment" feature="true" operator="?=">
          <terminal xsi:type="xtext:Keyword" value="true"/>
        </elements>
        <elements xsi:type="xtext:Keyword" value="false"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="StringLiteral">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//StringLiteral"/>
    </type>
    <alternatives xsi:type="xtext:Assignment" feature="value" operator="=">
      <terminal xsi:type="xtext:RuleCall" rule="//@rules.114"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="FeatureCall">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Expression"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.71"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.72"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="VariableAccess">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Expression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Action">
        <type metamodel="//@metamodelDeclarations.1">
          <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//VariableAccess"/>
        </type>
      </elements>
      <elements xsi:type="xtext:Assignment" feature="feature" operator="=">
        <terminal xsi:type="xtext:CrossReference">
          <type metamodel="//@metamodelDeclarations.1">
            <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//CallableElement"/>
          </type>
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.107"/>
        </terminal>
      </elements>
      <elements xsi:type="xtext:Group" cardinality="?">
        <elements xsi:type="xtext:Keyword" value="{"/>
        <elements xsi:type="xtext:Assignment" feature="stepExpression" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.73"/>
        </elements>
        <elements xsi:type="xtext:Keyword" value="}"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="FunctionCall">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Expression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Action">
        <type metamodel="//@metamodelDeclarations.1">
          <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//FunctionCall"/>
        </type>
      </elements>
      <elements xsi:type="xtext:Assignment" feature="feature" operator="=">
        <terminal xsi:type="xtext:CrossReference">
          <type metamodel="//@metamodelDeclarations.1">
            <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//CallableElement"/>
          </type>
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.107"/>
        </terminal>
      </elements>
      <elements xsi:type="xtext:Keyword" value="("/>
      <elements xsi:type="xtext:Group" cardinality="?">
        <elements xsi:type="xtext:Assignment" feature="arguments" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
        </elements>
        <elements xsi:type="xtext:Group" cardinality="*">
          <elements xsi:type="xtext:Keyword" value=","/>
          <elements xsi:type="xtext:Assignment" feature="arguments" operator="+=">
            <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
          </elements>
        </elements>
      </elements>
      <elements xsi:type="xtext:Keyword" value=")"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="StepExpression">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//StepExpression"/>
    </type>
    <alternatives xsi:type="xtext:RuleCall" rule="//@rules.74"/>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="RangeStepExpression">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//StepExpression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.75"/>
      <elements xsi:type="xtext:Group" cardinality="?">
        <elements xsi:type="xtext:Action" feature="start" operator="=">
          <type metamodel="//@metamodelDeclarations.1">
            <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//RangeStepExpression"/>
          </type>
        </elements>
        <elements xsi:type="xtext:Keyword" value=".."/>
        <elements xsi:type="xtext:Assignment" feature="end" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.75"/>
        </elements>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="AdditiveStepExpression">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//StepExpression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.76"/>
      <elements xsi:type="xtext:Group" cardinality="*">
        <elements xsi:type="xtext:Action" feature="leftOperand" operator="=">
          <type metamodel="//@metamodelDeclarations.1">
            <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//AdditiveStepExpression"/>
          </type>
        </elements>
        <elements xsi:type="xtext:Assignment" feature="operator" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.47"/>
        </elements>
        <elements xsi:type="xtext:Assignment" feature="rightOperand" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.76"/>
        </elements>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="NegateStepExpression">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//StepExpression"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.77"/>
      <elements xsi:type="xtext:Group">
        <elements xsi:type="xtext:Action">
          <type metamodel="//@metamodelDeclarations.1">
            <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//NegateStepExpression"/>
          </type>
        </elements>
        <elements xsi:type="xtext:Keyword" value="-"/>
        <elements xsi:type="xtext:Assignment" feature="operand" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.77"/>
        </elements>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="PrimitiveStepExpression">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//StepExpression"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.78"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.79"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="StepLiteral">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//StepLiteral"/>
    </type>
    <alternatives xsi:type="xtext:Assignment" feature="value" operator="=">
      <terminal xsi:type="xtext:RuleCall" rule="//@rules.109"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="StepN">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//StepN"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Action">
        <type metamodel="//@metamodelDeclarations.1">
          <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//StepN"/>
        </type>
      </elements>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.112"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="DerivativeOperator">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//DerivativeOperator"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Keyword" value="der"/>
      <elements xsi:type="xtext:Assignment" feature="variable" operator="=">
        <terminal xsi:type="xtext:CrossReference">
          <type metamodel="//@metamodelDeclarations.1">
            <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//CallableElement"/>
          </type>
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
        </terminal>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="ArrayConstructionOperator">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//ArrayConstructionOperator"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Keyword" value="{"/>
      <elements xsi:type="xtext:Assignment" feature="expressions" operator="+=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
      <elements xsi:type="xtext:Alternatives">
        <elements xsi:type="xtext:Group" cardinality="*">
          <elements xsi:type="xtext:Keyword" value=","/>
          <elements xsi:type="xtext:Assignment" feature="expressions" operator="+=">
            <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
          </elements>
        </elements>
        <elements xsi:type="xtext:Group">
          <elements xsi:type="xtext:Keyword" value="for"/>
          <elements xsi:type="xtext:Assignment" feature="iterationClauses" operator="+=">
            <terminal xsi:type="xtext:RuleCall" rule="//@rules.82"/>
          </elements>
          <elements xsi:type="xtext:Group" cardinality="*">
            <elements xsi:type="xtext:Keyword" value=","/>
            <elements xsi:type="xtext:Assignment" feature="iterationClauses" operator="+=">
              <terminal xsi:type="xtext:RuleCall" rule="//@rules.82"/>
            </elements>
          </elements>
        </elements>
      </elements>
      <elements xsi:type="xtext:Keyword" value="}"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="ArrayConstructionIterationClause">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//ArrayConstructionIterationClause"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Assignment" feature="variableName" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="in"/>
      <elements xsi:type="xtext:Assignment" feature="collectionExpression" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="ArrayConcatenationOperator">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//ArrayConcatenationOperator"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Keyword" value="["/>
      <elements xsi:type="xtext:Assignment" feature="rows" operator="+=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.84"/>
      </elements>
      <elements xsi:type="xtext:Group" cardinality="*">
        <elements xsi:type="xtext:Keyword" value=";"/>
        <elements xsi:type="xtext:Assignment" feature="rows" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.84"/>
        </elements>
      </elements>
      <elements xsi:type="xtext:Keyword" value="]"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="ExpressionList">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//ExpressionList"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Assignment" feature="expressions" operator="+=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
      <elements xsi:type="xtext:Group" cardinality="*">
        <elements xsi:type="xtext:Keyword" value=","/>
        <elements xsi:type="xtext:Assignment" feature="expressions" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
        </elements>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="UnitConstructionOperator">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//UnitConstructionOperator"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Keyword" value="$"/>
      <elements xsi:type="xtext:Assignment" feature="unit" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.101"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="ParenthesizedExpression">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//ParenthesizedExpression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Keyword" value="("/>
      <elements xsi:type="xtext:Assignment" feature="expressions" operator="+=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
      <elements xsi:type="xtext:Group" cardinality="*">
        <elements xsi:type="xtext:Keyword" value=","/>
        <elements xsi:type="xtext:Assignment" feature="expressions" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
        </elements>
      </elements>
      <elements xsi:type="xtext:Keyword" value=")"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="EndExpression">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//EndExpression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Action">
        <type metamodel="//@metamodelDeclarations.1">
          <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//EndExpression"/>
        </type>
      </elements>
      <elements xsi:type="xtext:Keyword" value="end"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="AlgorithmExpression">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Expression"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Action">
        <type metamodel="//@metamodelDeclarations.1">
          <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//AlgorithmExpression"/>
        </type>
      </elements>
      <elements xsi:type="xtext:Keyword" value="algo"/>
      <elements xsi:type="xtext:Assignment" feature="body" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.89"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="Compound">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//Compound"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Action">
        <type metamodel="//@metamodelDeclarations.1">
          <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//Compound"/>
        </type>
      </elements>
      <elements xsi:type="xtext:Keyword" value="{"/>
      <elements xsi:type="xtext:Assignment" cardinality="*" feature="statements" operator="+=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.90"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="}"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="Statement">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//Statement"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.89"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.91"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.92"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.93"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.94"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.96"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.95"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.97"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.98"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.99"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="Assignment">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//Assignment"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Assignment" feature="target" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.58"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="="/>
      <elements xsi:type="xtext:Assignment" feature="expression" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value=";"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="VariableDeclaration">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//VariableDeclaration"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Keyword" value="var"/>
      <elements xsi:type="xtext:Assignment" feature="name" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="="/>
      <elements xsi:type="xtext:Assignment" feature="initializer" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value=";"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="IfStatement">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//IfStatement"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Keyword" value="if"/>
      <elements xsi:type="xtext:Keyword" value="("/>
      <elements xsi:type="xtext:Assignment" feature="condition" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value=")"/>
      <elements xsi:type="xtext:Assignment" feature="thenStatement" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.90"/>
      </elements>
      <elements xsi:type="xtext:Group" cardinality="?">
        <elements xsi:type="xtext:Keyword" predicated="true" value="else"/>
        <elements xsi:type="xtext:Assignment" feature="elseStatement" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.90"/>
        </elements>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="WhileStatement">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//WhileStatement"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Keyword" value="while"/>
      <elements xsi:type="xtext:Keyword" value="("/>
      <elements xsi:type="xtext:Assignment" feature="condition" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value=")"/>
      <elements xsi:type="xtext:Assignment" feature="body" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.90"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="ForStatement">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//ForStatement"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Keyword" value="for"/>
      <elements xsi:type="xtext:Keyword" value="("/>
      <elements xsi:type="xtext:Assignment" feature="iterationVariable" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.59"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="in"/>
      <elements xsi:type="xtext:Assignment" feature="collectionExpression" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value=")"/>
      <elements xsi:type="xtext:Assignment" feature="body" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.90"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="DoWhileStatement">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//DoWhileStatement"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Keyword" value="do"/>
      <elements xsi:type="xtext:Assignment" feature="body" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.90"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="while"/>
      <elements xsi:type="xtext:Keyword" value="("/>
      <elements xsi:type="xtext:Assignment" feature="condition" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value=")"/>
      <elements xsi:type="xtext:Keyword" value=";"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="ContinueStatement">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//ContinueStatement"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Action">
        <type metamodel="//@metamodelDeclarations.1">
          <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//ContinueStatement"/>
        </type>
      </elements>
      <elements xsi:type="xtext:Keyword" value="continue"/>
      <elements xsi:type="xtext:Keyword" value=";"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="BreakStatement">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//BreakStatement"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Action">
        <type metamodel="//@metamodelDeclarations.1">
          <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//BreakStatement"/>
        </type>
      </elements>
      <elements xsi:type="xtext:Keyword" value="break"/>
      <elements xsi:type="xtext:Keyword" value=";"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="ReturnStatement">
    <type metamodel="//@metamodelDeclarations.1">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/AST/1.0.0#//ReturnStatement"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Keyword" value="return"/>
      <elements xsi:type="xtext:Assignment" feature="expression" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.31"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value=";"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="Unit">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Unit"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Action">
        <type metamodel="//@metamodelDeclarations.0">
          <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Unit"/>
        </type>
      </elements>
      <elements xsi:type="xtext:Alternatives">
        <elements xsi:type="xtext:Group">
          <elements xsi:type="xtext:Keyword" value="("/>
          <elements xsi:type="xtext:Keyword" value=")"/>
        </elements>
        <elements xsi:type="xtext:Group">
          <elements xsi:type="xtext:Keyword" value="("/>
          <elements xsi:type="xtext:Assignment" feature="numerator" operator="=">
            <terminal xsi:type="xtext:RuleCall" rule="//@rules.102"/>
          </elements>
          <elements xsi:type="xtext:Group" cardinality="?">
            <elements xsi:type="xtext:Keyword" value="/"/>
            <elements xsi:type="xtext:Assignment" feature="denominator" operator="=">
              <terminal xsi:type="xtext:RuleCall" rule="//@rules.104"/>
            </elements>
          </elements>
          <elements xsi:type="xtext:Keyword" value=")"/>
        </elements>
        <elements xsi:type="xtext:Assignment" feature="numerator" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.103"/>
        </elements>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="ExplicitUnit">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//Unit"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Keyword" value="("/>
      <elements xsi:type="xtext:Assignment" feature="numerator" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.102"/>
      </elements>
      <elements xsi:type="xtext:Group" cardinality="?">
        <elements xsi:type="xtext:Keyword" value="/"/>
        <elements xsi:type="xtext:Assignment" feature="denominator" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.104"/>
        </elements>
      </elements>
      <elements xsi:type="xtext:Keyword" value=")"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="UnitNumerator">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//UnitNumerator"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:Group">
        <elements xsi:type="xtext:Action">
          <type metamodel="//@metamodelDeclarations.0">
            <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//UnitNumerator"/>
          </type>
        </elements>
        <elements xsi:type="xtext:RuleCall" rule="//@rules.115"/>
      </elements>
      <elements xsi:type="xtext:Group">
        <elements xsi:type="xtext:Assignment" feature="factors" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.105"/>
        </elements>
        <elements xsi:type="xtext:Group" cardinality="*">
          <elements xsi:type="xtext:Keyword" value="*"/>
          <elements xsi:type="xtext:Assignment" feature="factors" operator="+=">
            <terminal xsi:type="xtext:RuleCall" rule="//@rules.105"/>
          </elements>
        </elements>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="ImplicitUnitNumerator">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//UnitNumerator"/>
    </type>
    <alternatives xsi:type="xtext:Action">
      <type metamodel="//@metamodelDeclarations.0">
        <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//UnitNumerator"/>
      </type>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="UnitDenominator">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//UnitDenominator"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:Assignment" feature="factors" operator="+=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.105"/>
      </elements>
      <elements xsi:type="xtext:Group">
        <elements xsi:type="xtext:Keyword" value="("/>
        <elements xsi:type="xtext:Assignment" feature="factors" operator="+=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.105"/>
        </elements>
        <elements xsi:type="xtext:Group" cardinality="*">
          <elements xsi:type="xtext:Keyword" value="*"/>
          <elements xsi:type="xtext:Assignment" feature="factors" operator="+=">
            <terminal xsi:type="xtext:RuleCall" rule="//@rules.105"/>
          </elements>
        </elements>
        <elements xsi:type="xtext:Keyword" value=")"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="UnitFactor">
    <type metamodel="//@metamodelDeclarations.0">
      <classifier xsi:type="ecore:EClass" href="http://www.eclipselabs.org/mscript/TypeSystem/1.0.0#//UnitFactor"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Assignment" feature="symbol" operator="=">
        <terminal xsi:type="xtext:RuleCall" rule="//@rules.111"/>
      </elements>
      <elements xsi:type="xtext:Group" cardinality="?">
        <elements xsi:type="xtext:Keyword" value="^"/>
        <elements xsi:type="xtext:Assignment" feature="exponent" operator="=">
          <terminal xsi:type="xtext:RuleCall" rule="//@rules.106"/>
        </elements>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="UnitExponent">
    <type metamodel="//@metamodelDeclarations.2">
      <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Keyword" cardinality="?" value="-"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.109"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="QualifiedName">
    <type metamodel="//@metamodelDeclarations.2">
      <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.111"/>
      <elements xsi:type="xtext:Group" cardinality="*">
        <elements xsi:type="xtext:Keyword" value="::"/>
        <elements xsi:type="xtext:RuleCall" rule="//@rules.111"/>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="ValidDouble">
    <type metamodel="//@metamodelDeclarations.2">
      <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
    </type>
    <alternatives xsi:type="xtext:RuleCall" rule="//@rules.116"/>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="ValidInt">
    <type metamodel="//@metamodelDeclarations.2">
      <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.115"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.117"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="ValidLong">
    <type metamodel="//@metamodelDeclarations.2">
      <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//ELong"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.115"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.117"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:ParserRule" name="ValidID">
    <type metamodel="//@metamodelDeclarations.2">
      <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </type>
    <alternatives xsi:type="xtext:Alternatives">
      <elements xsi:type="xtext:RuleCall" rule="//@rules.112"/>
      <elements xsi:type="xtext:RuleCall" rule="//@rules.113"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:TerminalRule" name="N">
    <type metamodel="//@metamodelDeclarations.2">
      <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </type>
    <alternatives xsi:type="xtext:Keyword" value="n"/>
  </rules>
  <rules xsi:type="xtext:TerminalRule" name="ID">
    <type metamodel="//@metamodelDeclarations.2">
      <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:Alternatives">
        <elements xsi:type="xtext:Keyword" value="_"/>
        <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>
      <elements xsi:type="xtext:Alternatives" cardinality="*">
        <elements xsi:type="xtext:CharacterRange">
          <left value="0"/>
          <right value="9"/>
        </elements>
        <elements xsi:type="xtext:Keyword" value="_"/>
        <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>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:TerminalRule" name="STRING">
    <type metamodel="//@metamodelDeclarations.2">
      <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="&quot;"/>
      <elements xsi:type="xtext:Alternatives" cardinality="*">
        <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 xsi:type="xtext:Group">
          <elements xsi:type="xtext:Keyword" value="\"/>
          <elements xsi:type="xtext:Alternatives">
            <elements xsi:type="xtext:Keyword" value="'"/>
            <elements xsi:type="xtext:Keyword" value="&quot;"/>
            <elements xsi:type="xtext:Keyword" value="?"/>
            <elements xsi:type="xtext:Keyword" value="\"/>
            <elements xsi:type="xtext:Keyword" value="a"/>
            <elements xsi:type="xtext:Keyword" value="b"/>
            <elements xsi:type="xtext:Keyword" value="f"/>
            <elements xsi:type="xtext:Keyword" value="n"/>
            <elements xsi:type="xtext:Keyword" value="r"/>
            <elements xsi:type="xtext:Keyword" value="t"/>
            <elements xsi:type="xtext:Keyword" value="v"/>
          </elements>
        </elements>
      </elements>
      <elements xsi:type="xtext:Keyword" value="&quot;"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:TerminalRule" name="ONE">
    <type metamodel="//@metamodelDeclarations.2">
      <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </type>
    <alternatives xsi:type="xtext:Keyword" value="1"/>
  </rules>
  <rules xsi:type="xtext:TerminalRule" name="REAL">
    <type metamodel="//@metamodelDeclarations.2">
      <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </type>
    <alternatives xsi:type="xtext:Group">
      <elements xsi:type="xtext:CharacterRange" cardinality="+">
        <left value="0"/>
        <right value="9"/>
      </elements>
      <elements xsi:type="xtext:Keyword" value="."/>
      <elements xsi:type="xtext:CharacterRange" cardinality="*">
        <left value="0"/>
        <right value="9"/>
      </elements>
      <elements xsi:type="xtext:Group" cardinality="?">
        <elements xsi:type="xtext:Alternatives">
          <elements xsi:type="xtext:Keyword" value="e"/>
          <elements xsi:type="xtext:Keyword" value="E"/>
        </elements>
        <elements xsi:type="xtext:Alternatives" cardinality="?">
          <elements xsi:type="xtext:Keyword" value="+"/>
          <elements xsi:type="xtext:Keyword" value="-"/>
        </elements>
        <elements xsi:type="xtext:CharacterRange" cardinality="+">
          <left value="0"/>
          <right value="9"/>
        </elements>
      </elements>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:TerminalRule" name="INT">
    <type metamodel="//@metamodelDeclarations.2">
      <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </type>
    <alternatives xsi:type="xtext:CharacterRange" cardinality="+">
      <left value="0"/>
      <right value="9"/>
    </alternatives>
  </rules>
  <rules xsi:type="xtext:TerminalRule" name="ML_COMMENT">
    <type metamodel="//@metamodelDeclarations.2">
      <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="//@metamodelDeclarations.2">
      <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="//@metamodelDeclarations.2">
      <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="//@metamodelDeclarations.2">
      <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </type>
    <alternatives xsi:type="xtext:Wildcard"/>
  </rules>
</xtext:Grammar>
