User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Computer Science and Software Design section within the Software Development category of DaniWeb, a massive community of 427,797 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,697 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Computer Science and Software Design advertiser: Programming Forums
Views: 3262 | Replies: 1 | Solved
Reply
Join Date: Apr 2004
Posts: 2
Reputation: static_ace is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
static_ace static_ace is offline Offline
Newbie Poster

Help Problem about grammar rules

  #1  
Apr 10th, 2004
I have tried looking in my textbook as well as my notes to figure out how to do this problem. I should have asked my teacher when I had the chance, but first I wanted to try working out the problem myself. I have until Monday to figure out how to do this problem, but would appreciate it if you could help me start. Here's the problem:

Show that the grammar is still ambiguous:

<statement> ------> if exp then <substat> else <statement> (1)
| if exp then <statement> (2)
| other-stat (3)

<substat> ---------> if exp then <substat> else <statement> (4)
|other_stat (5)

I at least know that I have to show two different parse trees of a single statement that fits those rules. Other than that, I'm stuck. Please help.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2004
Posts: 2
Reputation: static_ace is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
static_ace static_ace is offline Offline
Newbie Poster

Re: Problem about grammar rules

  #2  
Apr 10th, 2004
Sorry never mind. I finally got the solution.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Computer Science and Software Design Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Computer Science and Software Design Forum

All times are GMT -4. The time now is 2:02 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC