python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
How to prevent duplications when generating strings from context free grammar
I need to define context free grammar and generate strings from this language.
Grammar for a language that contains all strings with matched parentheses:
s->ss
s->(s)
s->()
Examples: (), ()(...
Oleg Dats
Votes: 0
Answers: 2