All Downloads are FREE. Search and download functionalities are using the official Maven repository.

foundation.jpa.querydsl.where.StateRPar2 Maven / Gradle / Ivy

There is a newer version: 0.29
Show newest version
package foundation.jpa.querydsl.where;

import foundation.rpg.parser.UnexpectedInputException;
import foundation.rpg.parser.Named;

import java.util.Arrays;
import java.util.List;

// Generated visitor pattern based state for grammar parser.
public class StateRPar2 extends StackState>>> {

// NoStack:
// Stack:
    public StateRPar2(foundation.jpa.querydsl.where.QueryFactory factory, foundation.rpg.common.symbols.RPar node, StackState>> prev) {
        super(factory, node, prev);
    }


// Reduce:
    @Override
    public State visitEnd(foundation.rpg.parser.End symbol) throws UnexpectedInputException {
        StackState>> stack1 = this.getPrev();
		StackState> stack2 = stack1.getPrev();
		StackState stack3 = stack2.getPrev();
		State stack4 = stack3.getPrev();
        return stack4.visitRelationalBooleanExpression(getFactory().is(stack3.getNode(), stack2.getNode(), stack1.getNode(), this.getNode())).visitEnd(symbol);
    }

    @Override
    public State visitOr(foundation.rpg.common.symbols.Or symbol) throws UnexpectedInputException {
        StackState>> stack1 = this.getPrev();
		StackState> stack2 = stack1.getPrev();
		StackState stack3 = stack2.getPrev();
		State stack4 = stack3.getPrev();
        return stack4.visitRelationalBooleanExpression(getFactory().is(stack3.getNode(), stack2.getNode(), stack1.getNode(), this.getNode())).visitOr(symbol);
    }

    @Override
    public State visitAnd(foundation.rpg.common.symbols.And symbol) throws UnexpectedInputException {
        StackState>> stack1 = this.getPrev();
		StackState> stack2 = stack1.getPrev();
		StackState stack3 = stack2.getPrev();
		State stack4 = stack3.getPrev();
        return stack4.visitRelationalBooleanExpression(getFactory().is(stack3.getNode(), stack2.getNode(), stack1.getNode(), this.getNode())).visitAnd(symbol);
    }


// Shift:
// Accept:
    @Override
    public List stack() {
        StackState>> stack1 = this.getPrev();
		StackState> stack2 = stack1.getPrev();
		StackState stack3 = stack2.getPrev();
		State stack4 = stack3.getPrev();
        return Arrays.asList(stack3.getNode(), stack2.getNode(), stack1.getNode(), this.getNode());
    }

}