I am writing a markdown parser. As what we know, there are some feature extensions to the standard markdown grammar. So I want to provide some macros as switches and only compile a certain rules based on the switch.
One solution might be evaluating a C code expression as a precondition check.
Hi,
I am writing a markdown parser. As what we know, there are some feature extensions to the standard markdown grammar. So I want to provide some macros as switches and only compile a certain rules based on the switch.
One solution might be evaluating a C code expression as a precondition check.
I am trying to rewrite the PEG parser here in PackCC and it has the ability to use a C code expression as a precondition check: https://github.com/vnotex/peg-markdown-highlight/blob/20f17c03969a1655c39536bf78f3ee5c2a9dd9f7/pmh_grammar.leg#L97
What is the right way to do it in PackCC?
Thanks!