diff --git a/BewerterStrukturellerInduktion/Eingabeverwaltung/Parser/Proof_Antlr.cs b/BewerterStrukturellerInduktion/Eingabeverwaltung/Parser/Proof_Antlr.cs index fdb2e6af4d373eb29acb868e57dd41d572f12a0d..663393fe60a76dd7bcc3ffd276d67a18a3769623 100644 --- a/BewerterStrukturellerInduktion/Eingabeverwaltung/Parser/Proof_Antlr.cs +++ b/BewerterStrukturellerInduktion/Eingabeverwaltung/Parser/Proof_Antlr.cs @@ -24,12 +24,14 @@ namespace Eingabeverwaltung.Parser ProofParser.ProofContext tree = parser.proof(); - // create Proof without TransformationSteps - IProofListener PL = new Proof_Listener(container); + Listener_Helper LH = new Listener_Helper(container.ADT.sorts, container.ADT.operations, container.ADT.axioms); + // create Proof without TransformationSteps + IProofListener PL = new Proof_Listener(container,LH); ParseTreeWalker.Default.Walk(PL, tree); // walk again and create all TransformationSteps: Now cycles are no Problem anymore. - IProofListener TL = new TransformationStep_Listener(container); + IProofListener TL = new TransformationStep_Listener(container,LH); ParseTreeWalker.Default.Walk(TL, tree); + LH.close(); } } } diff --git a/BewerterStrukturellerInduktion/Eingabeverwaltung/Parser/Proof_Listener.cs b/BewerterStrukturellerInduktion/Eingabeverwaltung/Parser/Proof_Listener.cs index 11ec7bb63dee8a2b4344e380229ef7dc1f1a93cf..3108f138133dbc803334e7608a8c831a908b8f0e 100644 --- a/BewerterStrukturellerInduktion/Eingabeverwaltung/Parser/Proof_Listener.cs +++ b/BewerterStrukturellerInduktion/Eingabeverwaltung/Parser/Proof_Listener.cs @@ -34,10 +34,10 @@ namespace Eingabeverwaltung.Parser // Transformation parts private Tree startTree; - public Proof_Listener(Container container) + public Proof_Listener(Container container, Listener_Helper LH) { this.container = container; - LH = new Listener_Helper(container.ADT.sorts, container.ADT.operations, null, container.ADT.axioms, null, null); + this.LH = LH; mainProof = null; lemmata = null; diff --git a/BewerterStrukturellerInduktion/Eingabeverwaltung/Parser/TransformationStep_Listener.cs b/BewerterStrukturellerInduktion/Eingabeverwaltung/Parser/TransformationStep_Listener.cs index ebaeac9118c12e300985f117d6523e8cae1290aa..d33b3afd2def56b0471126ba296e1b103bc7d49b 100644 --- a/BewerterStrukturellerInduktion/Eingabeverwaltung/Parser/TransformationStep_Listener.cs +++ b/BewerterStrukturellerInduktion/Eingabeverwaltung/Parser/TransformationStep_Listener.cs @@ -38,7 +38,7 @@ namespace Eingabeverwaltung.Parser private Transformation_Step TS; private List<Transformation_Step> TSs; - public TransformationStep_Listener(Container container) + public TransformationStep_Listener(Container container, Listener_Helper LH) { this.container = container; currentTR = null; @@ -46,7 +46,7 @@ namespace Eingabeverwaltung.Parser currentIndCase = null; currentIndCaseIndex = -1; currentLemma = null; - LH = new Listener_Helper(container.ADT.sorts, container.ADT.operations, container.ADT.axioms); + this.LH = LH; TS = null; TSs = null;