-
Notifications
You must be signed in to change notification settings - Fork 110
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
May resume SLY work in September 2021 #76
Comments
One QoL feature I would like to see: I find it tedious to have to manually define the Also, as an alternative use case. It would be nice if the Thanks for your hard work on this! |
I definitely agree with that part! |
Another feature that I would like to see based on an issue I ran into, would be to have a way to generate more than one token during error handling for the lexer. It would be nice if we could yield multiple tokens from the def error(self, t):
# On error yield the raw whitespace separated arguments as tokens until we see a newline.
text, _, _ = t.value.partition("\n")
for arg in text.split(" "):
new_token = YaccSymbol()
new_token.type = "ARGUMENT"
new_token.value = arg
yield new_token |
@dabeaz Something I think would be nice would be the ability to change the start attribute after having initialized the parser, and have the grammar updated appropriately. For example, if I have a test class to test my grammar, if I want to test small subsets of the grammar, I need to manually change the start attribute in my parser every time that I want to test the smaller subsets. If I could easily change the start attribute at the time parse was called, it would make automating tests a lot easier |
There are probably several ways to do this ^^ but I've made a PR with one solution |
Just a quick note that may resume some work on SLY in the coming month. Open to anything that improves it. Some things I'm thinking about
The text was updated successfully, but these errors were encountered: