I'm trying to describe a data structure by production rules. The structure is recursive; say a list of type $A$ made of elements of type $A$ or $B$.
Writing the grammar, I build this:
$(S \rightarrow AS|ε)$ $(A \rightarrow AA|bA|ε)$
where $b$ is a terminal representing element $B$ of my list.
The production $A \rightarrow AA$ got me a little baffled... is there something right? Thank you.