-
Notifications
You must be signed in to change notification settings - Fork 15
/
main.langium
45 lines (37 loc) · 1.07 KB
/
main.langium
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// SPDX-FileCopyrightText: 2023 Friedrich-Alexander-Universitat Erlangen-Nurnberg
//
// SPDX-License-Identifier: AGPL-3.0-only
grammar Jayvee
import './block-type'
import './pipeline'
import './terminal'
import './property'
import './value-type'
import './constraint'
import './transform'
import './io-type'
entry JayveeModel:
(
imports+=ImportDefinition
| exports+=ExportDefinition
| exportableElements+=ExportableElementDefinition
| pipelines+=PipelineDefinition
)*;
ExportableElementDefinition:
(isPublished?='publish')? ExportableElement;
ExportableElement:
(CustomValuetypeDefinition | BuiltinValuetypeDefinition)
| ConstraintDefinition
| TransformDefinition
| ReferenceableBlockTypeDefinition
| BuiltinConstrainttypeDefinition
| IotypeDefinition;
ExportDefinition:
'publish' element=[ExportableElement] ('as' alias=ID)? ';';
ImportDefinition:
'use' (
useAll?='*'
| '{' usedElements+=NamedImportElement (',' usedElements+=NamedImportElement)* '}'
) 'from' path=STRING ';';
NamedImportElement:
element=ID ('as' alias=ID)?;