On 11/15/07, Brion Vibber brion@wikimedia.org wrote:
In other words: let's record the syntax as it exists in people's minds
(and
their existing work), rather than the behavior of the actual parser.
Bingo. :)
This presumably means it is ok to make small, genuine "improvements" to the grammar.
For example, this code:
;Remarks: :This is a remarkable remark.
Probably renders differently to what you'd expect if you wrote it Notably, the ":" at the end of "Remarks" is stripped out*. The mental grammar of this construct is almost certainly that the writer intends there to be a :, but that's not what the parser does. Therefore our grammatical description of the language could legitimately state that a trailing colon should be rendered literally.
I doubt there will be many cases as clear-cut as this one though.
If my reasoning is valid, then it means the grammar we're describing is not necessarily equivalent to or a subset of the actual grammar recognised by the current parser, which is interesting. Either way, I think I have a much clearer idea of what the formal grammar should cover now. At last my linguistics-background definition of "grammar" and computer-science-background definition of "grammar" are meeting :)
Steve * It's actually rendered as an empty <dd></dd> pair, and the whitespacing is slightly different. Not useful behaviour though.