As the title suggests, assume a grammar which has to recognize function declarations, function calls, and expressions, at any order. Does that mean it has to be cyclic, and therefore ambiguous?
I mean, it would have to look something like:
- S -> function_declaration | function_call | expr
- function_declaration -> ... | S
- function_call -> ... | S
- expr -> ... | S
Maybe not all of them would have to point back to S, that depends on the specifics. Is there any way to solve this?