Skip to content

Commit

Permalink
(#218) Glushkov template fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xendalm committed Jun 25, 2024
1 parent cdcaf86 commit 3825e36
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
4 changes: 4 additions & 0 deletions libs/Objects/src/BackRefRegex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,10 @@ MemoryFiniteAutomaton BackRefRegex::to_mfa_additional(iLogTemplate* log) const {
MemoryFiniteAutomaton mfa(0, states, language);
if (log) {
log->set_parameter("brefregex", *this);
log->set_parameter("linearised bregex", temp_copy);
log->set_parameter("first", str_first);
log->set_parameter("last", str_last);
log->set_parameter("follow", str_follow);
log->set_parameter("result", mfa);
}
return mfa;
Expand Down
2 changes: 1 addition & 1 deletion libs/Objects/src/Regex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ FiniteAutomaton Regex::to_glushkov(iLogTemplate* log) const {
log->set_parameter("linearised regex", temp_copy);
log->set_parameter("first", str_first);
log->set_parameter("last", str_last);
log->set_parameter("get_follow", str_follow);
log->set_parameter("follow", str_follow);
log->set_parameter("result", fa);
}
return fa;
Expand Down
2 changes: 1 addition & 1 deletion resources/template/Glushkov.tex
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ \section{Автомат Глушкова}

Множество $\Follow$:

%template_pairs
%template_follow

\end{frame}

Expand Down
15 changes: 15 additions & 0 deletions resources/template/MFAexpt.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,22 @@ \section{MFAexpt}
Регулярное выражение:
%template_brefregex

Линеаризованное регулярное выражение:
%template_linearised bregex

Результат:
%template_result

Множество $\First$:

%template_first

Множество $\Last$:

%template_last

Множество $\Follow$:

%template_follow

\end{frame}

0 comments on commit 3825e36

Please sign in to comment.