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

lalrpop exploration #35

Closed
CrockAgile opened this issue Dec 9, 2017 · 2 comments
Closed

lalrpop exploration #35

CrockAgile opened this issue Dec 9, 2017 · 2 comments

Comments

@CrockAgile
Copy link
Collaborator

I just read thru the lalrpop documentation and it seems worth investigating the readability & performance comparison to the current nom usage. This exploration task could just be done on its own branch and never merged and it would serve its purpose. But if it stumbles into some improvements, then it could be up for consideration.

@CrockAgile CrockAgile self-assigned this Dec 9, 2017
@shnewto
Copy link
Owner

shnewto commented Dec 10, 2017

@CrockAgile I'll plan on taking some time to read the lalrpop docs. I'm definitely interested potential for value it would add to this project. Keep me posted on any details.

@shnewto
Copy link
Owner

shnewto commented Jul 1, 2020

Just remembered this issue and something I'd bumped into trying to work with significant whitespace reading the Writing a custom lexer chapter in the lalrpop book. Looks like there's a way work around it (the point of that chapter) but it wasn't the way I'd hoped. I think it's a deal breaker for me, for now.

By default, LALRPOP generates a tokenizer that skips all whitespace -- including newlines. What we want is to capture whitespace characters and ignore the rest as comments, and LALRPOP does the opposite of that.

At the moment, LALRPOP doesn't allow you to configure the default tokenizer. In the future it will become quite flexible, but for now we have to write our own.

@shnewto shnewto closed this as completed Jul 1, 2020
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