diff --git a/info4/kapitel-8/Interpreter/loopinterpreter.py b/info4/kapitel-8/Interpreter/loopinterpreter.py index 4cb0d0e0e48de72bb0e3bc397f77855b5d26451b..64c9851153be490c0fac10618e279f7a68c5abc7 100644 --- a/info4/kapitel-8/Interpreter/loopinterpreter.py +++ b/info4/kapitel-8/Interpreter/loopinterpreter.py @@ -36,7 +36,7 @@ class LOOPInterpreter: (re.compile(r'x\d+'), 'IDENTIFIER'), (re.compile(r'\+'), 'PLUS'), (re.compile(r'-'), 'MINUS'), - (re.compile(r':=|≔'), 'EQUALS'), + (re.compile(r':=|≔'), 'ALLOCATION'), (re.compile(r'LOOP'), 'LOOP'), (re.compile(r'DO'), 'DO'), (re.compile(r'END'), 'END'), @@ -53,7 +53,7 @@ class LOOPInterpreter: if identifier_1 in forbidden_identifiers: self.error_handler.handle_error("Identifier " + identifier_1 + " ist bereits in Loop vorhanden und darf nicht verwendet werden.") - if not self.next_nonempty_token("Zuweisung", ":=").k == 'EQUALS': + if not self.next_nonempty_token("Zuweisung", ":=").k == 'ALLOCATION': self.error_handler.handle_error(":= in Zuweisung erwartet.") identifier_token_2 = self.next_nonempty_token("Zuweisung", "IDENTIFIER (x0, x1, ...) oder NUMBER") if identifier_token_2.k == 'NUMBER': @@ -90,7 +90,7 @@ class LOOPInterpreter: if identifier_1 in forbidden_identifiers: self.error_handler.handle_error("Identifier " + identifier_1 + " ist bereits in Loop vorhanden und darf nicht verwendet werden.") - if not self.next_nonempty_token("Zuweisung", ":=").k == 'EQUALS': + if not self.next_nonempty_token("Zuweisung", ":=").k == 'ALLOCATION': self.error_handler.handle_error(":= in Zuweisung erwartet.") identifier_token_2 = self.next_nonempty_token("Zuweisung", "IDENTIFIER (x0, x1, ...) oder NUMBER") diff --git a/info4/kapitel-8/Interpreter/whileinterpreter.py b/info4/kapitel-8/Interpreter/whileinterpreter.py index 1c401de6f784c06324911c72ff00bb68f05b27ee..cc8a6cde32d4076bc1b18ee43cab5e1126bb950f 100644 --- a/info4/kapitel-8/Interpreter/whileinterpreter.py +++ b/info4/kapitel-8/Interpreter/whileinterpreter.py @@ -35,7 +35,7 @@ class WHILEInterpreter(LOOPInterpreter): (re.compile(r'x\d+'), 'IDENTIFIER'), (re.compile(r'\+'), 'PLUS'), (re.compile(r'-'), 'MINUS'), - (re.compile(r':=|≔'), 'EQUALS'), + (re.compile(r':=|≔'), 'ALLOCATION'), (re.compile(r'/=|≠|!='), 'NOTEQUALS'), (re.compile(r'LOOP'), 'LOOP'), (re.compile(r'WHILE'), 'WHILE'),