Results 1 to 2 of 2
Thread: Pairwise disjointness test help
- 10-17-2011, 12:26 AM #1
Member
- Join Date
- Jun 2011
- Posts
- 46
- Rep Power
- 0
Pairwise disjointness test help
Determine whether the following grammar is an LL grammar by performing the pairwise disjointness test, showing the FIRST sets of each RHS of each nonterminal:
A -> aB | b | CBB
B -> aB | bA | aBb
C -> aaA | b | caB
In the above productions upper case letters are nonterminals and lower case letters are terminal symbols.
I am trying to get a better understand of how this works and not sure if I am completely understanding. What I am thinking...
{a,b} and {a,b,a} and {a,b,c} and since all share the first two terminals they are not disjoint thus it fails the pairwise disjoint test and is not an LL grammar.
Is this correct and for the reasons I think it is? I haven't been able to find an example/explanation that is clear to me. I'd like a better explanation of the rules so I better understand. Thanks for any help you all can offer!
- 10-17-2011, 01:50 AM #2
Member
- Join Date
- Jun 2011
- Posts
- 46
- Rep Power
- 0
Re: Pairwise disjointness test help
actually after some more reading I think it should be:
{a,b} and {a,b,a}
{a,b,a}
{a,b,c} and {a,b}
I think this still fails because {a,b} is contained in A and C and {a,b,a} is contained in A and B. I am still unsure of all the rules and reasoning so any guidance would be greatly appreciated!
Similar Threads
-
Is it possible to test for NaN?
By AJArmstron@aol.com in forum New To JavaReplies: 7Last Post: 05-07-2010, 02:22 AM -
Test Advisory Panel-Telecommute- Test your Java skills + share insights on Java tests
By michelle in forum Jobs OfferedReplies: 0Last Post: 04-05-2008, 12:38 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks