Browsable SPL Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: dsl/spl/extracted
Source used for this grammar: David Touzet, SPL.ecore, 2006/01/18

Summary

Syntax

String ::=
	string
Integer ::=
	integer
Boolean ::=
	"true"
	"false"
LocatedElement ::=
	Program
LocatedElement ::=
	Service
LocatedElement ::=
	Session
LocatedElement ::=
	MethodName
LocatedElement ::=
	Branch
LocatedElement ::=
	TypeExpression
LocatedElement ::=
	Declaration
LocatedElement ::=
	StructureProperty
LocatedElement ::=
	FunctionCall
LocatedElement ::=
	Statement
LocatedElement ::=
	SelectMember
LocatedElement ::=
	Expression
LocatedElement ::=
	MessageField
LocatedElement ::=
	Constant
LocatedElement ::=
	Response
Program ::=
	[service]::Service
Service ::=
	[name]::String [declarations]::Declaration+ [sessions]::Session+
Session ::=
	Registration
Session ::=
	Dialog
Session ::=
	Event
Session ::=
	Method
Registration ::=
	[declarations]::Declaration+ [sessions]::Session+
Dialog ::=
	[declarations]::Declaration+ [methods]::Method+
Event ::=
	[eventId]::String [declarations]::Declaration+ [methods]::Method+
Method ::=
	[type]::TypeExpression [direction]::Direction [methodName]::MethodName [arguments]::Argument+ [statements]::Statement+ [branches]::Branch+
Argument ::=
	[type]::TypeExpression [initExp]::Expression
MethodName ::=
	SIPMethodName
MethodName ::=
	ControlMethodName
SIPMethodName ::=
	[name]::SIPMethod
ControlMethodName ::=
	[name]::ControlMethod
Branch ::=
	DefaultBranch
Branch ::=
	NamedBranch
Branch ::=
	[statements]::Statement+
DefaultBranch ::=
	[statements]::Statement+
NamedBranch ::=
	[name]::String+
TypeExpression ::=
	SimpleType
TypeExpression ::=
	SequenceType
TypeExpression ::=
	DefinedType
SimpleType ::=
	[type]::PrimitiveType
SequenceType ::=
	[modifier]::Modifier [type]::PrimitiveType [size]::Integer
DefinedType ::=
	[typeName]::String
Declaration ::=
	VariableDeclaration
Declaration ::=
	FunctionDeclaration
Declaration ::=
	StructureDeclaration
VariableDeclaration ::=
	Argument
VariableDeclaration ::=
	WhenHeader
VariableDeclaration ::=
	[type]::TypeExpression [initExp]::Expression
FunctionDeclaration ::=
	RemoteFunctionDeclaration
FunctionDeclaration ::=
	LocalFunctionDeclaration
RemoteFunctionDeclaration ::=
	[functionLocation]::FunctionLocation
LocalFunctionDeclaration ::=
	[statements]::Statement+
StructureDeclaration ::=
	[properties]::Argument+
StructureProperty ::=
	[name]::String [type]::TypeExpression
FunctionCall ::=
	[function]::FunctionDeclaration [parameters]::Expression+
Statement ::=
	CompoundStat
Statement ::=
	SetStat
Statement ::=
	DeclarationStat
Statement ::=
	ReturnStat
Statement ::=
	IfStat
Statement ::=
	WhenStat
Statement ::=
	ForeachStat
Statement ::=
	SelectStat
Statement ::=
	FunctionCallStat
Statement ::=
	ContinueStat
Statement ::=
	BreakStat
Statement ::=
	PushStat
CompoundStat ::=
	[statements]::Statement+
SetStat ::=
	[target]::Place [setValue]::Expression
DeclarationStat ::=
	[declaration]::Declaration
ReturnStat ::=
	[returnedValue]::Expression [branch]::NamedBranch
IfStat ::=
	[condition]::Expression [thenStatements]::Statement+ [elseStatements]::Statement+
WhenStat ::=
	[idExp]::Variable [whenHeaders]::WhenHeader+ [statements]::Statement+ [elseStatements]::Statement+
ForeachStat ::=
	[iteratorName]::String [sequenceExp]::Expression [statements]::Statement+
SelectStat ::=
	[matchedExp]::Expression [selectCases]::SelectCase+ [selectDefault]::SelectDefault
FunctionCallStat ::=
	[functionCall]::FunctionCall
ContinueStat ::=
	ε
BreakStat ::=
	ε
PushStat ::=
	[target]::Place [pushedValue]::Expression
WhenHeader ::=
	[headerId]::String [value]::Constant
SelectMember ::=
	SelectDefault
SelectMember ::=
	SelectCase
SelectDefault ::=
	[statements]::Statement+
SelectCase ::=
	[values]::Constant+
Expression ::=
	ConstantExp
Expression ::=
	OperatorExp
Expression ::=
	ForwardExp
Expression ::=
	WithExp
Expression ::=
	BlockExp
Expression ::=
	ReasonExp
Expression ::=
	BODYExp
Expression ::=
	RequestURIExp
Expression ::=
	PopExp
Expression ::=
	FunctionCallExp
Expression ::=
	Place
ConstantExp ::=
	[value]::Constant
OperatorExp ::=
	[opName]::String [leftExp]::Expression [rightExp]::Expression
ForwardExp ::=
	[isParallel]::Boolean [exp]::Expression
WithExp ::=
	[exp]::Expression [msgFields]::MessageField+
BlockExp ::=
	[exp]::Expression
ReasonExp ::=
	ε
BODYExp ::=
	ε
RequestURIExp ::=
	ε
PopExp ::=
	[source]::Place
FunctionCallExp ::=
	[functionCall]::FunctionCall
