Skip to content

anapyx/string-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

string-generator

String generator for Context-Free Grammars

About the program

Given a context-free grammar, get strings generated by that grammar. The fast mode option generates one of the simplest string possible and the detailed mode gives you options to generate the string wanted.

To run the program, go to the terminal and type:

$ python ./main.py “grammar.txt”

You should specify the grammar file's path if the grammar code isn’t in the string-generator directory.

The context-free grammar file program must be in the following format as the “test.txt” example in the main directory:

variaveis:S,A
inicial:S
terminais:0,1

producoes
S: 0A1
A: 0
A: 1
A: 0A1

About

String generator for Context Free Grammars

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages