Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
languages
EmbeddedMontiArc
Commits
19e58698
Commit
19e58698
authored
Oct 26, 2017
by
Sascha Niklas Schneiders
Browse files
updated tests
parent
0e1f7c17
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/monticore/lang/embeddedmontiarc/embeddedmontiarc/_symboltable/ComponentSymbolReference.java
View file @
19e58698
...
...
@@ -115,7 +115,7 @@ public class ComponentSymbolReference extends ComponentSymbol implements
int
count
=
0
;
for
(
ResolutionDeclarationSymbol
resDeclSym
:
getResolutionDeclarationSymbols
())
{
Log
.
debug
(
""
+
((
ASTUnitNumberResolution
)
getResolutionDeclarationSymbols
().
get
(
count
).
getASTResolution
()).
getNumber
().
get
().
intValue
(),
"resolus:"
);
//
Log.debug("" + ((ASTUnitNumberResolution) getResolutionDeclarationSymbols().get(count).getASTResolution()).getNumber().get().intValue(), "resolus:");
String
lastNameStart
=
""
;
for
(
PortSymbol
portSymbol
:
getIncomingPorts
())
{
Log
.
debug
(
portSymbol
.
getName
(),
"Found Port:"
);
...
...
src/main/java/de/monticore/lang/embeddedmontiarc/embeddedmontiarc/_symboltable/EmbeddedMontiArcSymbolTableCreator.java
View file @
19e58698
/**
* ******************************************************************************
* MontiCAR Modeling Family, www.se-rwth.de
* Copyright (c) 2017, Software Engineering Group at RWTH Aachen,
* All rights reserved.
* <p>
* This project is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* <p>
* You should have received a copy of the GNU Lesser General Public
* License along with this project. If not, see <http://www.gnu.org/licenses/>.
*
* ******************************************************************************
* MontiCAR Modeling Family, www.se-rwth.de
* Copyright (c) 2017, Software Engineering Group at RWTH Aachen,
* All rights reserved.
*
* This project is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this project. If not, see <http://www.gnu.org/licenses/>.
* *******************************************************************************
*/
package
de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable
;
...
...
@@ -467,7 +468,7 @@ public class EmbeddedMontiArcSymbolTableCreator extends EmbeddedMontiArcSymbolTa
Log
.
debug
(
"compInstanceName: "
+
compName
,
"Resolving"
);
System
.
out
.
println
(
compName
);
ComponentInstanceSymbol
symbol
;
symbol
=
curScope
.<
ComponentInstanceSymbol
>
resolve
(
compName
,
ComponentInstanceSymbol
.
KIND
).
get
();
symbol
=
curScope
.<
ComponentInstanceSymbol
>
resolve
(
compName
,
ComponentInstanceSymbol
.
KIND
).
get
();
for
(
PortSymbol
portSymbol
:
symbol
.
getComponentType
().
getAllPorts
())
{
Log
.
debug
(
portSymbol
.
toString
(),
"PortInfo"
);
...
...
@@ -785,13 +786,12 @@ public class EmbeddedMontiArcSymbolTableCreator extends EmbeddedMontiArcSymbolTa
ResolutionDeclarationSymbolReference
resDeclSymRef
;
resDeclSymRef
=
ResolutionDeclarationSymbolReference
.
constructResolutionDeclSymbolRef
(((
ASTTypeNameResolutionDeclaration
)
astResDecl
).
getName
(),
((
ASTTypeNameResolutionDeclaration
)
astResDecl
).
getResolution
());
resDeclSymRef
=
ResolutionDeclarationSymbolReference
.
constructResolutionDeclSymbolRef
(((
ASTTypeNameResolutionDeclaration
)
astResDecl
).
getName
(),
((
ASTTypeNameResolutionDeclaration
)
astResDecl
).
getResolution
()
.
orElse
(
null
)
);
Log
.
debug
(
resDeclSymRef
.
getNameToResolve
(),
"Added ResolutionDeclarationSymbol with name: "
);
typeSymbol
.
addResolutionDeclarationSymbol
(
resDeclSymRef
);
//TODO Resolution maybe link with node
addToScopeAndLinkWithNode
(
resDeclSymRef
,
astTypeParameter
);
currentScope
().
get
().
add
(
resDeclSymRef
);
}
}
}
...
...
src/test/java/de/monticore/lang/embeddedmontiarc/cocos/BasicCoCoTest.java
View file @
19e58698
/**
*
* ******************************************************************************
* MontiCAR Modeling Family, www.se-rwth.de
* Copyright (c) 2017, Software Engineering Group at RWTH Aachen,
* All rights reserved.
*
* This project is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this project. If not, see <http://www.gnu.org/licenses/>.
* *******************************************************************************
*/
package
de.monticore.lang.embeddedmontiarc.cocos
;
import
org.junit.Test
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment