MCMAS ::= ComponentDefinition+ ModelDefinition SimulationDefinition
ComponentDefinition ::= ComponentClause UseClause VariableClause InterfaceClause OperationClause EndComponentKeyword
ModelDefinition ::= ModelClause UseClause ConnectionClause EndModelKeyword
SimulationDefinition ::= SimulationClause SUseClause InitializeClause SimulateClause EndSimulationKeyword
ComponentClause ::= ComponentKeyword Identifier InfaceKeyword Integer OutfaceKeyword Integer
UseClause ::= UseKeyword Identifier*
VariableClause ::= VariableKeyword VariableDefinition*
InterfaceClause ::= InFaceDefinition OutFaceDefinition
OperationClause ::= PythonOperationBlock? OctaveOperationBlock?
ModelClause ::= ModelKeyword Identifier
ConnectionClause ::= ConnectionKeyword LComponentVariable RComponentVariable
SimulationClause ::= SimulationKeyword Identifier
SUseClause ::= UseKeyword Identifier
InitializeClause ::= InitializeKeyword InitializeTerm*
SimulateClause ::= SimulateKeyword Identifier
VariableDefinition ::= StringVariable | IntegerVariable | FloatVariable
StringVariable ::= StringKeyword Identifier Identifier*
IntegerVariable ::= IntegerKeyword Identifier Integer? ConstantKeyword?
FloatVariable ::= FloatKeyword Identifier Float? ConstantKeyword?
InFaceDefinition ::= InputKeyword Identifier ':' Identifier+
OutFaceDefinition ::= OutputKeyword Identifier ':' Identifier+
PythonOperationBlock ::= (PythonKeyword Identifier+)*
OctaveOperationBlock ::= (OctaveKeyword Identifier+)*
LComponentVariable ::= Identifier '.' Identifier
RComponentVariable ::= Identifier '.' Identifier
InitializeTerm ::= ComponentVariable Identifier+ | Integer | Float
ComponentVariable ::= Identifier '.' Identifier
ComponentKeyword ::= 'component'
ConnectionKeyword ::= 'connection'
ConstantKeyword ::= 'constant'
EndComponentKeyword ::= 'endcomponent'
EndModelKeyword ::= 'endmodel'
EndSimulationKeyword ::= 'endsimulation'
FloatKeyword ::= 'float'
InfaceKeyword ::= 'inface'
InitializeKeyword ::= 'initialize'
InputKeyword ::= 'input'
IntegerKeyword ::= 'integer'
ModelKeyword ::= 'model'
OctaveKeyword ::= 'octave'
OutfaceKeyword ::= 'outface'
OutputKeyword ::= 'output'
PythonKeyword ::= 'python'
SimulateKeyword ::= 'simulate'
SimulationKeyword ::= 'simulation'
StringKeyword ::= 'string'
VariableKeyword ::= 'variable'
UseKeyword ::= 'use'
Identifier ::= [a-zA-Z][a-zA-Z0-9]*
Float ::= Integer '.' Integer
Integer ::= [1-9][0-9]*