#ifndef LIBREGEXIS024_SRC_LIBREGEXIS024TOOLS_STRINGMATCHING_H #define LIBREGEXIS024_SRC_LIBREGEXIS024TOOLS_STRINGMATCHING_H #include #include #include #include namespace regexis024 { struct TrackingVariableInfo { bool stored_in_ca = true; bool stored_in_sa = false; tracking_var_type_t type; /* These fields will be -1 if unused */ int colarr_first = -1; int colarr_second = -1; int selarr_first = -1; int selarr_second = -1; }; typedef std::map track_var_list; struct MatchInfo { bool have_match = false; std::vector ca_history; std::vector sa; bool operator==(const MatchInfo& other) const ; bool operator!=(const MatchInfo& other) const ; MatchInfo() = default; MatchInfo(const std::vector &ca_history, const std::vector &sa); }; int matchStrToRegexp(const std::string& input, const std::string& pattern, MatchInfo& retMatchInfo, track_var_list& retTrackVarList, std::string& retStatus); } #endif