def InitCronFSM():
  fsm = FSM(dict({'time': '',
                  'range': '',
                  'step': '',
                  'cron_times': []}))

  # Case: *
  fsm.AddTransition('*', 'start', action_star, 'star')
  fsm.AddTransition('*', 'next', action_star, 'star')
  fsm.AddEndState('star', action_star_comma)
  fsm.AddTransition(',', 'star', action_star_comma, 'next')
  # Case: */<number>
  fsm.AddTransition('/', 'star', action_noop, 'start_star_step')
  fsm.AddTransition(string.digits, 'start_star_step', action_step,
                    'star_step')
  fsm.AddTransition(string.digits, 'star_step', action_step, 'star_step')
  fsm.AddEndState('star_step', action_star_step_comma)
  fsm.AddTransition(',', 'star_step', action_star_step_comma, 'next')

  # Case: <number>
  fsm.AddTransition(string.digits, 'start', action_time, 'time')
  fsm.AddTransition(string.digits, 'next', action_time, 'time')
  fsm.AddTransition(string.digits, 'time', action_time, 'time')
  fsm.AddEndState('time', action_time_comma)
  fsm.AddTransition(',', 'time', action_time_comma, 'next')
  # Case: <number>-<number>
  fsm.AddTransition('-', 'time', action_dash, 'start_range')
  fsm.AddTransition(string.digits, 'start_range', action_time, 'range')
  fsm.AddTransition(string.digits, 'range', action_time, 'range')
  fsm.AddEndState('range', action_range_comma)
  fsm.AddTransition(',', 'range', action_range_comma, 'next')
  # Case: <number>-<number>/<number>
  fsm.AddTransition('/', 'range', action_noop, 'start_range_step')
  fsm.AddTransition(string.digits, 'start_range_step',
                    action_step, 'range_step')
  fsm.AddTransition(string.digits, 'range_step', action_step, 'range_step')
  fsm.AddEndState('range_step', action_range_step_comma)
  fsm.AddTransition(',', 'range_step', action_range_step_comma, 'next')

  # Case: <text>
  fsm.AddTransition(string.ascii_letters, 'start', action_time, 'text')
  fsm.AddTransition(string.ascii_letters, 'next', action_time, 'text')
  fsm.AddTransition(string.ascii_letters, 'text', action_time, 'text')
  fsm.AddEndState('text', action_text_comma)
  fsm.AddTransition(',', 'text', action_text_comma, 'next')
  # Case: <text>-<text>
  fsm.AddTransition('-', 'text', action_dash, 'start_text_range')
  fsm.AddTransition(string.ascii_letters, 'start_text_range', action_time,
                    'text_range')
  fsm.AddTransition(string.ascii_letters, 'text_range', action_time,
                    'text_range')
  fsm.AddEndState('text_range', action_text_range_comma)
  fsm.AddTransition(',', 'text_range', action_text_range_comma, 'next')
  # Case: <text>-<text>/<text>
  fsm.AddTransition('/', 'text_range', action_noop, 'start_text_range_step')
  fsm.AddTransition(string.digits, 'start_text_range_step', action_step,
                    'text_range_step')
  fsm.AddTransition(string.digits, 'text_range_step', action_step,
                    'text_range_step')
  fsm.AddEndState('text_range_step', action_text_range_step_comma)
  fsm.AddTransition(',', 'text_range_step', action_text_range_step_comma,
                    'next')

  return fsm
Using the same routines that Oracle does we can convert our
dataset/ETHPy150Open lyda/chkcrontab/chkcrontab_lib.py/InitCronFSM--crossover with--dataset/ETHPy150Open dcramer/django-compositepks/django/contrib/gis/db/models/sql/query.py/GeoQuery.convert_values