From 992a2ec8a4ed054cc5cf31a2e25fe19a26c601ec Mon Sep 17 00:00:00 2001 From: SharafMohamed Date: Sun, 8 Dec 2024 07:58:51 -0500 Subject: [PATCH] Update intersect-test.cpp with new names. --- examples/intersect-test.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/intersect-test.cpp b/examples/intersect-test.cpp index abf0b46..f218bd3 100644 --- a/examples/intersect-test.cpp +++ b/examples/intersect-test.cpp @@ -6,9 +6,9 @@ #include using log_surgeon::finite_automata::Dfa; -using log_surgeon::finite_automata::DfaByteState; +using log_surgeon::finite_automata::ByteDfaState; using log_surgeon::finite_automata::Nfa; -using log_surgeon::finite_automata::NfaByteState; +using log_surgeon::finite_automata::ByteNfaState; using log_surgeon::lexers::ByteLexer; using log_surgeon::LexicalRule; using log_surgeon::ParserAST; @@ -17,11 +17,11 @@ using std::string; using std::unique_ptr; using std::vector; -using ByteLexicalRule = log_surgeon::LexicalRule; +using ByteLexicalRule = log_surgeon::LexicalRule; auto get_intersect_for_query( std::map& m_id_symbol, - std::unique_ptr>& dfa1, + std::unique_ptr>& dfa1, std::string const& search_string ) -> void { std::string processed_search_string; @@ -40,7 +40,7 @@ auto get_intersect_for_query( auto* schema_var_ast = dynamic_cast(parser_ast.get()); rules.emplace_back(0, std::move(schema_var_ast->m_regex_ptr)); } - Nfa nfa(std::move(rules)); + Nfa nfa(std::move(rules)); auto dfa2 = ByteLexer::nfa_to_dfa(nfa); auto schema_types = dfa1->get_intersect(dfa2.get()); std::cout << search_string << ":"; @@ -78,7 +78,7 @@ auto main() -> int { rules.emplace_back(m_id_symbol.size(), std::move(var_ast->m_regex_ptr)); m_id_symbol[m_id_symbol.size()] = var_ast->m_name; } - Nfa nfa(std::move(rules)); + Nfa nfa(std::move(rules)); auto dfa = ByteLexer::nfa_to_dfa(nfa); get_intersect_for_query(m_id_symbol, dfa, "*1*"); get_intersect_for_query(m_id_symbol, dfa, "*a*");