Skip to content

lorainemg/grammar-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grammar Analyzer

This project provides tools for analyzing grammars. It includes functionality to process and analyze context-free grammars, generating reports on various properties of the grammar.

Features

  • Compute First and Follow sets.
  • Check if the grammar is LL(1), SLR, LR, or LALR and provide relevant analysis.
  • Identify and remove common prefixes and immediate left recursion.
  • Convert regular grammars to automata and regular expressions.
  • Visualize the grammar and display its version without unnecessary productions.

Setup

  1. Clone the repository.
  2. Install dependencies:
pip install -r requirements.txt

Run the main program:

python main.py

License

This project is licensed under the MIT License.