i have to translate this EBNF to bison:
<compound-statement> ::= begin [ <statement> ( ; <statement> )*] end
<statement> ::=
| <assignment>
| <if-statement>
| <while-statement>
| <proc-func-call>
| <compound-statement>
when i translate assignement, if,while statements and proc_func_ there is no error in bison. However when i type this in bison, translating the compound statement:
compound_statement : BEGINKEY state ENDKEY ;
state : | statement stm ;
stm : | BQUESTIONMARK statement stm ;
there is a reduce/reduce error.
Can someone explain to me, why there is a reduce/reduce error, because it doesnt make sense to me. I would really appreciate it.
Thanks in advance.