【发布时间】:2011-03-26 11:31:59
【问题描述】:
我正在尝试编写一个语法来解析 Media wiki's wiki syntax,然后是 Creole syntax too(不幸的是 existing Creole grammar 在 Antlr 3 中不起作用)。
我现在的问题是当我已经在斜体规则中时能够捕获粗体规则,反之亦然。例如
'' this text is bold '''now it's italic''' and just bold again''
this question 给了我很多帮助,但我被困住了。目标是使用动作在语法中生成 HTML,或者可能是 AST - 我不确定哪个是最好的。
【问题讨论】: