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

feature request: colorize * in error report #8

Closed
dgreisen opened this issue Sep 27, 2017 · 5 comments
Closed

feature request: colorize * in error report #8

dgreisen opened this issue Sep 27, 2017 · 5 comments
Assignees
Labels
Projects

Comments

@dgreisen
Copy link

It would be hugely helpful if the * indicating where the parser failed were bright red. I hacked something together for arpeggio with regexp and http://click.pocoo.org/5/utils/#ansi-colors, but it would be great if this were built in to parglare.

@dgreisen
Copy link
Author

While improving display, it would also be helpful to improve the debugger output:

@igordejanovic
Copy link
Owner

Great idea. It should improve trace readability a lot. I try to keep dependencies low.
These deps could be optional (e.g. with fallback to current behaviour) and used only in development mode.

@dgreisen
Copy link
Author

dgreisen commented Sep 28, 2017 via email

@igordejanovic
Copy link
Owner

Yes, I guess you are right. click uses 3-clause BSD licence so it is compatible with MIT and shouldn't be a problem to take just the needed bits of code while keeping the copyright notice.

@igordejanovic igordejanovic added this to TODO in v0.5 Sep 30, 2017
@igordejanovic igordejanovic moved this from TODO to In progress in v0.5 Oct 1, 2017
@igordejanovic
Copy link
Owner

@dgreisen This is implemented on the master. There is now a param debug_colors for Parser/GLRParser and Grammar.from_string/from_file. By default it is False.

For pglr command coloring is enabled by default. You can disable it by --no-colors switch. click module is now used to implement pglr cli so the command is changed a bit.

@igordejanovic igordejanovic moved this from In progress to Docs in v0.5 Oct 9, 2017
@igordejanovic igordejanovic moved this from Docs to Done in v0.5 Oct 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
v0.5
Done
Development

No branches or pull requests

2 participants