I am doing a course in uni on Automata and Formal Languages, and I think I've come across a pretty significant misunderstanding. When you have a rewrite rule in a grammar, and apply it to a string, do all occurrences of the string on the LHS get rewritten?
For example, if I have the string $abbababc$ over alphabet $\{a,b,c\}$, and rewrite rule $a \to b$ the string $bbbbbbbc$, or could we have also $bbababc$ and $bbbbbabc$, etc.
I thought it was the case that we could have only the first option but reading this answer: CFG of all regular expressions over a binary alphabet has made me think maybe differently.