Add function prototypes for four basic libregex functions.
This commit is contained in:
		
							parent
							
								
									7f370983f2
								
							
						
					
					
						commit
						e5219da6fe
					
				@ -292,4 +292,30 @@ typedef struct regex_match_s regex_match;
 | 
			
		||||
typedef struct regex_result_s regex_result;
 | 
			
		||||
typedef struct regex_sim_s regex_sim;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Clears a node completely, resetting all the values to default.
 | 
			
		||||
 * @param node the node to clear.
 | 
			
		||||
 */
 | 
			
		||||
void regex_node_clear(regex_node* node);
 | 
			
		||||
/**
 | 
			
		||||
 * Frees an entire NFA, starting from the given root node.
 | 
			
		||||
 * @param root the root, or starting node, of the NFA.
 | 
			
		||||
 */
 | 
			
		||||
void regex_free(regex_node* root);
 | 
			
		||||
/**
 | 
			
		||||
 * Builds a regular expression from the given regular expression strings.
 | 
			
		||||
 * @param root the root node to build into.
 | 
			
		||||
 * @param expression the expression to construct the NFA from.
 | 
			
		||||
 * @return the result of the operation: LIBREGEX_SUCCESS if all goes well, or an error code.
 | 
			
		||||
 */
 | 
			
		||||
libregex_result regex_build(regex_node** root, char* expression);
 | 
			
		||||
/**
 | 
			
		||||
 * Matches the regular expression against a given string.
 | 
			
		||||
 * @param root the root of a regular expression NFA
 | 
			
		||||
 * @param string the string to be matched
 | 
			
		||||
 * @param result the result to be populated with the data from matching the string.
 | 
			
		||||
 * @return the result of the operation: LIBREGEX_SUCCESS if all goes well, or an error code.
 | 
			
		||||
 */
 | 
			
		||||
libregex_result regex_match_string(regex_node* root, char* string, regex_result* result);
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user