![]() |
context-free grammar
if i have posted it in a wrong section, please feel free to move it!
I have to write a context-free grammr for the language in which a sentence has 0 or more b followed by a c followed by a string of d, and the number of d equals number of b! Problem! ... how do i keep track of the number of b?? there is no way, right? hmm thanks! |
what if you just made sure there was a d for every b? Something like:
:
S = <something1> |
Does anyone else see the irony here?
|
Quote:
are you sure it's that easy?? btw i am not supposed to use left recursion |
Quote:
|
Quote:
|
Quote:
|
You want to do a project having to do with grammar in another language, yet you don't use proper grammar in English.
|
hey, so i know how to write context-free grammar for this q now, but I need practice! could you guys come up with more questions like this that requires me to write context-free grammar?
or tell me a site where i could find such questions (and their solutions!!) |
my best guess would be to google some school sites and look for homework assignments... no guarantees on getting solutions though
|
| All times are GMT -5. The time now is 1:01 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC