Loading de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/TTCN3.xtext +19 −15 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ ExtConstDef: EXTKEYWORD CONSTKEYWORD type=Type id=IdentifierList; ImportDef: IMPORTKEYWORD ImportFromSpec (all=AllWithExcepts | LBRACKET importSpec=ImportSpec RBRACKET); IMPORTKEYWORD importFrom=ImportFromSpec (all=AllWithExcepts | LBRACKET importSpec=ImportSpec RBRACKET); // TODO: fix import ImportFromSpec: Loading Loading @@ -250,16 +250,16 @@ InterleavedGuardElement: guard=InterleavedGuard statement=StatementBlock; InterleavedGuard: SQUAREOPEN SQUARECLOSE GuardOp; SQUAREOPEN SQUARECLOSE guardOp=GuardOp; AltConstruct: ALTKEYWORD LBRACKET AltGuardList RBRACKET; ALTKEYWORD LBRACKET agList=AltGuardList RBRACKET; AltGuardList: {AltGuardList} (guardList+=GuardStatement | elseList+=ElseStatement SEMICOLON?)*; ElseStatement: SQUAREOPEN ELSEKEYWORD SQUARECLOSE StatementBlock; SQUAREOPEN ELSEKEYWORD SQUARECLOSE block=StatementBlock; GuardStatement: guard=AltGuardChar (step=AltstepInstance block=StatementBlock? | op=GuardOp block=StatementBlock); Loading Loading @@ -306,10 +306,10 @@ PortRedirectWithValueAndParam: PORTREDIRECTSYMBOL RedirectWithValueAndParamSpec; RedirectWithValueAndParamSpec: value=ValueSpec param=ParamSpec? sender=SenderSpec? | RedirectWithParamSpec; value=ValueSpec param=ParamSpec? sender=SenderSpec? | redirect=RedirectWithParamSpec; ValueMatchSpec: VALUEKEYWORD InLineTemplate; VALUEKEYWORD template=InLineTemplate; CatchStatement: PortOrAny DOT catch=PortCatchOp; Loading @@ -318,7 +318,7 @@ PortCatchOp: {PortCatchOp} CATCHOPKEYWORD (LPAREN param=CatchOpParameter RPAREN)? from=FromClause? redirect=PortRedirect?; CatchOpParameter: {CatchOpParameter} Signature COMMA template=InLineTemplate | {CatchOpParameter} TIMEOUTKEYWORD; signature=Signature COMMA template=InLineTemplate | {CatchOpParameter} TIMEOUTKEYWORD; GetCallStatement: PortOrAny DOT call=PortGetCallOp; Loading @@ -328,7 +328,7 @@ PortGetCallOp: redirect=PortRedirectWithParam?; PortRedirectWithParam: PORTREDIRECTSYMBOL RedirectWithParamSpec; PORTREDIRECTSYMBOL redirect=RedirectWithParamSpec; RedirectWithParamSpec: ParamSpec sender=SenderSpec? | sender=SenderSpec; Loading Loading @@ -563,7 +563,7 @@ RaiseStatement: array=ArrayIdentifierRef DOT op=PortRaiseOp; PortRaiseOp: RAISEKEYWORD LPAREN Signature COMMA InLineTemplate RPAREN to=ToClause?; RAISEKEYWORD LPAREN signature=[SignatureDef|IDENTIFIER] COMMA template=InLineTemplate RPAREN to=ToClause?; ReplyStatement: array=ArrayIdentifierRef DOT op=PortReplyOp; Loading Loading @@ -630,7 +630,8 @@ VarList: variables+=SingleVarInstance (COMMA variables+=SingleVarInstance)*; ReferencedType: SubTypeDefNamed | RecordDefNamed | SetDefNamed | PortDef | ComponentDef | UnionDefNamed | EnumDefNamed | RecordOfDefNamed | SetOfDefNamed; SubTypeDefNamed | RecordDefNamed | SetDefNamed | PortDef | ComponentDef | UnionDefNamed | EnumDefNamed | RecordOfDefNamed | SetOfDefNamed | SignatureDef; TypeDef: TYPEDEFKEYWORD body=TypeDefBody; Loading Loading @@ -683,7 +684,7 @@ PortDefBody: attribs=PortDefAttribs; PortDefAttribs: MessageAttribs | ProcedureAttribs | MixedAttribs; message=MessageAttribs | procedure=ProcedureAttribs | mixed=MixedAttribs; MixedAttribs: {MixedAttribs} MIXEDKEYWORD LBRACKET ((decl+=AddressDecl | list+=MixedList | def+=ConfigParamDef) SEMICOLON?)+ Loading @@ -695,8 +696,9 @@ MixedList: ProcOrTypeList: {ProcOrTypeList} ALLKEYWORD | type+=ProcOrType (COMMA type+=ProcOrType)*; /// changed Signature -> Type ProcOrType: {ProcOrType} Signature | Type; type=Type; MessageAttribs: MESSAGEKEYWORD LBRACKET ((adresses+=AddressDecl | messages+=MessageList | configs+=ConfigParamDef) SEMICOLON?)+ Loading Loading @@ -837,8 +839,9 @@ TemplateDef: DerivedDef: MODIFIESKEYWORD name=ExtendedIdentifier; /// changed Signature -> Type BaseTemplate: (type=Type | Signature) name=IDENTIFIER (LPAREN parList=TemplateOrValueFormalParList RPAREN)?; type=Type name=IDENTIFIER (LPAREN parList=TemplateOrValueFormalParList RPAREN)?; TempVarList: var+=SingleTempVarInstance (COMMA var+=SingleTempVarInstance)*; Loading @@ -849,8 +852,9 @@ SingleVarInstance: SingleTempVarInstance: name=IDENTIFIER array=ArrayDef? (ac=ASSIGNMENTCHAR template=TemplateBody)?; /// changed Signature -> Type InLineTemplate: ((type=Type | Signature) COLON)? (derived=DerivedRefWithParList ASSIGNMENTCHAR)? template=TemplateBody; (type=Type COLON)? (derived=DerivedRefWithParList ASSIGNMENTCHAR)? template=TemplateBody; DerivedRefWithParList: MODIFIESKEYWORD template=TemplateRefWithParList; Loading Loading @@ -941,7 +945,7 @@ AllElementsFrom: ALLKEYWORD FROMKEYWORD body=TemplateBody; Signature: ExtendedIdentifier; ref=[SignatureDef|IDENTIFIER]; TemplateInstanceAssignment: name=IDENTIFIER ASSIGNMENTCHAR template=InLineTemplate; Loading de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/validation/TTCN3Validator.xtend +1 −1 Original line number Diff line number Diff line Loading @@ -168,7 +168,7 @@ class TTCN3Validator extends AbstractTTCN3Validator { if (module.defs.checkNameClashModuleDefinitionsList(sig, sig.name)) { error('Name clash with another variable definition in this scope!', TTCN3Package.eINSTANCE.signatureDef_Name); TTCN3Package.eINSTANCE.referencedType_Name); return; } } Loading Loading
de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/TTCN3.xtext +19 −15 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ ExtConstDef: EXTKEYWORD CONSTKEYWORD type=Type id=IdentifierList; ImportDef: IMPORTKEYWORD ImportFromSpec (all=AllWithExcepts | LBRACKET importSpec=ImportSpec RBRACKET); IMPORTKEYWORD importFrom=ImportFromSpec (all=AllWithExcepts | LBRACKET importSpec=ImportSpec RBRACKET); // TODO: fix import ImportFromSpec: Loading Loading @@ -250,16 +250,16 @@ InterleavedGuardElement: guard=InterleavedGuard statement=StatementBlock; InterleavedGuard: SQUAREOPEN SQUARECLOSE GuardOp; SQUAREOPEN SQUARECLOSE guardOp=GuardOp; AltConstruct: ALTKEYWORD LBRACKET AltGuardList RBRACKET; ALTKEYWORD LBRACKET agList=AltGuardList RBRACKET; AltGuardList: {AltGuardList} (guardList+=GuardStatement | elseList+=ElseStatement SEMICOLON?)*; ElseStatement: SQUAREOPEN ELSEKEYWORD SQUARECLOSE StatementBlock; SQUAREOPEN ELSEKEYWORD SQUARECLOSE block=StatementBlock; GuardStatement: guard=AltGuardChar (step=AltstepInstance block=StatementBlock? | op=GuardOp block=StatementBlock); Loading Loading @@ -306,10 +306,10 @@ PortRedirectWithValueAndParam: PORTREDIRECTSYMBOL RedirectWithValueAndParamSpec; RedirectWithValueAndParamSpec: value=ValueSpec param=ParamSpec? sender=SenderSpec? | RedirectWithParamSpec; value=ValueSpec param=ParamSpec? sender=SenderSpec? | redirect=RedirectWithParamSpec; ValueMatchSpec: VALUEKEYWORD InLineTemplate; VALUEKEYWORD template=InLineTemplate; CatchStatement: PortOrAny DOT catch=PortCatchOp; Loading @@ -318,7 +318,7 @@ PortCatchOp: {PortCatchOp} CATCHOPKEYWORD (LPAREN param=CatchOpParameter RPAREN)? from=FromClause? redirect=PortRedirect?; CatchOpParameter: {CatchOpParameter} Signature COMMA template=InLineTemplate | {CatchOpParameter} TIMEOUTKEYWORD; signature=Signature COMMA template=InLineTemplate | {CatchOpParameter} TIMEOUTKEYWORD; GetCallStatement: PortOrAny DOT call=PortGetCallOp; Loading @@ -328,7 +328,7 @@ PortGetCallOp: redirect=PortRedirectWithParam?; PortRedirectWithParam: PORTREDIRECTSYMBOL RedirectWithParamSpec; PORTREDIRECTSYMBOL redirect=RedirectWithParamSpec; RedirectWithParamSpec: ParamSpec sender=SenderSpec? | sender=SenderSpec; Loading Loading @@ -563,7 +563,7 @@ RaiseStatement: array=ArrayIdentifierRef DOT op=PortRaiseOp; PortRaiseOp: RAISEKEYWORD LPAREN Signature COMMA InLineTemplate RPAREN to=ToClause?; RAISEKEYWORD LPAREN signature=[SignatureDef|IDENTIFIER] COMMA template=InLineTemplate RPAREN to=ToClause?; ReplyStatement: array=ArrayIdentifierRef DOT op=PortReplyOp; Loading Loading @@ -630,7 +630,8 @@ VarList: variables+=SingleVarInstance (COMMA variables+=SingleVarInstance)*; ReferencedType: SubTypeDefNamed | RecordDefNamed | SetDefNamed | PortDef | ComponentDef | UnionDefNamed | EnumDefNamed | RecordOfDefNamed | SetOfDefNamed; SubTypeDefNamed | RecordDefNamed | SetDefNamed | PortDef | ComponentDef | UnionDefNamed | EnumDefNamed | RecordOfDefNamed | SetOfDefNamed | SignatureDef; TypeDef: TYPEDEFKEYWORD body=TypeDefBody; Loading Loading @@ -683,7 +684,7 @@ PortDefBody: attribs=PortDefAttribs; PortDefAttribs: MessageAttribs | ProcedureAttribs | MixedAttribs; message=MessageAttribs | procedure=ProcedureAttribs | mixed=MixedAttribs; MixedAttribs: {MixedAttribs} MIXEDKEYWORD LBRACKET ((decl+=AddressDecl | list+=MixedList | def+=ConfigParamDef) SEMICOLON?)+ Loading @@ -695,8 +696,9 @@ MixedList: ProcOrTypeList: {ProcOrTypeList} ALLKEYWORD | type+=ProcOrType (COMMA type+=ProcOrType)*; /// changed Signature -> Type ProcOrType: {ProcOrType} Signature | Type; type=Type; MessageAttribs: MESSAGEKEYWORD LBRACKET ((adresses+=AddressDecl | messages+=MessageList | configs+=ConfigParamDef) SEMICOLON?)+ Loading Loading @@ -837,8 +839,9 @@ TemplateDef: DerivedDef: MODIFIESKEYWORD name=ExtendedIdentifier; /// changed Signature -> Type BaseTemplate: (type=Type | Signature) name=IDENTIFIER (LPAREN parList=TemplateOrValueFormalParList RPAREN)?; type=Type name=IDENTIFIER (LPAREN parList=TemplateOrValueFormalParList RPAREN)?; TempVarList: var+=SingleTempVarInstance (COMMA var+=SingleTempVarInstance)*; Loading @@ -849,8 +852,9 @@ SingleVarInstance: SingleTempVarInstance: name=IDENTIFIER array=ArrayDef? (ac=ASSIGNMENTCHAR template=TemplateBody)?; /// changed Signature -> Type InLineTemplate: ((type=Type | Signature) COLON)? (derived=DerivedRefWithParList ASSIGNMENTCHAR)? template=TemplateBody; (type=Type COLON)? (derived=DerivedRefWithParList ASSIGNMENTCHAR)? template=TemplateBody; DerivedRefWithParList: MODIFIESKEYWORD template=TemplateRefWithParList; Loading Loading @@ -941,7 +945,7 @@ AllElementsFrom: ALLKEYWORD FROMKEYWORD body=TemplateBody; Signature: ExtendedIdentifier; ref=[SignatureDef|IDENTIFIER]; TemplateInstanceAssignment: name=IDENTIFIER ASSIGNMENTCHAR template=InLineTemplate; Loading
de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/validation/TTCN3Validator.xtend +1 −1 Original line number Diff line number Diff line Loading @@ -168,7 +168,7 @@ class TTCN3Validator extends AbstractTTCN3Validator { if (module.defs.checkNameClashModuleDefinitionsList(sig, sig.name)) { error('Name clash with another variable definition in this scope!', TTCN3Package.eINSTANCE.signatureDef_Name); TTCN3Package.eINSTANCE.referencedType_Name); return; } } Loading