Skip to content

A lightweight interactive shell for parsing and grammar analysis. Supports FIRST, FOLLOW, LL(1) table construction, SLR(1) automaton generation. Designed for both analysis and education, it provides step-by-step explanations to visualize parsing processes.

License

Notifications You must be signed in to change notification settings

jose-rZM/PLShell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4f3c2f4 Β· Feb 26, 2025

History

43 Commits
Feb 22, 2025
Feb 24, 2025
Feb 26, 2025
Feb 22, 2025
Feb 22, 2025
Feb 22, 2025
Feb 22, 2025
Feb 22, 2025
Feb 24, 2025

Repository files navigation

PLShell - Interactive Parsing Shell πŸ–₯οΈπŸ“–

PLShell is an interactive shell for grammar analysis and parsing. It supports FIRST, FOLLOW, LL(1) table construction, SLR(1) automaton generation, and input validation.
Designed for both analysis and education, it provides step-by-step explanations to help visualize parsing processes.

πŸš€ Features

βœ… Load grammars from files (load grammar.txt)
βœ… Compute LL(1) components:

  • first: Compute the First set of a given string.
  • follow: Compute the Follow set of a given non-terminal.
  • predsymbols: Compute the Prediction Symbols of a rule.
  • ll1: Checks whether the grammar is LL(1) and display the table.

βœ… Coming soon: Generate SLR(1) automaton and visualize states
βœ… Coming soon: Parse and validate input strings
βœ… Verbose mode: Add -v or --verbose to any command to get a step-by-step explanation, useful for learning purposes. βœ… Shell environment: Run multiple commands interactively.


πŸ“₯ Compiling

πŸ”§ Requirements

  • C++20 or later
  • Boost.ProgramOptions (for command parsing)

Usage

Once inside pl-shell you can execute commands:

  • Load a grammar
load my_grammar.txt
  • Compute First set:
first ABC
first ABC -v
  • Compute Follow set:
follow A
follow A -v
  • Compute Prediction Symbols:
predsymbols A BC
predsymbols A BC -v
  • Check if the grammar is LL(1):
ll1
ll1 -v

About

A lightweight interactive shell for parsing and grammar analysis. Supports FIRST, FOLLOW, LL(1) table construction, SLR(1) automaton generation. Designed for both analysis and education, it provides step-by-step explanations to visualize parsing processes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published