Browsable Bossa Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: dsl/scheduling/bossa/youssef/extracted
Source used for this grammar: SROUR Youssef, Bossa 1.0 1.1, Bossa.ecore, 2006/07/31

Summary

Syntax

BossaProgramm ::=
	[scheduler]::Scheduler
Scheduler ::=
	NormalScheduler
Scheduler ::=
	VirtualScheduler
NormalScheduler ::=
	[schedulerDecl]::SchedulerDecl
VirtualScheduler ::=
	[vschedulerDecl]::VSchdulerDecl
AbstractSchedulerDecl ::=
	SchedulerDecl
AbstractSchedulerDecl ::=
	VSchdulerDecl
SchedulerDecl ::=
	[processDef]::ProcessDef
VSchdulerDecl ::=
	[schedulerDef]::SchedulerDef
ConstDef ::=
	[id]::String [expr]::Expression [bossaTypeExpr]::BossaTypeExpr
TypeDef ::=
	[enumRang]::EnumRange
EnumRange ::=
	[enumDef]::EnumDef [rangeDef]::RangeDef
EnumDef ::=
	[theIds]::String+
BagId ::=
	[theValue]::String
RangeDef ::=
	[expr]::Expression
ProcessDef ::=
	[processVarDecl]::ProcessVarDecl+
SchedulerDef ::=
	[processVarDecl]::ProcessVarDecl+
ProcessVarDecl ::=
	Timer_ProcessVarDecl
ProcessVarDecl ::=
	System_ProcessVarDecl
ProcessVarDecl ::=
	Normal_ProcessVarDecl
ProcessVarDecl ::=
	[id]::String [processDef]::ProcessDef [schedulerDef]::SchedulerDef
Timer_ProcessVarDecl ::=
	[id]::String [processDef]::ProcessDef [schedulerDef]::SchedulerDef
System_ProcessVarDecl ::=
	[system]::Boolean [typeExpr]::TypeExpr
Normal_ProcessVarDecl ::=
	[typeExpr]::TypeExpr
HandlerDef ::=
	[id]::String [scheduler]::Scheduler [onHandlerDef]::OnHandlerDef+
InterfaceDef ::=
	[composantOfInterFunc]::ComposantOfInterFunc+ [scheduler]::Scheduler
FunctionDef ::=
	[composantOfInterFunc]::ComposantOfInterFunc+ [scheduler]::Scheduler
Expression ::=
	Integer_Expression
Expression ::=
	Id_Expression
Expression ::=
	State_Expression
Expression ::=
	True_Expression
Expression ::=
	False_Expression
Expression ::=
	Unop_Expression
Expression ::=
	Etoile_Expression
Expression ::=
	ExpId_Expression
Expression ::=
	Select_Expression
Expression ::=
	FnName_Expression
Expression ::=
	Empty_Expression
Expression ::=
	SRCOnSched_Expression
Expression ::=
	SchedulerOf_Expression
Expression ::=
	In_Expression
Expression ::=
	Parenthese_Expression
Expression ::=
	Binop_Expression
Integer_Expression ::=
	[theValue]::Integer
Id_Expression ::=
	[id]::String
State_Expression ::=
	[theValue]::String
True_Expression ::=
	ε
False_Expression ::=
	ε
Unop_Expression ::=
	[unop]::Unop [expr]::Expression
Etoile_Expression ::=
	[expr]::Expression
ExpId_Expression ::=
	[id]::String [expr]::Expression
Select_Expression ::=
	ε
FnName_Expression ::=
	[expr]::Expression+
Empty_Expression ::=
	[classState]::ClassState
SRCOnSched_Expression ::=
	ε
SchedulerOf_Expression ::=
	[expr]::Expression
In_Expression ::=
	[in]::Boolean [expr]::Expression [classState]::ClassState
Parenthese_Expression ::=
	[expr]::Expression
Binop_Expression ::=
	[id_Expression]::Id_Expression [compo_Binop_Expression]::Compo_Binop_Expression
