[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.tmf] Removing left recursion...
|
Hi,
I'm trying to remove some left recursion problems I have in a grammar. I understand that I must refactor the grammar, but I can't get it to work. I have read the user manual and some other posts.
Here's my grammar:
LogicExpression :
atom=ID
| 'TRUE'
| 'FALSE'
| LogicBinaryExpression
| LogicUnaryExpression
| '(' LogicExpression ')';
LogicBinaryExpression:
TermnialLogicExpression leftExpression=LogicExpression ;
TermnialLogicExpression:
op=LogicBinOperator | rightExpression=LogicExpression;
LogicUnaryExpression:
op=LogicUnOperator expression=LogicExpression;
LogicBinOperator:
'&'
| '#'
| '->'
| '<->'
| '<-'
| '#!';
LogicUnOperator :
'~'
| '@';
Can anyone give me some hints?
Best regards
Henrik