Loading de.ugoe.cs.swe.TTCN3/.launch/Generate Language Infrastructure (de.ugoe.cs.swe.TTCN3).launch +2 −2 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration type="org.eclipse.emf.mwe2.launch.Mwe2LaunchConfigurationType"> <stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1299248699643_13" label="working set" name="working set"> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/de.ugoe.cs.swe.TTCN3" type="4"/> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/de.ugoe.cs.swe.TTCN3.generator" type="4"/> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/de.ugoe.cs.swe.TTCN3.tests" type="4"/> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/de.ugoe.cs.swe.TTCN3.ui" type="4"/> </launchConfigurationWorkingSet>}"/> <stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <resources> <item path="/de.ugoe.cs.swe.TTCN3" type="4"/> <item path="/de.ugoe.cs.swe.TTCN3.generator" type="4"/> <item path="/de.ugoe.cs.swe.TTCN3.tests" type="4"/> <item path="/de.ugoe.cs.swe.TTCN3.ui" type="4"/> </resources>}"/> <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> <listEntry value="/de.ugoe.cs.swe.TTCN3"/> </listAttribute> Loading @@ -14,5 +14,5 @@ <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher"/> <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="src/de/ugoe/cs/swe/GenerateTTCN3.mwe2"/> <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="de.ugoe.cs.swe.TTCN3"/> <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx512m"/> <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx1024m"/> </launchConfiguration> de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/TTCN3.xtext +31 −26 Original line number Diff line number Diff line Loading @@ -208,7 +208,7 @@ ControlStatementOrDefList: def=ControlStatementOrDef sc=SEMICOLON?; ControlStatementOrDef: (localDef=FunctionLocalDef | localInst=FunctionLocalInst) WithStatement? | control=ControlStatement; (localDef=FunctionLocalDef | localInst=FunctionLocalInst) withstm=WithStatement? | control=ControlStatement; ControlStatement: timer=TimerStatements | basic=BasicStatements | behavior=BehaviourStatements | sut=SUTStatements | {ControlStatement} Loading Loading @@ -973,25 +973,23 @@ LogItem: Expression: SingleExpression | CompoundExpression; WithStatement returns ecore::EString: WITHKEYWORD WithAttribList; WithStatement: WITHKEYWORD attrib=WithAttribList; WithAttribList returns ecore::EString: LBRACKET MultiWithAttrib RBRACKET; WithAttribList: LBRACKET multi=MultiWithAttrib RBRACKET; MultiWithAttrib returns ecore::EString: (SingleWithAttrib SEMICOLON?)*; MultiWithAttrib: {MultiWithAttrib} (single+=SingleWithAttrib SEMICOLON?)*; // TODO: fix this! SingleWithAttrib returns ecore::EString: AttribKeyword OVERRIDEKEYWORD? /*AttribQualifier?*/ FREE_TEXT; SingleWithAttrib: {SingleWithAttrib} AttribKeyword OVERRIDEKEYWORD? attrib=AttribQualifier? FREE_TEXT; AttribKeyword returns ecore::EString: ENCODEKEYWORD | VARIANTKEYWORD | DISPLAYKEYWORD | EXTENSIONKEYWORD | OPTIONALKEYWORD; // TODO: fix this! //AttribQualifier returns ecore::EString: // LPAREN DefOrFieldRefList RPAREN; AttribQualifier: LPAREN list=DefOrFieldRefList RPAREN; IdentifierList: ids+=IDENTIFIER (COMMA ids+=IDENTIFIER)*; Loading Loading @@ -1112,20 +1110,27 @@ UnaryExpression returns SingleExpression: Primary returns SingleExpression: OpCall | Value | LPAREN SingleExpression RPAREN; // TODO: fix this! //DefOrFieldRefList returns ecore::EString: // DefOrFieldRef (COMMA DefOrFieldRef)*; DefOrFieldRefList: refs+=DefOrFieldRef (COMMA refs+=DefOrFieldRef)*; // TODO: ( ( FieldReference | SQUAREOPEN MINUS SQUARECLOSE ) [ ExtendedFieldReference ] ) // TODO: improve references //DefOrFieldRef returns ecore::EString: // QualifiedIdentifier | AllRef; // TODO: fix this! //AllRef returns ecore::EString: // GROUPKEYWORD ALLKEYWORD (EXCEPTKEYWORD LBRACKET QualifiedIdentifierList RBRACKET)? | (TYPEDEFKEYWORD | // TEMPLATEKEYWORD | CONSTKEYWORD | ALTSTEPKEYWORD | TESTCASEKEYWORD | FUNCTIONKEYWORD | SIGNATUREKEYWORD | // MODULEPARKEYWORD) ALLKEYWORD (EXCEPTKEYWORD LBRACKET IdentifierList RBRACKET)?; // TODO: restrict references to some QID DefOrFieldRef: id=[TTCN3Reference|QualifiedIdentifier] | (field=FieldReference | {DefOrFieldRef} SQUAREOPEN MINUS SQUARECLOSE) extended=ExtendedFieldReference? | all=AllRef; AllRef: {AllRef} GROUPKEYWORD ALLKEYWORD (EXCEPTKEYWORD LBRACKET groupList=GroupRefList RBRACKET)? | {AllRef} (TYPEDEFKEYWORD | TEMPLATEKEYWORD | CONSTKEYWORD | ALTSTEPKEYWORD | TESTCASEKEYWORD | FUNCTIONKEYWORD | SIGNATUREKEYWORD | MODULEPARKEYWORD) ALLKEYWORD (EXCEPTKEYWORD LBRACKET idList=TTCN3ReferenceList RBRACKET)?; GroupRefList: groups+=[GroupDef|QualifiedIdentifier] (COMMA groups+=[GroupDef|QualifiedIdentifier])*; TTCN3Reference: ReferencedType | RefValue | TestcaseDef | AltstepDef | SignatureDef; TTCN3ReferenceList: refs+=[TTCN3Reference|IDENTIFIER] (COMMA refs+=[TTCN3Reference|IDENTIFIER])*; // TODO: improve references // StructFieldRef | ArrayOrBitRef | ParRef; Loading de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/validation/TTCN3Validator.xtend +11 −11 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ class TTCN3Validator extends AbstractTTCN3Validator { val container = field.findDesiredParent(typeof(ModuleDefinitionsList)) as ModuleDefinitionsList if (container.checkNameClashModuleDefinitionsList(field, field.name)) { error('Name clash with another variable definition in this scope!', TTCN3Package.eINSTANCE.refValue_Name); TTCN3Package.eINSTANCE.TTCN3Reference_Name); return; } Loading @@ -79,7 +79,7 @@ class TTCN3Validator extends AbstractTTCN3Validator { for (StructFieldDef f : body.defs) { if (f != field && f.name.equals(field.name)) { error('Name clash with another variable definition in this scope!', TTCN3Package.eINSTANCE.refValue_Name); TTCN3Package.eINSTANCE.TTCN3Reference_Name); return; } } Loading @@ -90,7 +90,7 @@ class TTCN3Validator extends AbstractTTCN3Validator { val char pattern = 'M'; if (module.name.charAt(0) != pattern) { warning('Module names should start with M!', TTCN3Package.eINSTANCE.referencedType_Name); warning('Module names should start with M!', TTCN3Package.eINSTANCE.TTCN3Reference_Name); } } Loading @@ -104,7 +104,7 @@ class TTCN3Validator extends AbstractTTCN3Validator { current = d; if (current == last) { error('The extension list contains the type ' + current.name + ' twice!', TTCN3Package.eINSTANCE.referencedType_Name); TTCN3Package.eINSTANCE.TTCN3Reference_Name); return; } last = current Loading @@ -115,7 +115,7 @@ class TTCN3Validator extends AbstractTTCN3Validator { def checkTypeNames(ReferencedType type) { if (type.checkNameClashesModuleDefs(type.name)) { error('Name clash with another variable definition in this scope!', TTCN3Package.eINSTANCE.referencedType_Name); TTCN3Package.eINSTANCE.TTCN3Reference_Name); return; } } Loading @@ -124,7 +124,7 @@ class TTCN3Validator extends AbstractTTCN3Validator { def checkTypeNames(TestcaseDef tc) { if (tc.checkNameClashesModuleDefs(tc.name)) { error('Name clash with another variable definition in this scope!', TTCN3Package.eINSTANCE.testcaseDef_Name); TTCN3Package.eINSTANCE.TTCN3Reference_Name); return; } } Loading @@ -133,7 +133,7 @@ class TTCN3Validator extends AbstractTTCN3Validator { def checkTypeNames(FunctionDef function) { if (function.checkNameClashesModuleDefs(function.name)) { error('Name clash with another variable definition in this scope!', TTCN3Package.eINSTANCE.refValue_Name); TTCN3Package.eINSTANCE.TTCN3Reference_Name); return; } } Loading @@ -142,7 +142,7 @@ class TTCN3Validator extends AbstractTTCN3Validator { def checkTypeNames(SignatureDef sig) { if (sig.checkNameClashesModuleDefs(sig.name)) { error('Name clash with another variable definition in this scope!', TTCN3Package.eINSTANCE.referencedType_Name); TTCN3Package.eINSTANCE.TTCN3Reference_Name); return; } } Loading @@ -151,7 +151,7 @@ class TTCN3Validator extends AbstractTTCN3Validator { def checkTypeNames(AltstepDef alt) { if (alt.checkNameClashesModuleDefs(alt.name)) { error('Name clash with another variable definition in this scope!', TTCN3Package.eINSTANCE.altstepDef_Name); TTCN3Package.eINSTANCE.TTCN3Reference_Name); return; } } Loading @@ -160,14 +160,14 @@ class TTCN3Validator extends AbstractTTCN3Validator { def checkTypeNames(GroupDef group) { if (group.checkNameClashesModuleDefs(group.name)) { error('Name clash with another variable definition in this scope!', TTCN3Package.eINSTANCE.referencedType_Name); TTCN3Package.eINSTANCE.TTCN3Reference_Name); return; } } def private isNameClashInHierarchy(RefValue variable) { var parent = variable.eContainer val EStructuralFeature feature = TTCN3Package.eINSTANCE.refValue_Name; val EStructuralFeature feature = TTCN3Package.eINSTANCE.TTCN3Reference_Name; while (parent != null) { Loading de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/scoping/TTCN3ScopeProvider.xtend +3 −3 File changed.Contains only whitespace changes. Show changes Loading
de.ugoe.cs.swe.TTCN3/.launch/Generate Language Infrastructure (de.ugoe.cs.swe.TTCN3).launch +2 −2 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration type="org.eclipse.emf.mwe2.launch.Mwe2LaunchConfigurationType"> <stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1299248699643_13" label="working set" name="working set"> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/de.ugoe.cs.swe.TTCN3" type="4"/> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/de.ugoe.cs.swe.TTCN3.generator" type="4"/> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/de.ugoe.cs.swe.TTCN3.tests" type="4"/> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/de.ugoe.cs.swe.TTCN3.ui" type="4"/> </launchConfigurationWorkingSet>}"/> <stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <resources> <item path="/de.ugoe.cs.swe.TTCN3" type="4"/> <item path="/de.ugoe.cs.swe.TTCN3.generator" type="4"/> <item path="/de.ugoe.cs.swe.TTCN3.tests" type="4"/> <item path="/de.ugoe.cs.swe.TTCN3.ui" type="4"/> </resources>}"/> <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> <listEntry value="/de.ugoe.cs.swe.TTCN3"/> </listAttribute> Loading @@ -14,5 +14,5 @@ <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher"/> <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="src/de/ugoe/cs/swe/GenerateTTCN3.mwe2"/> <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="de.ugoe.cs.swe.TTCN3"/> <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx512m"/> <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx1024m"/> </launchConfiguration>
de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/TTCN3.xtext +31 −26 Original line number Diff line number Diff line Loading @@ -208,7 +208,7 @@ ControlStatementOrDefList: def=ControlStatementOrDef sc=SEMICOLON?; ControlStatementOrDef: (localDef=FunctionLocalDef | localInst=FunctionLocalInst) WithStatement? | control=ControlStatement; (localDef=FunctionLocalDef | localInst=FunctionLocalInst) withstm=WithStatement? | control=ControlStatement; ControlStatement: timer=TimerStatements | basic=BasicStatements | behavior=BehaviourStatements | sut=SUTStatements | {ControlStatement} Loading Loading @@ -973,25 +973,23 @@ LogItem: Expression: SingleExpression | CompoundExpression; WithStatement returns ecore::EString: WITHKEYWORD WithAttribList; WithStatement: WITHKEYWORD attrib=WithAttribList; WithAttribList returns ecore::EString: LBRACKET MultiWithAttrib RBRACKET; WithAttribList: LBRACKET multi=MultiWithAttrib RBRACKET; MultiWithAttrib returns ecore::EString: (SingleWithAttrib SEMICOLON?)*; MultiWithAttrib: {MultiWithAttrib} (single+=SingleWithAttrib SEMICOLON?)*; // TODO: fix this! SingleWithAttrib returns ecore::EString: AttribKeyword OVERRIDEKEYWORD? /*AttribQualifier?*/ FREE_TEXT; SingleWithAttrib: {SingleWithAttrib} AttribKeyword OVERRIDEKEYWORD? attrib=AttribQualifier? FREE_TEXT; AttribKeyword returns ecore::EString: ENCODEKEYWORD | VARIANTKEYWORD | DISPLAYKEYWORD | EXTENSIONKEYWORD | OPTIONALKEYWORD; // TODO: fix this! //AttribQualifier returns ecore::EString: // LPAREN DefOrFieldRefList RPAREN; AttribQualifier: LPAREN list=DefOrFieldRefList RPAREN; IdentifierList: ids+=IDENTIFIER (COMMA ids+=IDENTIFIER)*; Loading Loading @@ -1112,20 +1110,27 @@ UnaryExpression returns SingleExpression: Primary returns SingleExpression: OpCall | Value | LPAREN SingleExpression RPAREN; // TODO: fix this! //DefOrFieldRefList returns ecore::EString: // DefOrFieldRef (COMMA DefOrFieldRef)*; DefOrFieldRefList: refs+=DefOrFieldRef (COMMA refs+=DefOrFieldRef)*; // TODO: ( ( FieldReference | SQUAREOPEN MINUS SQUARECLOSE ) [ ExtendedFieldReference ] ) // TODO: improve references //DefOrFieldRef returns ecore::EString: // QualifiedIdentifier | AllRef; // TODO: fix this! //AllRef returns ecore::EString: // GROUPKEYWORD ALLKEYWORD (EXCEPTKEYWORD LBRACKET QualifiedIdentifierList RBRACKET)? | (TYPEDEFKEYWORD | // TEMPLATEKEYWORD | CONSTKEYWORD | ALTSTEPKEYWORD | TESTCASEKEYWORD | FUNCTIONKEYWORD | SIGNATUREKEYWORD | // MODULEPARKEYWORD) ALLKEYWORD (EXCEPTKEYWORD LBRACKET IdentifierList RBRACKET)?; // TODO: restrict references to some QID DefOrFieldRef: id=[TTCN3Reference|QualifiedIdentifier] | (field=FieldReference | {DefOrFieldRef} SQUAREOPEN MINUS SQUARECLOSE) extended=ExtendedFieldReference? | all=AllRef; AllRef: {AllRef} GROUPKEYWORD ALLKEYWORD (EXCEPTKEYWORD LBRACKET groupList=GroupRefList RBRACKET)? | {AllRef} (TYPEDEFKEYWORD | TEMPLATEKEYWORD | CONSTKEYWORD | ALTSTEPKEYWORD | TESTCASEKEYWORD | FUNCTIONKEYWORD | SIGNATUREKEYWORD | MODULEPARKEYWORD) ALLKEYWORD (EXCEPTKEYWORD LBRACKET idList=TTCN3ReferenceList RBRACKET)?; GroupRefList: groups+=[GroupDef|QualifiedIdentifier] (COMMA groups+=[GroupDef|QualifiedIdentifier])*; TTCN3Reference: ReferencedType | RefValue | TestcaseDef | AltstepDef | SignatureDef; TTCN3ReferenceList: refs+=[TTCN3Reference|IDENTIFIER] (COMMA refs+=[TTCN3Reference|IDENTIFIER])*; // TODO: improve references // StructFieldRef | ArrayOrBitRef | ParRef; Loading
de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/validation/TTCN3Validator.xtend +11 −11 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ class TTCN3Validator extends AbstractTTCN3Validator { val container = field.findDesiredParent(typeof(ModuleDefinitionsList)) as ModuleDefinitionsList if (container.checkNameClashModuleDefinitionsList(field, field.name)) { error('Name clash with another variable definition in this scope!', TTCN3Package.eINSTANCE.refValue_Name); TTCN3Package.eINSTANCE.TTCN3Reference_Name); return; } Loading @@ -79,7 +79,7 @@ class TTCN3Validator extends AbstractTTCN3Validator { for (StructFieldDef f : body.defs) { if (f != field && f.name.equals(field.name)) { error('Name clash with another variable definition in this scope!', TTCN3Package.eINSTANCE.refValue_Name); TTCN3Package.eINSTANCE.TTCN3Reference_Name); return; } } Loading @@ -90,7 +90,7 @@ class TTCN3Validator extends AbstractTTCN3Validator { val char pattern = 'M'; if (module.name.charAt(0) != pattern) { warning('Module names should start with M!', TTCN3Package.eINSTANCE.referencedType_Name); warning('Module names should start with M!', TTCN3Package.eINSTANCE.TTCN3Reference_Name); } } Loading @@ -104,7 +104,7 @@ class TTCN3Validator extends AbstractTTCN3Validator { current = d; if (current == last) { error('The extension list contains the type ' + current.name + ' twice!', TTCN3Package.eINSTANCE.referencedType_Name); TTCN3Package.eINSTANCE.TTCN3Reference_Name); return; } last = current Loading @@ -115,7 +115,7 @@ class TTCN3Validator extends AbstractTTCN3Validator { def checkTypeNames(ReferencedType type) { if (type.checkNameClashesModuleDefs(type.name)) { error('Name clash with another variable definition in this scope!', TTCN3Package.eINSTANCE.referencedType_Name); TTCN3Package.eINSTANCE.TTCN3Reference_Name); return; } } Loading @@ -124,7 +124,7 @@ class TTCN3Validator extends AbstractTTCN3Validator { def checkTypeNames(TestcaseDef tc) { if (tc.checkNameClashesModuleDefs(tc.name)) { error('Name clash with another variable definition in this scope!', TTCN3Package.eINSTANCE.testcaseDef_Name); TTCN3Package.eINSTANCE.TTCN3Reference_Name); return; } } Loading @@ -133,7 +133,7 @@ class TTCN3Validator extends AbstractTTCN3Validator { def checkTypeNames(FunctionDef function) { if (function.checkNameClashesModuleDefs(function.name)) { error('Name clash with another variable definition in this scope!', TTCN3Package.eINSTANCE.refValue_Name); TTCN3Package.eINSTANCE.TTCN3Reference_Name); return; } } Loading @@ -142,7 +142,7 @@ class TTCN3Validator extends AbstractTTCN3Validator { def checkTypeNames(SignatureDef sig) { if (sig.checkNameClashesModuleDefs(sig.name)) { error('Name clash with another variable definition in this scope!', TTCN3Package.eINSTANCE.referencedType_Name); TTCN3Package.eINSTANCE.TTCN3Reference_Name); return; } } Loading @@ -151,7 +151,7 @@ class TTCN3Validator extends AbstractTTCN3Validator { def checkTypeNames(AltstepDef alt) { if (alt.checkNameClashesModuleDefs(alt.name)) { error('Name clash with another variable definition in this scope!', TTCN3Package.eINSTANCE.altstepDef_Name); TTCN3Package.eINSTANCE.TTCN3Reference_Name); return; } } Loading @@ -160,14 +160,14 @@ class TTCN3Validator extends AbstractTTCN3Validator { def checkTypeNames(GroupDef group) { if (group.checkNameClashesModuleDefs(group.name)) { error('Name clash with another variable definition in this scope!', TTCN3Package.eINSTANCE.referencedType_Name); TTCN3Package.eINSTANCE.TTCN3Reference_Name); return; } } def private isNameClashInHierarchy(RefValue variable) { var parent = variable.eContainer val EStructuralFeature feature = TTCN3Package.eINSTANCE.refValue_Name; val EStructuralFeature feature = TTCN3Package.eINSTANCE.TTCN3Reference_Name; while (parent != null) { Loading
de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/scoping/TTCN3ScopeProvider.xtend +3 −3 File changed.Contains only whitespace changes. Show changes