Ausgangsbasis erstellt

This commit is contained in:
sebastian 2017-03-18 11:07:34 +01:00
parent fbdd81a35f
commit 5d4ea4bd69
4 changed files with 9 additions and 31 deletions

View File

@ -40,8 +40,8 @@ public class Algo_Type {
// für alle Methoden der Klasse
List<AS_Argument> ass_arguments = new ArrayList<AS_Argument>();
for (Method m : cl.getMethods()) {
for (int i = 0; i < m.parameterlist.formalparameter.size() ; i++ ) {
AS_Argument as_argument = new AS_Argument(m.parameterlist.formalparameter.get(i), i , m , cl );
for (int i = 0; i < m.getParameterList().getFormalparalist().size() ; i++ ) {
AS_Argument as_argument = new AS_Argument(m.getParameterList().getFormalparalist().get(i), i , m , cl );
ass_arguments.add(as_argument);
}
}

View File

@ -24,8 +24,8 @@ public class TV_Method extends TV_Abstract {
this.alpha_strich = new ArrayList<TV_Alpha>();
for (int i = 0; i < method.parameterlist.formalparameter.size(); i++ ) {
FormalParameter fp = method.parameterlist.formalparameter.get(i);
for (int i = 0; i < method.getParameterList().getFormalparalist().size(); i++ ) {
FormalParameter fp = method.getParameterList().getFormalparalist().get(i);
TV_Alpha tv_alpha = new TV_Alpha(method, i , cl, fp);
this.alpha_strich.add(tv_alpha);
}

View File

@ -41,7 +41,7 @@ public class GeneralParserTest{
//filenames.add("FieldVarTest.jav");
//filenames.add("StructuralTypesField.jav");
filenames.add("StructuralTypesSimple2.jav");
filenames.add("StructuralTypesSimple.jav");
JavaTXParser parser = new JavaTXParser();
try{
@ -54,7 +54,7 @@ public class GeneralParserTest{
SourceFile sfdebug = sf;
List<AS_Abstract> ass = new ArrayList<AS_Abstract>();
Algo_Type type = new Algo_Type( ass , sf.KlassenVektor.get(0));
Algo_Type type = new Algo_Type( ass , sf.getClasses().get(0));
// Erstellen der TypeExpression

View File

@ -5,35 +5,13 @@ class A {
A f2;
mt6(haus2) {
nummer = haus.hausnummer;
val = nummer.value;
return val;
}
mt1(x) { return x; }
mt1(x) { return x; }
mt2(x) { return x.field ; }
mt2(x) { return x.feld ; }
mt3(a,b,c) { return a.add(b).sub(c); }
mt4(a,b,c) {
r1 = a.add(b);
r2 = r1.sub(c);
return r2;
}
mt5(haus) { return haus.hausnummer.value; }
}