Grammar-Kit excluding a character

Hi there. I'm making a pretty complicated parser for MediaWiki content. Essentially I have a letter, digit and symbol token (which contains a pipe). From there it's a large tree of rules all the way up to something like "content". Now I'm making a "template" rule, and I need to match "content" except a pipe. Is there a simple way to do this? It seems silly to have to traverse the entire tree "content-without-pipe" .... "___without-pipe" ... "symbol-without-pipe". Perhaps I'm approaching this the wrong way, not entirely sure. I tried !"|" to little avail, because from what I understand BNF is always greedy. Any input would be appreciated!

1

Please sign in to leave a comment.