|
|
|
## Parameter Group
|
|
|
|
|
|
|
|
```
|
|
|
|
ParameterGroup:
|
|
|
|
group=[declaration::ParameterGroupDeclaration|ID] '{'
|
|
|
|
(parameters+=ParameterAssignment)*
|
|
|
|
'}';
|
|
|
|
```
|
|
|
|
|
|
|
|
## Parameter Assignment
|
|
|
|
|
|
|
|
```
|
|
|
|
ParameterAssignment:
|
|
|
|
declaration=[declaration::ParameterDeclaration|ID] ('(' dimensions+=Dimension (',' dimensions+=Dimension)* ')')? '=' value=ConfigurationExpression (unit=Unit)?
|
|
|
|
;
|
|
|
|
```
|
|
|
|
|
|
|
|
## Configuration Expression
|
|
|
|
|
|
|
|
```
|
|
|
|
ConfigurationExpression:
|
|
|
|
left=MultiplyExpression (operator=('+'|'-') right=ConfigurationExpression)?
|
|
|
|
;
|
|
|
|
|
|
|
|
MultiplyExpression:
|
|
|
|
left=Literal (operator=('*'|'/'|'%') right=MultiplyExpression)?
|
|
|
|
;
|
|
|
|
|
|
|
|
Literal:
|
|
|
|
Primitive | Array | '(' ConfigurationExpression ')';
|
|
|
|
|
|
|
|
Array:
|
|
|
|
{Array} '{' elements+=Primitive (',' elements+=Primitive)* '}';
|
|
|
|
```
|
|
|
|
|
|
|
|
## Primitive Elements
|
|
|
|
|
|
|
|
```
|
|
|
|
Primitive:
|
|
|
|
FloatNumber | IntNumber | Text | Bool | NamedElementReference;
|
|
|
|
|
|
|
|
// TODO add features to access only single elements of an array
|
|
|
|
NamedElementReference:
|
|
|
|
declaration=[types::NamedElement|ID]
|
|
|
|
;
|
|
|
|
|
|
|
|
Bool:
|
|
|
|
value=BOOLEAN;
|
|
|
|
|
|
|
|
Text:
|
|
|
|
value=STRING;
|
|
|
|
|
|
|
|
FloatNumber:
|
|
|
|
value=FLOAT
|
|
|
|
;
|
|
|
|
|
|
|
|
IntNumber:
|
|
|
|
value=INT
|
|
|
|
;
|
|
|
|
```
|
|
|
|
|
|
|
|
## Unit
|
|
|
|
|
|
|
|
```
|
|
|
|
Unit:
|
|
|
|
unit=ID;
|
|
|
|
``` |