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

Development "Mode" #370

Closed
bd82 opened this issue Feb 13, 2017 · 7 comments
Closed

Development "Mode" #370

bd82 opened this issue Feb 13, 2017 · 7 comments

Comments

@bd82
Copy link
Member

bd82 commented Feb 13, 2017

As the name implies, a Dev mode should help during the development of Chevrotain Grammars.
Examples:

@bd82
Copy link
Member Author

bd82 commented Mar 13, 2017

Runtime type checks should be pretty simple to implement using NO-OP pattern.

@CMCDragonkai
Copy link

Also wanted to mention that I don't think the library should alert the user about: Running the Lexer in Debug Mode, DO NOT ENABLE THIS IN PRODUCTIVE ENV!. Sometimes you need "debug" mode even in production because the production application itself is an exercise in lexing. It should just be in the documentation.

@CMCDragonkai
Copy link

Another suggestion, sometimes you want to actually see the skipped tokens. I propose that the debug mode shows the skipped tokens as well. This way you can ensure that skipped tokens are being skipped properly.

@bd82
Copy link
Member Author

bd82 commented Nov 14, 2017

Another suggestion, sometimes you want to actually see the skipped tokens. I propose that the debug mode shows the skipped tokens as well. This way you can ensure that skipped tokens are being skipped properly.

Thanks, it is a good suggestion, it is already possible to do this manually
by changing the group from 'Lexer.SKIPPED' to some named group.

See example of Token Groups.
https://github.com/SAP/chevrotain/blob/master/examples/lexer/token_groups/token_groups.js

@CMCDragonkai
Copy link

I see, by changing the groups, you can then later filter the token vector by groups.

One more suggestion, the diagram creation examples all work on parsers, what about diagram creation for the lexers? https://github.com/JexCheng/regulex

@bd82
Copy link
Member Author

bd82 commented Nov 14, 2017

Diagrams for regExps look nice.
Perhaps they can be integrated into the existing diagrams as tooltips/popups.

The more interensting potential of a library like regulex is more in depth analysis of the lexer.
See #525

@bd82 bd82 mentioned this issue Sep 15, 2018
12 tasks
@bd82
Copy link
Member Author

bd82 commented Apr 18, 2019

I don't think this issue is still relevant.

One thing that is still very relevant is #874 - a debug helper method to collect information while debugging.

@bd82 bd82 closed this as completed Apr 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants