Search in sources :

Example 16 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 17 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.LL1.syntax.ISyntaxComponent) VisitBag(priv.bajdcc.util.VisitBag)

Example 18 with VisitBag

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

the class TokenExp 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 19 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.OP.syntax.ISyntaxComponent) VisitBag(priv.bajdcc.util.VisitBag)

Example 20 with VisitBag

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

the class BranchExp method visitReverse.

@Override
public void visitReverse(ISyntaxComponentVisitor visitor) {
    VisitBag bag = new VisitBag();
    visitor.visitBegin(this, bag);
    if (bag.bVisitChildren) {
        for (ISyntaxComponent exp : arrExpressions) {
            exp.visitReverse(visitor);
        }
    }
    if (bag.bVisitEnd) {
        visitor.visitEnd(this);
    }
}
Also used : ISyntaxComponent(priv.bajdcc.OP.syntax.ISyntaxComponent) 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