Skip to content

Given a Context-Free-Grammar the script will convert it into the selected Normal Form

License

Notifications You must be signed in to change notification settings

LordAlucard90/Context-Free-Grammars-Normal-Formalizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Normal Formalizer For Context-Free-Grammars

Requires python 3.x (3.6 tested)

Supported Normal Forms

  • Base Context-Free-Grammar Definition
  • Chomsky Normal Form
  • Greibach Normal Form

Input Text Format

V : [ V | V_0 ], ...
SIGMA : [ s | # ], ...
S : s0
P : V1 -> s1 V | #,
    V2 -> s1 | s2 | ...

Run Example

$ python3 example.py example.txt 

More examples can be found in 'ContextFreeGrammars/tests'

About

Given a Context-Free-Grammar the script will convert it into the selected Normal Form

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages