|
|
## Module Configuration
|
|
|
|
|
|
Currently, the DSL has two kinds of *module configurations*. The standard version and one specialized to setup diagnostics. The latter is experimental.
|
|
|
|
|
|
```
|
|
|
ModuleConfiguration:
|
|
|
StandardModuleConfiguration | Diagnostics
|
|
|
;
|
|
|
```
|
|
|
|
|
|
## Standard Module Configuration
|
|
|
|
|
|
The standard module configuration refers to an existing module in the declaration model.
|
|
|
Like the global setup, a module can have features and parameter groups.
|
|
|
|
|
|
```
|
|
|
StandardModuleConfiguration:
|
|
|
'module' moduleDeclaration=[declaration::ModuleDeclaration] '{'
|
|
|
('features' features+=[declaration::Feature|ID] (',' features+=[declaration::Feature|ID])*)?
|
|
|
'parameters' (parameterGroups+=ParameterGroup)*
|
|
|
'}'
|
|
|
;
|
|
|
```
|
|
|
|
|
|
## Diagnostics
|
|
|
|
|
|
The diagnostics rule is specially tailored for diagnostics which we encountered so far in all scientific models. They only have a set of parameter assignments which apply to all diagnostic settings and several log configurations.
|
|
|
|
|
|
```
|
|
|
Diagnostics: {Diagnostics} 'diagnostics' '{'
|
|
|
modifiers+=DiagnosticParameterAssignment*
|
|
|
'logs'
|
|
|
logConfigurations+=LogConfiguration*
|
|
|
'}'
|
|
|
;
|
|
|
```
|
|
|
|
|
|
## Diagnostic Parameter Assignments
|
|
|
|
|
|
We have two kind of assignments. Value assignments work like those found in standard module configurations. While flag parameters are defined by just naming them. In that they are similar to features.
|
|
|
|
|
|
```
|
|
|
DiagnosticParameterAssignment: DiagnosticValueParameterAssignment | DiagnosticFlagParameterAssignment;
|
|
|
|
|
|
DiagnosticValueParameterAssignment:
|
|
|
declaration=[declaration::DiagnosticValueParameterDeclaration|ID] ('(' dimensions+=Dimension (',' dimensions+=Dimension)* ')')? '=' value=ConfigurationExpression
|
|
|
;
|
|
|
DiagnosticFlagParameterAssignment:
|
|
|
declaration=[declaration::DiagnosticFlagParameterDeclaration|ID]
|
|
|
;
|
|
|
```
|
|
|
|
|
|
## Log Configuration
|
|
|
|
|
|
Each log configuration starts with a filename specified as a string, followed by diagnostic parameters and a set of generic parameters. This will be simplified in future.
|
|
|
|
|
|
```
|
|
|
LogConfiguration: filePrefix=STRING diagnosticParameters+=DiagnosticParameterAssignment* '{'
|
|
|
(parameters+=ParameterAssignment)*
|
|
|
'}'
|
|
|
;
|
|
|
```
|
|
|
|
|
|
|