Re: size of Wirth's Oberon compiler

C. M. Sperberg-McQueen writes:

> In the call just now, the question "just how big / small *is* Wirth's
> compiler for Oberon?".  I ... can report that they total about 121 kB
> in 3124 lines.

> ...

> Some work is needed before we can actually use these for a demo; in
> particular, parsing them is uncovering flaws in my transcription of the
> Oberon grammar and errors in my handling of whitespace in the ixml form
> of the grammar.  But I am always hopeful that I have just now removed
> the last bug ...

When I set out to make the sample directory, I took a more systematic
approach.  Instead of using the grammar I had written by hand based on
the 1996 grammar of the language, I downloaded the syntax description
that is part of the materials of the "2013 Edition" of the Oberon
project and re-generated the ixml from scratch, first mechanically
(parsing Wirth's EBNF into ixml and processing the ixml grammar with
XSLT stylesheets to insert whitespace-handling rules) and then by hand
(first fixing errors and then tweaking the grammar and the marks in the
ixml to make the XML more plausible).

The draft sample directory is now ready for review in pull request 126.

    https://github.com/invisibleXML/ixml/pull/126

Comments welcome.

In particular, I think it might be nice to have clearer names than
Oberon.0.ixml and Oberon.1.ixml for the grammar translated mechanically
from Wirth's EBNF and the grammar made from that by adding whitespace
rules and fixing fatal problems.

Michael

-- 
C. M. Sperberg-McQueen
Black Mesa Technologies LLC
http://blackmesatech.com

Received on Friday, 24 June 2022 01:13:39 UTC