I defined a new format which I named Yiki (a combination of YAML and
Wiki). I have a yiki2html Perl converter using YAML.pm. I ported the
YAML spec to it. You can find the whole package in
http://www.ben-kiki.org/oren/yiki/.
Note that if you try to run yiki2html on spec.yiki using version 0.35 of
YAML.pm (the version from CPAN), it will not work; I made some fixes to
YAML.pm to make it work and Brian hasn't released them yet. The main fix
is a one char bug in line 1024 of YAML.pm (the \w should be \S). Still,
you can get the idea, and anyone who wants the BNF in machine readable
format now has full access via YAML.
The spec you'll see there contains all the latest batch of changes. I'd
like to consider it frozen, barring errors and polish (here I am,
tempting fate again). At any rate, given the porting, it is in need of
people doing a pass on it and verifying I didn't royally mess up
anything in there. One big change I made was to rename the productions
in a variant of "Hungarian". I used the following prefixes:
c : a special character (or character set)
b : a line break character
nb : a non-break character
s : a white space character
ns : a non-space (non-break) character
i : indentation space
l : a complete line (including the line break)
If a production doesn't define a single char, its name starts with two
such prefixes - the first describing the very first character/part
covered by the production, the second describing the very last
character/part. Thus ns-b-something is known to start with a non-space
and end with a line break. This helped me a lot in following and
debugging the productions. I'd like to know what those of you who
actually look at the productions think about it :-) so give it a try.
Sharp eyed folk will notice there are minor changes in the formatting of
the spec (e.g., the format of <h5> headers). And, of course, the table
of contents is much less nice and printing is all messed up. Anyone
wants to whip up a yiki2latex converter? :-)
Have fun!
Oren Ben-Kiki
|