In addition to what Nicolas Weeger already requested, might I also ask exactly what syntax element you found unsuitable? I can't think of anything that isn't context-free.
What I mean is, Timwi, while WikiML might be reducible to a context-free grammar; it's not necessarily suited to one-token lookahead parsing, where Bison excels.
Like SGML and HTML, however, WikiML is describable in terms of a DTD; and DTD is written in Extended Backus-Naur Form. In spite of EBNF, WikiML's features which distinguish it from XML might make constructing a legitimate context- free grammar tedious; on the other hand, many of the points brought against SGML's context freedom may or may not apply to Wiki [1]:
SGML WikiML -------------------------------------------------------- Declared content -> Initial spaces Inclusion exclusions -> Nested definitions AND groups -> Link morphology OMITTAG -> Section and subsections --------------------------------------------------------
Constucting a rigorous WikiML DTD would enable us to erect an LL(1) grammar at will, and should be our first job; in addition, HTML Tidy's lexer/parser provides a fantastic example of recursive-descent application.
Best, Peter ----------- 1 See Joe English' classic discussion of SGML's context freedom, which he still considered an open question: "It is however possible to create an equiva- lent context-free (BNF) grammar from any XML DTD, where the terminals are start-tags, end- tags, and #PCDATA and the productions correspond to element types and content model positions. The reverse is not possible in general, so XML DTDs are (in a sense) a subset of BNF. "The same *might* be true of SGML, but when you consider things like declared content, exceptions, AND groups, and OMITTAG, converting a general SGML DTD to a CFG is a much more dif- ficult problem. "Do SGML DTDs define context- free languages" is still an open question AFAIK. (I suspect the answer is "yes", but even if so it would not be a very useful result; the derived CFG would be intractably large in many cases.)" (http://xml.coverpages.org//english-cfg.html)