Compo_Binop_Expression ::=
	[binop]::Binop [id_Expression]::Id_Expression
ValDecl ::=
	Normal_ValDecl
ValDecl ::=
	System_ValDecl
ValDecl ::=
	Timer_ValDecl
ValDecl ::=
	[id]::String [abstractSchedulerDecl]::AbstractSchedulerDecl
Normal_ValDecl ::=
	[nonProcType]::NonProcType
System_ValDecl ::=
	[nonProcType]::NonProcType
Timer_ValDecl ::=
	[id]::String [abstractSchedulerDecl]::AbstractSchedulerDecl
FunDecl ::=
	[parameterTypes]::ParameterType [nonProcType]::NonProcType [abstractSchedulerDecl]::AbstractSchedulerDecl
StateDef ::=
	[classNameStorage]::ClassNameStorage+ [abstractSchedulerDecl]::AbstractSchedulerDecl
ClassNameStorage ::=
	[id]::String [className]::ClassName [storage]::Storage
OrderDef ::=
	[keyCritDecl]::KeyCritDecls [critDecls]::CritDecls [abstractSchedulerDecl]::AbstractSchedulerDecl
AdmissionDef ::=
	[valDef]::ValDef+ [admCrit]::AdmCrit [attachDetach]::AttachDetach [abstractSchedulerDecl]::AbstractSchedulerDecl
TraceDef ::=
	[traceEvent]::TraceEvent [traceExpr]::TraceExpr [traceTest]::TraceTest [abstractSchedulerDecl]::AbstractSchedulerDecl
TypeExpr ::=
	[id]::String [bossaTypeExpr]::BossaTypeExpr
TypeOrVoid ::=
	[isVoid]::Boolean [typeExpr]::TypeExpr
ParameterType ::=
	[typeExpr]::TypeExpr+
Storage ::=
	Process_Storage
Storage ::=
	Scheduler_Storage
Storage ::=
	Queue_Storage
Process_Storage ::=
	ε
Scheduler_Storage ::=
	[stateVisibility]::StateVisibility
Queue_Storage ::=
	[stateVisibility]::StateVisibility [queueType]::QueueType
KeyCritDecls ::=
	[compoKeyCritDecls]::CompoKeyCritDecls+
CompoKeyCritDecls ::=
	[critDecl]::CritDecl
CritDecls ::=
	[critDecl]::CritDecl+
CritDecl ::=
	CritDeclWhithId
CritDecl ::=
	CritDeclWhithoutId
CritDeclWhithId ::=
	[id]::String
CritDeclWhithoutId ::=
	[expr]::Expression
ValDef ::=
	[id]::String [typeExpr]::TypeExpr [expr]::Expression
AdmCrit ::=
	[paramVarDecl]::ParamVarDecl+ [expr]::Expression
AttachDetach ::=
	[procParam1]::ProcParam [procParam2]::ProcParam [seqStmt1]::SeqStmt [seqStmt2]::SeqStmt
ParamVarDecl ::=
	[id]::String [typeExpr]::TypeExpr
SeqStmt ::=
	[valDef]::ValDef+ [stmt]::Statment+
TraceEvent ::=
	[eventName]::EventName+
TraceExpr ::=
	[id]::String+
TraceTest ::=
	[expr]::Expression
ProcParam ::=
	[id]::String [process]::Boolean [scheduler]::Boolean
Statment ::=
	IfStmt
Statment ::=
	ForStmt
Statment ::=
	ReturnStmt
Statment ::=
	SwitchStmt
Statment ::=
	AssignStmt
Statment ::=
	MoveStmt
Statment ::=
	DeferStmt
Statment ::=
	PrimStmt
Statment ::=
	ErrorStmt
Statment ::=
	BreakStmt
IfStmt ::=
	[expr]::Expression [seqStmt]::SeqStmt
ForStmt ::=
	ForeachForStmt
ForStmt ::=
	ForEachIncreasingForStmt
ForStmt ::=
	ForEachDecreasingForStmt
