Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding keyword argument errorlog to ply lexer #80

Open
dmwyatt opened this issue Aug 11, 2015 · 2 comments
Open

Consider adding keyword argument errorlog to ply lexer #80

dmwyatt opened this issue Aug 11, 2015 · 2 comments

Comments

@dmwyatt
Copy link

dmwyatt commented Aug 11, 2015

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.

@chonigman
Copy link

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.

@chadawagner
Copy link

def quiet(*args, **kwargs):
    pass
from ply import yacc, lex
yacc.PlyLogger.warning = quiet
lex.PlyLogger.warning = quiet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants