Loading fja_checker/__main__.py +3 −0 Original line number Original line Diff line number Diff line Loading @@ -4,6 +4,7 @@ from lib.parsing.parser import Parser, ParsingError from lib.checker import get_task, dfa_transform, nfa_transform, check_task, check_empty, check_alphabets, exit_correct, exit_incorrect from lib.checker import get_task, dfa_transform, nfa_transform, check_task, check_empty, check_alphabets, exit_correct, exit_incorrect import sys import sys import signal import signal import traceback def print_extra_word_ce(student_word): def print_extra_word_ce(student_word): Loading @@ -20,6 +21,7 @@ def dfa_task(teacher_type, teacher_string, task, student_string): teacher_solution = dfa_transform(teacher_string, teacher_type) teacher_solution = dfa_transform(teacher_string, teacher_type) except ParsingError as ex: except ParsingError as ex: print("Nastala chyba při parsování:", ex) print("Nastala chyba při parsování:", ex) traceback.print_exc(file=sys.stderr) exit_incorrect() exit_incorrect() task_solved = "" task_solved = "" Loading Loading @@ -156,6 +158,7 @@ def main(): except Exception as ex: except Exception as ex: print("Error inside of fja_checker:", ex.args) print("Error inside of fja_checker:", ex.args) traceback.print_exc(file=sys.stderr) exit(1) exit(1) if __name__ == "__main__": if __name__ == "__main__": Loading Loading
fja_checker/__main__.py +3 −0 Original line number Original line Diff line number Diff line Loading @@ -4,6 +4,7 @@ from lib.parsing.parser import Parser, ParsingError from lib.checker import get_task, dfa_transform, nfa_transform, check_task, check_empty, check_alphabets, exit_correct, exit_incorrect from lib.checker import get_task, dfa_transform, nfa_transform, check_task, check_empty, check_alphabets, exit_correct, exit_incorrect import sys import sys import signal import signal import traceback def print_extra_word_ce(student_word): def print_extra_word_ce(student_word): Loading @@ -20,6 +21,7 @@ def dfa_task(teacher_type, teacher_string, task, student_string): teacher_solution = dfa_transform(teacher_string, teacher_type) teacher_solution = dfa_transform(teacher_string, teacher_type) except ParsingError as ex: except ParsingError as ex: print("Nastala chyba při parsování:", ex) print("Nastala chyba při parsování:", ex) traceback.print_exc(file=sys.stderr) exit_incorrect() exit_incorrect() task_solved = "" task_solved = "" Loading Loading @@ -156,6 +158,7 @@ def main(): except Exception as ex: except Exception as ex: print("Error inside of fja_checker:", ex.args) print("Error inside of fja_checker:", ex.args) traceback.print_exc(file=sys.stderr) exit(1) exit(1) if __name__ == "__main__": if __name__ == "__main__": Loading