The formal technique is quite easy. Simply change:
A --> | | ... |
A --> A' A' --> | | ... |
A' --> | | ... |