Recursive Descent Idea
Recursive descent is a decent parsing technique.
descent: |
---|
a movement downward |
decent: |
---|
adequate: sufficient for the purpose; “an adequate income”; “the food was adequate”; “a decent wage”; “enough food”; “good enough” |
(from Wordnet)
Basic Ideas
- construct parse tree top-down
- use current symbol to decide which production to use
- write one procedure to recognize each non-terminal
- recursive non-terminals lead to recursive procedures
- alternative (|) in grammar becomes if statement
- repetition (*) becomes while statement