From 7d4009b6ae06f622b1241c07088886763dce5054 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Fri, 16 Jan 2015 14:48:20 +0100 Subject: [PATCH] parser.jay Fehler beheben --- .classpath | 2 +- src/de/dhbwstuttgart/parser/JavaParser.java | 1246 ++++++++--------- src/de/dhbwstuttgart/parser/JavaParser.jay | 27 +- .../syntaxtree/type/ExtendsWildcardType.java | 11 +- .../syntaxtree/type/RefType.java | 6 + .../syntaxtree/type/SuperWildcardType.java | 8 + .../dhbwstuttgart/syntaxtree/type/Type.java | 4 + .../syntaxtree/type/WildcardType.java | 3 +- src/de/dhbwstuttgart/typeinference/Pair.java | 10 + .../GenericTypeInsertPoint.java | 16 +- .../typedeployment/TypeInsertPoint.java | 2 +- .../typedeployment/TypeInsertSet.java | 39 +- 12 files changed, 708 insertions(+), 666 deletions(-) diff --git a/.classpath b/.classpath index 8ed570226..38eed00a1 100755 --- a/.classpath +++ b/.classpath @@ -3,7 +3,7 @@ - + diff --git a/src/de/dhbwstuttgart/parser/JavaParser.java b/src/de/dhbwstuttgart/parser/JavaParser.java index f915c2b2a..696165f77 100644 --- a/src/de/dhbwstuttgart/parser/JavaParser.java +++ b/src/de/dhbwstuttgart/parser/JavaParser.java @@ -126,7 +126,6 @@ public Vector testPair = new Vector(); public static final int EOF = 328; public static final int LAMBDAASSIGNMENT = 329; public static final int ENDOFGENERICVARDECLARATION = 330; - public static final int typename = 331; public static final int yyErrorCode = 256; /** thrown for irrecoverable syntax errors and stack overflow. @@ -347,7 +346,6 @@ public Vector testPair = new Vector(); //t "methoddeclarator : IDENTIFIER '(' formalparameterlist ')'", //t "primitivetype : BOOLEAN", //t "primitivetype : numerictype", -//t "referencelongtype : typename parameter", //t "referencetype : classorinterfacetype", //t "variabledeclarator : variabledeclaratorid", //t "blockstatement : localvariabledeclarationstatement", @@ -516,7 +514,7 @@ public Vector testPair = new Vector(); "DIVIDEEQUAL","ANDEQUAL","OREQUAL","XOREQUAL","MODULOEQUAL", "SHIFTLEFTEQUAL","SIGNEDSHIFTRIGHTEQUAL","UNSIGNEDSHIFTRIGHTEQUAL", "BRACE","RELOP","OP","EOF","LAMBDAASSIGNMENT", - "ENDOFGENERICVARDECLARATION","typename", + "ENDOFGENERICVARDECLARATION", }; /** index-checked interface to yyName[]. @@ -683,20 +681,20 @@ public Vector testPair = new Vector(); yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]); switch (yyN) { case 1: - // line 248 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 247 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((SourceFile)yyVals[0+yyTop]); } break; case 2: - // line 252 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 251 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((SourceFile)yyVals[0+yyTop]).addImports(((ImportDeclarations)yyVals[-1+yyTop])); yyVal=((SourceFile)yyVals[0+yyTop]); } break; case 3: - // line 257 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 256 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Package*/ ((SourceFile)yyVals[0+yyTop]).setPackageName(((UsedId)yyVals[-2+yyTop])); @@ -705,7 +703,7 @@ case 3: } break; case 4: - // line 264 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 263 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Package*/ ((SourceFile)yyVals[0+yyTop]).setPackageName(((UsedId)yyVals[-1+yyTop])); @@ -713,21 +711,21 @@ case 4: } break; case 5: - // line 270 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 269 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { this.testPair.add(new Pair(((Type)yyVals[-2+yyTop]),((Type)yyVals[-1+yyTop]))); yyVal=((SourceFile)yyVals[0+yyTop]); } break; case 6: - // line 276 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 275 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Package*/ yyVal = ((UsedId)yyVals[-1+yyTop]); } break; case 7: - // line 282 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 281 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ImportDeclarations declarations=new ImportDeclarations(); declarations.addElement(((UsedId)yyVals[0+yyTop])); @@ -735,20 +733,20 @@ case 7: } break; case 8: - // line 288 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 287 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ImportDeclarations)yyVals[-1+yyTop]).addElement(((UsedId)yyVals[0+yyTop])); yyVal=((ImportDeclarations)yyVals[-1+yyTop]); } break; case 9: - // line 294 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 293 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((UsedId)yyVals[-1+yyTop]); } break; case 10: - // line 299 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 298 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { SourceFile Scfile = new SourceFile(); Scfile.addElement(((AClassOrInterface)yyVals[0+yyTop])); @@ -756,39 +754,39 @@ case 10: } break; case 11: - // line 305 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 304 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((SourceFile)yyVals[-1+yyTop]).addElement(((AClassOrInterface)yyVals[0+yyTop])); yyVal=((SourceFile)yyVals[-1+yyTop]); } break; case 12: - // line 311 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 310 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((UsedId)yyVals[0+yyTop]); } break; case 13: - // line 315 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 314 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((UsedId)yyVals[0+yyTop]); } break; case 14: - // line 320 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 319 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Class)yyVals[0+yyTop]); } break; case 15: - // line 324 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 323 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ yyVal=((Interface)yyVals[0+yyTop]); } break; case 16: - // line 331 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 330 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((UsedId)yyVals[-2+yyTop]).set_Name(((Token)yyVals[0+yyTop]).getLexem()); ((UsedId)yyVals[-2+yyTop]).setOffset(((UsedId)yyVals[-2+yyTop]).getOffset()); @@ -796,7 +794,7 @@ case 16: } break; case 17: - // line 338 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 337 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((UsedId)yyVals[-2+yyTop]).set_Name(((Token)yyVals[0+yyTop]).getLexem()); ((UsedId)yyVals[-2+yyTop]).setOffset(((UsedId)yyVals[-2+yyTop]).getOffset()); @@ -804,7 +802,7 @@ case 17: } break; case 18: - // line 344 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 343 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((UsedId)yyVals[-2+yyTop]).set_Name("*"); ((UsedId)yyVals[-2+yyTop]).setOffset(((UsedId)yyVals[-2+yyTop]).getOffset()); @@ -812,7 +810,7 @@ case 18: } break; case 19: - // line 352 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 351 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { UsedId UI = new UsedId(((Token)yyVals[0+yyTop]).getOffset()); UI.set_Name( ((Token)yyVals[0+yyTop]).getLexem() ); @@ -821,7 +819,7 @@ case 19: } break; case 20: - // line 360 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 359 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Um das hier uebersichtlicher zu halten,*/ /* gibt es einen allumfassenden Konstruktor fuer Class*/ @@ -840,7 +838,7 @@ case 20: } break; case 21: - // line 377 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 376 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-1+yyTop]).getName(), ((Modifiers)yyVals[-3+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, null, ((ClassAndParameter)yyVals[-1+yyTop]).getParaVector(), ((Token)yyVals[-2+yyTop]).getOffset()); this.initContainedTypes(); @@ -848,7 +846,7 @@ case 21: } break; case 22: - // line 383 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 382 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes, ((UsedId)yyVals[-1+yyTop]), null, ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); @@ -856,7 +854,7 @@ case 22: } break; case 23: - // line 389 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 388 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), ((Modifiers)yyVals[-4+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, ((UsedId)yyVals[-1+yyTop]), null, ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); @@ -864,7 +862,7 @@ case 23: } break; case 24: - // line 396 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 395 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes, ((InterfaceList)yyVals[-1+yyTop]).getTypeVector(), ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); @@ -872,7 +870,7 @@ case 24: } break; case 25: - // line 402 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 401 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-2+yyTop]).getName(), ((Modifiers)yyVals[-4+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, ((InterfaceList)yyVals[-1+yyTop]).getTypeVector(), ((ClassAndParameter)yyVals[-2+yyTop]).getParaVector(), ((Token)yyVals[-3+yyTop]).getOffset()); this.initContainedTypes(); @@ -880,7 +878,7 @@ case 25: } break; case 26: - // line 408 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 407 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-3+yyTop]).getName(), null, ((ClassBody)yyVals[0+yyTop]), containedTypes, ((UsedId)yyVals[-2+yyTop]), ((InterfaceList)yyVals[-1+yyTop]).getTypeVector(), ((ClassAndParameter)yyVals[-3+yyTop]).getParaVector(), ((Token)yyVals[-4+yyTop]).getOffset()); this.initContainedTypes(); @@ -888,7 +886,7 @@ case 26: } break; case 27: - // line 414 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 413 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new Class(((ClassAndParameter)yyVals[-3+yyTop]).getName(), ((Modifiers)yyVals[-5+yyTop]), ((ClassBody)yyVals[0+yyTop]), containedTypes, ((UsedId)yyVals[-2+yyTop]), ((InterfaceList)yyVals[-1+yyTop]).getTypeVector(), ((ClassAndParameter)yyVals[-3+yyTop]).getParaVector(), ((Token)yyVals[-4+yyTop]).getOffset()); this.initContainedTypes(); @@ -896,7 +894,7 @@ case 27: } break; case 28: - // line 421 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 420 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* HOTI*/ /* Verbindet den Namen eines Interfaces mit einer optionalen Parameterliste*/ @@ -904,13 +902,13 @@ case 28: } break; case 29: - // line 427 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 426 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new InterfaceAndParameter(((Token)yyVals[-3+yyTop]).getLexem(), ((ParaList)yyVals[-1+yyTop])); } break; case 30: - // line 432 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 431 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Hilfskonstrukt, um die Grammatik ueberschaubar zu halten*/ /* Verbindet den Namen einer Klasse mit einer optionalen Parameterliste*/ @@ -918,13 +916,13 @@ case 30: } break; case 31: - // line 438 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 437 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = new ClassAndParameter(((Token)yyVals[-3+yyTop]).getLexem(), ((ParaList)yyVals[-1+yyTop])); } break; case 32: - // line 443 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 442 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ Interface ic = new Interface(((InterfaceAndParameter)yyVals[-1+yyTop]).getName(), ((Token)yyVals[-2+yyTop]).getOffset()); @@ -936,7 +934,7 @@ case 32: } break; case 33: - // line 453 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 452 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Interface ic = new Interface(((InterfaceAndParameter)yyVals[-1+yyTop]).getName(), ((Modifiers)yyVals[-3+yyTop]), ((Token)yyVals[-2+yyTop]).getOffset()); ic.setInterfaceBody(((InterfaceBody)yyVals[0+yyTop])); @@ -947,7 +945,7 @@ case 33: } break; case 34: - // line 462 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 461 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Interface ic = new Interface(((InterfaceAndParameter)yyVals[-2+yyTop]).getName(), ((Token)yyVals[-3+yyTop]).getOffset()); ic.setParaList(((InterfaceAndParameter)yyVals[-2+yyTop]).getParaVector()); @@ -959,7 +957,7 @@ case 34: } break; case 35: - // line 472 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 471 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Interface ic = new Interface(((InterfaceAndParameter)yyVals[-2+yyTop]).getName(), ((Modifiers)yyVals[-4+yyTop]), ((Token)yyVals[-3+yyTop]).getOffset()); ic.setParaList(((InterfaceAndParameter)yyVals[-2+yyTop]).getParaVector()); @@ -971,7 +969,7 @@ case 35: } break; case 36: - // line 483 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 482 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ParaList pl = new ParaList(); /* #JB# 05.04.2005 */ @@ -984,7 +982,7 @@ case 36: } break; case 37: - // line 494 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 493 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ParaList pl = new ParaList(); RefType t = new RefType( ((Token)yyVals[-3+yyTop]).getLexem(),null,((Token)yyVals[-3+yyTop]).getOffset() ); @@ -995,7 +993,7 @@ case 37: } break; case 38: - // line 503 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 502 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ParaList pl = new ParaList(); pl.getParalist().addElement(((WildcardType)yyVals[0+yyTop])); @@ -1003,7 +1001,7 @@ case 38: } break; case 39: - // line 509 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 508 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* #JB# 05.04.2005 */ @@ -1017,7 +1015,7 @@ case 39: } break; case 40: - // line 522 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 521 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { RefType t = new RefType( ((Token)yyVals[-3+yyTop]).getLexem(),null ,((Token)yyVals[-3+yyTop]).getOffset() ); t.set_ParaList( ((ParaList)yyVals[-1+yyTop]).get_ParaList() ); @@ -1027,14 +1025,14 @@ case 40: } break; case 41: - // line 530 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 529 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ParaList)yyVals[-2+yyTop]).getParalist().addElement(((WildcardType)yyVals[0+yyTop])); yyVal=((ParaList)yyVals[-2+yyTop]); } break; case 42: - // line 536 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 535 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*Luar 29.11.06 Offset auf -1, da keine Angabe vorhanden*/ WildcardType wc = new WildcardType(null,-1); @@ -1042,34 +1040,34 @@ case 42: } break; case 43: - // line 542 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 541 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ExtendsWildcardType ewc = new ExtendsWildcardType(((Token)yyVals[-1+yyTop]).getOffset(),((RefType)yyVals[0+yyTop])); yyVal = ewc; } break; case 44: - // line 547 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 546 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { SuperWildcardType swc = new SuperWildcardType(((Token)yyVals[-1+yyTop]).getOffset(),((RefType)yyVals[0+yyTop])); yyVal = swc; } break; case 45: - // line 553 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 552 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ClassBody CB = new ClassBody(); yyVal = CB; } break; case 46: - // line 559 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 558 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((ClassBody)yyVals[-1+yyTop]); } break; case 47: - // line 564 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 563 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Modifiers Mod = new Modifiers(); Mod.addModifier(((Modifier)yyVals[0+yyTop])); @@ -1077,20 +1075,20 @@ case 47: } break; case 48: - // line 570 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 569 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Modifiers)yyVals[-1+yyTop]).addModifier(((Modifier)yyVals[0+yyTop])); yyVal = ((Modifiers)yyVals[-1+yyTop]); } break; case 49: - // line 576 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 575 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((UsedId)yyVals[0+yyTop]); } break; case 50: - // line 581 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 580 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ InterfaceList il = new InterfaceList(); @@ -1099,27 +1097,27 @@ case 50: } break; case 51: - // line 588 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 587 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((InterfaceList)yyVals[-2+yyTop]).addInterface(((UsedId)yyVals[0+yyTop])); yyVal = ((InterfaceList)yyVals[-2+yyTop]); } break; case 52: - // line 594 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 593 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ yyVal = new InterfaceBody(); } break; case 53: - // line 599 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 598 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((InterfaceBody)yyVals[-1+yyTop]); } break; case 54: - // line 606 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 605 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ InterfaceList il = new InterfaceList(); @@ -1128,14 +1126,14 @@ case 54: } break; case 55: - // line 613 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 612 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((InterfaceList)yyVals[-2+yyTop]).addInterface(((UsedId)yyVals[0+yyTop])); yyVal = ((InterfaceList)yyVals[-2+yyTop]); } break; case 56: - // line 620 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 619 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ClassBody CB = new ClassBody(); CB.addField( ((Field)yyVals[0+yyTop]) ); @@ -1143,62 +1141,62 @@ case 56: } break; case 57: - // line 626 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 625 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ClassBody)yyVals[-1+yyTop]).addField(((Field)yyVals[0+yyTop])); yyVal = ((ClassBody)yyVals[-1+yyTop]); } break; case 58: - // line 633 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 632 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Public Pub = new Public(); yyVal=Pub; } break; case 59: - // line 638 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 637 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Protected Pro = new Protected(); yyVal=Pro; } break; case 60: - // line 643 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 642 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Private Pri = new Private(); yyVal=Pri; } break; case 61: - // line 648 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 647 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Static Sta = new Static(); yyVal=Sta; } break; case 62: - // line 653 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 652 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Abstract Abs = new Abstract(); yyVal=Abs; } break; case 63: - // line 658 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 657 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Final fin = new Final(); yyVal = fin; } break; case 64: - // line 664 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 663 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*PL 05-07-30 eingefuegt containedTypes ANFANG*/ RefType RT = new RefType(((UsedId)yyVals[0+yyTop]).get_Name_1Element(),null,-1); /*RT.set_UsedId($1);*/ /*RT.setName(RT.get_UsedId().get_Name_1Element());*/ RT.set_ParaList(((UsedId)yyVals[0+yyTop]).get_RealParaList()); - //RT.setName(); + /*RT.setName($1.get_Name_1Element());*/ containedTypes.addElement(RT); /*PL 05-07-30 eingefuegt containedTypes ENDE*/ @@ -1206,7 +1204,7 @@ case 64: } break; case 65: - // line 679 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 678 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ InterfaceBody ib = new InterfaceBody(); @@ -1215,39 +1213,39 @@ case 65: } break; case 66: - // line 686 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 685 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((InterfaceBody)yyVals[-1+yyTop]).addElement(((Field)yyVals[0+yyTop])); yyVal = ((InterfaceBody)yyVals[-1+yyTop]); } break; case 67: - // line 692 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 691 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interfaces*/ yyVal = ((UsedId)yyVals[0+yyTop]); } break; case 68: - // line 698 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 697 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Field)yyVals[0+yyTop]); } break; case 69: - // line 703 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 702 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Method)yyVals[0+yyTop]); } break; case 70: - // line 707 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 706 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Field)yyVals[0+yyTop]); } break; case 71: - // line 713 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 712 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { if (((Vector)yyVals[0+yyTop]) != null) { /*$1.set_ParaList($2.get_ParaList());*/ @@ -1259,7 +1257,7 @@ case 71: } break; case 72: - // line 724 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 723 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Vector tl = new Vector(); tl.add(((Type)yyVals[0+yyTop])); @@ -1267,21 +1265,21 @@ case 72: } break; case 73: - // line 730 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 729 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Vector)yyVals[-2+yyTop]).add(((Type)yyVals[0+yyTop])); yyVal=((Vector)yyVals[-2+yyTop]); } break; case 74: - // line 735 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 734 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Vector)yyVals[-2+yyTop]).add(((WildcardType)yyVals[0+yyTop])); yyVal=((Vector)yyVals[-2+yyTop]); } break; case 75: - // line 740 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 739 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Vector tl = new Vector(); tl.add(((WildcardType)yyVals[0+yyTop])); @@ -1289,42 +1287,42 @@ case 75: } break; case 76: - // line 748 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 747 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = null; } break; case 77: - // line 750 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 749 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((Vector)yyVals[-1+yyTop]); } break; case 78: - // line 755 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 754 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interfaces, Spezialform Konstantendef.*/ yyVal = ((Constant)yyVals[0+yyTop]); } break; case 79: - // line 760 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 759 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((Method)yyVals[0+yyTop]); } break; case 80: - // line 765 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 764 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Field)yyVals[0+yyTop]); } break; case 81: - // line 769 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 768 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Method)yyVals[0+yyTop]); } break; case 82: - // line 774 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 773 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Method STAT = new Method(((Token)yyVals[-1+yyTop]).getOffset()); DeclId DST = new DeclId(); @@ -1339,14 +1337,14 @@ case 82: } break; case 83: - // line 788 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 787 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Constructor)yyVals[-1+yyTop]).set_Block(((Block)yyVals[0+yyTop])); yyVal = ((Constructor)yyVals[-1+yyTop]); } break; case 84: - // line 793 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 792 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Constructor)yyVals[-1+yyTop]).set_Block(((Block)yyVals[0+yyTop])); ((Constructor)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); @@ -1354,7 +1352,7 @@ case 84: } break; case 85: - // line 800 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 799 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ Constant c = new Constant(((Token)yyVals[-3+yyTop]).getLexem(), ((Modifiers)yyVals[-5+yyTop])); @@ -1364,14 +1362,14 @@ case 85: } break; case 86: - // line 809 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 808 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /* SCJU: Interface*/ yyVal = ((Method)yyVals[-1+yyTop]); } break; case 87: - // line 834 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 833 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { FieldDeclaration ret = new FieldDeclaration(((DeclId)yyVals[-2+yyTop]).getOffset()); ret.set_DeclId(((DeclId)yyVals[-2+yyTop])); @@ -1380,7 +1378,7 @@ case 87: } break; case 88: - // line 841 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 840 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { FieldDeclaration ret = new FieldDeclaration(((DeclId)yyVals[0+yyTop]).getOffset()); ret.set_DeclId(((DeclId)yyVals[0+yyTop])); @@ -1388,27 +1386,27 @@ case 88: } break; case 89: - // line 848 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 847 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { GenericDeclarationList ret = new GenericDeclarationList(((GenericVarDeclarationList)yyVals[-1+yyTop]).getElements(),((GenericVarDeclarationList)yyVals[-1+yyTop]).getEndOffset()); yyVal = ret; } break; case 90: - // line 855 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 854 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; case 91: - // line 860 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 859 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; case 92: - // line 864 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 863 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {/*angefügt von Andreas Stadelmeier*/ ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); ((FieldDeclaration)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); @@ -1416,13 +1414,13 @@ case 92: } break; case 93: - // line 871 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 870 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((FieldDeclaration)yyVals[-1+yyTop]); } break; case 94: - // line 876 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 875 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("T->Parser->fielddeclaration ...: type " + ((Type)yyVals[-2+yyTop]), Section.PARSER); ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); @@ -1430,7 +1428,7 @@ case 94: } break; case 95: - // line 883 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 882 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((FieldDeclaration)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); for(int i=0;i<(((FieldDeclaration)yyVals[-1+yyTop]).getDeclIdVector().size());i++) @@ -1441,27 +1439,27 @@ case 95: } break; case 96: - // line 893 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 892 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).set_Block(((Block)yyVals[0+yyTop])); yyVal=((Method)yyVals[-1+yyTop]); } break; case 97: - // line 900 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 899 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Block Bl = new Block(); yyVal=Bl; } break; case 98: - // line 906 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 905 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Block)yyVals[-1+yyTop]); } break; case 99: - // line 911 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 910 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Constructor CON = new Constructor(null); /*TODO: Der Parser kann sowieso nicht zwischen einem Konstruktor und einer Methode unterscheiden. Das hier kann wegfallen...*/ DeclId DIDCon = new DeclId(); @@ -1471,7 +1469,7 @@ case 99: } break; case 100: - // line 919 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 918 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Constructor CONpara = new Constructor(null); DeclId DIconpara = new DeclId(); @@ -1482,14 +1480,14 @@ case 100: } break; case 101: - // line 929 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 928 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Block CBL = new Block(); yyVal=CBL; } break; case 102: - // line 934 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 933 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Block CBLexpl = new Block(); CBLexpl.set_Statement(((Statement)yyVals[-1+yyTop])); @@ -1497,13 +1495,13 @@ case 102: } break; case 103: - // line 940 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 939 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Block)yyVals[-1+yyTop]); } break; case 104: - // line 944 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 943 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Block CBes = new Block(); CBes.set_Statement(((Statement)yyVals[-2+yyTop])); @@ -1515,7 +1513,7 @@ case 104: } break; case 105: - // line 955 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 954 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ExceptionList EL = new ExceptionList(); EL.set_addElem(((RefType)yyVals[0+yyTop])); @@ -1523,13 +1521,13 @@ case 105: } break; case 106: - // line 962 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 961 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal = ((GenericTypeVar)yyVals[0+yyTop]); } break; case 107: - // line 967 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 966 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ParaList p = new ParaList(); p.add_ParaList(((GenericTypeVar)yyVals[0+yyTop])); @@ -1537,20 +1535,20 @@ case 107: } break; case 108: - // line 973 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 972 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ParaList)yyVals[-2+yyTop]).add_ParaList(((GenericTypeVar)yyVals[0+yyTop])); yyVal=((ParaList)yyVals[-2+yyTop]); } break; case 109: - // line 980 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 979 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=new GenericTypeVar(((Token)yyVals[0+yyTop]).getLexem(),null,((Token)yyVals[0+yyTop]).getOffset()); } break; case 110: - // line 984 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 983 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { BoundedGenericTypeVar gtv=new BoundedGenericTypeVar(((Token)yyVals[-2+yyTop]).getLexem(), ((BoundedClassIdentifierList)yyVals[0+yyTop]),null, ((Token)yyVals[-2+yyTop]).getOffset() ,((BoundedClassIdentifierList)yyVals[0+yyTop]).getEndOffset()); /*gtv.setBounds($3);*/ @@ -1558,7 +1556,7 @@ case 110: } break; case 111: - // line 991 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 990 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Vector vec=new Vector(); vec.addElement(((RefType)yyVals[0+yyTop])); @@ -1567,7 +1565,7 @@ case 111: } break; case 112: - // line 998 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 997 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((BoundedClassIdentifierList)yyVals[-2+yyTop]).addElement(((RefType)yyVals[0+yyTop])); ((BoundedClassIdentifierList)yyVals[-2+yyTop]).addOffsetOff(((RefType)yyVals[0+yyTop])); @@ -1576,7 +1574,7 @@ case 112: } break; case 113: - // line 1006 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1005 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { GenericVarDeclarationList vec=new GenericVarDeclarationList(); vec.addElement(((GenericTypeVar)yyVals[0+yyTop])); @@ -1584,14 +1582,14 @@ case 113: } break; case 114: - // line 1012 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1011 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((GenericVarDeclarationList)yyVals[-2+yyTop]).addElement(((GenericTypeVar)yyVals[0+yyTop])); yyVal=((GenericVarDeclarationList)yyVals[-2+yyTop]); } break; case 115: - // line 1020 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1019 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).setType(((Type)yyVals[-1+yyTop])); ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-2+yyTop])); @@ -1599,14 +1597,14 @@ case 115: } break; case 116: - // line 1026 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1025 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).setType(((Type)yyVals[-1+yyTop])); yyVal=((Method)yyVals[0+yyTop]); } break; case 117: - // line 1031 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1030 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); ((Method)yyVals[0+yyTop]).setType(((Type)yyVals[-1+yyTop])); @@ -1614,7 +1612,7 @@ case 117: } break; case 118: - // line 1037 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1036 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-2+yyTop])); @@ -1623,7 +1621,7 @@ case 118: } break; case 119: - // line 1044 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1043 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); @@ -1631,7 +1629,7 @@ case 119: } break; case 120: - // line 1050 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1049 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); @@ -1640,7 +1638,7 @@ case 120: } break; case 121: - // line 1057 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1056 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); ((Method)yyVals[-1+yyTop]).setType(((Type)yyVals[-2+yyTop])); @@ -1649,7 +1647,7 @@ case 121: } break; case 122: - // line 1064 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1063 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-4+yyTop])); ((Method)yyVals[-1+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-3+yyTop])); @@ -1659,7 +1657,7 @@ case 122: } break; case 123: - // line 1072 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1071 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void Voit = new Void(((Method)yyVals[0+yyTop]),((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).setType(Voit); @@ -1667,7 +1665,7 @@ case 123: } break; case 124: - // line 1078 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1077 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voit = new Void(((Method)yyVals[0+yyTop]),((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); @@ -1676,7 +1674,7 @@ case 124: } break; case 125: - // line 1085 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1084 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voyt = new Void(((Method)yyVals[-1+yyTop]),((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).setType(voyt); @@ -1685,7 +1683,7 @@ case 125: } break; case 126: - // line 1092 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1091 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voyd = new Void(((Method)yyVals[-1+yyTop]),((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); @@ -1695,7 +1693,7 @@ case 126: } break; case 127: - // line 1100 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1099 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void Voit = new Void(((Method)yyVals[0+yyTop]),((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).setType(Voit); @@ -1704,7 +1702,7 @@ case 127: } break; case 128: - // line 1107 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1106 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voit = new Void(((Method)yyVals[0+yyTop]),((Token)yyVals[-1+yyTop]).getOffset()); ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-3+yyTop])); @@ -1714,7 +1712,7 @@ case 128: } break; case 129: - // line 1115 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1114 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voyt = new Void(((Method)yyVals[-1+yyTop]),((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).setType(voyt); @@ -1724,7 +1722,7 @@ case 129: } break; case 130: - // line 1123 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1122 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Void voyd = new Void(((Method)yyVals[-1+yyTop]),((Token)yyVals[-2+yyTop]).getOffset()); ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-4+yyTop])); @@ -1735,14 +1733,14 @@ case 130: } break; case 131: - // line 1133 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1132 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*auskommentiert von Andreas Stadelmeier (a10023) $1.setType(TypePlaceholder.fresh()); */ yyVal=((Method)yyVals[0+yyTop]); } break; case 132: - // line 1138 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1137 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*auskommentiert von Andreas Stadelmeier (a10023) $4.setType(TypePlaceholder.fresh());*/ ((Method)yyVals[0+yyTop]).setGenericParameter(((GenericDeclarationList)yyVals[-1+yyTop])); @@ -1750,7 +1748,7 @@ case 132: } break; case 133: - // line 1145 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1144 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[0+yyTop]).set_Modifiers(((Modifiers)yyVals[-1+yyTop])); /*auskommentiert von Andreas Stadelmeier (a10023) $2.setType(TypePlaceholder.fresh());*/ @@ -1758,7 +1756,7 @@ case 133: } break; case 134: - // line 1151 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1150 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*auskommentiert von Andreas Stadelmeier (a10023) $1.setType(TypePlaceholder.fresh());*/ ((Method)yyVals[-1+yyTop]).set_ExceptionList(((ExceptionList)yyVals[0+yyTop])); @@ -1766,7 +1764,7 @@ case 134: } break; case 135: - // line 1157 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1156 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Method)yyVals[-1+yyTop]).set_Modifiers(((Modifiers)yyVals[-2+yyTop])); /*auskommentiert von Andreas Stadelmeier (a10023) $2.setType(TypePlaceholder.fresh());*/ @@ -1775,31 +1773,31 @@ case 135: } break; case 136: - // line 1166 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1165 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((BaseType)yyVals[0+yyTop]); } break; case 137: - // line 1170 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1169 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((BaseType)yyVals[-2+yyTop]).setArray(true); } break; case 138: - // line 1174 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1173 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((RefType)yyVals[0+yyTop]); } break; case 139: - // line 1178 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1177 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((RefType)yyVals[-2+yyTop]).setArray(true); } break; case 140: - // line 1182 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1181 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { FieldDeclaration IVD = new FieldDeclaration(((DeclId)yyVals[0+yyTop]).getOffset()); IVD.getDeclIdVector().addElement( ((DeclId)yyVals[0+yyTop]) ); @@ -1808,20 +1806,20 @@ case 140: } break; case 141: - // line 1189 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1188 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((FieldDeclaration)yyVals[-2+yyTop]).getDeclIdVector().addElement(((DeclId)yyVals[0+yyTop])); yyVal=((FieldDeclaration)yyVals[-2+yyTop]); } break; case 142: - // line 1195 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1194 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; case 143: - // line 1200 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1199 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Block Blstat = new Block(); Blstat.set_Statement(((Statement)yyVals[0+yyTop])); @@ -1829,14 +1827,14 @@ case 143: } break; case 144: - // line 1207 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1206 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((Block)yyVals[-1+yyTop]).set_Statement(((Statement)yyVals[0+yyTop])); yyVal=((Block)yyVals[-1+yyTop]); } break; case 145: - // line 1213 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1212 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ParameterList PL = new ParameterList(); PL.set_AddParameter(((FormalParameter)yyVals[0+yyTop])); @@ -1844,21 +1842,21 @@ case 145: } break; case 146: - // line 1219 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1218 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ParameterList)yyVals[-2+yyTop]).set_AddParameter(((FormalParameter)yyVals[0+yyTop])); yyVal = ((ParameterList)yyVals[-2+yyTop]); } break; case 147: - // line 1225 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1224 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { This THCON = new This(((Token)yyVals[-3+yyTop]).getOffset(),((Token)yyVals[-3+yyTop]).getLexem().length()); yyVal=THCON; } break; case 148: - // line 1230 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1229 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { This THCONargl = new This(((Token)yyVals[-4+yyTop]).getOffset(),((Token)yyVals[-4+yyTop]).getLexem().length()); THCONargl.set_ArgumentList(((ArgumentList)yyVals[-2+yyTop])); @@ -1866,11 +1864,12 @@ case 148: } break; case 149: - // line 1239 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1238 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - RefType RT = new RefType(((UsedId)yyVals[0+yyTop]).get_Name_1Element(),null,-1); - //RT.set_UsedId(((UsedId)yyVals[0+yyTop])); - //RT.setName(RT.get_UsedId().get_Name_1Element()); + /*RefType RT = new RefType(RT.get_UsedId().get_Name_1Element(),null,-1);*/ + RefType RT = new RefType(((UsedId)yyVals[0+yyTop]).get_Name_1Element(),null,-1); + /*RT.set_UsedId($1);*/ + /*RT.setName(RT.get_UsedId().get_Name_1Element());*/ yyVal=RT; } break; @@ -1931,19 +1930,16 @@ case 154: } break; case 155: - // line 1295 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1296 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - if (((Vector)yyVals[0+yyTop]) != null) { - /*$1.set_ParaList($2.get_ParaList());*/ - ((UsedId)yyVals[-1+yyTop]).set_ParaList(((Vector)yyVals[0+yyTop]));/*Änderung von Andreas Stadelmeier. Type statt GenericVarType*/ - /* otth: originale (also diese) Parameterliste retten */ - /*((UsedId)$1).vParaOrg = new Vector( $2.get_ParaList() );*/ - } - UsedId uid = ((UsedId)yyVals[-1+yyTop]); - RefType RT = new RefType(uid.getQualifiedName(),null,uid.getOffset()); + de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("T->Parser->referenctype: " + ((UsedId)yyVals[0+yyTop]), Section.PARSER); + RefType RT = new RefType(((UsedId)yyVals[0+yyTop]).getQualifiedName(),null,((UsedId)yyVals[0+yyTop]).getOffset()); - RT.set_ParaList(uid.get_RealParaList()); - RT.setName(uid.getQualifiedName()); + /*ausgetauscht PL 05-07-30*/ + /*RT.set_UsedId($1); */ + /*RT.setName(RT.get_UsedId().get_Name_1Element());*/ + RT.set_ParaList(((UsedId)yyVals[0+yyTop]).get_RealParaList()); + /*RT.setName($1.getQualifiedName());*/ /*PL 05-07-30 eingefuegt containedTypes ANFANG*/ @@ -1954,45 +1950,25 @@ case 155: } break; case 156: - // line 1317 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1318 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { - de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("T->Parser->referenctype: " + ((UsedId)yyVals[0+yyTop]), Section.PARSER); - RefType RT = new RefType(((UsedId)yyVals[0+yyTop]).getQualifiedName().toString(),null,((UsedId)yyVals[0+yyTop]).getOffset()); - - /*ausgetauscht PL 05-07-30*/ - /*RT.set_UsedId($1); */ - /*RT.setName(RT.get_UsedId().get_Name_1Element());*/ - RT.set_ParaList(((UsedId)yyVals[0+yyTop]).get_RealParaList()); - RT.setName(((UsedId)yyVals[0+yyTop]).getQualifiedName()); - - - /*PL 05-07-30 eingefuegt containedTypes ANFANG*/ - containedTypes.addElement(RT); - /*PL 05-07-30 eingefuegt containedTypes ENDE*/ - - yyVal=RT; + yyVal=((DeclId)yyVals[0+yyTop]); } break; case 157: // line 1339 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" - { - yyVal=((DeclId)yyVals[0+yyTop]); - } - break; -case 158: - // line 1360 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((LocalVarDecl)yyVals[0+yyTop]); } break; -case 159: - // line 1364 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 158: + // line 1343 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; -case 160: - // line 1369 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 159: + // line 1348 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { FormalParameter FP = new FormalParameter(((DeclId)yyVals[0+yyTop])); FP.setType(((Type)yyVals[-1+yyTop])); @@ -2000,8 +1976,8 @@ case 160: yyVal=FP; } break; -case 161: - // line 1394 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 160: + // line 1373 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nFunktionsdeklaration mit typlosen Parametern: " + ((DeclId)yyVals[0+yyTop]).name, Section.PARSER); @@ -2020,29 +1996,29 @@ case 161: yyVal=FP; } break; -case 162: - // line 1413 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 161: + // line 1392 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ArgumentList AL = new ArgumentList(); AL.expr.addElement(((Expr)yyVals[0+yyTop])); yyVal=AL; } break; -case 163: - // line 1419 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 162: + // line 1398 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ((ArgumentList)yyVals[-2+yyTop]).expr.addElement(((Expr)yyVals[0+yyTop])); yyVal=((ArgumentList)yyVals[-2+yyTop]); } break; -case 164: - // line 1425 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 163: + // line 1404 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((BaseType)yyVals[0+yyTop]); } break; -case 165: - // line 1430 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 164: + // line 1409 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { DeclId DI = new DeclId(); /* #JB# 10.04.2005 */ @@ -2054,62 +2030,62 @@ case 165: yyVal=DI; } break; -case 166: - // line 1442 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 165: + // line 1421 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 167: - // line 1447 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 166: + // line 1426 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((LocalVarDecl)yyVals[-1+yyTop]); } break; -case 168: - // line 1452 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 167: + // line 1431 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; +case 168: + // line 1435 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + { + yyVal=((IfStmt)yyVals[0+yyTop]); + } + break; case 169: - // line 1456 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1439 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((IfStmt)yyVals[0+yyTop]); } break; case 170: - // line 1460 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" - { - yyVal=((IfStmt)yyVals[0+yyTop]); - } - break; -case 171: - // line 1464 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1443 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((WhileStmt)yyVals[0+yyTop]); } break; -case 172: - // line 1468 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 171: + // line 1447 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((ForStmt)yyVals[0+yyTop]); } break; -case 173: - // line 1473 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 172: + // line 1452 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 174: - // line 1477 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 173: + // line 1456 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((NewClass)yyVals[0+yyTop]); } break; -case 175: - // line 1482 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 174: + // line 1461 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { IntegerType IT = new IntegerType(null); /* #JB# 05.04.2005 */ @@ -2119,8 +2095,8 @@ case 175: yyVal=IT; } break; -case 176: - // line 1491 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 175: + // line 1470 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { CharacterType CT = new CharacterType(null); /* #JB# 05.04.2005 */ @@ -2130,8 +2106,8 @@ case 176: yyVal=CT; } break; -case 177: - // line 1501 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 176: + // line 1480 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!", Section.PARSER); LocalVarDecl LVD = new LocalVarDecl(((Type)yyVals[-1+yyTop]).getOffset(),((Type)yyVals[-1+yyTop]).getVariableLength()); @@ -2140,8 +2116,8 @@ case 177: yyVal = LVD; } break; -case 178: - // line 1512 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 177: + // line 1491 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("P -> Lokale Variable angelegt!", Section.PARSER); LocalVarDecl LVD = new LocalVarDecl(((FieldDeclaration)yyVals[0+yyTop]).getOffset(),((FieldDeclaration)yyVals[0+yyTop]).getVariableLength()); @@ -2150,32 +2126,32 @@ case 178: yyVal = LVD; } break; -case 179: - // line 1522 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 178: + // line 1501 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; -case 180: - // line 1526 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 179: + // line 1505 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((EmptyStmt)yyVals[0+yyTop]); } break; -case 181: - // line 1530 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 180: + // line 1509 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((ExprStmt)yyVals[0+yyTop]); } break; -case 182: - // line 1534 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 181: + // line 1513 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Return)yyVals[0+yyTop]); } break; -case 183: - // line 1539 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 182: + // line 1518 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { IfStmt Ifst = new IfStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Ifst.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2183,8 +2159,8 @@ case 183: yyVal=Ifst; } break; -case 184: - // line 1547 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 183: + // line 1526 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { IfStmt IfstElst = new IfStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); IfstElst.set_Expr(((Expr)yyVals[-4+yyTop])); @@ -2193,8 +2169,8 @@ case 184: yyVal=IfstElst; } break; -case 185: - // line 1556 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 184: + // line 1535 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { WhileStmt Whlst = new WhileStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Whlst.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2202,8 +2178,8 @@ case 185: yyVal=Whlst; } break; -case 186: - // line 1567 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 185: + // line 1546 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-6+yyTop]).getOffset(),((Expr)yyVals[-6+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-6+yyTop])); @@ -2215,8 +2191,8 @@ case 186: yyVal = Fst; } break; -case 187: - // line 1579 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 186: + // line 1558 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-5+yyTop])); @@ -2227,8 +2203,8 @@ case 187: yyVal = Fst; } break; -case 188: - // line 1590 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 187: + // line 1569 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-5+yyTop])); @@ -2239,8 +2215,8 @@ case 188: yyVal = Fst; } break; -case 189: - // line 1601 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 188: + // line 1580 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); Fst.set_head_Condition(((Expr)yyVals[-4+yyTop])); @@ -2251,8 +2227,8 @@ case 189: yyVal = Fst; } break; -case 190: - // line 1612 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 189: + // line 1591 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); Fst.set_head_Initializer(((Expr)yyVals[-4+yyTop])); @@ -2262,8 +2238,8 @@ case 190: yyVal = Fst; } break; -case 191: - // line 1622 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 190: + // line 1601 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-3+yyTop]).getOffset(),((Expr)yyVals[-3+yyTop]).getVariableLength()); Fst.set_head_Condition(((Expr)yyVals[-3+yyTop])); @@ -2273,8 +2249,8 @@ case 191: yyVal = Fst; } break; -case 192: - // line 1632 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 191: + // line 1611 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Fst.set_head_Loop_expr(((Expr)yyVals[-2+yyTop])); @@ -2284,8 +2260,8 @@ case 192: yyVal = Fst; } break; -case 193: - // line 1642 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 192: + // line 1621 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ForStmt Fst = new ForStmt(((Statement)yyVals[0+yyTop]).getOffset(),((Statement)yyVals[0+yyTop]).getVariableLength()); Fst.set_body_Loop_block(((Statement)yyVals[0+yyTop])); @@ -2294,73 +2270,73 @@ case 193: yyVal = Fst; } break; -case 194: - // line 1651 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 193: + // line 1630 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("conditionalexpression", Section.PARSER); yyVal=((Expr)yyVals[0+yyTop]); } break; -case 195: - // line 1656 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 194: + // line 1635 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Assign)yyVals[0+yyTop]); } break; -case 196: - // line 1662 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 195: + // line 1641 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { EmptyStmt Empst = new EmptyStmt(); yyVal=Empst; } break; -case 197: - // line 1668 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 196: + // line 1647 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[-1+yyTop]); } break; -case 198: - // line 1673 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 197: + // line 1652 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Return ret = new Return(-1,-1); yyVal= ret; } break; -case 199: - // line 1678 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 198: + // line 1657 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Return retexp = new Return(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); retexp.set_ReturnExpr(((Expr)yyVals[-1+yyTop])); yyVal=retexp; } break; -case 200: - // line 1685 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 199: + // line 1664 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Statement)yyVals[0+yyTop]); } break; -case 201: - // line 1689 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 200: + // line 1668 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((IfStmt)yyVals[0+yyTop]); } break; -case 202: - // line 1693 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 201: + // line 1672 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((WhileStmt)yyVals[0+yyTop]); } break; -case 203: - // line 1698 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 202: + // line 1677 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 204: - // line 1704 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 203: + // line 1683 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("\nParser --> Zuweisung1!\n", Section.PARSER); Assign Ass = new Assign(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); @@ -2386,8 +2362,8 @@ case 204: yyVal=Ass; } break; -case 205: - // line 1729 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 204: + // line 1708 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Assign Ass =new Assign(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); LocalOrFieldVar LOFV = new LocalOrFieldVar(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); @@ -2410,44 +2386,44 @@ case 205: yyVal=Ass; } break; -case 206: - // line 1752 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 205: + // line 1731 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Assign)yyVals[0+yyTop]); } break; +case 206: + // line 1735 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; case 207: - // line 1756 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1739 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 208: - // line 1760 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1743 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 209: - // line 1764 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1747 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 210: - // line 1768 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 211: - // line 1772 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 1751 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((MethodCall)yyVals[0+yyTop]); } break; -case 212: - // line 1783 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 211: + // line 1762 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { IfStmt IfElno = new IfStmt(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); IfElno.set_Expr(((Expr)yyVals[-4+yyTop])); @@ -2456,8 +2432,8 @@ case 212: yyVal=IfElno; } break; -case 213: - // line 1792 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 212: + // line 1771 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { WhileStmt Whstno = new WhileStmt(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); Whstno.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -2465,14 +2441,14 @@ case 213: yyVal=Whstno; } break; -case 214: - // line 1800 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 213: + // line 1779 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 215: - // line 1804 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 214: + // line 1783 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary LogOr = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); OrOp OrO = new OrOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -2483,20 +2459,20 @@ case 215: yyVal=LogOr; } break; -case 216: - // line 1817 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 215: + // line 1796 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=null; } break; -case 217: - // line 1822 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 216: + // line 1801 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Block)yyVals[0+yyTop]); } break; -case 218: - // line 1826 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 217: + // line 1805 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { /*Lambdabody kann auch nur aus einer Expression bestehen. In diesem Fall wird ein Block erstellt, welcher als einziges Statement ein return statment mit der expression hat.*/ /*Bsp.: Aus der Expression |var=="hallo"| wird: |{return var=="hallo";}|*/ @@ -2506,20 +2482,20 @@ case 218: yyVal=ret; } break; -case 219: - // line 1836 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 218: + // line 1815 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=null; } break; -case 220: - // line 1840 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 219: + // line 1819 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((ParameterList)yyVals[-1+yyTop]); } break; -case 221: - // line 1845 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 220: + // line 1824 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { LambdaExpression lambda = new LambdaExpression(/*((ParameSterList)$2).getOffset(),((ParameterList)$2).getVariableLength()*/0,0); if(((ParameterList)yyVals[-2+yyTop])!=null)lambda.setParameterList(((ParameterList)yyVals[-2+yyTop])); @@ -2527,87 +2503,87 @@ case 221: yyVal=lambda; } break; -case 222: - // line 1864 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 221: + // line 1843 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((UsedId)yyVals[0+yyTop]); } break; -case 223: - // line 1869 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 222: + // line 1848 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=null; } break; -case 224: - // line 1873 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 223: + // line 1852 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { TimesOp TEO = new TimesOp(-1,-1); yyVal=TEO; } break; -case 225: - // line 1878 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 224: + // line 1857 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { DivideOp DEO = new DivideOp(-1,-1); yyVal=DEO; } break; -case 226: - // line 1883 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 225: + // line 1862 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { ModuloOp MEO = new ModuloOp(-1,-1); yyVal=MEO; } break; -case 227: - // line 1888 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 226: + // line 1867 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PlusOp PEO = new PlusOp(-1,-1); yyVal=PEO; } break; -case 228: - // line 1893 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 227: + // line 1872 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { MinusOp MEO = new MinusOp(-1,-1); yyVal=MEO; } break; -case 229: - // line 1905 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 228: + // line 1884 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PreIncExpr PRINC = new PreIncExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); PRINC.set_Expr(((Expr)yyVals[0+yyTop])); yyVal=PRINC; } break; -case 230: - // line 1912 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 229: + // line 1891 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PreDecExpr PRDEC = new PreDecExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); PRDEC.set_Expr(((Expr)yyVals[0+yyTop])); yyVal=PRDEC; } break; -case 231: - // line 1919 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 230: + // line 1898 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PostIncExpr PIE = new PostIncExpr(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); PIE.set_Expr(((Expr)yyVals[-1+yyTop])); yyVal=PIE; } break; -case 232: - // line 1926 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 231: + // line 1905 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PostDecExpr PDE = new PostDecExpr(((Expr)yyVals[-1+yyTop]).getOffset(),((Expr)yyVals[-1+yyTop]).getVariableLength()); PDE.set_Expr(((Expr)yyVals[-1+yyTop])); yyVal=PDE; } break; -case 233: - // line 1934 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 232: + // line 1913 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M1", Section.PARSER); MethodCall MC = new MethodCall(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); @@ -2638,8 +2614,8 @@ case 233: yyVal=MC; } break; -case 234: - // line 1964 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 233: + // line 1943 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M2", Section.PARSER); MethodCall MCarg = new MethodCall(((UsedId)yyVals[-3+yyTop]).getOffset(),((UsedId)yyVals[-3+yyTop]).getVariableLength()); @@ -2671,8 +2647,8 @@ case 234: yyVal=MCarg; } break; -case 235: - // line 1995 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 234: + // line 1974 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M3", Section.PARSER); MethodCall MCpr = new MethodCall(((Expr)yyVals[-4+yyTop]).getOffset(),((Expr)yyVals[-4+yyTop]).getVariableLength()); @@ -2692,8 +2668,8 @@ case 235: yyVal=MCpr; } break; -case 236: - // line 2014 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 235: + // line 1993 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { de.dhbwstuttgart.logger.Logger.getLogger("parser").debug("M4", Section.PARSER); MethodCall MCPA = new MethodCall(((Expr)yyVals[-5+yyTop]).getOffset(),((Expr)yyVals[-5+yyTop]).getVariableLength()); @@ -2714,8 +2690,8 @@ case 236: yyVal=MCPA; } break; -case 237: - // line 2037 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 236: + // line 2016 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { NewClass NC = new NewClass(((UsedId)yyVals[-2+yyTop]).getOffset(),((UsedId)yyVals[-2+yyTop]).getVariableLength()); NC.set_UsedId(((UsedId)yyVals[-2+yyTop])); @@ -2724,8 +2700,8 @@ case 237: yyVal=NC; } break; -case 238: - // line 2045 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 237: + // line 2024 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { NewClass NCarg = new NewClass(((UsedId)yyVals[-3+yyTop]).getOffset(),((UsedId)yyVals[-3+yyTop]).getVariableLength()); NCarg.set_UsedId(((UsedId)yyVals[-3+yyTop])); @@ -2735,14 +2711,14 @@ case 238: yyVal=NCarg; } break; -case 239: - // line 2055 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 238: + // line 2034 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 240: - // line 2059 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 239: + // line 2038 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary And = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); AndOp AndO = new AndOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -2753,20 +2729,20 @@ case 240: yyVal=And; } break; +case 240: + // line 2054 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; case 241: - // line 2075 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2058 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 242: - // line 2079 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 243: - // line 2083 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2062 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { PositivExpr POSEX=new PositivExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryPlus UP= new UnaryPlus(); @@ -2775,8 +2751,8 @@ case 243: yyVal=POSEX; } break; -case 244: - // line 2091 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 243: + // line 2070 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { NegativeExpr NEGEX=new NegativeExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryMinus UM=new UnaryMinus(); @@ -2785,20 +2761,20 @@ case 244: yyVal=NEGEX; } break; +case 244: + // line 2078 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; case 245: - // line 2099 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2083 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 246: - // line 2104 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 247: - // line 2108 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2087 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { if (((UsedId)yyVals[0+yyTop]).get_Name().size() > 1) { @@ -2817,38 +2793,38 @@ case 247: } } break; +case 247: + // line 2105 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; case 248: - // line 2126 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2109 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 249: - // line 2130 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2114 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 250: - // line 2135 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2119 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 251: - // line 2140 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 253: - // line 2146 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 252: + // line 2125 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Literal)yyVals[0+yyTop]); } break; -case 254: - // line 2150 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 253: + // line 2129 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { This T = new This(((Token)yyVals[0+yyTop]).getOffset(),((Token)yyVals[0+yyTop]).getLexem().length()); UsedId UT = new UsedId(((Token)yyVals[0+yyTop]).getOffset()); @@ -2857,24 +2833,24 @@ case 254: yyVal=T; } break; -case 255: - // line 2171 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 254: + // line 2150 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((MethodCall)yyVals[0+yyTop]); } break; -case 256: - // line 2175 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 255: + // line 2154 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 257: - // line 2180 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 256: + // line 2159 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {yyVal=((Expr)yyVals[0+yyTop]);} break; -case 258: - // line 2182 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 257: + // line 2161 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {NotExpr NE=new NotExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); UnaryNot UN=new UnaryNot(); NE.set_UnaryNot(UN); @@ -2882,75 +2858,75 @@ case 258: yyVal=NE; } break; -case 259: - // line 2188 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 258: + // line 2167 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {yyVal=((CastExpr)yyVals[0+yyTop]);} break; -case 260: - // line 2190 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 259: + // line 2169 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {yyVal=((Expr)yyVals[0+yyTop]);} break; -case 262: - // line 2195 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 261: + // line 2174 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {IntLiteral IL = new IntLiteral(); IL.set_Int(((Token)yyVals[0+yyTop]).String2Int()); yyVal = IL; } break; -case 263: - // line 2200 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 262: + // line 2179 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {BoolLiteral BL = new BoolLiteral(); BL.set_Bool(((Token)yyVals[0+yyTop]).String2Bool()); yyVal = BL; } break; -case 264: - // line 2204 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 263: + // line 2183 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" {CharLiteral CL = new CharLiteral(); CL.set_Char(((Token)yyVals[0+yyTop]).CharInString()); yyVal=CL; } break; -case 265: - // line 2209 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 264: + // line 2188 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { StringLiteral ST = new StringLiteral(); ST.set_String(((Token)yyVals[0+yyTop]).get_String()); yyVal=ST; } break; -case 266: - // line 2214 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 265: + // line 2193 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { LongLiteral LL = new LongLiteral(); LL.set_Long(((Token)yyVals[0+yyTop]).String2Long()); yyVal = LL; } break; -case 267: - // line 2218 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 266: + // line 2197 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { FloatLiteral FL = new FloatLiteral(); FL.set_Float(((Token)yyVals[0+yyTop]).String2Float()); yyVal = FL; } break; -case 268: - // line 2223 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 267: + // line 2202 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { DoubleLiteral DL = new DoubleLiteral(); DL.set_Double(((Token)yyVals[0+yyTop]).String2Double()); yyVal = DL; } break; -case 269: - // line 2229 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 268: + // line 2208 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Null NN = new Null(); yyVal=NN; } break; -case 270: - // line 2235 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 269: + // line 2214 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { CastExpr CaEx=new CastExpr(((Expr)yyVals[0+yyTop]).getOffset(),((Expr)yyVals[0+yyTop]).getVariableLength()); CaEx.set_Type(((BaseType)yyVals[-2+yyTop])); @@ -2958,25 +2934,25 @@ case 270: yyVal=CaEx; } break; -case 271: - // line 2244 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 270: + // line 2223 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; +case 271: + // line 2227 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + { + } + break; case 272: - // line 2248 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" - { - } - break; -case 273: - // line 2252 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2231 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 274: - // line 2256 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 273: + // line 2235 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary EQ = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); EqualOp EO = new EqualOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -2987,8 +2963,8 @@ case 274: yyVal=EQ; } break; -case 275: - // line 2266 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 274: + // line 2245 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary NEQ = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); NotEqualOp NEO = new NotEqualOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -2999,14 +2975,14 @@ case 275: yyVal=NEQ; } break; -case 276: - // line 2277 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 275: + // line 2256 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 277: - // line 2281 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 276: + // line 2260 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary LO = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); LessOp LOO = new LessOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3017,8 +2993,8 @@ case 277: yyVal=LO; } break; -case 278: - // line 2291 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 277: + // line 2270 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary GO = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); GreaterOp GOO = new GreaterOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3029,8 +3005,8 @@ case 278: yyVal=GO; } break; -case 279: - // line 2301 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 278: + // line 2280 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary LE = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); LessEquOp LEO = new LessEquOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3041,8 +3017,8 @@ case 279: yyVal=LE; } break; -case 280: - // line 2311 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 279: + // line 2290 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary GE = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); GreaterEquOp GEO = new GreaterEquOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3053,8 +3029,8 @@ case 280: yyVal=GE; } break; -case 281: - // line 2321 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 280: + // line 2300 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { InstanceOf ISO=new InstanceOf(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); ISO.set_Expr(((Expr)yyVals[-2+yyTop])); @@ -3062,20 +3038,20 @@ case 281: yyVal=ISO; } break; +case 281: + // line 2308 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + { + yyVal=((Expr)yyVals[0+yyTop]); + } + break; case 282: - // line 2329 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2313 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; case 283: - // line 2334 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" - { - yyVal=((Expr)yyVals[0+yyTop]); - } - break; -case 284: - // line 2338 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" + // line 2317 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary AD = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); PlusOp PO = new PlusOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3086,8 +3062,8 @@ case 284: yyVal=AD; } break; -case 285: - // line 2348 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 284: + // line 2327 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary MI = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); MinusOp MO = new MinusOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3098,14 +3074,14 @@ case 285: yyVal=MI; } break; -case 286: - // line 2359 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 285: + // line 2338 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { yyVal=((Expr)yyVals[0+yyTop]); } break; -case 287: - // line 2363 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 286: + // line 2342 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary ML = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); TimesOp TO = new TimesOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3116,8 +3092,8 @@ case 287: yyVal=ML; } break; -case 288: - // line 2373 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 287: + // line 2352 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary DV = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); DivideOp DO = new DivideOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3128,8 +3104,8 @@ case 288: yyVal = DV; } break; -case 289: - // line 2383 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" +case 288: + // line 2362 "./../src/de/dhbwstuttgart/parser/JavaParser.jay" { Binary MD = new Binary(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); ModuloOp MO = new ModuloOp(((Expr)yyVals[-2+yyTop]).getOffset(),((Expr)yyVals[-2+yyTop]).getVariableLength()); @@ -3140,7 +3116,7 @@ case 289: yyVal =MD; } break; - // line 3144 "-" + // line 3120 "-" } yyTop -= yyLen[yyN]; yyState = yyStates[yyTop]; @@ -3186,20 +3162,20 @@ case 289: 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 40, 40, 40, 40, 19, 19, 44, 45, 45, 51, 51, 110, 110, 39, 39, - 15, 15, 37, 37, 117, 38, 21, 81, 81, 50, - 50, 104, 104, 36, 22, 79, 47, 82, 82, 82, - 82, 82, 72, 72, 35, 35, 48, 48, 80, 80, - 80, 80, 87, 88, 84, 85, 85, 85, 85, 85, - 85, 85, 85, 70, 70, 90, 78, 91, 91, 83, - 83, 83, 69, 100, 100, 73, 73, 73, 73, 73, - 73, 89, 86, 68, 68, 102, 46, 46, 52, 52, - 71, 103, 101, 101, 101, 101, 101, 101, 74, 75, - 76, 77, 105, 105, 105, 105, 92, 92, 67, 67, - 58, 58, 58, 58, 58, 56, 56, 56, 56, 55, - 66, 66, 54, 54, 54, 54, 57, 57, 57, 65, - 65, 53, 53, 53, 53, 53, 53, 53, 53, 112, - 64, 64, 63, 63, 63, 62, 62, 62, 62, 62, - 62, 61, 60, 60, 60, 59, 59, 59, 59, + 15, 15, 37, 37, 38, 21, 81, 81, 50, 50, + 104, 104, 36, 22, 79, 47, 82, 82, 82, 82, + 82, 72, 72, 35, 35, 48, 48, 80, 80, 80, + 80, 87, 88, 84, 85, 85, 85, 85, 85, 85, + 85, 85, 70, 70, 90, 78, 91, 91, 83, 83, + 83, 69, 100, 100, 73, 73, 73, 73, 73, 73, + 89, 86, 68, 68, 102, 46, 46, 52, 52, 71, + 103, 101, 101, 101, 101, 101, 101, 74, 75, 76, + 77, 105, 105, 105, 105, 92, 92, 67, 67, 58, + 58, 58, 58, 58, 56, 56, 56, 56, 55, 66, + 66, 54, 54, 54, 54, 57, 57, 57, 65, 65, + 53, 53, 53, 53, 53, 53, 53, 53, 112, 64, + 64, 63, 63, 63, 62, 62, 62, 62, 62, 62, + 61, 60, 60, 60, 59, 59, 59, 59, }; protected static final short yyLen [] = { 2, 1, 2, 3, 2, 3, 3, 1, 2, 3, 1, @@ -3217,25 +3193,25 @@ case 289: 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 2, 3, 1, 3, 1, 3, 1, 3, 1, 1, 2, 1, 3, 4, 5, 1, 3, - 3, 4, 1, 1, 2, 1, 1, 1, 1, 2, - 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, - 1, 1, 5, 7, 5, 9, 8, 8, 8, 7, - 7, 7, 6, 1, 1, 1, 2, 2, 3, 1, - 1, 1, 1, 3, 3, 1, 1, 1, 1, 1, - 1, 7, 5, 1, 3, 1, 1, 1, 2, 3, - 3, 1, 1, 1, 1, 1, 1, 1, 2, 2, - 2, 2, 3, 4, 5, 6, 4, 5, 1, 3, - 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, - 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, - 3, 1, 1, 1, 1, 1, 1, 1, 1, 4, - 1, 3, 1, 3, 3, 1, 3, 3, 3, 3, - 3, 1, 1, 3, 3, 1, 3, 3, 3, + 3, 4, 1, 1, 1, 1, 1, 1, 2, 1, + 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, + 1, 5, 7, 5, 9, 8, 8, 8, 7, 7, + 7, 6, 1, 1, 1, 2, 2, 3, 1, 1, + 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, + 7, 5, 1, 3, 1, 1, 1, 2, 3, 3, + 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, + 2, 3, 4, 5, 6, 4, 5, 1, 3, 1, + 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 3, 1, 1, 1, 1, 1, 2, 1, 1, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, + 3, 1, 3, 3, 1, 3, 3, 3, 3, 3, + 1, 1, 3, 3, 1, 3, 3, 3, }; protected static final short yyDefRed [] = { 0, - 62, 153, 176, 0, 63, 175, 60, 59, 58, 0, + 62, 153, 175, 0, 63, 174, 60, 59, 58, 0, 0, 0, 61, 19, 0, 14, 15, 13, 12, 7, - 0, 0, 156, 164, 154, 0, 0, 0, 0, 47, + 0, 0, 155, 163, 154, 0, 0, 0, 0, 47, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 71, 0, 0, 0, 0, 0, 48, 11, 0, 0, 0, 0, 0, 0, 20, 0, @@ -3243,7 +3219,7 @@ case 289: 0, 72, 0, 75, 137, 139, 5, 0, 0, 0, 0, 106, 107, 0, 49, 64, 67, 50, 0, 0, 0, 0, 45, 0, 80, 0, 81, 0, 0, 56, - 68, 0, 0, 0, 157, 0, 0, 0, 70, 0, + 68, 0, 0, 0, 156, 0, 0, 0, 70, 0, 69, 22, 0, 0, 24, 0, 18, 0, 54, 0, 52, 0, 65, 79, 78, 0, 0, 0, 0, 0, 34, 0, 0, 0, 77, 21, 0, 0, 33, 0, @@ -3252,36 +3228,36 @@ case 289: 93, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 26, 51, 29, 53, 66, 0, 86, 0, 55, 43, 44, 73, 74, 23, 0, - 25, 35, 111, 0, 108, 0, 0, 0, 254, 0, - 262, 266, 268, 267, 263, 269, 264, 265, 0, 0, - 0, 196, 97, 0, 0, 140, 0, 0, 179, 0, - 158, 0, 0, 253, 250, 0, 0, 256, 0, 207, - 208, 0, 0, 181, 168, 143, 159, 171, 172, 169, - 170, 180, 182, 206, 0, 0, 125, 151, 161, 0, + 25, 35, 111, 0, 108, 0, 0, 0, 253, 0, + 261, 265, 267, 266, 262, 268, 263, 264, 0, 0, + 0, 195, 97, 0, 0, 140, 0, 0, 178, 0, + 157, 0, 0, 252, 249, 0, 0, 255, 0, 206, + 207, 0, 0, 180, 167, 143, 158, 170, 171, 168, + 169, 179, 181, 205, 0, 0, 125, 151, 160, 0, 145, 0, 0, 89, 0, 0, 0, 0, 149, 0, - 165, 141, 0, 0, 0, 0, 0, 0, 0, 245, - 286, 0, 0, 276, 0, 0, 0, 0, 0, 0, - 0, 194, 173, 87, 241, 242, 248, 249, 174, 195, - 255, 259, 99, 0, 119, 94, 90, 0, 0, 0, + 164, 141, 0, 0, 0, 0, 0, 0, 0, 244, + 285, 0, 0, 275, 0, 0, 0, 0, 0, 0, + 0, 193, 172, 87, 240, 241, 247, 248, 173, 194, + 254, 258, 99, 0, 119, 94, 90, 0, 0, 0, 135, 0, 0, 84, 0, 101, 0, 0, 0, 27, - 0, 0, 0, 198, 0, 0, 0, 229, 230, 219, - 0, 0, 0, 98, 144, 167, 216, 0, 0, 231, - 232, 197, 227, 228, 224, 225, 226, 223, 0, 160, - 0, 152, 114, 129, 120, 92, 0, 0, 0, 243, - 244, 258, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 197, 0, 0, 0, 228, 229, 218, + 0, 0, 0, 98, 144, 166, 215, 0, 0, 230, + 231, 196, 226, 227, 223, 224, 225, 222, 0, 159, + 0, 152, 114, 129, 120, 92, 0, 0, 0, 242, + 243, 257, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 126, 0, 0, 121, 95, 0, 103, 102, 0, 0, - 112, 0, 0, 0, 199, 0, 220, 233, 162, 0, - 217, 221, 218, 0, 204, 205, 146, 150, 0, 0, - 287, 288, 289, 0, 0, 281, 279, 280, 277, 278, + 112, 0, 0, 0, 198, 0, 219, 232, 161, 0, + 216, 220, 217, 0, 203, 204, 146, 150, 0, 0, + 286, 287, 288, 0, 0, 280, 278, 279, 276, 277, 0, 0, 0, 0, 0, 0, 0, 130, 122, 0, - 0, 104, 0, 0, 0, 0, 0, 0, 0, 234, - 0, 237, 0, 270, 147, 0, 85, 0, 0, 0, - 0, 0, 0, 0, 0, 183, 0, 202, 201, 185, - 163, 235, 0, 238, 148, 193, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 236, 192, 191, 0, 190, - 0, 0, 0, 0, 0, 184, 189, 188, 187, 0, - 0, 0, 186, 0, 213, 0, 212, + 0, 104, 0, 0, 0, 0, 0, 0, 0, 233, + 0, 236, 0, 269, 147, 0, 85, 0, 0, 0, + 0, 0, 0, 0, 0, 182, 0, 201, 200, 184, + 162, 234, 0, 237, 148, 192, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 235, 191, 190, 0, 189, + 0, 0, 0, 0, 0, 183, 188, 187, 186, 0, + 0, 0, 185, 0, 212, 0, 211, }; protected static final short yyDgoto [] = { 15, 16, 17, 68, 122, 123, 124, 59, 35, 40, 125, @@ -3295,7 +3271,7 @@ case 289: 236, 237, 447, 238, 239, 448, 240, 241, 449, 242, 243, 289, 31, 82, 83, 194, 150, 84, 32, 290, 339, 328, 245, 390, 291, 33, 109, 110, 175, 308, - 111, 292, 0, 73, 45, 74, 0, + 111, 292, 0, 73, 45, 74, }; protected static final short yySindex [] = { 2528, 0, 0, 0, -247, 0, 0, 0, 0, 0, -216, @@ -3411,21 +3387,21 @@ case 289: -193, 1843, 127, 0, 0, 0, 0, 0, 0, 0, 0, 361, 290, -71, 546, 0, 0, 625, 0, 114, 0, 0, 0, -139, 179, 353, 0, 594, 530, 0, - 0, 0, 0, 0, 0, 570, 0, + 0, 0, 0, 0, 0, 570, }; - protected static final short yyTable [] = { 254, - 22, 117, 227, 209, 71, 67, 255, 145, 28, 259, - 36, 38, 86, 87, 154, 185, 186, 248, 338, 211, + protected static final short yyTable [] = { 253, + 22, 117, 227, 208, 71, 67, 254, 145, 28, 259, + 36, 38, 86, 87, 154, 185, 186, 248, 338, 210, 149, 58, 87, 293, 193, 307, 325, 13, 22, 19, - 273, 273, 227, 58, 273, 273, 273, 273, 273, 273, - 273, 13, 108, 19, 22, 114, 30, 102, 22, 168, - 400, 129, 273, 34, 131, 127, 22, 22, 22, 320, - 165, 28, 19, 210, 139, 43, 22, 22, 51, 41, - 87, 131, 13, 130, 19, 165, 19, 165, 227, 44, - 113, 123, 116, 108, 14, 133, 87, 273, 102, 48, + 272, 272, 227, 58, 272, 272, 272, 272, 272, 272, + 272, 13, 108, 19, 22, 114, 30, 102, 22, 168, + 400, 129, 272, 34, 131, 127, 22, 22, 22, 320, + 164, 28, 19, 209, 139, 43, 22, 22, 51, 41, + 87, 131, 13, 130, 19, 164, 19, 164, 227, 44, + 113, 123, 116, 108, 14, 133, 87, 272, 102, 48, 119, 230, 330, 331, 22, 257, 167, 148, 138, 22, 46, 41, 104, 132, 39, 72, 129, 19, 22, 28, - 127, 249, 86, 325, 22, 127, 348, 273, 380, 107, + 127, 249, 86, 325, 22, 127, 348, 272, 380, 107, 133, 230, 22, 252, 58, 192, 22, 249, 128, 22, 22, 46, 22, 22, 22, 131, 47, 115, 177, 294, 55, 22, 231, 104, 217, 123, 116, 51, 22, 133, @@ -3436,16 +3412,16 @@ case 289: 183, 30, 57, 160, 381, 187, 322, 258, 64, 2, 398, 115, 43, 3, 262, 30, 118, 323, 161, 250, 317, 317, 232, 340, 22, 6, 44, 233, 231, 86, - 217, 363, 105, 322, 364, 250, 124, 249, 165, 43, + 217, 363, 105, 322, 364, 250, 124, 249, 164, 43, 65, 300, 70, 134, 2, 445, 421, 227, 3, 117, - 2, 406, 14, 165, 3, 165, 391, 233, 128, 81, - 6, 135, 248, 248, 230, 230, 6, 244, 232, 433, - 116, 254, 254, 22, 22, 317, 317, 317, 255, 255, + 2, 406, 14, 164, 3, 164, 391, 233, 128, 81, + 6, 135, 247, 247, 230, 230, 6, 244, 232, 433, + 116, 253, 253, 22, 22, 317, 317, 317, 254, 254, 118, 333, 334, 335, 336, 250, 2, 209, 337, 356, 3, 357, 13, 209, 19, 227, 227, 244, 75, 445, - 445, 453, 6, 233, 445, 273, 227, 284, 273, 273, - 273, 273, 273, 86, 249, 231, 231, 217, 217, 76, - 42, 22, 249, 249, 141, 227, 227, 19, 227, 209, + 445, 453, 6, 233, 445, 272, 227, 284, 272, 272, + 272, 272, 272, 86, 249, 231, 231, 217, 217, 76, + 42, 22, 248, 248, 141, 227, 227, 19, 227, 209, 160, 54, 246, 227, 144, 250, 230, 227, 160, 227, 227, 126, 315, 244, 140, 296, 146, 106, 227, 227, 227, 22, 80, 375, 227, 232, 232, 22, 370, 88, @@ -3459,9 +3435,9 @@ case 289: 244, 244, 404, 405, 182, 231, 231, 230, 230, 230, 267, 387, 52, 230, 341, 297, 231, 264, 388, 309, 265, 311, 266, 160, 2, 2, 383, 384, 3, 3, - 386, 312, 233, 19, 165, 231, 231, 165, 231, 19, + 386, 312, 233, 19, 164, 231, 231, 164, 231, 19, 6, 6, 393, 231, 313, 232, 232, 231, 430, 231, - 231, 429, 165, 19, 19, 316, 232, 151, 231, 231, + 231, 429, 164, 19, 19, 316, 232, 151, 231, 231, 231, 411, 412, 327, 231, 246, 246, 120, 14, 355, 436, 326, 244, 429, 353, 232, 232, 329, 232, 354, 233, 233, 332, 232, 19, 267, 346, 232, 347, 232, @@ -3475,16 +3451,16 @@ case 289: 437, 440, 244, 264, 244, 244, 265, 295, 266, 455, 457, 462, 301, 244, 244, 244, 473, 474, 475, 244, 463, 464, 382, 267, 465, 246, 246, 484, 485, 469, - 264, 486, 487, 265, 471, 266, 246, 247, 247, 480, - 481, 247, 247, 247, 247, 247, 482, 247, 1, 424, - 407, 408, 409, 410, 2, 246, 246, 4, 246, 247, - 247, 222, 247, 246, 3, 178, 88, 246, 177, 246, + 264, 486, 487, 265, 471, 266, 246, 246, 246, 480, + 481, 246, 246, 246, 246, 246, 482, 246, 1, 424, + 407, 408, 409, 410, 2, 246, 246, 4, 246, 246, + 246, 221, 246, 246, 3, 177, 88, 246, 176, 246, 246, 77, 79, 78, 136, 180, 267, 159, 246, 246, 246, 53, 137, 264, 246, 349, 265, 140, 266, 318, - 319, 397, 263, 267, 247, 414, 344, 345, 413, 415, + 319, 397, 263, 267, 246, 414, 344, 345, 413, 415, 264, 432, 416, 265, 199, 266, 417, 195, 395, 118, 201, 202, 203, 204, 205, 206, 207, 208, 14, 396, - 267, 173, 304, 188, 247, 210, 211, 264, 438, 0, + 267, 173, 304, 188, 246, 210, 211, 264, 438, 0, 265, 0, 266, 0, 19, 0, 0, 0, 0, 371, 0, 19, 19, 374, 350, 351, 352, 19, 19, 19, 19, 267, 0, 0, 19, 0, 0, 0, 264, 0, @@ -3499,12 +3475,12 @@ case 289: 0, 266, 0, 0, 0, 136, 0, 0, 112, 115, 199, 0, 0, 0, 0, 0, 201, 202, 203, 204, 205, 206, 207, 208, 14, 263, 136, 0, 267, 0, - 0, 210, 211, 247, 0, 264, 472, 199, 265, 434, + 0, 210, 211, 246, 0, 264, 472, 199, 265, 434, 266, 0, 0, 201, 202, 203, 204, 205, 206, 207, 208, 14, 0, 0, 0, 0, 0, 0, 210, 211, - 0, 176, 247, 247, 247, 247, 247, 247, 247, 247, - 0, 0, 267, 0, 222, 222, 222, 222, 263, 264, - 0, 222, 265, 0, 266, 189, 191, 138, 0, 0, + 0, 176, 246, 246, 246, 246, 246, 246, 246, 246, + 0, 0, 267, 0, 221, 221, 221, 221, 263, 264, + 0, 221, 265, 0, 266, 189, 191, 138, 0, 0, 199, 0, 0, 0, 0, 263, 201, 202, 203, 204, 205, 206, 207, 208, 14, 138, 0, 199, 0, 0, 0, 210, 211, 201, 202, 203, 204, 205, 206, 207, @@ -3536,110 +3512,110 @@ case 289: 0, 76, 0, 0, 76, 0, 0, 199, 0, 0, 0, 0, 0, 201, 202, 203, 204, 205, 206, 207, 208, 14, 0, 0, 0, 0, 0, 0, 210, 211, - 0, 0, 0, 76, 246, 246, 76, 0, 246, 246, - 246, 246, 246, 0, 246, 260, 0, 0, 0, 260, - 260, 260, 260, 260, 260, 260, 246, 246, 0, 246, - 0, 0, 0, 0, 0, 76, 76, 260, 260, 0, - 260, 251, 251, 0, 0, 251, 251, 251, 251, 251, - 251, 251, 247, 247, 0, 0, 247, 247, 247, 247, - 247, 246, 247, 251, 251, 0, 251, 0, 0, 0, - 0, 0, 260, 0, 247, 247, 0, 247, 239, 239, - 0, 0, 239, 239, 239, 239, 239, 239, 239, 214, - 214, 246, 0, 214, 214, 214, 214, 214, 214, 214, - 239, 239, 260, 239, 0, 0, 0, 0, 0, 247, - 0, 214, 214, 0, 214, 203, 203, 0, 0, 203, - 203, 203, 203, 203, 203, 203, 0, 0, 251, 0, - 0, 0, 0, 0, 0, 239, 0, 203, 203, 247, - 203, 0, 0, 261, 0, 0, 214, 261, 261, 261, - 261, 261, 261, 261, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 261, 261, 0, 261, 76, - 76, 0, 203, 0, 76, 76, 214, 0, 0, 0, + 0, 0, 0, 76, 245, 245, 76, 0, 245, 245, + 245, 245, 245, 0, 245, 259, 0, 0, 0, 259, + 259, 259, 259, 259, 259, 259, 245, 245, 0, 245, + 0, 0, 0, 0, 0, 76, 76, 259, 259, 0, + 259, 250, 250, 0, 0, 250, 250, 250, 250, 250, + 250, 250, 246, 246, 0, 0, 246, 246, 246, 246, + 246, 245, 246, 250, 250, 0, 250, 0, 0, 0, + 0, 0, 259, 0, 246, 246, 0, 246, 238, 238, + 0, 0, 238, 238, 238, 238, 238, 238, 238, 213, + 213, 245, 0, 213, 213, 213, 213, 213, 213, 213, + 238, 238, 259, 238, 0, 0, 0, 0, 0, 246, + 0, 213, 213, 0, 213, 202, 202, 0, 0, 202, + 202, 202, 202, 202, 202, 202, 0, 0, 250, 0, + 0, 0, 0, 0, 0, 238, 0, 202, 202, 246, + 202, 0, 0, 260, 0, 0, 213, 260, 260, 260, + 260, 260, 260, 260, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 260, 260, 0, 260, 76, + 76, 0, 202, 0, 76, 76, 213, 0, 0, 0, 0, 76, 0, 0, 0, 76, 76, 0, 76, 76, 76, 76, 76, 76, 76, 0, 76, 0, 0, 0, - 261, 0, 203, 0, 0, 0, 0, 0, 0, 0, + 260, 0, 202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 76, 76, 76, 76, 76, 76, 76, 76, 0, 0, 0, 0, 0, 0, 0, 0, - 261, 0, 0, 0, 0, 0, 0, 240, 240, 0, - 246, 240, 240, 240, 240, 240, 240, 240, 0, 0, - 0, 260, 0, 0, 0, 0, 0, 0, 0, 240, - 240, 0, 240, 0, 0, 0, 0, 0, 0, 246, - 246, 246, 246, 246, 246, 246, 246, 251, 0, 0, - 260, 260, 260, 260, 260, 260, 260, 260, 247, 0, - 0, 0, 0, 0, 240, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 251, 251, 251, 251, - 251, 251, 251, 251, 239, 0, 0, 247, 247, 247, - 247, 247, 247, 247, 247, 214, 0, 0, 0, 0, + 260, 0, 0, 0, 0, 0, 0, 239, 239, 0, + 245, 239, 239, 239, 239, 239, 239, 239, 0, 0, + 0, 259, 0, 0, 0, 0, 0, 0, 0, 239, + 239, 0, 239, 0, 0, 0, 0, 0, 0, 245, + 245, 245, 245, 245, 245, 245, 245, 250, 0, 0, + 259, 259, 259, 259, 259, 259, 259, 259, 246, 0, + 0, 0, 0, 0, 239, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 250, 250, 250, 250, + 250, 250, 250, 250, 238, 0, 0, 246, 246, 246, + 246, 246, 246, 246, 246, 213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 239, 239, 239, 239, 239, 239, 239, - 239, 203, 0, 0, 214, 214, 214, 214, 214, 0, - 214, 214, 0, 0, 0, 0, 252, 252, 0, 0, - 252, 252, 252, 252, 252, 252, 252, 0, 0, 261, - 203, 203, 203, 203, 0, 203, 203, 203, 252, 252, - 0, 252, 0, 0, 215, 215, 0, 0, 215, 215, - 215, 215, 215, 215, 215, 0, 0, 0, 261, 261, - 261, 261, 261, 261, 261, 261, 215, 215, 0, 215, + 0, 0, 0, 238, 238, 238, 238, 238, 238, 238, + 238, 202, 0, 0, 213, 213, 213, 213, 213, 0, + 213, 213, 0, 0, 0, 0, 251, 251, 0, 0, + 251, 251, 251, 251, 251, 251, 251, 0, 0, 260, + 202, 202, 202, 202, 0, 202, 202, 202, 251, 251, + 0, 251, 0, 0, 214, 214, 0, 0, 214, 214, + 214, 214, 214, 214, 214, 0, 0, 0, 260, 260, + 260, 260, 260, 260, 260, 260, 214, 214, 0, 214, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 282, 282, 0, 0, 282, 282, 0, 282, - 0, 282, 282, 0, 0, 0, 0, 0, 0, 0, - 0, 215, 0, 252, 282, 282, 0, 282, 0, 0, - 271, 271, 0, 0, 271, 271, 271, 271, 271, 271, - 271, 0, 1, 240, 0, 0, 0, 0, 49, 0, - 0, 215, 271, 271, 5, 271, 0, 0, 0, 282, + 0, 0, 281, 281, 0, 0, 281, 281, 0, 281, + 0, 281, 281, 0, 0, 0, 0, 0, 0, 0, + 0, 214, 0, 251, 281, 281, 0, 281, 0, 0, + 270, 270, 0, 0, 270, 270, 270, 270, 270, 270, + 270, 0, 1, 239, 0, 0, 0, 0, 49, 0, + 0, 214, 270, 270, 5, 270, 0, 0, 0, 281, 0, 7, 8, 9, 0, 0, 50, 0, 0, 13, - 0, 0, 240, 240, 240, 240, 240, 240, 240, 240, - 0, 0, 0, 0, 0, 0, 0, 271, 222, 282, - 272, 272, 0, 0, 272, 272, 272, 272, 272, 272, - 272, 274, 274, 0, 0, 274, 274, 274, 274, 274, - 274, 274, 272, 272, 0, 272, 0, 271, 76, 0, - 0, 0, 0, 274, 275, 275, 0, 0, 275, 275, - 275, 275, 275, 275, 275, 0, 1, 0, 0, 0, - 0, 0, 4, 0, 0, 0, 275, 272, 5, 0, - 0, 0, 0, 0, 0, 7, 8, 9, 274, 0, - 12, 0, 283, 13, 0, 283, 0, 283, 283, 283, - 283, 0, 252, 0, 0, 0, 0, 272, 0, 0, - 0, 275, 0, 283, 283, 0, 283, 0, 274, 0, + 0, 0, 239, 239, 239, 239, 239, 239, 239, 239, + 0, 0, 0, 0, 0, 0, 0, 270, 221, 281, + 271, 271, 0, 0, 271, 271, 271, 271, 271, 271, + 271, 273, 273, 0, 0, 273, 273, 273, 273, 273, + 273, 273, 271, 271, 0, 271, 0, 270, 76, 0, + 0, 0, 0, 273, 274, 274, 0, 0, 274, 274, + 274, 274, 274, 274, 274, 0, 1, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 274, 271, 5, 0, + 0, 0, 0, 0, 0, 7, 8, 9, 273, 0, + 12, 0, 282, 13, 0, 282, 0, 282, 282, 282, + 282, 0, 251, 0, 0, 0, 0, 271, 0, 0, + 0, 274, 0, 282, 282, 0, 282, 0, 273, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 215, 252, 252, 252, 252, 252, 252, 252, 252, 0, - 0, 275, 0, 0, 0, 0, 0, 0, 283, 284, - 0, 0, 284, 0, 284, 284, 284, 284, 0, 215, - 215, 215, 215, 215, 0, 215, 215, 0, 282, 285, - 284, 284, 285, 284, 285, 285, 285, 285, 283, 0, + 214, 251, 251, 251, 251, 251, 251, 251, 251, 0, + 0, 274, 0, 0, 0, 0, 0, 0, 282, 283, + 0, 0, 283, 0, 283, 283, 283, 283, 0, 214, + 214, 214, 214, 214, 0, 214, 214, 0, 281, 284, + 283, 283, 284, 283, 284, 284, 284, 284, 282, 0, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, - 285, 285, 0, 285, 0, 0, 271, 282, 282, 282, - 282, 282, 282, 282, 282, 284, 0, 0, 0, 0, - 0, 257, 257, 0, 0, 257, 257, 257, 257, 257, - 257, 257, 0, 0, 0, 285, 271, 271, 0, 271, - 271, 271, 271, 257, 257, 284, 257, 0, 0, 0, + 284, 284, 0, 284, 0, 0, 270, 281, 281, 281, + 281, 281, 281, 281, 281, 283, 0, 0, 0, 0, + 0, 256, 256, 0, 0, 256, 256, 256, 256, 256, + 256, 256, 0, 0, 0, 284, 270, 270, 0, 270, + 270, 270, 270, 256, 256, 283, 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 0, 0, 0, - 0, 0, 0, 0, 0, 285, 272, 0, 76, 0, - 0, 0, 0, 0, 168, 247, 247, 0, 257, 0, - 0, 222, 222, 222, 222, 0, 0, 0, 222, 0, - 0, 0, 0, 168, 0, 0, 272, 272, 0, 272, - 272, 272, 272, 0, 0, 0, 274, 0, 257, 274, - 274, 274, 274, 274, 0, 0, 0, 0, 0, 214, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 275, - 0, 0, 275, 275, 275, 275, 275, 283, 212, 0, + 0, 0, 0, 0, 0, 284, 271, 0, 76, 0, + 0, 0, 0, 0, 167, 246, 246, 0, 256, 0, + 0, 221, 221, 221, 221, 0, 0, 0, 221, 0, + 0, 0, 0, 167, 0, 0, 271, 271, 0, 271, + 271, 271, 271, 0, 0, 0, 273, 0, 256, 273, + 273, 273, 273, 273, 0, 0, 0, 0, 0, 214, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 274, + 0, 0, 274, 274, 274, 274, 274, 282, 212, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 168, 0, 168, - 0, 0, 0, 0, 0, 0, 283, 283, 283, 283, - 283, 283, 283, 283, 0, 0, 214, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 167, 0, 167, + 0, 0, 0, 0, 0, 0, 282, 282, 282, 282, + 282, 282, 282, 282, 0, 0, 214, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, - 0, 0, 0, 3, 284, 212, 0, 0, 0, 0, + 0, 0, 0, 3, 283, 212, 0, 0, 0, 0, 5, 0, 144, 0, 213, 6, 0, 7, 8, 9, - 0, 0, 0, 0, 285, 89, 0, 0, 0, 0, - 0, 0, 90, 284, 284, 284, 284, 284, 284, 284, - 284, 0, 91, 214, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 285, 285, 285, 285, 285, 285, 285, - 285, 0, 212, 0, 0, 0, 0, 257, 0, 144, + 0, 0, 0, 0, 284, 89, 0, 0, 0, 0, + 0, 0, 90, 283, 283, 283, 283, 283, 283, 283, + 283, 0, 91, 214, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 284, 284, 284, 284, 284, 284, 284, + 284, 0, 212, 0, 0, 0, 0, 256, 0, 144, 0, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 214, 0, - 0, 0, 0, 0, 0, 0, 257, 257, 257, 257, - 257, 257, 168, 0, 0, 0, 168, 212, 0, 0, - 0, 200, 0, 0, 0, 168, 168, 0, 168, 0, - 0, 0, 0, 0, 0, 0, 144, 168, 324, 0, - 0, 168, 0, 0, 0, 0, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 0, 2, 0, 214, - 0, 3, 168, 168, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 256, 256, 256, 256, + 256, 256, 167, 0, 0, 0, 167, 212, 0, 0, + 0, 199, 0, 0, 0, 167, 167, 0, 167, 0, + 0, 0, 0, 0, 0, 0, 144, 167, 324, 0, + 0, 167, 0, 0, 0, 0, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 0, 2, 0, 214, + 0, 3, 167, 167, 0, 0, 0, 0, 0, 0, 196, 197, 0, 6, 0, 0, 0, 0, 212, 446, 450, 144, 198, 377, 0, 0, 199, 0, 0, 0, 456, 200, 201, 202, 203, 204, 205, 206, 207, 208, diff --git a/src/de/dhbwstuttgart/parser/JavaParser.jay b/src/de/dhbwstuttgart/parser/JavaParser.jay index 077e6004c..b46ecd397 100755 --- a/src/de/dhbwstuttgart/parser/JavaParser.jay +++ b/src/de/dhbwstuttgart/parser/JavaParser.jay @@ -147,7 +147,6 @@ public Vector testPair = new Vector(); %type variabledeclarator %type variabledeclaratorid %type simplename -%type typename %type qualifiedname %type importqualifiedname %type importdeclaration @@ -1237,8 +1236,9 @@ explicitconstructorinvocation : THIS '(' ')' ';' classtypelist : classtype { - RefType RT = new RefType(RT.get_UsedId().get_Name_1Element(),null,-1); - RT.set_UsedId($1); + //RefType RT = new RefType(RT.get_UsedId().get_Name_1Element(),null,-1); + RefType RT = new RefType($1.get_Name_1Element(),null,-1); + //RT.set_UsedId($1); //RT.setName(RT.get_UsedId().get_Name_1Element()); $$=RT; } @@ -1291,27 +1291,6 @@ primitivetype :BOOLEAN $$=$1; } -referencelongtype : typename parameter - { - if ($2 != null) { - //$1.set_ParaList($2.get_ParaList()); - $1.set_ParaList($2);//Änderung von Andreas Stadelmeier. Type statt GenericVarType - /* otth: originale (also diese) Parameterliste retten */ - //((UsedId)$1).vParaOrg = new Vector( $2.get_ParaList() ); - } - UsedId uid = $1; - RefType RT = new RefType(uid.getQualifiedName(),null,uid.getOffset()); - - RT.set_ParaList(uid.get_RealParaList()); - //RT.setName(uid.getQualifiedName()); - - - //PL 05-07-30 eingefuegt containedTypes ANFANG - containedTypes.addElement(RT); - //PL 05-07-30 eingefuegt containedTypes ENDE - - $$=RT; - } referencetype :classorinterfacetype { diff --git a/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java index 70677904c..5a66e308d 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java @@ -1,5 +1,7 @@ package de.dhbwstuttgart.syntaxtree.type; +import java.util.Vector; + import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.typeinference.JavaCodeResult; @@ -132,5 +134,12 @@ public class ExtendsWildcardType extends WildcardType implements ITypeContainer, public JavaCodeResult printJavaCode(ResultSet resultSet) { return new JavaCodeResult("? extends "+this.extendsType.printJavaCode(resultSet)); } - + + @Override + public Vector getInvolvedTypePlaceholder() { + Vector ret = super.getInvolvedTypePlaceholder(); + ret.addAll(this.extendsType.getInvolvedTypePlaceholder()); + return ret; + } + } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java index 132f751b9..85ea2d9d2 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java @@ -762,7 +762,13 @@ public class RefType extends Type implements IMatchable } return ret; } + + @Override + public Type applyResultSet(ResultSet result) { + return super.applyResultSet(result); + } + /** * Liefert alle SuperWildcardTypes, die in diesem Typ enthalten sind. * Dabei werden auch die parameter auf SuperWildcardTypes durchsucht. diff --git a/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java index fdeadd182..7a730da6a 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java @@ -1,5 +1,7 @@ package de.dhbwstuttgart.syntaxtree.type; +import java.util.Vector; + import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; @@ -130,4 +132,10 @@ public class SuperWildcardType extends WildcardType implements ITypeContainer, I } } + @Override + public Vector getInvolvedTypePlaceholder() { + Vector ret = super.getInvolvedTypePlaceholder(); + ret.addAll(this.superType.getInvolvedTypePlaceholder()); + return ret; + } } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/Type.java b/src/de/dhbwstuttgart/syntaxtree/type/Type.java index eacb438ac..2e0cea922 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/Type.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/Type.java @@ -262,6 +262,10 @@ public abstract class Type extends SyntaxTreeNode implements IItemWithOffset return new JavaCodeResult(this.name.toString()); } + public Type applyResultSet(ResultSet result){ + return this.clone(); + } + /** * Liefert alle SuperWildcardTypes, die in diesem Typ enthalten sind. * @return diff --git a/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java index f8d07f9a8..4679dc620 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java @@ -1,5 +1,7 @@ package de.dhbwstuttgart.syntaxtree.type; +import java.util.Vector; + import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; @@ -88,5 +90,4 @@ public class WildcardType extends Type{ } } - } diff --git a/src/de/dhbwstuttgart/typeinference/Pair.java b/src/de/dhbwstuttgart/typeinference/Pair.java index 114bc97ea..2973b24f4 100755 --- a/src/de/dhbwstuttgart/typeinference/Pair.java +++ b/src/de/dhbwstuttgart/typeinference/Pair.java @@ -395,5 +395,15 @@ public class Pair if(this.TA2 instanceof TypePlaceholder)ret.add((TypePlaceholder)TA2); return ret; } + + /** + * @return Vector aus TA1 und TA2 + */ + public Vector getTypes(){ + Vector ret = new Vector<>(); + ret.add(this.TA1); + ret.add(this.TA2); + return ret; + } } // ino.end diff --git a/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java b/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java index 15db16923..082a8df07 100644 --- a/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/GenericTypeInsertPoint.java @@ -103,6 +103,7 @@ class GenericVarPatch { } public String getInsertString(ResultSet rs){ + //Hier sollten TPHs nicht aufgelöst sondern in Generische Variablen umgewandelt werden: String ret = ""; Iterator it1 = this.genericVarDeclarations.iterator(); while(it1.hasNext()){ @@ -124,6 +125,14 @@ class GenericVarPatch { GenericVarDeclarationPatch toAdd = new GenericVarDeclarationPatch(tph); if(!this.genericVarDeclarations.contains(toAdd))this.genericVarDeclarations.add(toAdd); } + + public void addTPHs(Vector TPHs) { + for(TypePlaceholder tph: TPHs)this.add(tph); + } + + public void addPairs(Vector pairs) { + for(Pair pair : pairs)this.add(pair); + } } @@ -156,6 +165,10 @@ class GenericVarExtendsDeclarationPatch { if(!(this.genericPair.equals(((GenericVarExtendsDeclarationPatch)o).genericPair)))return false; return true; } + + public String toString(){ + return this.genericPair.toString(); + } } /** @@ -174,7 +187,8 @@ class GenericVarDeclarationPatch { public String getInsertString(ResultSet resultSet){ String ret = ""; if(this.genericPair != null){ - ret += this.genericPair.printJavaCode(resultSet); + //ret += this.genericPair.printJavaCode(resultSet); + ret += this.genericPair.getName().toString(); } return ret; } diff --git a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java index 33593014c..6d870e1d3 100644 --- a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertPoint.java @@ -29,7 +29,7 @@ public class TypeInsertPoint extends SourcePatchPoint { * Dieser Konstruktor erstellt einen TypInsertPoint * @param insertPoint * @param insertNode - muss das gleiche sein wie "insertPoint" - * @param insertType + * @param insertType - der einzusetzende Typ * @param resultSet * @param generics - die generischen Parameter des einzusetzenden Typs */ diff --git a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java index c80a1b224..1024442bb 100644 --- a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java @@ -11,6 +11,7 @@ import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; +import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.Pair; @@ -64,12 +65,44 @@ public class TypeInsertSet { * @param tpj */ private void insertType(TypeInsertPoint tip, TypePatchJob tpj){ + /* + * Ablauf: + * 1. Alle TypePlaceholder im einzusetzenden Typ ermitteln. + * 2. Alle Constraints die mit diesen TPHs zusammenhängen ermitteln + * 3. Alle TPHs, aus Schritt 1 und 2 zusammenfügen. + * 4. Kontrollieren, welche TPHs in dem InsertKontext noch nicht bekannt sind. + * 5. Alle Unbekannten TPHs herausfiltern (von den Pairs nur TA2) + * 6. Alle unbekannten TPHs + Pairs als GenericTypeInsertPoint deklarieren. + */ GenericVarPatch gPatch = new GenericVarPatch();//Set der Einzusetzenden generischen Variablendeklarationen + //Schritt 1: + Vector involvedTPHs = tip.getInsertType().getUnresolvedTPH(resultSet);//.getInvolvedTypePlaceholder(); + //Schritt 2: Vector pairs = new Vector<>(); - for(Pair pair : this.resultSet.getConstraintsFor(tip.getInsertType().getInvolvedTypePlaceholder())){ - gPatch.add(pair); + for(Pair pair : this.resultSet.getConstraintsFor(involvedTPHs)){ + //gPatch.add(pair); //Schritt 6 (Teil 2) pairs.add(pair); } + //Schritt 3: + Vector allTPHs = new Vector<>(); + for(TypePlaceholder tph : involvedTPHs){ + if(!allTPHs.contains(tph)){ + allTPHs.add(tph); + } + } + //TODO: Schritt 4 (Es wird nicht kontrolliert, ob der TPH in dem Kontext schon bekannt ist) + // und Schritt 5: (Es werden nur die TPHs übernommen, welche noch nicht in den involvedTPHs vorkommen) + for(Pair pair : pairs)for(Type t : pair.getTypes())for(TypePlaceholder tph : t.getInvolvedTypePlaceholder()){ + if(!allTPHs.contains(tph)){ + allTPHs.add(tph); + } + } + + //gPatch.addPairs(pairs); + gPatch.addTPHs(allTPHs); + + /* + //TODO: Nur die TPH aus den Paaren entnehmen und Generische Variablen bilden //Kontrollieren ob alle in den Paaren vorhandenen Generischen Variablen in dem Bereich vorkommen: for(Pair pair : pairs){ if(! tip.getInsertNode().seesType(pair.TA2)){ @@ -80,6 +113,8 @@ public class TypeInsertSet { } } } + */ + GenericTypeInsertPoint gip = new GenericTypeInsertPoint(tip.getGenericTypeVarInsertNode(), gPatch, resultSet); typinferenzLog.debug("Erstellter GenericTypeInsertPoint: "+gip, Section.TYPEINFERENCE); tpj.add(tip);