You need backtracking if you have an ambiguous grammar. This comes up in natural language parsing; I'd guess that it is avoided in programming languages.
This sort of thing can be fixed up with predicates added to the grammar but it always feels like a bodge.