blob: b4e0aa42024cba1f503ea44b502246806b190101 (
plain) (
tree)
|
|
/*******************************************************************************
* Copyright (c) 2012 protos software gmbh (http://www.protos.de).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* CONTRIBUTORS:
* Henrik Rentz-Reichert (initial contribution)
*
*******************************************************************************/
grammar org.eclipse.etrice.core.etmap.ETMap with org.eclipse.xtext.common.Terminals
generate eTMap "http://www.eclipse.org/etrice/core/etmap/ETMap"
import "http://www.eclipse.org/emf/2002/Ecore" as ecore
import "platform:/resource/org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore" as room
import "platform:/resource/org.eclipse.etrice.core.etphys/src-gen/org/eclipse/etrice/core/etphys/ETPhys.ecore" as phys
MappingModel:
'MappingModel' name=FQN '{'
(imports+=Import)*
mappings+=Mapping*
'}'
;
Mapping:
'Mapping' logicalSys=[room::LogicalSystem|FQN] '->' physicalSys=[phys::PhysicalSystem|FQN] '{'
subsysMappings+=SubSystemMapping*
'}'
;
SubSystemMapping:
'SubSystemMapping' logicalSubSys=[room::SubSystemRef|ID] '->' node=[phys::NodeRef|ID] ('{'
threadMappings+=ThreadMapping*
'}')?
;
ThreadMapping:
'ThreadMapping' logicalThread=[room::LogicalThread|ID] '->' physicalThread=[phys::PhysicalThread|ID]
;
Import :
'import' (importedNamespace=ImportedFQN 'from' | 'model') importURI=STRING;
ImportedFQN:
FQN ('.*')?;
FQN:
ID ('.' ID)*;
|