Browsable Hierarchical State Machine Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: automata/hsm/machine/extracted
Source used for this grammar: Youssef Srour, Hierarchical State Machine 1.0, HierarchicalStateMachine.ecore, 2006/07/14

Summary

Syntax

MgaObject ::=
	StateBase
MgaObject ::=
	DataVar
MgaObject ::=
	Transition
MgaObject ::=
	StateDateRelation
MgaObject ::=
	[name]::String [position]::String
StateBase ::=
	CompoundState
StateBase ::=
	PrimitiveState
StateBase ::=
	[defaultTransition]::String [marked]::Boolean [associationStateStatedst]::AssociationStateState+ [associationStateStatesrc]::AssociationStateState+ [data]::DataVar+ [associationDataStateBase]::AssociationDataStateBase
DataVar ::=
	[stateBase]::StateBase+ [orState]::OrState [associationDataStateBase]::AssociationDataStateBase
Transition ::=
	[guard]::String [trigger]::String [action]::String [isSync]::Boolean [orState]::OrState [associationStateState]::AssociationStateState
StateDateRelation ::=
	[value]::String [color]::String
RootFolder ::=
	[name]::String [rootFolders]::RootFolder+ [orState]::OrState+
OrState ::=
	[rootFolder]::RootFolder [state]::State+ [init]::Init [dataVar]::DataVar+ [stateDataRelation]::StateDataRelation+ [transition]::Transition+ [compoundState]::CompoundState+
AndState ::=
	[compoundState]::CompoundState+
CompoundState ::=
	OrState
CompoundState ::=
	AndState
CompoundState ::=
	[andState]::AndState [orState]::OrState
PrimitiveState ::=
	Init
PrimitiveState ::=
	State
PrimitiveState ::=
	StateDataRelation
PrimitiveState ::=
	Init
	State
	StateDataRelation
Init ::=
	[orState]::OrState
State ::=
	[orState]::OrState
StateDataRelation ::=
	[value]::String [color]::String [orState]::OrState [associationDataStateBase1]::AssociationDataStateBase
AssociationStateState ::=
	[transition]::Transition [dstTransition]::StateBase+ [srcTransition]::StateBase+
AssociationDataStateBase ::=
	[stateDataRelation]::StateDataRelation [dataVar]::DataVar+ [stateBase]::StateBase+
String ::=
	string
Boolean ::=
	"true"
	"false"
Integer ::=
	integer

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