From time to time you can write a grammar that creates shift/reduce conflict (for example) but after reading the grammar you notice that if you rewrite the productions the conflict will go away, despite the fact that the rewritten grammar is obviously equivalent and accepts exactly the same language.
Are there some automatic transformations of the grammar to avoid conflict? Something (just an analogy) as left recursion elimination in LL parsers?
For example, here is a trivial example of two grammars:
... deco_symbol -> anon_symbol | named_symbol; ...
... symbol -> anon_symbol | named_symbol; deco_symbol -> symbol; ...
For LR(1) parser such indirection can be crucial and second form can introduce conflicts (it did in real life).
Since I asked this question I wrote automatic removal of identity production and it helped, so this would be the first type of transformation I know it is helpful. Now I am testing wrapper production removal and empty productions as well.