Added bnf when adding a new concept + Started logging filtering
This commit is contained in:
+2
-21
@@ -80,6 +80,8 @@ class LexerError(Exception):
|
||||
class Keywords(Enum):
|
||||
DEF = "def"
|
||||
CONCEPT = "concept"
|
||||
FROM = "from"
|
||||
BNF = "bnf"
|
||||
AS = "as"
|
||||
WHERE = "where"
|
||||
PRE = "pre"
|
||||
@@ -308,24 +310,3 @@ class Tokenizer:
|
||||
1 if lines_count > 0 else start_column + len(result))
|
||||
|
||||
return result, lines_count
|
||||
|
||||
def seek(self, words):
|
||||
if self.i == self.text_len:
|
||||
return 0
|
||||
|
||||
# init
|
||||
offsets = {}
|
||||
start_index = self.i
|
||||
|
||||
buffer = ""
|
||||
while self.i < self.text_len:
|
||||
c = self.text[self.i]
|
||||
|
||||
# skip white space
|
||||
if c in (" ", "\t"):
|
||||
self.i += 1
|
||||
continue
|
||||
|
||||
for word in words:
|
||||
if c == word[offset]:
|
||||
os
|
||||
|
||||
Reference in New Issue
Block a user