Skip to content

asks for \n for every pattern #118

Answered by zesterer
Vaimer9 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello! The issue you mention is caused by the fact that your expression parser doesn't allow for whitespace and probably needs a .padded() on the end of it. On Unix systems, saving a file will generally result in a newline character being placed at the end. This means that the parser is encountering a newline that it's not expecting, hence the error.

A few more things to consider about the parser:

  • .then_ignore(end()) is used in several different places. This pattern is used to force a parser to read until the very end of an input, and so should generally only go at the very highest level of the parser. Some people even omit it from the parser entirely, preferring to add it to the place …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Vaimer9
Comment options

@zesterer
Comment options

@Vaimer9
Comment options

Answer selected by Vaimer9
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