ABSTRACT

A deterministic top-down parser verifies that the tokenized version of a source program is syntactically correct by constructing its parse tree. Reading the input string representing the tokenized program from left to the right, the parser starts from its root and proceeds down toward the frontier denoted by the input string. To put it alternatively in terms of derivations, it builds up the leftmost derivation of this tokenized program starting from the start symbol. Frequently, this parser is based upon LL grammars, where the first L stands for the left-to-right scan of tokens and the second L stands for the leftmost derivations. By making use of predictive sets constructed for rules in these grammars, the parser makes a completely deterministic selection of an applied rule during every leftmost derivation.