Browsable Occam Grammar

CC-BY

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

Summary

Syntax

OCCAM_Program ::=
	[occam_Elements]::OCCAM_Element+ [files]::File+
OCCAM_Element ::=
	Process
OCCAM_Element ::=
	Action
OCCAM_Element ::=
	Constructor
OCCAM_Element ::=
	DataType
OCCAM_Element ::=
	[name]::String
Process ::=
	[declaration]::Declaration [constructors]::Constructor+ [parameters]::DataType+ [libraries]::Library+ [toChannel]::Channel
Channel ::=
	[name]::String [type]::String [toServer]::Server [toProcess]::Process
Action ::=
	Assignment
Action ::=
	Input
Action ::=
	Output
Action ::=
	[constructor]::Constructor [while]::While [if]::If
Assignment ::=
	[constructor]::Constructor [while]::While [if]::If
Input ::=
	[constructor]::Constructor [while]::While [if]::If
Output ::=
	[constructor]::Constructor [while]::While [if]::If
Constructor ::=
	Sequential
Constructor ::=
	Parallel
Constructor ::=
	Alternative
Constructor ::=
	[process]::Process [actions]::Action+ [buckels]::Buckel+ [childrens]::Constructor+
Buckel ::=
	If
Buckel ::=
	While
Buckel ::=
	[constructor]::Constructor
If ::=
	[conditions]::Condition+ [actions]::Action+
While ::=
	[conditions]::Condition+ [actions]::Action+
Condition ::=
	[elementRight]::String [elementLeft]::String [typeCondition]::String [if]::If [while]::While
Sequential ::=
	[process]::Process [actions]::Action+ [buckels]::Buckel+ [childrens]::Constructor+
Parallel ::=
	[process]::Process [actions]::Action+ [buckels]::Buckel+ [childrens]::Constructor+
Alternative ::=
	[process]::Process [actions]::Action+ [buckels]::Buckel+ [childrens]::Constructor+
DataType ::=
	[dataType]::String
Library ::=
	[name]::String
File ::=
	[name]::String
Server ::=
	[name]::String [toChannel]::Channel
Declaration ::=
	[name]::String [process]::Process [elements]::DataType+
String ::=
	string
Boolean ::=
	"true"
	"false"
Integer ::=
	integer

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