Elimination technique is used for LL parsers and it needs a grammar that can be parsed by LL parsers. Those grammars are called LL grammars which are subset of context free grammar. Therefore not all context free grammar are LL or can be transformed to LL. That's why this algorithm fails. I have to check whether the grammar is LL or LL-convertible.