Skip to content

Commit

Permalink
Merge branch 'remove-regex-prefix' into remove-uneeded-this
Browse files Browse the repository at this point in the history
  • Loading branch information
SharafMohamed committed Jan 8, 2025
2 parents ed631b3 + 9af72f3 commit 6f3ce6c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
1 change: 0 additions & 1 deletion src/log_surgeon/Lalr1Parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ class Lalr1Parser : public Parser<TypedNfaState, TypedDfaState> {
*/
auto report_error() -> std::string;

/* Lexer<TypedNfaState, TypedDfaState> m_lexer; */
std::stack<MatchedSymbol> m_parse_stack_matches;
std::stack<ItemSet*> m_parse_stack_states;
ItemSet* m_root_item_set_ptr{nullptr};
Expand Down
18 changes: 0 additions & 18 deletions src/log_surgeon/Lexer.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,22 +447,13 @@ auto Lexer<TypedNfaState, TypedDfaState>::nfa_to_dfa(finite_automata::Nfa<TypedN
unmarked_sets.pop();
TypedDfaState* dfa_state = dfa_states.at(set);
std::map<uint32_t, StateSet> ascii_transitions_map;
// map<Interval, StateSet> transitions_map;
for (TypedNfaState const* s0 : set) {
for (uint32_t i = 0; i < cSizeOfByte; i++) {
for (TypedNfaState* const s1 : s0->get_byte_transitions(i)) {
StateSet closure = epsilon_closure(s1);
ascii_transitions_map[i].insert(closure.begin(), closure.end());
}
}
// TODO: add this for the utf8 case
/*
for (const typename TypedNfaState::Tree::Data& data : s0->get_tree_transitions().all())
{ for (TypedNfaState* const s1 : data.m_value) { StateSet closure = epsilon_closure(s1);
transitions_map[data.m_interval].insert(closure.begin(), closure.end());
}
}
*/
}
auto next_dfa_state
= [&dfa_states, &create_dfa_state](StateSet const& set) -> TypedDfaState* {
Expand All @@ -479,15 +470,6 @@ auto Lexer<TypedNfaState, TypedDfaState>::nfa_to_dfa(finite_automata::Nfa<TypedN
TypedDfaState* dest_state = next_dfa_state(kv.second);
dfa_state->add_byte_transition(kv.first, dest_state);
}
// TODO: add this for the utf8 case
/*
for (const typename map<Interval, typename TypedNfaState::StateSet>::value_type& kv :
transitions_map)
{
TypedDfaState* dest_state = next_dfa_state(kv.second);
dfa_state->add_tree_transition(kv.first, dest_state);
}
*/
}
return dfa;
}
Expand Down

0 comments on commit 6f3ce6c

Please sign in to comment.