instaparse 2018-11-20

@aengelberg The context is: I am parsing a markdown document and I need to detect a line separator as either something based on \n and \r, or either the end of the document.

Thank you for the negative lookahead hint, I will try it.

@vincent.cantin you could maybe structure the parser as

S = line (separator line)*
separator = '\n' | '\r'
then you don't have to explicitly check whether it reaches the end of the file.

👍 2

That would be doable, but it requires to adapt the full grammar for that.