-
Here is the source code. The main function only prints the output of the function in the provided code
what could be the main issue? the input used in to produce the following error was |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hello! The issue you mention is caused by the fact that your expression parser doesn't allow for whitespace and probably needs a A few more things to consider about the parser:
I hope this helps! |
Beta Was this translation helpful? Give feedback.
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 …