Walking on SR-automata to detect grammar ambiguity