| /** |
| * |
| * Copyright (c) 2011, 2018 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * |
| * 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: |
| * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation |
| * |
| */ |
| grammar org.eclipse.osbp.xtext.signal.SignalDSL |
| with org.eclipse.osbp.xtext.oxtype.OXtype |
| |
| import "http://osbp.eclipse.org/xtext/signal/SignalDSL" |
| import "http://osbp.eclipse.org/xtext/datainterchange/DataDSL" as data |
| import "http://osbp.eclipse.org/dsl/common/types/v1" as types |
| import "http://www.eclipse.org/emf/2002/Ecore" as ecore |
| |
| |
| SignalModel: |
| importSection=XImportSection? |
| packages+=SignalPackage*; |
| |
| SignalPackage: |
| {SignalPackage} 'package' name=QualifiedName |
| ('{' (watchers+=SignalWatcher)* |
| (handlers+=SignalHandler)* |
| '}') ; |
| |
| |
| SignalWatcher: |
| {SignalWatcher} |
| 'watcher' name=ID |
| 'directory' directory=STRING |
| 'for' signal=SignalTypeEnum |
| ; |
| |
| |
| SignalHandler: |
| {SignalHandler} |
| 'handlerOn' |
| watcher=[SignalWatcher] |
| (handler=SignalHandling (notification=SignalNotification)?) |
| ; |
| |
| SignalNotification: |
| event=SignalNotificationEnum |
| message=STRING; |
| |
| SignalDatainterchange: |
| dataRef=[data::DataInterchange]; |
| |
| SignalProcessor: |
| SignalDatainterchange; |
| |
| SignalHandling: |
| actionType=SignalHandlerTypeEnum |
| dataRef=[data::DataInterchange]; |
| // processor=SignalProcessor; |
| |
| enum SignalTypeEnum: |
| all = 'all' | |
| createsignals = 'createSignals' | |
| modifysignals = 'modifySignals' | |
| deletesignals = 'deleteSignals'; |
| |
| enum SignalNotificationEnum: |
| showOnAll | showOnCreate | showOnDelete |showOnModify; |
| |
| enum SignalHandlerTypeEnum: |
| doAfter | doAfterCreate | doAfterDelete| doAfterModify| |
| doBefore | doBeforeCreate | doBeforeModify | doDeforeDelete; |
| |
| TRANSLATABLEID: |
| ID; |