5.3.15

LL parser


  • is a top-down parser
    • for subset of context-free languages.
      • It parses the input from Left to right
        • performing Leftmost derivation of the sentence.
  • LL(k) grammar
    • An LL parser is called an LL(k) parser 
      • if it uses k tokens of lookahead when parsing a sentence.
        • If such a parser exists for a certain grammar and it can parse sentences of this grammar without backtracking then it is called an LL(k) grammar.
  • LL parsers can only parse languages that have 
    • LL(k) grammars without ε-rules.
      • LL(k) grammars without ε-rules can generate more languages the higher the number k of lookahead tokens.
  • LL(*) parser
    • An LL-regular parser.
    • if it is not restricted to a finite k tokens of lookahead,
      • but can make parsing decisions by recognizing whether the following tokens belong to a regular language
        • e.g.
          • by means of Deterministic Finite Automaton.

No comments: