Commit a1ae14e1 authored by Christopher Happe's avatar Christopher Happe
Browse files

Support für MINUS in Unicode für alle Interpreter.

parent 50eeaba4
......@@ -14,7 +14,7 @@ class GOTOInterpreter:
(re.compile(r'x\d+'), 'IDENTIFIER'),
(re.compile(r'M\d+'), 'MARKER'),
(re.compile(r'\+'), 'PLUS'),
(re.compile(r'-|−'), 'MINUS'),
(re.compile(r'[−-]'), 'MINUS'),
(re.compile(r':=|≔'), 'ALLOCATION'),
(re.compile(r'='), 'EQUALS'),
(re.compile(r'/=|≠|!='), 'NOTEQUALS'),
......
......@@ -35,7 +35,7 @@ class LOOPInterpreter:
self.regex_to_token = [(re.compile(r'\d+'), 'NUMBER'),
(re.compile(r'x\d+'), 'IDENTIFIER'),
(re.compile(r'\+'), 'PLUS'),
(re.compile(r'-'), 'MINUS'),
(re.compile(r'[−-]'), 'MINUS'),
(re.compile(r':=|≔'), 'ALLOCATION'),
(re.compile(r'LOOP'), 'LOOP'),
(re.compile(r'DO'), 'DO'),
......
......@@ -34,7 +34,7 @@ class WHILEInterpreter(LOOPInterpreter):
self.regex_to_token = [(re.compile(r'\d+'), 'NUMBER'),
(re.compile(r'x\d+'), 'IDENTIFIER'),
(re.compile(r'\+'), 'PLUS'),
(re.compile(r'-'), 'MINUS'),
(re.compile(r'[−-]'), 'MINUS'),
(re.compile(r':=|≔'), 'ALLOCATION'),
(re.compile(r'/=|≠|!='), 'NOTEQUALS'),
(re.compile(r'LOOP'), 'LOOP'),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment