Skip to content

RezaTaheri01/first-follow-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Context-Free Grammar First & Follow Calculator

This project is a web-based tool for calculating the First and Follow sets of a context-free grammar (CFG). It takes user input in the form of a CFG and computes these sets, showing the results with a typewriter animation.

Features

  • Grammar Input: Input context-free grammar in a textarea with production rules.
  • Symbols: Use buttons or shortcut keys to input symbols like →, |, and λ.
  • Syntax Checking: Basic validation to check if the grammar syntax is correct.
  • First & Follow Calculation: Computes the First and Follow sets using predefined rules.
  • Typewriter Animation: Displays results in a typewriter style for a better user experience.

Usage

  1. Enter the grammar in the text area in the format:
  S → ACB | Cbb | Ba
  A → da | BC
  B → g | λ
  C → h | λ
  1. Use shortcuts to insert special symbols:
  • 1 :
  • 2 : |
  • 3 : λ
  1. Press the Check Grammar button to calculate the First and Follow sets.

Installation

  1. Clone the repository:
  git clone https://github.com/RezaTaheri01/first-follow-compiler.git
  1. Open index.html in your browser.

License

This project is licensed under the MIT License.

About

This project is a web-based tool for calculating the First and Follow sets of a context-free grammar (CFG)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy