Browsable MATLAB Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: markup/scientific/matlab/srour/extracted
Source used for this grammar: Youssef Srour, MATLAB 1.2, Matlab.ecore, 26/06/2006

Summary

Syntax

String ::=
	string
Integer ::=
	integer
Matlab ::=
	[model]::Model+
BlockDefaults ::=
	Block
BlockDefaults ::=
	[blockDefaults]::String [model]::Model
Model ::=
	[name]::String [matlab]::Matlab [annotationDefaults]::AnnotationDefaults+ [system]::System+ [blockDefaults]::BlockDefaults+ [lineDefaults]::LineDefaults+ [simulink]::Simulink
AnnotationDefaults ::=
	Annotation
AnnotationDefaults ::=
	[annotationDefaults]::String [model]::Model
LineDefaults ::=
	Line
LineDefaults ::=
	[lineDefaults]::String [model]::Model
System ::=
	[name]::String [blocks]::Block+ [lines]::Line+ [annotations]::Annotation+ [model]::Model [parentSubsystem]::Subsystem
Subsystem ::=
	Masked
Subsystem ::=
	Normal
Subsystem ::=
	[system]::System
Block ::=
	Subsystem
Block ::=
	Primitive
Block ::=
	Reference
Block ::=
	[name]::String [blockType]::String [description]::String [priority]::String [tag]::String [position]::String [mySystem]::System [ports]::Port+
Annotation ::=
	[position]::String [text]::String [system]::System
Line ::=
	DirectLine
Line ::=
	BranchedLine
Line ::=
	[points]::String [id]::String [srcPort]::OutputPort [system]::System
DirectLine ::=
	[destPort1]::InputPort
InputPort ::=
	[owningDirectLine]::DirectLine [owningDirectBranch]::DirectBranch
Branch ::=
	DirectBranch
Branch ::=
	NestedBranch
Branch ::=
	[points]::String [branchedLine]::BranchedLine [nestedBranch]::NestedBranch
BranchedLine ::=
	[branchs]::Branch+
Primitive ::=
	[id]::String [parameters]::Parameter+ [refPort]::Port
Port ::=
	InputPort
Port ::=
	OutputPort
Port ::=
	[id]::String [number]::String [portBlock]::Block [primitive]::Primitive
Reference ::=
	[sourceType]::String [sourceBlock]::String [parameters]::Parameter+
Masked ::=
	[system]::System
Normal ::=
	[system]::System
Parameter ::=
	Type
Parameter ::=
	Double
Parameter ::=
	INteger
Parameter ::=
	Enumeration
Parameter ::=
	BOolean
Parameter ::=
	Text
Parameter ::=
	Vector
Parameter ::=
	[name]::String [le_reference]::Reference [primitive]::Primitive
OutputPort ::=
	[owningLine]::Line
Type ::=
	[value]::String
Double ::=
	[value]::String
INteger ::=
	[value]::String
Enumeration ::=
	[value]::String
BOolean ::=
	[value]::TrueFalse
TrueFalse ::=
	[True]::ε
	[False]::ε
Text ::=
	[value]::String
Vector ::=
	[value]::String
DirectBranch ::=
	[id]::String [destPort]::InputPort
NestedBranch ::=
	[branchs]::Branch+
Machine ::=
	[name]::String [id]::String [events]::Event+ [data]::Data+ [instances]::Instance+ [targets]::Target+ [stateFlow]::StateFlow
Junction ::=
	[_id]::String [id]::String [type]::String [position]::String [state]::State [chart]::Chart
Transition ::=
	[_id]::String [dataLimites]::String [id]::String [trigger]::String [condition]::String [conditionAction]::String [action]::String [chart]::Chart [state]::State
Event ::=
	[name]::String [id]::String [scope]::String [description]::String [trigger]::String [machine]::Machine [chart]::Chart [state]::State
Data ::=
	[name]::String [id]::String [scope]::String [description]::String [units]::String [dataType]::String [props]::Props+ [state]::State [chart]::Chart [machine]::Machine
Instance ::=
	[_id]::String [id]::String [name]::String [machine]::Machine
Target ::=
	[name]::String [id]::String [codeCommand]::String [description]::String [makeCommand]::String [codeFlags]::String [checksumOld]::String [machine]::Machine
Chart ::=
	[name]::String [id]::String [_id]::String [decomposotion]::String [updateMethode]::String [sampleTime]::String [junctions]::Junction+ [events]::Event+ [transitions]::Transition+ [data]::Data+ [states]::State+
State ::=
	[name]::String [id]::String [_id]::String [type]::String [entryAction]::String [exitAction]::String [duringAction]::String [eventActions]::String [decomposition]::String [position]::String [junctions]::Junction+ [events]::Event+ [transitions]::Transition+ [data]::Data+ [chart]::Chart [states]::State+
Props ::=
	[initialValue]::String [arrays]::Array+ [ranges]::Range+ [data]::Data
Range ::=
	[maximum]::String [minimum]::String [props]::Props
Array ::=
	[firstIndex]::String [size]::String [props]::Props
StateFlow ::=
	[stateFlow]::String [machines]::Machine+ [simulink]::Simulink
TransitionTerminal ::=
	[_id]::String
Simulink ::=
	[simulink]::String [stateFlows]::StateFlow+ [models]::Model+

GrammarLabMaintained by Dr. Vadim Zaytsev a.k.a. @grammarware. Last updated in September 2015. []