On 13/11/2007, Lars Aronsson <lars(a)aronsson.se> wrote:
For this discussion to become
meaningful, a purpose is required. Can you find a purpose?
Bring it here. Show us a real problem that needs a solution.
There is no clear purpose to expressing Wikitext in EBNF, simply because the
possibilities of the use of such an expression are undefined and large. The
EBNF expression could be used to create a validator, and a validator could
be used to warn users when they've accidentally typed bad syntax - or simply
to determine when a page is and is not written in Wikitext. It could be used
to build a parser in a sense that generated a DOM (Document Tree) for an
entire wikitext document, which would allow it to be very easily converted
into XHTML without the need for a complex parser/compiler ad-hoc combination
as is currently use. Furthermore, the generated DOM would allow easy
conversion of the Wikitext into ANY language, particularly any XML language,
facilitating easy syndication, mashups, presentation in other mediums, etc.
Having a defined DOM would also allow things like very, very fine-grained
editing or other actions (i.e. actions applied to very small segments of a
page), DOM alteration similar to JavaScript in HTML, etc.
I'm no computer scientist, so my evaluation of the use of the EBNF is
limited, but I can definitely see strong uses. EBNF is a well-recognised
standard for defining languages, it has open-source tools already built
around it (parsers, etc), and it's a step towards clearing up the mess that
is currently wikitext.
On 13/11/2007, Steve Bennett <stevagewp(a)gmail.com> wrote:
I don't think it's actually
that important. Because in fact this:
**foo
##blah
*is*
valid syntax. As is this:
*foo
**blah
#*blah
[...]
I think honestly a list element will just be defined as an arbitrary
sequence of :, # and *,
followed by text
This is not true. It is not arbitrary what symbol come before the last one.
Each symbol defines a list-type, and it's not only the final list-type that
counts. A string of symbols beginning with an asterisk will output a nested
list beginning with a bullet point - a string beginning with a hash will
output a list beginning with a number.