Skip to content

Explicit pre/post skip #106

Answered by foonathan
mavam asked this question in Q&A
Dec 23, 2022 · 1 comments · 2 replies
Discussion options

You must be logged in to vote
  1. Why call it "whitespace" when it can be in theory any parser that skips the input? Coming from Spirit, I find it more natural to think in terms of "skipping" because based on what you do, it's not just whitespace.

It is designed for specifically skipping whitespace. In particular, it is optimized to skip sequences of ASCII space, etc. It's also the main use case, I think?

  1. Would it make sense to make the skipping configurable, by having a pre and post skip mode?

I'm not sure whether it would make sense: why do you need to skip different things before and after? Do you have a use case? It's also problematic to implement: Consider a >> b | c >> d. Currently, lexy attempts to match a or

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mavam
Comment options

@foonathan
Comment options

Answer selected by foonathan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants