Skip to content

Input a Regex, get its AST, NFA, DFA and finally it Minimized DFA (Compiler Course Assignment)

Notifications You must be signed in to change notification settings

BigFish2086/Regex2MDFA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Regex2MDFA

Input a Regex, get its abstract syntax tree (AST), non-deterministic finite automata (NFA), deterministic finite automata (DFA) and finally its Minimized DFA

⚒️ Supported Rules

  • Alteration: A|B
  • Concatenation: AB
  • 1 or More: A+
  • 0 or More: A*
  • Optional - 0 or 1: A?
  • ORing: [abc], (a|b|c), [123], (1|2|3)
  • Ranges: [0-9] or [a-z]
  • Grouping using parentheses to control the order of operations (ABD)+
  • Min and Max Number of repetitions of certain token (a{1,3}) and its different vairiants

🏁 Get started

  • Using the main.py file
git clone https://github.com/BigFish2086/Regex2MDFA
cd Regex2MDFA
python -m pip install -r requirements.txt
cd src
python ./main.py <REGEX>
  • Or using the notebook provided here in the github link, however whenever changing the testcase/regex in hand, make sure to re-run the whole notebook again, since it's just a compilation of all the files in the src folder

About

Input a Regex, get its AST, NFA, DFA and finally it Minimized DFA (Compiler Course Assignment)

Topics

Resources

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