On top-down parsing of algol 68+

Lambert Meertens, J.C. vanVliet · Centrum Wiskunde & Informatica (CWI), the national research institute for mathematics and computer science in the Netherlands · 1981

If a grammar is of type LL(1), this easily leads to a parsing method for that grammar, implemented by a set of mutually recursive routines, one for each non-terminal of the grammar.ALGOL 68+ is a superlanguage of ALGOL 68 which is powerful enough to describe the standard-prelude.An operator-precedence grammar for ALGOL 68+ can, through a simple rightto-left transduction scheme, be made to be of type LL(1).If, in addition, the grammar is an "operator-priority" grammar, an easy and consistent error-recovery mechanism can be applied.Both the algorithm for the transduction scheme and the subsequent top-down syntax analysis are discussed, with emphasis on the treatment of incorrect input texts.The LL(1) grammar for ALGOL 68+ is given as well.

Read the paper · More papers on PaperTik