|
|
|
|
|
by mananaysiempre
1382 days ago
|
|
Is there a source on Van Vijngaarden grammars that’s even barely readable to the modern eye (and more detailed than Wikipedia)? I tried a number of contemporary papers, and they’re impressively impenetrable when they try to define the whole thing inside a page and a half—which is entirely unsurprising even if you set aside the prehistoric terminology (“notions” are ... nonterminals? or maybe all symbols? I can’t tell). In any case, there’s something to be said for defining a language in a series of layers: tokens, then trees, then perhaps elaboration / desugaring, then one or more layers of semantics (typing, binding, execution). In an actual frontend, you probably even want a looser tree syntax followed by a layer of “semantic” checks that could technically be folded into the syntax, in order to be able to tell the user things like “you can’t use an array type like that” rather than “unexpected bracket”. Compare Lisp s-expressions, the Dylan idea of skeleton syntax trees, and the class of visibly pushdown languages as used in one recent structural editor[1]. Contrast the refusal of the Glasgow Haskell Compiler to desugar before typechecking[2]. [1] https://news.ycombinator.com/item?id=31384528 [2] https://www.aosabook.org/en/ghc.html |
|
Page 6 of the report presents the ideas of the Vw-grammar. Protonotions, Notions, Metanotions, Hypernotions, Paranotions, Symbols, Productions and Production Trees are introduced to explain the grammar! I encourage readers to take a peek at almost any paragraph of the 70 page Algol 68 report and compare it to the The Programming Language Pascal Revised Report by Wirth [2],[3]. It's easy to see why Pascal became quite popular and Algol 68 never did.
Despite the fact that Algol 68 was too difficult to compile efficiently at the time, it introduced a number of features we take for granted today. See Richard Hamlet's Ignorance of Algol 68 Considered Harmful, [4].
On a personal note, I was a young Computer Scientist at the time these reports were published, and I miss how easy it was back then to keep up with the research that was going on at the time. Today it's impossible to be a generalist. So many independent and important branches have sprouted off the trunk of CS that everyone is a novice in major parts of the field.
[1] ACM SIGPLAN Notices, Volume 12, Issue 5, May 1977 pp 1–70, https://doi.org/10.1145/954652.1781176
[2] http://standardpascaline.org/The_Programming_Language_Pascal...
[3] https://www.amazon.com/Pascal-User-Manual-Report-Standard/dp...
[4] ACM SIGPLAN Notices, Volume 12, Issue 4, April 1977 pp 51-56, https://doi.org/10.1145/954654.954659