Notice to GitKraken users: A vulnerability has been found in the SSH key generation of GitKraken versions 7.6.0 to 8.0.0 (https://www.gitkraken.com/blog/weak-ssh-key-fix). If you use GitKraken and have generated a SSH key using one of these versions, please remove it both from your local workstation and from your LRZ GitLab profile.

21.10.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

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