Search in sources :

Example 11 with ISyntaxComponent

use of priv.bajdcc.LL1.syntax.ISyntaxComponent in project jMiniLang by bajdcc.

the class FirstsetSolver method visitBegin.

@Override
public void visitBegin(BranchExp node, VisitBag bag) {
    bag.bVisitChildren = false;
    bag.bVisitEnd = false;
    boolean zero = false;
    for (ISyntaxComponent exp : node.arrExpressions) {
        exp.visit(this);
        if (bZero) {
            zero = bZero;
        }
    }
    bZero = zero;
}
Also used : ISyntaxComponent(priv.bajdcc.LALR1.syntax.ISyntaxComponent)

Example 12 with ISyntaxComponent

use of priv.bajdcc.LL1.syntax.ISyntaxComponent in project jMiniLang by bajdcc.

the class FirstSetSolver method visitBegin.

@Override
public void visitBegin(BranchExp node, VisitBag bag) {
    bag.bVisitChildren = false;
    bag.bVisitEnd = false;
    boolean zero = false;
    for (ISyntaxComponent exp : node.arrExpressions) {
        exp.visit(this);
        if (bZero) {
            zero = bZero;
        }
    }
    bZero = zero;
}
Also used : ISyntaxComponent(priv.bajdcc.LL1.syntax.ISyntaxComponent)

Aggregations

ISyntaxComponent (priv.bajdcc.LALR1.syntax.ISyntaxComponent)4 ISyntaxComponent (priv.bajdcc.LL1.syntax.ISyntaxComponent)4 VisitBag (priv.bajdcc.util.VisitBag)4 SyntaxToString (priv.bajdcc.LL1.syntax.stringify.SyntaxToString)2 BranchExp (priv.bajdcc.LL1.syntax.exp.BranchExp)1 IExpCollction (priv.bajdcc.LL1.syntax.exp.IExpCollction)1 SequenceExp (priv.bajdcc.LL1.syntax.exp.SequenceExp)1 RuleItem (priv.bajdcc.LL1.syntax.rule.RuleItem)1 OperatorType (priv.bajdcc.LL1.syntax.token.OperatorType)1