Browsable µOccam Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: occam/mu/srour/extracted
Source used for this grammar: Youssef Srour, µOCCAM 1.0, µOCCAM.ecore, 2006/07/24 [Atlantic]

Summary

Syntax

String ::=
	string
Boolean ::=
	"true"
	"false"
Integer ::=
	integer
Process ::=
	StopProcess
Process ::=
	SkipProcess
Process ::=
	Action
Process ::=
	Construction
Process ::=
	Instance
Process ::=
	Specification
StopProcess ::=
	ε
SkipProcess ::=
	ε
Action ::=
	Assignment
Action ::=
	Input
Action ::=
	Output
Construction ::=
	Sequence
Construction ::=
	Conditional
Construction ::=
	Loop
Construction ::=
	Parallel
Construction ::=
	Alternation
Construction ::=
	Sequence
	Conditional
	Loop
	Parallel
	Alternation
Instance ::=
	[name]::String
Assignment ::=
	[variable]::Variable [expression]::Expression
Input ::=
	[channel]::Channel [variable]::Variable
Output ::=
	[channel]::Channel [expression]::Expression
Sequence ::=
	NormalSequence
Sequence ::=
	ReplicatorSequence
NormalSequence ::=
	[process]::Process
ReplicatorSequence ::=
	[replicator]::Replicator
Conditional ::=
	NormalConditional
Conditional ::=
	ReplicatorConditional
NormalConditional ::=
	[choice]::Choice
ReplicatorConditional ::=
	[replicator]::Replicator
Loop ::=
	[boolean]::BooleanRef [process]::Process
Parallel ::=
	NormalParallel
Parallel ::=
	ReplicatorParallel
Parallel ::=
	NormalAlternation
Parallel ::=
	ReplicatorAlternation
NormalParallel ::=
	[process]::Process
ReplicatorParallel ::=
	[replicator]::Replicator
Alternation ::=
	[alternative]::Alternative
NormalAlternation ::=
	[process]::Process
ReplicatorAlternation ::=
	[replicator]::Replicator
Choice ::=
	[boolean]::BooleanRef [process]::Process
BooleanRef ::=
	[expression]::Expression
Alternative ::=
	[guard]::Guard [process]::Process
Guard ::=
	InputGuard
Guard ::=
	BooleanGuard
InputGuard ::=
	[input]::Input
BooleanGuard ::=
	[boolean]::BooleanRef
Replicator ::=
	[name]::String [base]::Base [count]::Count
Base ::=
	[expression]::Expression
Count ::=
	[expression]::Expression
Type ::=
	[primitiveType]::PrimitiveType [expression]::Expression
PrimitiveType ::=
	[isInt]::Boolean [isChan]::Boolean
Literal ::=
	LiteralOperand
Literal ::=
	[integer]::Integer
Element ::=
	[name]::String [subscript]::Subscript
Subscript ::=
	[expression]::Expression
Variable ::=
	VariableOPerand
Variable ::=
	[element]::Element
Channel ::=
	[element]::Element
VariableOPerand ::=
	[element]::Element
LiteralOperand ::=
	[integer]::Integer
ExpressionOperand ::=
	[operand]::Operand
Expression ::=
	ExpressionOperand
Expression ::=
	MonadicExpression
Expression ::=
	DyadicExpression
Expression ::=
	SimpleExpression
MonadicExpression ::=
	[monadicOperator]::MonadicOperator
DyadicExpression ::=
	[operandRight]::Operand [dyadicOperator]::DyadicOperator
SimpleExpression ::=
	[operand]::Operand
Specification ::=
	Declaration
Specification ::=
	Definition
Declaration ::=
	TypeDeclaration
Declaration ::=
	IntDeclaration
Declaration ::=
	ValDeclaration
TypeDeclaration ::=
	[type]::Type
IntDeclaration ::=
	[name]::String [expression]::Expression
ValDeclaration ::=
	[name]::String [expression]::Expression
Definition ::=
	[name]::String [procedureBody]::ProcedureBody
Formal ::=
	[name]::String [primitiveType]::PrimitiveType
ProcedureBody ::=
	[name]::String [process]::Process
Actual ::=
	[element]::Element
MonadicOperator ::=
	[minus]::Boolean [not]::Boolean
DyadicOperator ::=
	[plus]::Boolean [minus]::Boolean [star]::Boolean [slash]::Boolean [or]::Boolean [inverseSlash]::Boolean [and]::Boolean [eq]::Boolean [ne]::Boolean [lt]::Boolean [gt]::Boolean [le]::Boolean [ge]::Boolean

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