Skip to content

Commit

Permalink
Added get_transition
Browse files Browse the repository at this point in the history
  • Loading branch information
mkpro118 committed Jul 1, 2024
1 parent 99de115 commit 5241000
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions include/nfa_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,15 @@ void state_free(NFAState* state);
*/
int add_transition(NFAState* from, NFAState* to, char on);

/**
* Get the transition for the `on` character for the given NFA State
*
* @param from State to transition from
* @param on The character on which to transition
*
* @return A pointer to the list of transition state if it exists,
* NULL if it doesn't
*/
NFAStateList* get_transition(NFAState* from, char on);

#endif // REGEX_STATE_H

0 comments on commit 5241000

Please sign in to comment.