I try to read a antlr grammar with python.
As in this question:
Umlauts in JSON files lead to errors in Python code created by ANTLR4
the error:
File "/usr/local/lib/python2.7/dist-packages/antlr4/Lexer.py", line 109,
in nextToken
tokenStartMarker = self._input.mark()
AttributeError: 'str' object has no attribute 'mark'
occurs.
My grammar works fine with java and has no german umlauts.
The code is generated like this:
antlr4 -Dlanguage=Python2 -visitor MyGrammar.g4
Could the error have another reason? Maybe version problems or anything else?