Commit dff1575f authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ support for open type and automatic type (may have performance implications,...

+ support for open type and automatic type (may have performance implications, needs further testing)
parent e801b9c6
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -9,10 +9,12 @@ TTCN3File:
	modules+=TTCN3Module*;

ConstDef:
	CONSTKEYWORD type=Type defs=ConstList;
	//TODO: workaround for automatic type may have performance implications
	CONSTKEYWORD ((type=Type defs=ConstList) | defs=ConstList);

Type:
	pre=PredefinedType | ref=TypeReference extensions+=ExtendedFieldReference*;
	//TODO: any is not part of the grammar directly so far, needs to be restricted to ExtFunctionDef only
	any=ANYKEYWORD | pre=PredefinedType | ref=TypeReference extensions+=ExtendedFieldReference*;

TypeReferenceTailType:
	ReferencedType | FieldReference;
@@ -40,7 +42,8 @@ ModuleParDef:
	MODULEPARKEYWORD (param=ModulePar | LBRACKET multitypeParam=MultitypedModuleParList RBRACKET);

ModulePar:
	type=Type list=ModuleParList;
	//TODO: template modifier?
	((type=Type) list=ModuleParList) | list=ModuleParList;

ModuleParList:
	params+=ModuleParameter (COMMA params+=ModuleParameter)*;
@@ -664,8 +667,9 @@ TimerInstance:
	TIMERKEYWORD list=VarList;

VarInstance:
	VARKEYWORD ((listMod=(LAZY_MODIFIER | FUZZY_MODIFIER)? listType=Type list=VarList) | ((TEMPLATEKEYWORD |
	resTemplate=RestrictedTemplate) tempMod=(LAZY_MODIFIER | FUZZY_MODIFIER)? type=Type tempList=TempVarList));
	//TODO: workarounds for automatic type support may have performance implications
	VARKEYWORD ((listMod=(LAZY_MODIFIER | FUZZY_MODIFIER)? ((listType=Type list=VarList) |  list=VarList) ) | ((TEMPLATEKEYWORD |
	resTemplate=RestrictedTemplate) tempMod=(LAZY_MODIFIER | FUZZY_MODIFIER)? ((type=Type tempList=TempVarList) | tempList=TempVarList)) );

VarList:
	variables+=SingleVarInstance (COMMA variables+=SingleVarInstance)*;