What is Parsing?

Parsing is the process of analyzing a string of symbols, either in natural language, computer languages or data structures, conforming to the rules of a formal grammar.

Minimalist academic diagram of the parsing process
Computational Complexity

O(n) Optimal Traversal

LL(1)

Top-Down Predictive Parsing

LL(1) parsers work by building the parse tree from the top down, from the start symbol to the leaves. The "(1)" denotes using a single lookahead token to make parsing decisions, ensuring deterministic execution for specific grammar subsets.

  • check_circle No Left Recursion allowed
  • check_circle Grammar must be Left-Factored
  • check_circle Constructed via First and Follow sets
View LL(1) Generator arrow_forward
LR(0)

Bottom-Up Shift-Reduce Parsing

LR(0) parsers build the parse tree from the bottom up, identifying the smallest units and reducing them toward the start symbol. They use a Finite State Automaton (DFA) to track the state of the stack without needing lookahead for initial decisions.

  • check_circle Handles more grammars than LL(1)
  • check_circle State-based transition table
  • check_circle Foundation for SLR, LALR, and LR(1)
View LR(0) Generator arrow_forward

Step-by-Step Guide

1

Enter Grammar

Navigate to the LL(1) or LR(0) tab and enter your context-free grammar productions. Use uppercase for non-terminals and lowercase / symbols for terminals.

2

Generate Tables

Click "Compute" to generate FIRST/FOLLOW sets, parsing tables, item sets, and all intermediate results.

3

Parse Input

Enter an input string and watch the parser simulate step-by-step, showing stack operations, actions, and the parsing trace.

Supervisor

Supervisor Profile

Ms. Rabeya Khatun

Lecturer, Department of Computer Science and Engineering, DIU

mail
Jian
01

Jian

Managed the UI design and optimized First-Set parser calculations

Shanita
02

Shanita

Designed visual assets while computing Follow-Set grammar transitions

Jiaur
03

Jiaur

Conducted system testing and authored comprehensive technical documentation

Naim
04

Naim

Engineered LR(0) item collections for automated state machine transitions

Habib
05

Habib

Constructed canonical parsing tables to ensure efficient syntax analysis