Is there a difference between these two grammar definitions (where |
denotes OR and ;
is just a regular character)?
1. <foo> ::= <bar> | <foo> ; <bar>
2. <foo> ::= <bar> | <bar> ; <foo>
It seems to me that foo would match a sequence that looks like <bar> ; <bar> ; <bar> ; ....
regardless of which definition is used. Am I missing something here or are they functionally the same?