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]
String
, Boolean
, Integer
, Process
, StopProcess
, SkipProcess
, Action
, Construction
, Instance
, Assignment
, Input
, Output
, Sequence
, NormalSequence
, ReplicatorSequence
, Conditional
, NormalConditional
, ReplicatorConditional
, Loop
, Parallel
, NormalParallel
, ReplicatorParallel
, Alternation
, NormalAlternation
, ReplicatorAlternation
, Choice
, BooleanRef
, Alternative
, Guard
, InputGuard
, BooleanGuard
, Replicator
, Base
, Count
, Type
, PrimitiveType
, Literal
, Element
, Subscript
, Variable
, Channel
, VariableOPerand
, LiteralOperand
, ExpressionOperand
, Expression
, MonadicExpression
, DyadicExpression
, SimpleExpression
, Specification
, Declaration
, TypeDeclaration
, IntDeclaration
, ValDeclaration
, Definition
, Formal
, ProcedureBody
, Actual
, MonadicOperator
, DyadicOperator
), 0 root (—), 3 top (Literal
, Formal
, Actual
), 1 bottom (Operand
3).[name]
8, [variable]
2, [expression]
9, [channel]
2, [process]
7, [replicator]
4, [choice]
, [boolean]
3, [alternative]
, [guard]
, [input]
, [base]
, [count]
, [primitiveType]
2, [isInt]
, [isChan]
, [integer]
2, [subscript]
, [element]
4, [operand]
2, [monadicOperator]
, [operandRight]
, [dyadicOperator]
, [type]
, [procedureBody]
, [minus]
2, [not]
, [plus]
, [star]
, [slash]
, [or]
, [inverseSlash]
, [and]
, [eq]
, [ne]
, [lt]
, [gt]
, [le]
, [ge]
.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