In the result, we can see the following debug trace:
MainThread WARNING 2020-02-26 15:37:22,849 JDraw Parser: Failed to parse /tmp/bug1077_log.jdw
MainThread DEBUG 2020-02-26 15:37:22,849 JDraw Parser: Details:
Traceback (most recent call last):
File "/nfs/home/cpascual/src/taurus/lib/taurus/qt/qtgui/graphic/jdraw/jdraw_parser.py", line 352, in parse
res = yacc.parse(f.read())
File "/home/cpascual/miniconda/envs/py3qt5/lib/python3.7/site-packages/ply/yacc.py", line 333, in parse
return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
File "/home/cpascual/miniconda/envs/py3qt5/lib/python3.7/site-packages/ply/yacc.py", line 1201, in parseopt_notrack
tok = call_errorfunc(self.errorfunc, errtoken, self)
File "/home/cpascual/miniconda/envs/py3qt5/lib/python3.7/site-packages/ply/yacc.py", line 192, in call_errorfunc
r = errorfunc(token)
File "/nfs/home/cpascual/src/taurus/lib/taurus/qt/qtgui/graphic/jdraw/jdraw_parser.py", line 108, in p_error
p.lexer.log.error("[%d]: Syntax error in input [%s]" %
AttributeError: 'Lexer' object has no attribute 'log'
During the investigation for #1077 I found that jdraw_parser fails to report the parsing issues due to a bug in its logging mechanism.
To reproduce, run the following snippet:
where
unsupported.jdw
contains:In the result, we can see the following debug trace: