slimit
slimit copied to clipboard
Consider adding keyword argument `errorlog` to ply lexer
ply spews some Warnings to stderr even if you have debug=False.
if you instantiate ply.lex.lex
and ply.yacc.yacc
with errorlog=ply.lex.NullLogger()
you can suppress these warnings.
Optionally make this configurable.
Having trouble figuring out how exactly you instantiate these things. Would you mind sharing the code?
Can this be done without recompiling the package? Really like this parser but can't use if it's spitting out all these warnings.
def quiet(*args, **kwargs):
pass
from ply import yacc, lex
yacc.PlyLogger.warning = quiet
lex.PlyLogger.warning = quiet