Commit be770f50 authored by Eckhart Arnold's avatar Eckhart Arnold
Browse files

python 3.4 compatibility fixes

parent 57b09014
......@@ -44,7 +44,8 @@ __all__ = ('GrammarError',
'raw_compileEBNF',
'compileEBNF',
'grammar_provider',
'compile_on_disk')
'compile_on_disk',
'recompile_grammar')
SECTION_MARKER = """\n
......
......@@ -217,7 +217,7 @@ def grammar_suite(directory, parser_factory, transformer_factory,
Runs all grammar unit tests in a directory. A file is considered a test
unit, if it has the word "test" in its name.
"""
if not isinstance(fn_patterns, collections.abc.Collection):
if not isinstance(fn_patterns, collections.abc.Iterable):
fn_patterns = [fn_patterns]
all_errors = collections.OrderedDict()
if verbose:
......
......@@ -23,11 +23,13 @@ import sys
sys.path.extend(['../../', '../', './'])
import DHParser.dsl
from DHParser import dsl
from DHParser import testing
from DHParser import toolkit
if not DHParser.dsl.recompile_grammar('LaTeX.ebnf', force=False): # recompiles Grammar only if it has changed
# print(dir(dsl))
if not dsl.recompile_grammar('LaTeX.ebnf', force=False): # recompiles Grammar only if it has changed
print('\nErrors while recompiling "LaTeX.ebnf":\n--------------------------------------\n\n')
with open('LaTeX_ebnf_ERRORS.txt') as f:
print(f.read())
......
......@@ -20,7 +20,8 @@ limitations under the License.
"""
import sys
sys.path.extend(['../','../../'])
sys.path.extend(['../../', '../', './'])
from DHParser import dsl
from DHParser import testing
......
Markdown is supported
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