Re: Examples of Ambiguous CFG's and Languages

=?ISO-8859-1?Q?Djam=E9_Seddah?= <djame@jamais-de-la-vie.com>
11 Dec 2004 12:28:21 -0500

          From comp.compilers

Related articles
Examples of Ambiguous CFG's and Languages jkazemitabar@yahoo.com (2004-12-01)
Re: Examples of Ambiguous CFG's and Languages djame@jamais-de-la-vie.com (=?ISO-8859-1?Q?Djam=E9_Seddah?=) (2004-12-11)
| List of all articles for this month |
From: =?ISO-8859-1?Q?Djam=E9_Seddah?= <djame@jamais-de-la-vie.com>
Newsgroups: comp.compilers
Date: 11 Dec 2004 12:28:21 -0500
Organization: Guest of ProXad - France
References: 04-12-024
Keywords: parse, theory
Posted-Date: 11 Dec 2004 12:28:20 EST

Seyyed Jalal Kazemitabar a écrit :
> Hi,
> Can anybody show me a sorce for some ambiguous Context Free Grammars
> and Languages ( other than the famous one or two available in all the
> books)?
> Thanks
> jalal++


have a look to


np -> np gadj
np -> det n
np -> n
np -> np gp
gp -> prep np
gadj -> adj
adj -> [americain] (american)
det -> [le] (the)
n -> [joueur] (player)
n -> football (football)


so "le joueur de football américan"
can be analysed as [NP1 [Np2 [det le] [n joueur] NP2] [GP [prep de ]
[np3 [n football] [gadj [adj americain] np3] GP] NP1] or [NP1 [Np2 [det
le] [n joueur] NP2] [GP [prep de ] [np3 [n football] np3] GP] [gadj
[adj americain] gadj] NP1] (maybe for error, it's hard to draw tree by
hand)


so either the football is american or the player


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.