Skip to content
Snippets Groups Projects
Commit a1ae14e1 authored by Chris's avatar Chris
Browse files

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

parent 50eeaba4
No related branches found
No related tags found
1 merge request!1Master
...@@ -14,7 +14,7 @@ class GOTOInterpreter: ...@@ -14,7 +14,7 @@ class GOTOInterpreter:
(re.compile(r'x\d+'), 'IDENTIFIER'), (re.compile(r'x\d+'), 'IDENTIFIER'),
(re.compile(r'M\d+'), 'MARKER'), (re.compile(r'M\d+'), 'MARKER'),
(re.compile(r'\+'), 'PLUS'), (re.compile(r'\+'), 'PLUS'),
(re.compile(r'-|−'), 'MINUS'), (re.compile(r'[−-]'), 'MINUS'),
(re.compile(r':=|≔'), 'ALLOCATION'), (re.compile(r':=|≔'), 'ALLOCATION'),
(re.compile(r'='), 'EQUALS'), (re.compile(r'='), 'EQUALS'),
(re.compile(r'/=|≠|!='), 'NOTEQUALS'), (re.compile(r'/=|≠|!='), 'NOTEQUALS'),
......
...@@ -35,7 +35,7 @@ class LOOPInterpreter: ...@@ -35,7 +35,7 @@ class LOOPInterpreter:
self.regex_to_token = [(re.compile(r'\d+'), 'NUMBER'), self.regex_to_token = [(re.compile(r'\d+'), 'NUMBER'),
(re.compile(r'x\d+'), 'IDENTIFIER'), (re.compile(r'x\d+'), 'IDENTIFIER'),
(re.compile(r'\+'), 'PLUS'), (re.compile(r'\+'), 'PLUS'),
(re.compile(r'-'), 'MINUS'), (re.compile(r'[−-]'), 'MINUS'),
(re.compile(r':=|≔'), 'ALLOCATION'), (re.compile(r':=|≔'), 'ALLOCATION'),
(re.compile(r'LOOP'), 'LOOP'), (re.compile(r'LOOP'), 'LOOP'),
(re.compile(r'DO'), 'DO'), (re.compile(r'DO'), 'DO'),
......
...@@ -34,7 +34,7 @@ class WHILEInterpreter(LOOPInterpreter): ...@@ -34,7 +34,7 @@ class WHILEInterpreter(LOOPInterpreter):
self.regex_to_token = [(re.compile(r'\d+'), 'NUMBER'), self.regex_to_token = [(re.compile(r'\d+'), 'NUMBER'),
(re.compile(r'x\d+'), 'IDENTIFIER'), (re.compile(r'x\d+'), 'IDENTIFIER'),
(re.compile(r'\+'), 'PLUS'), (re.compile(r'\+'), 'PLUS'),
(re.compile(r'-'), 'MINUS'), (re.compile(r'[−-]'), 'MINUS'),
(re.compile(r':=|≔'), 'ALLOCATION'), (re.compile(r':=|≔'), 'ALLOCATION'),
(re.compile(r'/=|≠|!='), 'NOTEQUALS'), (re.compile(r'/=|≠|!='), 'NOTEQUALS'),
(re.compile(r'LOOP'), 'LOOP'), (re.compile(r'LOOP'), 'LOOP'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment