DANGLING ELSE PROBLEM:
S->iEtSS' / a
S'->∊/ eS
E->b
is a Deterministic context free grammar, and is ambiguous for "iEtiEtSeS"
but ALL DCFG ARE UNAMBIGUOUS . so " how can this DCFG be ambiguous?"
DANGLING ELSE PROBLEM:
S->iEtSS' / a
S'->∊/ eS
E->b
is a Deterministic context free grammar, and is ambiguous for "iEtiEtSeS"
but ALL DCFG ARE UNAMBIGUOUS . so " how can this DCFG be ambiguous?"
is a Deterministic context free grammar, and is ambiguous for "iEtiEtSeS"
This is the problem. You assume that your grammar is a deterministic context free grammar. However, you also state that it is ambiguous. Both cannot be true and indeed it is not: Your grammar is not a deterministic context free grammar but only a context free grammar that is ambiguous.
Indeed, the dangling else problem is known to be an issue for compiler design, because it cannot be solved with only a context free grammar. It is often disambiguated by using a syntactic predicate. This tells the compiler to prefer the shift over the reduce operation, which leads to a parse tree where the else part is attached to the inner most if. However, while this resolves the problem, it is not part of a pure context free grammar.
Finally, to give a clear and simple answer to the question: No, it is not possible to specify a deterministic context free grammar for an inherently ambiguous language.