/******************************************************** * Function: mimic * Description: Converts this NFA state into a copy of * the input one. *******************************************************/ public void mimic ( CNfa nfa ) { m_edge = nfa.m_edge; if (null != nfa.m_set) { if (null == m_set) { m_set = new CSet(); } m_set.mimic(nfa.m_set); } else { m_set = null; } m_next = nfa.m_next; m_next2 = nfa.m_next2; m_accept = nfa.m_accept; m_anchor = nfa.m_anchor; if (null != nfa.m_states) { m_states = (SparseBitSet)nfa.m_states.Clone(); } else { m_states = null; } }
/*************************************************************** * Function: CAcceptAnchor **************************************************************/ CAcceptAnchor ( ) { m_accept = null; m_anchor = CSpec.NONE; }
public int m_accept_index; /* CNfa index corresponding to accepting actions. */ /*************************************************************** * Function: CBunch * Description: Constructor. **************************************************************/ public CBunch ( ) { m_nfa_set = null; m_nfa_bit = null; m_accept = null; m_anchor = CSpec.NONE; m_accept_index = -1; }
/************************************************************* * Function: CTrans ***********************************************************/ public CDTrans ( int label, CSpec spec ) { m_dtrans = new int[spec.m_dtrans_ncols]; m_accept = null; m_anchor = CSpec.NONE; m_label = label; }
/******************************************************** * Function: CNfa *******************************************************/ public CNfa ( ) { m_edge = EMPTY; m_set = null; m_next = null; m_next2 = null; m_accept = null; m_anchor = CSpec.NONE; m_label = NO_LABEL; m_states = null; }
/*************************************************************** * Function: mimic **************************************************************/ public void mimic ( CAccept accept ) { int elem; m_action_read = accept.m_action_read; m_action = new char[m_action_read]; for (elem = 0; elem < m_action_read; ++elem) { m_action[elem] = accept.m_action[elem]; } }
/*************************************************************** * Function: CDfa **************************************************************/ public CDfa ( int label ) { m_group = 0; m_mark = false; m_accept = null; m_anchor = CSpec.NONE; m_nfa_set = null; m_nfa_bit = null; m_label = label; }
/*************************************************************** * Function: CAccept **************************************************************/ public CAccept ( CAccept accept ) { int elem; m_action_read = accept.m_action_read; m_action = new char[m_action_read]; for (elem = 0; elem < m_action_read; ++elem) { m_action[elem] = accept.m_action[elem]; } m_line_number = accept.m_line_number; }