i have this rule in antlr :
anREs : anRE
| ('(' anREs ')') => '(' anREs ')'
| (anREs '|' anREs) => anREs '|' anREs ;
where the anRE is a regular expression , when i want to compile the rules file i have this error message due to 3rd alternative in last rule :
error(210): The following sets of rules are mutually left-recursive [anREs]
how i can re write this rule ?
thanks