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.
- Transform the grammar into proper form.
- Determine the sets First[E] and Follow[N] for each right-hand side E and non-terminal N of the grammar.
- Construct parsing procedures from the grammar.
- Construct the parser.
Posted in Computer Science, Information Technology, Compiler Design, Compiler Design |
