Six Years of Melbourne: July 2002 to April 2008 by Maurice HT Ling - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

Appendix C: Initial Specification of MCMAS

 

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]*