Updated tokenizer.py. Added lineanalyzer.py

This commit is contained in:
2019-02-06 20:06:50 +01:00
parent 47e3272458
commit 21aa6f0b12
3 changed files with 478 additions and 145 deletions
+28
View File
@@ -0,0 +1,28 @@
'''
Contains class LINEANALYSER
'''
from contextlib import ContextDecorator
from itertools import count
class ANALYZEOBJECT:
_passes = count(0)
_analyzed = []
def __exit__(self, *exc):
return False
def __init__(self):
self.passes = 0
self.analyzeline = []
self.analyzed = []
class ANALYZER(ANALYZEOBJECT):
_ids = count(0)
_passes = count(0)
def __init__(self):
self.id = next(self._ids)
self.tupline = []
self.tupfile = []
self.passes = next(self._passes)