Exim uses a really awkward comment syntax,
Blank lines in the file, and lines starting with a # character (ignoring leading white space) are treated as comments and are ignored. Note: A
#
character other than at the beginning of a line is not treated specially, and does not introduce a comment.
This means that,
# This is is a comment
This has no comments # at all
Is there a way to mirror this with Pest.rs? I've tried this,
COMMENT = { "#" ~ (!NEWLINE ~ ANY)* ~ NEWLINE }
WHITESPACE = _{ " " }
main = { SOI ~ ASCII_ALPHA* ~ EOI }
But, this will match on
MyText # Exim test this is not a comment
How can I anchor the comment to the left?