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

Semantic actions for comments defined under the space rule #448

Open
DaBisounours opened this issue Apr 22, 2023 · 1 comment
Open

Semantic actions for comments defined under the space rule #448

DaBisounours opened this issue Apr 22, 2023 · 1 comment

Comments

@DaBisounours
Copy link

Hi, amazing work with this lib!

I followed this pattern to support comments in my grammar :
space += comment
Though I'm also interested in defining a Semantic Action for the comment rule. But as the space is automatically skipped the action is never called.
Is there a way I can force the action to be called without explicitly defining where the language allows comments in my grammar ( a LOT of places...) ?

Thanks

@toddobryan
Copy link

This is completely off-topic, but I've been working on a parsing framework and thought about dealing with whitespace/comments in the Reader before it gets to the parser and making it so that you could recover those from the Reader later.

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

2 participants