┌───────────────┐ ┌───────────────┐
│ Start Rule │ │ Input Text │
└──────┬────────┘ └──────┬────────┘
│ │
│ │
│ │
│ │
▼ ▼
┌───────────────┐ ┌───────────────┐
│ Top-down │ │ Bottom-up │
│ Parsing │ │ Parsing │
│ (Predict & │ │ (Recognize & │
│ Expand) │ │ Reduce) │
└──────┬────────┘ └──────┬────────┘
│ │
▼ ▼
┌───────────────┐ ┌───────────────┐
│ Parse Tree │ │ Parse Tree │
│ (From root) │ │ (From leaves) │
└───────────────┘ └───────────────┘This diagram shows the flow of top-down parsing starting from the start rule and bottom-up parsing starting from the input text, both leading to a parse tree.