ForeachForStmt ::=
	[id]::String [isIn]::Boolean [classState]::ClassState+ [seqStmt]::SeqStmt
ForEachIncreasingForStmt ::=
	[id]::String [seqStmt]::SeqStmt
ForEachDecreasingForStmt ::=
	[id]::String [seqStmt]::SeqStmt
ReturnStmt ::=
	[expr]::Expression
SwitchStmt ::=
	[locExpr]::LocExpr [composantOfSwitchStmt]::ComposantOfSwitchStmt+
AssignStmt ::=
	[locExpr]::LocExpr [assignUnop]::AssignUnop [assignBinop]::AssignBinop [expr]::Expression
MoveStmt ::=
	NormalMoveStmt
MoveStmt ::=
	ForwardMoveStmt
NormalMoveStmt ::=
	[stateRef]::StateRef
ForwardMoveStmt ::=
	[isHead]::Boolean [isTail]::Boolean [moveExpr]::MoveExpr
StateRef ::=
	[stateRef]::String
DeferStmt ::=
	[deferStmt]::String
PrimStmt ::=
	[expr]::Expression+
ErrorStmt ::=
	[errorType]::String
BreakStmt ::=
	ε
LocExpr ::=
	[stateName]::String [id]::String+
MoveExpr ::=
	Select_MoveExpr
MoveExpr ::=
	SatateName_MoveExpr
MoveExpr ::=
	ID_MoveExpr
MoveExpr ::=
	IDSource_MoveExpr
MoveExpr ::=
	IDTarget_MoveExpr
Select_MoveExpr ::=
	ε
SatateName_MoveExpr ::=
	ε
ID_MoveExpr ::=
	[id]::String
IDSource_MoveExpr ::=
	[id]::String
IDTarget_MoveExpr ::=
	[id]::String
ClassState ::=
	[state]::Boolean [className]::ClassName
OnHandlerDef ::=
	[eventName]::EventName+ [seqStmt]::SeqStmt
EventName ::=
	[eventNameLeft]::String [eventNameRight]::String
ComposantOfSwitchStmt ::=
	[classState]::ClassState+ [seqStmt]::SeqStmt
ComposantOfInterFunc ::=
	[id]::String [typeOrVoid]::TypeOrVoid [paramVarDecl]::ParamVarDecl+ [seqStmt]::SeqStmt
BossaTypeExpr ::=
	[bossaTypeExpr]::String
QueueType ::=
	Normal_QueueType
QueueType ::=
	Fifo_QueueType
QueueType ::=
	Lifo_QueueType
Normal_QueueType ::=
	ε
Fifo_QueueType ::=
	ε
Lifo_QueueType ::=
	ε
Critop ::=
	[lowest]::Boolean [highest]::Boolean
StateVisibility ::=
	[public]::Boolean [private]::Boolean
ClassName ::=
	[className]::String
NonProcType ::=
	[system]::Boolean [struct]::Boolean [id]::Boolean [nonProcType]::String
Unop ::=
	[plus]::Boolean [minus]::Boolean [excl]::Boolean [tild]::Boolean
Binop ::=
	[plus]::Boolean [minus]::Boolean [star]::Boolean [slash]::Boolean [percentage]::Boolean [doubleAnd]::Boolean [doubleVerticalBar]::Boolean [and]::Boolean [eq]::Boolean [ne]::Boolean [lt]::Boolean [gt]::Boolean [le]::Boolean [ge]::Boolean [doubleLt]::Boolean [doubleGt]::Boolean
AssignUnop ::=
	[doublePlus]::Boolean [doubleMoins]::Boolean
AssignBinop ::=
	[affect]::Boolean [plusEqual]::Boolean [moinsEqual]::Boolean [starEqual]::Boolean [slashEqual]::Boolean [percentageEqual]::Boolean [andEqual]::Boolean [orEqual]::Boolean [doubleLtEqual]::Boolean [doubleGtEqual]::Boolean
String ::=
	string
Boolean ::=
	"true"
	"false"
Integer ::=
	integer

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