Commit 05a10816 authored by Daniel Honsel's avatar Daniel Honsel
Browse files

added mtcSpec and systemSpec support to function definitions according to TTCN3 version 4.6.1

parent d4ffaa6d
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -212,7 +212,8 @@ ControlStatementOrDef:
	(localDef=FunctionLocalDef | localInst=FunctionLocalInst) WithStatement? | control=ControlStatement;

ControlStatement:
	timer=TimerStatements | basic=BasicStatements | behavior=BehaviourStatements | sut=SUTStatements | {ControlStatement} STOPKEYWORD;
	timer=TimerStatements | basic=BasicStatements | behavior=BehaviourStatements | sut=SUTStatements | {ControlStatement}
	STOPKEYWORD;

SUTStatements:
	ACTIONKEYWORD LPAREN txt+=ActionText (STRINGOP txt+=ActionText)* RPAREN;
@@ -1192,8 +1193,11 @@ SelectCase:
	statement=StatementBlock;

FunctionDef:
	FUNCTIONKEYWORD name=IDENTIFIER LPAREN parameterList=FunctionFormalParList? RPAREN runsOn=RunsOnSpec?
	returnType=ReturnType? statement=StatementBlock;
	FUNCTIONKEYWORD name=IDENTIFIER LPAREN parameterList=FunctionFormalParList? RPAREN runsOn=RunsOnSpec? mtc=MtcSpec?
	system=SystemSpec? returnType=ReturnType? statement=StatementBlock;

MtcSpec:
	MTCKEYWORD type=[ComponentDef|IDENTIFIER];

FunctionFormalParList:
	params+=FunctionFormalPar (COMMA params+=FunctionFormalPar)*;