python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
a CFG for {a^m b^n c^k, m > n > k}?
Is this language context free? How can I come with a CFG for it, I tried coming up with one but I can't keep it in order.
{a^m b^n c^k, m > n > k, k >= 0}
Not me
Votes: 0
Answers: 0
Why doesn't this ANTLR grammar derive the string `baba`?
Using ANTLR v4.9.3, I created the following grammar …
grammar G ;
start : s EOF ;
s : 'ba' a b ;
a : 'b' ;
b : 'a' ;
Given the above grammar, I thought that the following derivation is possible …
...
user3134725
Votes: 0
Answers: 1
How are these parse tree generated?
I need assistance regarding generating the parse tree and the syntax tree. My version of the solutions are the images below but I don't know if they are correct or way off.
Given the Grammar: S-->a...
zed unseened
Votes: 0
Answers: 1
Stuck in a loop while trying to get Chomsky normal form
I have the automata
S'-> S
S -> a | XbY
X -> ε | aZ | Y
Y -> b | XX
z -> ab | SS
After doing one round of removing null productions i got:
S'-> S
S -> a | XbY | bY
X -> aZ |...
Teo
Votes: 0
Answers: 1