Place ::=
	SIPHeaderPlace
Place ::=
	VariablePlace
SIPHeaderPlace ::=
	[header]::SIPHeader
VariablePlace ::=
	PropertyCallPlace
VariablePlace ::=
	Variable
PropertyCallPlace ::=
	[propName]::String [source]::VariablePlace
Variable ::=
	[source]::Declaration
MessageField ::=
	ReasonMessageField
MessageField ::=
	HeadedMessageField
ReasonMessageField ::=
	[exp]::Expression
HeadedMessageField ::=
	[headerId]::String
Constant ::=
	BooleanConstant
Constant ::=
	IntegerConstant
Constant ::=
	StringConstant
Constant ::=
	URIConstant
Constant ::=
	SequenceConstant
Constant ::=
	ResponseConstant
BooleanConstant ::=
	[value]::Boolean
IntegerConstant ::=
	[value]::Integer
StringConstant ::=
	[value]::String
URIConstant ::=
	[uri]::String
SequenceConstant ::=
	[values]::Constant+
ResponseConstant ::=
	[response]::Response
Response ::=
	SuccessResponse
Response ::=
	ErrorResponse
SuccessResponse ::=
	[successKind]::SuccessKind
ErrorResponse ::=
	ClientErrorResponse
ErrorResponse ::=
	GlobalErrorResponse
ErrorResponse ::=
	RedirectionErrorResponse
ErrorResponse ::=
	ServerErrorResponse
ErrorResponse ::=
	ClientErrorResponse
	GlobalErrorResponse
	RedirectionErrorResponse
	ServerErrorResponse
ClientErrorResponse ::=
	[errorKind]::ClientErrorKind
GlobalErrorResponse ::=
	[errorKind]::GlobalErrorKind
RedirectionErrorResponse ::=
	[errorKind]::RedirectionErrorKind
ServerErrorResponse ::=
	[errorKind]::ServerErrorKind
Direction ::=
	[inout]::ε
	[in]::ε
	[out]::ε
SIPMethod ::=
	[ACK]::ε
	[BYE]::ε
	[CANCEL]::ε
	[INVITE]::ε
	[NOTIFY]::ε
	[OPTIONS]::ε
	[REACK]::ε
	[REGISTER]::ε
	[REINVITE]::ε
	[REREGISTER]::ε
	[RESUBSCRIBE]::ε
	[SUBSCRIBE]::ε
ControlMethod ::=
	[deploy]::ε
	[undeploy]::ε
	[uninvite]::ε
	[unregister]::ε
	[unsubscribe]::ε
PrimitiveType ::=
	[void]::ε
	[bool]::ε
	[int]::ε
	[request]::ε
	[response]::ε
	[string]::ε
	[time]::ε
	[uri]::ε
Modifier ::=
	[LIFO]::ε
	[FIFO]::ε
FunctionLocation ::=
	[remote]::ε
	[local]::ε
SIPHeader ::=
	[CALL_ID]::ε
	[CONTACT]::ε
	[CSEQ]::ε
	[EVENT]::ε
	[FROM]::ε
	[MAX_FORWARDS]::ε
	[SUBSCRIPTION_STATE]::ε
	[TO]::ε
	[VIA]::ε
SuccessKind ::=
	[OK]::ε
	[ACCEPTED]::ε
ClientErrorKind ::=
	[ADDRESS_INCOMPLETE]::ε
	[AMBIGUOUS]::ε
	[BAD_EXTENSION]::ε
	[BAD_REQUEST]::ε
	[BUSY_HERE]::ε
	[CALL_OR_TRANSACTION_DOES_NOT_EXIST]::ε
	[EXTENSION_REQUIRED]::ε
	[FORBIDDEN]::ε
	[GONE]::ε
	[INTERVAL_TOO_BRIEF]::ε
	[LOOP_DETECTED]::ε
	[METHOD_NOT_ALLOWED]::ε
	[NOT_ACCEPTABLE_HERE]::ε
	[NOT_ACCEPTABLE]::ε
	[NOT_FOUND]::ε
	[PAYMENT_REQUIRED]::ε
	[PROXY_AUTHENTICATION_REQUIRED]::ε
	[REQUESTURI_TOO_LONG]::ε
	[REQUEST_ENTITY_TOO_LARGE]::ε
	[REQUEST_PENDING]::ε
	[REQUEST_TERMINATED]::ε
	[REQUEST_TIMEOUT]::ε
	[TEMPORARILY_UNAVAILABLE]::ε
	[TOO_MANY_HOPS]::ε
	[UNAUTHORIZED]::ε
	[UNDECIPHERABLE]::ε
	[UNSUPPORTED_MEDIA_TYPE]::ε
	[UNSUPPORTED_URI_SCHEME]::ε
GlobalErrorKind ::=
	[BUSY_EVERYWHERE]::ε
	[DECLINE]::ε
	[DOES_NOT_EXIST_ANYWHERE]::ε
	[NOT_ACCEPTABLE]::ε
RedirectionErrorKind ::=
	[ALTERNATIVE_SERVICE]::ε
	[MOVED_PERMANENTLY]::ε
	[MOVED_TEMPORARILY]::ε
	[MULTIPLE_CHOICES]::ε
	[USE_PROXY]::ε
ServerErrorKind ::=
	[BAD_GATEWAY]::ε
	[MESSAGE_TOO_LARGE]::ε
	[NOT_IMPLEMENTED]::ε
	[SERVER_INTERNAL_ERROR]::ε
	[SERVER_TIMEOUT]::ε
	[SERVICE_UNAVAILABLE]::ε
	[VERSION_NOT_SUPPORTED]::ε

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