-
Notifications
You must be signed in to change notification settings - Fork 42
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
Parse without allowing ignored tokens #26
Comments
Normally this is implemented as so-called 'lexer modes' which the lexer switches upon encountering a token of a specific type. A popular example is switching to the comment tokenizing mode for the rest of the line when a I do have plans to implement tokenizing modes in @rnett Would anything like that cover your use case? |
Possibly? It would be overkill by quite a bit though. I'm trying to parse dice, e.g. |
I want to allow whitespace most of the time, so I have
token("\\s+", true)
. However, in a few scenarios, I want to disallow whitespace between tokens/subexpressions. A relatively easy way to do this would be nice.The best for my use would be a version of
*
/and
that doesn't ignore anything.The text was updated successfully, but these errors were encountered: