I'm trying to parse a config file where a the value of an entry may have a comment mark in it. So the rule is only the last comment mark is the divider between the value and the comment.
For example:
key1 = value
key2 = value;This is a comment
key3 = value;This is still value;This is a comment
Can I do that with parsimonious? How can I write a grammar that differentiates the last section after the ;
sign?
Thank you.
You can do something like this: