Bryan Ford wrote:
Jan Hidders wrote:
On Monday 16 August 2004 19:35, Magnus Manske
wrote:
>So, what you'd need is an EBNF representation or something?
>
>
Mind if I jump in and suggest a substitution for the "or something"
alternative? :) Check out "parsing expression grammar" on wikipedia (and in
more detail on the external links that article leads to).
You still need a formal grammar to start with. :-)
Although at the moment you probably won't find a
parser generator that'll generate the PHP
code you want from it, if the primary goal here is formal specification then
that's not such an issue - and in any case, unlike (LA)LR CFGs, parsing
expression grammars tend to be very easy to convert manually into working
parsers.
Did you just say "formal specification"? :-) Without a parser generator
there is no hope that we will have somewhere in the documentation a
correct, precise and complete specification of the wikisyntax.
-- Jan Hidders