BUGFIX: Undefined symbols (Issue #87)

This commit is contained in:
Erez Shinan 2018-02-18 17:28:47 +02:00
parent 84d5bd6382
commit 6578742c06
2 changed files with 2 additions and 1 deletions

View File

@ -81,7 +81,7 @@ class Earley_NoLex:
regexp = t.pattern.to_regexp()
width = get_regexp_width(regexp)
if width != (1,1):
raise GrammarError('Scanless parsing (lexer=None) requires all tokens to have a width of 1 (terminal %s: %s is %s)' % (sym, regexp, width))
raise GrammarError('Scanless parsing (lexer=None) requires all tokens to have a width of 1 (terminal %s: %s is %s)' % (t.name, regexp, width))
self.regexps[t.name] = re.compile(regexp)
def parse(self, text):

View File

@ -1,5 +1,6 @@
from __future__ import absolute_import
import unittest
from unittest import TestCase
import logging
import copy