van Wijngaarden grammars
Jose E. Marchesi
jemarch@gnu.org
Fri Mar 7 16:38:40 GMT 2025
> https://github.com/vestein463/yoyovwg
>
> Just want to note that I tried to revive Tony Fisher's yoyovwg parser
> for W-grammars.
Very interesting, thanks for sharing.
> The parser does not work on the grammar published in the Revised
> Report. The foremost reason is that the metasyntax of the RR is no)
> parseable. Some trivial and some not so trivial reformulations are
> needed.
I am using RR notation for describing the language accepted by ga68, in
https://forge.sourceware.org/jemarch/a68-gcc/src/branch/a68/gcc/algol68/ga68.vw.
At the moment I am basically transcribing the grammar from the RR, but
soon we will be adding the formal parts corresponding to the extensions
we plan to add to the GNU Algol 68 super-language: modules, exceptions,
modals, etc. The idea is for ga68.vw to be the authoritative reference.
For helping in writing and maintaining that file I wrote an Emacs
vw-mode: https://git.sr.ht/~jemarch/vw-mode.
I would be very happy to modify ga68.vw (and Emacs mode) in order to
make its contents processable by yoyowwg. A program that could do
things like consistent substitution given an hypernotion and particular
values for the metanotions would be VERY useful while working in the
formal parts of the extensions.
What are the reformulations necessary?
> The file meta.vwg contains a version accepted by the parser, but is not
> sufficient for some of the predicates yet.
PS: Isn't it tempting to rewrite that parser in Algol 68 now that we can
compile it? ;) If the temptation becomes irresisible at some point,
there is an example of how to use Algol 68 support in Automake,
Autoconf for a complete Algol 68 program at
https://git.sr.ht/~jemarch/godcc
More information about the Algol68
mailing list