Should Raku grammars or regexes be used for parsing wiki markup?

140 Views Asked by At

I need to convert a few hundred text files using TWiki markup to a more standard markup language (e.g. Markdown or Asciidoc) and, as there doesn't seem to be any usable tool for doing this (pandoc supports TWIki but very poorly, i.e. it irretrievably loses not only much of the markup but also a lot of contents), I'd like to write my own converter in Raku.

At first sight, it looks like it would be appropriate to use Raku grammars for this task, but I'm a bit worried that I could have problems with some broken markup -- which I'd still need to handle in some way. So would it be wiser to stick to manual regexes to have more flexibility?

If anybody has any experience with using Raku grammars for parsing markup, could you please share it? TIA!

0

There are 0 best solutions below