Search in sources :

Example 6 with VisitBag

use of priv.bajdcc.util.VisitBag in project jMiniLang by bajdcc.

the class RuleExp method visit.

@Override
public void visit(ISyntaxComponentVisitor visitor) {
    VisitBag bag = new VisitBag();
    visitor.visitBegin(this, bag);
    if (bag.bVisitEnd) {
        visitor.visitEnd(this);
    }
}
Also used : VisitBag(priv.bajdcc.util.VisitBag)

Example 7 with VisitBag

use of priv.bajdcc.util.VisitBag in project jMiniLang by bajdcc.

the class SequenceExp method visit.

@Override
public void visit(ISyntaxComponentVisitor visitor) {
    VisitBag bag = new VisitBag();
    visitor.visitBegin(this, bag);
    if (bag.bVisitChildren) {
        for (ISyntaxComponent exp : arrExpressions) {
            exp.visit(visitor);
        }
    }
    if (bag.bVisitEnd) {
        visitor.visitEnd(this);
    }
}
Also used : ISyntaxComponent(priv.bajdcc.OP.syntax.ISyntaxComponent) VisitBag(priv.bajdcc.util.VisitBag)

Example 8 with VisitBag

use of priv.bajdcc.util.VisitBag in project jMiniLang by bajdcc.

the class SequenceExp method visitReverse.

@Override
public void visitReverse(ISyntaxComponentVisitor visitor) {
    VisitBag bag = new VisitBag();
    visitor.visitBegin(this, bag);
    if (bag.bVisitChildren) {
        for (int i = arrExpressions.size() - 1; i >= 0; i--) {
            arrExpressions.get(i).visitReverse(visitor);
        }
    }
    if (bag.bVisitEnd) {
        visitor.visitEnd(this);
    }
}
Also used : VisitBag(priv.bajdcc.util.VisitBag)

Example 9 with VisitBag

use of priv.bajdcc.util.VisitBag in project jMiniLang by bajdcc.

the class BranchExp method visit.

@Override
public void visit(ISyntaxComponentVisitor visitor) {
    VisitBag bag = new VisitBag();
    visitor.visitBegin(this, bag);
    if (bag.bVisitChildren) {
        for (ISyntaxComponent exp : arrExpressions) {
            exp.visit(visitor);
        }
    }
    if (bag.bVisitEnd) {
        visitor.visitEnd(this);
    }
}
Also used : ISyntaxComponent(priv.bajdcc.LL1.syntax.ISyntaxComponent) VisitBag(priv.bajdcc.util.VisitBag)

Example 10 with VisitBag

use of priv.bajdcc.util.VisitBag in project jMiniLang by bajdcc.

the class OptionExp method visit.

@Override
public void visit(ISyntaxComponentVisitor visitor) {
    VisitBag bag = new VisitBag();
    visitor.visitBegin(this, bag);
    if (bag.bVisitChildren) {
        expression.visit(visitor);
    }
    if (bag.bVisitEnd) {
        visitor.visitEnd(this);
    }
}
Also used : VisitBag(priv.bajdcc.util.VisitBag)

Aggregations

VisitBag (priv.bajdcc.util.VisitBag)22 ArrayList (java.util.ArrayList)4 HashSet (java.util.HashSet)4 BreadthFirstSearch (priv.bajdcc.util.lexer.automata.BreadthFirstSearch)4 ISyntaxComponent (priv.bajdcc.OP.syntax.ISyntaxComponent)3 ISyntaxComponent (priv.bajdcc.LALR1.syntax.ISyntaxComponent)2 ISyntaxComponent (priv.bajdcc.LL1.syntax.ISyntaxComponent)2