van Wijngaarden grammars
WB Kloke
wb@pkeus.de
Fri Mar 7 16:59:44 GMT 2025
> What are the reformulations necessary?
The vwg program does some refactoring to assist in making the metasyntax
LL(1)-parseable. But the algorithm is not even sufficient to allow the
original formulation, eg. of metanotion DIGIT, because two and three both start with 't'. So I changed some digits to german: three-> drei, four->vier and six->xix.
For metanotion PRIO it sufficed to reverse the order. Some notions had to be changed also, eg.
STOWED :: xtructured with FIELDS _ode ; ROWS of MODE.
or
PROCEDURE :: procedure PARAMETY yielding MOID ; hrocedure yielding MOID .
Perhaps, a better approach would be to enlarge the set of 'small syntactic mark's
by a suitable set of replacement tokens for notions like "mode", "reference", "procedure" which are not changed in the parsing process.
More information about the Algol68
mailing list