Wiki Creole grammar

Finally I’ve found a Wiki grammar for ANTLR: http://www.riehle.org/2008/01/09/an-ebnf-grammar-for-wiki-creole-10

That’s interesting to compare with Novelang’s one.

— Paragraphs are the same central thing.

— Rule names embed rendering-oriented meaning (like text_boldcontent).

— Some rules embed their own terminator (a list may end by a end_of_list).

— Some predicates look like hand-coded lookahead:

{ input.LA(1) != STAR || (input.LA(1) == STAR && input.LA(2) == STAR) }?

This grammar is just a skeleton, it doesn’t produce an AST tree or whatever.

No comments: