Timeline for How to prove that Ambiguity is still present in Resolved Production of Dangling Else Problem?
Current License: CC BY-SA 3.0
15 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 29, 2018 at 20:58 | answer | added | Theodore Norvell | timeline score: 2 | |
Dec 4, 2016 at 14:58 | comment | added | rici | @akhil: the grammar presented in exercise 4.3.3 is not the same as the one which you copied into your question from example 4.1.6. Look more closely. | |
Dec 4, 2016 at 7:27 | comment | added | Akhil Nadh PC | @rici you better see exercise 4.3.3 p.217 Here author has mentioned " Show that this grammar is still ambiguous.. " | |
Dec 4, 2016 at 7:25 | history | edited | Akhil Nadh PC | CC BY-SA 3.0 |
What I knew about how to prove a grammer is ambiguous is added .
|
Nov 30, 2016 at 15:15 | history | tweeted | twitter.com/StackCompSci/status/803980708305928192 | ||
Nov 29, 2016 at 9:47 | answer | added | gnasher729 | timeline score: 2 | |
Nov 28, 2016 at 16:42 | comment | added | rici | @akhil it is not inherently ambiguous and the dragon book does not say that it is. 2nd edition, p. 211, example 4.16: "we can rewrite the dangling else grammar as the following unambiguous grammar..." (emphasis added). | |
Nov 28, 2016 at 16:31 | answer | added | iambruv | timeline score: -1 | |
Nov 28, 2016 at 15:10 | comment | added | mruether | @YuvalFilmus in fact it is, but this is solved by choosing the nearest IF for an ELSE. This solves the problem on the parser-level. Another option would have been to add an ENDIF to the grammar, which solves the problem on the language-level. | |
Nov 28, 2016 at 14:48 | comment | added | Yuval Filmus | I seriously doubt that the grammar of C is inherently ambiguous. Indeed, it can be parsed using an LALR parser, which is a deterministic push-down automaton. | |
Nov 28, 2016 at 14:45 | answer | added | Yuval Filmus | timeline score: 4 | |
Nov 28, 2016 at 14:36 | comment | added | mruether | The problem of ambiguity is in general undecidable. Maybe you try to find an example which can be parsed into two different parse-trees. | |
Nov 28, 2016 at 13:58 | comment | added | Akhil Nadh PC | @rici , Because Dangling else problem is inherently ambiguous . so there will not be any unambiguous grammar . Moreover he , himself has mentioned in the book | |
Nov 28, 2016 at 13:36 | comment | added | rici | What makes you think the second grammar is ambiguous? | |
Nov 28, 2016 at 13:12 | history | asked | Akhil Nadh PC | CC BY-SA 3.0 |