The current state must be set. It is the
first state, the root of the search.
When the feature returns, 'search_is_success' must be
checked to know if a solution was found.
When search_is_success=False, it means that there
is no solution at all. Conversely, if search_is_success=True,
then the first solution is found and 'search_next'
can be called to get the next solution if it exists.
When the feature returns, 'search_is_success' must be
checked to know if a solution was found.
When search_is_success=False at the end, it means that there
is no more solution. Conversely, if search_is_success=True,
then a solution is found and 'search_next'
can be called again to get the next solution.
Call the action for each group that matched during the last match.
The first action argument is the name of the group; the second is its content.
The order of the action calls is the ascending order of the group definitions in the pattern.
Note: the same STRING objects may be reused, so be sure to copy them if you want to keep them.