public Transition(int label, State target) { this.label = new Label(label); this.target = target; }
public Transition(int label, State target) { this.label = new Label(label); this.target = target; }
public Transition(int label, State target) { this.label = new Label(label); this.target = target; }
public Transition(int label, State target) { this.label = new Label(label); this.target = target; }
/** From set build single edge graph o->o-set->o. To conform to * what an alt block looks like, must have extra state on left. */ public StateCluster build_Set(IntSet set, GrammarAST associatedAST) { NFAState left = newState(); NFAState right = newState(); left.associatedASTNode = associatedAST; right.associatedASTNode = associatedAST; Label label = new Label(set); Transition e = new Transition(label,right); left.addTransition(e); StateCluster g = new StateCluster(left, right); return g; }
/** From set build single edge graph o->o-set->o. To conform to * what an alt block looks like, must have extra state on left. */ public StateCluster build_Set(IntSet set, GrammarAST associatedAST) { NFAState left = newState(); NFAState right = newState(); left.associatedASTNode = associatedAST; right.associatedASTNode = associatedAST; Label label = new Label(set); Transition e = new Transition(label,right); left.addTransition(e); StateCluster g = new StateCluster(left, right); return g; }
/** From set build single edge graph o->o-set->o. To conform to * what an alt block looks like, must have extra state on left. */ public StateCluster build_Set(IntSet set, GrammarAST associatedAST) { NFAState left = newState(); NFAState right = newState(); left.associatedASTNode = associatedAST; right.associatedASTNode = associatedAST; Label label = new Label(set); Transition e = new Transition(label,right); left.addTransition(e); StateCluster g = new StateCluster(left, right); return g; }
/** From set build single edge graph o->o-set->o. To conform to * what an alt block looks like, must have extra state on left. */ public StateCluster build_Set(IntSet set, GrammarAST associatedAST) { NFAState left = newState(); NFAState right = newState(); left.associatedASTNode = associatedAST; right.associatedASTNode = associatedAST; Label label = new Label(set); Transition e = new Transition(label,right); left.addTransition(e); StateCluster g = new StateCluster(left, right); return g; }
/** Build an atom with all possible values in its label */ public StateCluster build_Wildcard(GrammarAST associatedAST) { NFAState left = newState(); NFAState right = newState(); left.associatedASTNode = associatedAST; right.associatedASTNode = associatedAST; Label label = new Label(nfa.grammar.getTokenTypes()); // char or tokens Transition e = new Transition(label,right); left.addTransition(e); StateCluster g = new StateCluster(left, right); return g; }
/** Build an atom with all possible values in its label */ public StateCluster build_Wildcard(GrammarAST associatedAST) { NFAState left = newState(); NFAState right = newState(); left.associatedASTNode = associatedAST; right.associatedASTNode = associatedAST; Label label = new Label(nfa.grammar.getTokenTypes()); // char or tokens Transition e = new Transition(label,right); left.addTransition(e); StateCluster g = new StateCluster(left, right); return g; }
/** Build an atom with all possible values in its label */ public StateCluster build_Wildcard(GrammarAST associatedAST) { NFAState left = newState(); NFAState right = newState(); left.associatedASTNode = associatedAST; right.associatedASTNode = associatedAST; Label label = new Label(nfa.grammar.getTokenTypes()); // char or tokens Transition e = new Transition(label,right); left.addTransition(e); StateCluster g = new StateCluster(left, right); return g; }
/** Build an atom with all possible values in its label */ public StateCluster build_Wildcard(GrammarAST associatedAST) { NFAState left = newState(); NFAState right = newState(); left.associatedASTNode = associatedAST; right.associatedASTNode = associatedAST; Label label = new Label(nfa.grammar.getTokenTypes()); // char or tokens Transition e = new Transition(label,right); left.addTransition(e); StateCluster g = new StateCluster(left, right); return g; }
/** Can only complement block of simple alts; can complement build_Set() * result, that is. Get set and complement, replace old with complement. public StateCluster build_AlternativeBlockComplement(StateCluster blk) { State s0 = blk.left; IntSet set = getCollapsedBlockAsSet(s0); if ( set!=null ) { // if set is available, then structure known and blk is a set set = nfa.grammar.complement(set); Label label = s0.transition(0).target.transition(0).label; label.setSet(set); } return blk; } */ public StateCluster build_Range(int a, int b) { NFAState left = newState(); NFAState right = newState(); Label label = new Label(IntervalSet.of(a, b)); Transition e = new Transition(label,right); left.addTransition(e); StateCluster g = new StateCluster(left, right); return g; }
/** Can only complement block of simple alts; can complement build_Set() * result, that is. Get set and complement, replace old with complement. public StateCluster build_AlternativeBlockComplement(StateCluster blk) { State s0 = blk.left; IntSet set = getCollapsedBlockAsSet(s0); if ( set!=null ) { // if set is available, then structure known and blk is a set set = nfa.grammar.complement(set); Label label = s0.transition(0).target.transition(0).label; label.setSet(set); } return blk; } */ public StateCluster build_Range(int a, int b) { NFAState left = newState(); NFAState right = newState(); Label label = new Label(IntervalSet.of(a, b)); Transition e = new Transition(label,right); left.addTransition(e); StateCluster g = new StateCluster(left, right); return g; }
/** Can only complement block of simple alts; can complement build_Set() * result, that is. Get set and complement, replace old with complement. public StateCluster build_AlternativeBlockComplement(StateCluster blk) { State s0 = blk.left; IntSet set = getCollapsedBlockAsSet(s0); if ( set!=null ) { // if set is available, then structure known and blk is a set set = nfa.grammar.complement(set); Label label = s0.transition(0).target.transition(0).label; label.setSet(set); } return blk; } */ public StateCluster build_Range(int a, int b) { NFAState left = newState(); NFAState right = newState(); Label label = new Label(IntervalSet.of(a, b)); Transition e = new Transition(label,right); left.addTransition(e); StateCluster g = new StateCluster(left, right); return g; }
/** Can only complement block of simple alts; can complement build_Set() * result, that is. Get set and complement, replace old with complement. public StateCluster build_AlternativeBlockComplement(StateCluster blk) { State s0 = blk.left; IntSet set = getCollapsedBlockAsSet(s0); if ( set!=null ) { // if set is available, then structure known and blk is a set set = nfa.grammar.complement(set); Label label = s0.transition(0).target.transition(0).label; label.setSet(set); } return blk; } */ public StateCluster build_Range(int a, int b) { NFAState left = newState(); NFAState right = newState(); Label label = new Label(IntervalSet.of(a, b)); Transition e = new Transition(label,right); left.addTransition(e); StateCluster g = new StateCluster(left, right); return g; }