I'm trying to write a grammar to parse Media wiki's wiki syntax, and after this the Creole syntax too (unfortunately an existing Creole grammar doesn't work in Antlr 3).
My issue right now is being able to capture a bold rule when I'm already inside an italic rule, or visa versa. For example
'' this text is bold '''now it's italic''' and just bold again''
I've got a lot of help from this question but I'm stuck. The goal is to produce HTML inside the grammar using actions, or possibly an AST - I'm not sure which is best yet.