// or_op -> OR or_term or_op
// or_op -> EPSILON
private ExpressionNode orOperation(ExpressionNode expression) {
// or_op -> OR or_term or_op
if (lookahead.tokenType == TokenTypes.OR) {
OrExpressionNode disjunction;
// This means we are actually dealing with an OR
// If expr is not already an OR, we have to create one
if (expression.getType() == TokenTypes.OR) {
disjunction = (OrExpressionNode) expression;
} else {
disjunction = new OrExpressionNode(expression);
}
nextToken();
ExpressionNode term = orTerm();
disjunction.add(term);
return orOperation(disjunction);
}
// or_op -> EPSILON