Sections


Main-Menu

header image

Systematic development of a recursive descent parser


A parser groups sequences of tokens into larger meaningful units described by a context-free grammar. The parser takes as input a stream of tokens where each token contains both the class and spelling of a token. The stream of tokens is processed sequentially and currentToken contains the token of immediate interest. The output of the parser is a syntax tree. The tree may or may not be built explicitly.

There are four steps in the systematic construction of a recursive descent parser.

  1. Transform the grammar into proper form.
  2. Determine the sets First[E] and Follow[N] for each right-hand side E and non-terminal N of the grammar.
  3. Construct parsing procedures from the grammar.
  4. Construct the parser.


Related Articles :



Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

Shaadi.com Matrimony - Register for FREE