/** return the single atom label or INVALID if not a single atom */ public int getAtom() { if ( isAtom() ) { return label; } return INVALID; }
/** return the single atom label or INVALID if not a single atom */ public int getAtom() { if ( isAtom() ) { return label; } return INVALID; }
/** return the single atom label or INVALID if not a single atom */ public int getAtom() { if ( isAtom() ) { return label; } return INVALID; }
/** return the single atom label or INVALID if not a single atom */ public int getAtom() { if ( isAtom() ) { return label; } return INVALID; }
public void addTransition(Transition e) { if ( e==null ) { throw new IllegalArgumentException("You can't add a null transition"); } if ( numTransitions>transition.length ) { throw new IllegalArgumentException("You can only have "+transition.length+" transitions"); } if ( e!=null ) { transition[numTransitions] = e; numTransitions++; // Set the "back pointer" of the target state so that it // knows about the label of the incoming edge. Label label = e.label; if ( label.isAtom() || label.isSet() ) { if ( ((NFAState)e.target).incidentEdgeLabel!=null ) { ErrorManager.internalError("Clobbered incident edge"); } ((NFAState)e.target).incidentEdgeLabel = e.label; } } }
public void addTransition(Transition e) { if ( e==null ) { throw new IllegalArgumentException("You can't add a null transition"); } if ( numTransitions>transition.length ) { throw new IllegalArgumentException("You can only have "+transition.length+" transitions"); } if ( e!=null ) { transition[numTransitions] = e; numTransitions++; // Set the "back pointer" of the target state so that it // knows about the label of the incoming edge. Label label = e.label; if ( label.isAtom() || label.isSet() ) { if ( ((NFAState)e.target).incidentEdgeLabel!=null ) { ErrorManager.internalError("Clobbered incident edge"); } ((NFAState)e.target).incidentEdgeLabel = e.label; } } }
@Override public void addTransition(Transition e) { if ( e==null ) { throw new IllegalArgumentException("You can't add a null transition"); } if ( numTransitions>transition.length ) { throw new IllegalArgumentException("You can only have "+transition.length+" transitions"); } if ( e!=null ) { transition[numTransitions] = e; numTransitions++; // Set the "back pointer" of the target state so that it // knows about the label of the incoming edge. Label label = e.label; if ( label.isAtom() || label.isSet() ) { if ( ((NFAState)e.target).incidentEdgeLabel!=null ) { ErrorManager.internalError("Clobbered incident edge"); } ((NFAState)e.target).incidentEdgeLabel = e.label; } } }
@Override public void addTransition(Transition e) { if ( e==null ) { throw new IllegalArgumentException("You can't add a null transition"); } if ( numTransitions>transition.length ) { throw new IllegalArgumentException("You can only have "+transition.length+" transitions"); } if ( e!=null ) { transition[numTransitions] = e; numTransitions++; // Set the "back pointer" of the target state so that it // knows about the label of the incoming edge. Label label = e.label; if ( label.isAtom() || label.isSet() ) { if ( ((NFAState)e.target).incidentEdgeLabel!=null ) { ErrorManager.internalError("Clobbered incident edge"); } ((NFAState)e.target).incidentEdgeLabel = e.label; } } }
public void add(Label a) { if ( isAtom() ) { labelSet = IntervalSet.of(label); label=SET; if ( a.isAtom() ) { labelSet.add(a.getAtom()); } else if ( a.isSet() ) { labelSet.addAll(a.getSet()); } else { throw new IllegalStateException("can't add element to Label of type "+label); } return; } if ( isSet() ) { if ( a.isAtom() ) { labelSet.add(a.getAtom()); } else if ( a.isSet() ) { labelSet.addAll(a.getSet()); } else { throw new IllegalStateException("can't add element to Label of type "+label); } return; } throw new IllegalStateException("can't add element to Label of type "+label); }
public void add(Label a) { if ( isAtom() ) { labelSet = IntervalSet.of(label); label=SET; if ( a.isAtom() ) { labelSet.add(a.getAtom()); } else if ( a.isSet() ) { labelSet.addAll(a.getSet()); } else { throw new IllegalStateException("can't add element to Label of type "+label); } return; } if ( isSet() ) { if ( a.isAtom() ) { labelSet.add(a.getAtom()); } else if ( a.isSet() ) { labelSet.addAll(a.getSet()); } else { throw new IllegalStateException("can't add element to Label of type "+label); } return; } throw new IllegalStateException("can't add element to Label of type "+label); }
public void add(Label a) { if ( isAtom() ) { labelSet = IntervalSet.of(label); label=SET; if ( a.isAtom() ) { labelSet.add(a.getAtom()); } else if ( a.isSet() ) { labelSet.addAll(a.getSet()); } else { throw new IllegalStateException("can't add element to Label of type "+label); } return; } if ( isSet() ) { if ( a.isAtom() ) { labelSet.add(a.getAtom()); } else if ( a.isSet() ) { labelSet.addAll(a.getSet()); } else { throw new IllegalStateException("can't add element to Label of type "+label); } return; } throw new IllegalStateException("can't add element to Label of type "+label); }
public void add(Label a) { if ( isAtom() ) { labelSet = IntervalSet.of(label); label=SET; if ( a.isAtom() ) { labelSet.add(a.getAtom()); } else if ( a.isSet() ) { labelSet.addAll(a.getSet()); } else { throw new IllegalStateException("can't add element to Label of type "+label); } return; } if ( isSet() ) { if ( a.isAtom() ) { labelSet.add(a.getAtom()); } else if ( a.isSet() ) { labelSet.addAll(a.getSet()); } else { throw new IllegalStateException("can't add element to Label of type "+label); } return; } throw new IllegalStateException("can't add element to Label of type "+label); }
public boolean matches(Label other) { if ( other.isSet() ) { return matches(other.getSet()); } if ( other.isAtom() ) { return matches(other.getAtom()); } return false; }
public boolean matches(Label other) { if ( other.isSet() ) { return matches(other.getSet()); } if ( other.isAtom() ) { return matches(other.getAtom()); } return false; }
public boolean matches(Label other) { if ( other.isSet() ) { return matches(other.getSet()); } if ( other.isAtom() ) { return matches(other.getAtom()); } return false; }
public boolean matches(Label other) { if ( other.isSet() ) { return matches(other.getSet()); } if ( other.isAtom() ) { return matches(other.getAtom()); } return false; }
public boolean matches(IntSet set) { if ( isAtom() ) { return set.member(getAtom()); } if ( isSet() ) { // matches if intersection non-nil return !getSet().and(set).isNil(); } return false; }
public boolean matches(IntSet set) { if ( isAtom() ) { return set.member(getAtom()); } if ( isSet() ) { // matches if intersection non-nil return !getSet().and(set).isNil(); } return false; }
public boolean matches(IntSet set) { if ( isAtom() ) { return set.member(getAtom()); } if ( isSet() ) { // matches if intersection non-nil return !getSet().and(set).isNil(); } return false; }
public boolean matches(IntSet set) { if ( isAtom() ) { return set.member(getAtom()); } if ( isSet() ) { // matches if intersection non-nil return !getSet().and(set).isNil(); } return false; }