Logo Search packages:      
Sourcecode: lttoolbox version File versions  Download package

void Transducer::optional ( int const   epsilon_tag = 0  ) 

Make a transducer optional (link initial state with final states with empty transductions)

epsilon_tag the tag to take as epsilon

Definition at line 381 of file Transducer.C.

References finals, initial, joinFinals(), linkStates(), and newState().

Referenced by RegExpCompiler::Esp(), RegExpCompiler::Term(), and zeroOrMore().

  int state = newState();  
  linkStates(state, initial, epsilon_tag);
  initial = state;

  state = newState();
  linkStates(*finals.begin(), state, epsilon_tag);
  linkStates(initial, state, epsilon_tag);

Generated by  Doxygen 1.6.0   Back to index