(self, session)
Initialise statement callbacks.
Initialise statement callbacks.
Initialise statement callbacks .
def init_statements(self, session):
        """Initialise statement callbacks."""
        self._callbacks = {
            tk.DATA: list,
            tk.COMMON: list,
            tk.REM: list,
            tk.ELSE: list,
            tk.CONT: session.interpreter.cont_,
            tk.TRON: session.interpreter.tron_,
            tk.TROFF: session.interpreter.troff_,
            tk.WHILE: session.interpreter.while_,
            tk.RESET: session.files.reset_,
            tk.END: session.end_,
            tk.STOP: session.interpreter.stop_,
            tk.NEW: session.new_,
            tk.WEND: session.interpreter.wend_,
            tk.SYSTEM: session.system_,
            tk.FOR: session.interpreter.for_,
            tk.NEXT: session.interpreter.next_,
            tk.INPUT: session.input_,
            tk.DIM: session.memory.arrays.dim_,
            tk.READ: session.interpreter.read_,
            tk.LET: session.memory.let_,
            tk.GOTO: session.interpreter.goto_,
            tk.RUN: session.run_,
            tk.IF: session.interpreter.if_,
            tk.RESTORE: session.interpreter.restore_,
            tk.GOSUB: session.interpreter.gosub_,
            tk.RETURN: session.interpreter.return_,
            tk.PRINT: session.files.print_,
            tk.CLEAR: session.clear_,
            tk.LIST: session.list_,
            tk.WAIT: session.machine.wait_,
            tk.POKE: session.all_memory.poke_,
            tk.OUT: session.machine.out_,
            tk.LPRINT: session.files.lprint_,
            tk.LLIST: session.interpreter.llist_,
            tk.WIDTH: session.files.width_,
            tk.SWAP: session.memory.swap_,
            tk.ERASE: session.memory.arrays.erase_,
            tk.EDIT: session.edit_,
            tk.ERROR: session.interpreter.error_,
            tk.RESUME: session.interpreter.resume_,
            tk.DELETE: session.delete_,
            tk.AUTO: session.auto_,
            tk.RENUM: session.interpreter.renum_,
            tk.DEFSTR: session.memory.defstr_,
            tk.DEFINT: session.memory.defint_,
            tk.DEFSNG: session.memory.defsng_,
            tk.DEFDBL: session.memory.defdbl_,
            tk.CALL: session.all_memory.call_,
            tk.CALLS: session.all_memory.call_,
            tk.WRITE: session.files.write_,
            tk.OPTION: session.memory.arrays.option_base_,
            tk.RANDOMIZE: session.randomize_,
            tk.OPEN: session.files.open_,
            tk.CLOSE: session.files.close_,
            tk.LOAD: session.load_,
            tk.MERGE: session.merge_,
            tk.SAVE: session.save_,
            tk.COLOR: session.display.color_,
            tk.CLS: session.display.cls_,
            tk.MOTOR: session.files.motor_,
            tk.BSAVE: session.all_memory.bsave_,
            tk.BLOAD: session.all_memory.bload_,
            tk.SOUND: session.sound.sound_,
            tk.BEEP: session.sound.beep_,
            tk.PSET: session.graphics.pset_,
            tk.PRESET: session.graphics.preset_,
            tk.SCREEN: session.display.screen_,
            tk.LOCATE: session.text_screen.locate_,
            tk.FILES: session.files.files_,
            tk.FIELD: session.files.field_,
            tk.NAME: session.files.name_,
            tk.LSET: session.memory.lset_,
            tk.RSET: session.memory.rset_,
            tk.KILL: session.files.kill_,
            tk.CHAIN: session.chain_,
            tk.DATE: session.clock.date_,
            tk.TIME: session.clock.time_,
            tk.PAINT: session.graphics.paint_,
            tk.COM: session.basic_events.com_,
            tk.CIRCLE: session.graphics.circle_,
            tk.DRAW: session.graphics.draw_,
            tk.TIMER: session.basic_events.timer_,
            tk.IOCTL: session.files.ioctl_statement_,
            tk.CHDIR: session.files.chdir_,
            tk.MKDIR: session.files.mkdir_,
            tk.RMDIR: session.files.rmdir_,
            tk.SHELL: session.shell_,
            tk.ENVIRON: session.environment.environ_statement_,
            tk.WINDOW: session.graphics.window_,
            tk.LCOPY: session.files.lcopy_,
            tk.PCOPY: session.display.pcopy_,
            tk.LOCK: session.files.lock_,
            tk.UNLOCK: session.files.unlock_,
            tk.MID: session.memory.mid_,
            tk.PEN: session.basic_events.pen_,
            tk.TERM: session.term_,
            tk.NOISE: session.sound.noise_,
            tk.ON + tk.ERROR: session.interpreter.on_error_goto_,
            tk.ON + tk.KEY: session.basic_events.on_event_gosub_,
            tk.ON + tk.PEN: session.basic_events.on_event_gosub_,
            tk.ON + tk.TIMER: session.basic_events.on_event_gosub_,
            tk.ON + tk.PLAY: session.basic_events.on_event_gosub_,
            tk.ON + tk.COM: session.basic_events.on_event_gosub_,
            tk.ON + tk.STRIG: session.basic_events.on_event_gosub_,
            tk.ON: session.interpreter.on_jump_,
            tk.DEF + tk.FN: session.interpreter.def_fn_,
            tk.DEF + tk.USR: session.all_memory.def_usr_,
            tk.DEF: session.all_memory.def_seg_,
            tk.LINE + tk.INPUT: session.line_input_,
            tk.LINE: session.graphics.line_,
            tk.KEY + tk.ON: session.console.key_,
            tk.KEY + tk.OFF: session.console.key_,
            tk.KEY + tk.LIST: session.console.key_,
            tk.KEY + b'(': session.basic_events.key_,
            tk.KEY: session.key_,
            tk.PUT + b'(': session.graphics.put_,
            tk.PUT: session.files.put_,
            tk.GET + b'(': session.graphics.get_,
            tk.GET: session.files.get_,
            tk.PLAY + tk.ON: session.basic_events.play_,
            tk.PLAY + tk.OFF: session.basic_events.play_,
            tk.PLAY + tk.STOP: session.basic_events.play_,
            tk.PLAY: session.sound.play_,
            tk.VIEW + tk.PRINT: session.text_screen.view_print_,
            tk.VIEW: session.graphics.view_,
            tk.PALETTE + tk.USING: session.display.palette_using_,
            tk.PALETTE: session.display.palette_,
            tk.STRIG + tk.ON: session.stick.strig_statement_,
            tk.STRIG + tk.OFF: session.stick.strig_statement_,
            tk.STRIG: session.basic_events.strig_,
            b'_': session.extensions.call_as_statement,
        }
def init_statements ( self , session ) : self . _callbacks = { tk . DATA : list , tk . COMMON : list , tk . REM : list , tk . ELSE : list , tk . CONT : session . interpreter . cont_ , tk . TRON : session . interpreter . tron_ , tk . TROFF : session . interpreter . troff_ , tk . WHILE : session . interpreter . while_ , tk . RESET : session . files . reset_ , tk . END : session . end_ , tk . STOP : session . interpreter . stop_ , tk . NEW : session . new_ , tk . WEND : session . interpreter . wend_ , tk . SYSTEM : session . system_ , tk . FOR : session . interpreter . for_ , tk . NEXT : session . interpreter . next_ , tk . INPUT : session . input_ , tk . DIM : session . memory . arrays . dim_ , tk . READ : session . interpreter . read_ , tk . LET : session . memory . let_ , tk . GOTO : session . interpreter . goto_ , tk . RUN : session . run_ , tk . IF : session . interpreter . if_ , tk . RESTORE : session . interpreter . restore_ , tk . GOSUB : session . interpreter . gosub_ , tk . RETURN : session . interpreter . return_ , tk . PRINT : session . files . print_ , tk . CLEAR : session . clear_ , tk . LIST : session . list_ , tk . WAIT : session . machine . wait_ , tk . POKE : session . all_memory . poke_ , tk . OUT : session . machine . out_ , tk . LPRINT : session . files . lprint_ , tk . LLIST : session . interpreter . llist_ , tk . WIDTH : session . files . width_ , tk . SWAP : session . memory . swap_ , tk . ERASE : session . memory . arrays . erase_ , tk . EDIT : session . edit_ , tk . ERROR : session . interpreter . error_ , tk . RESUME : session . interpreter . resume_ , tk . DELETE : session . delete_ , tk . AUTO : session . auto_ , tk . RENUM : session . interpreter . renum_ , tk . DEFSTR : session . memory . defstr_ , tk . DEFINT : session . memory . defint_ , tk . DEFSNG : session . memory . defsng_ , tk . DEFDBL : session . memory . defdbl_ , tk . CALL : session . all_memory . call_ , tk . CALLS : session . all_memory . call_ , tk . WRITE : session . files . write_ , tk . OPTION : session . memory . arrays . option_base_ , tk . RANDOMIZE : session . randomize_ , tk . OPEN : session . files . open_ , tk . CLOSE : session . files . close_ , tk . LOAD : session . load_ , tk . MERGE : session . merge_ , tk . SAVE : session . save_ , tk . COLOR : session . display . color_ , tk . CLS : session . display . cls_ , tk . MOTOR : session . files . motor_ , tk . BSAVE : session . all_memory . bsave_ , tk . BLOAD : session . all_memory . bload_ , tk . SOUND : session . sound . sound_ , tk . BEEP : session . sound . beep_ , tk . PSET : session . graphics . pset_ , tk . PRESET : session . graphics . preset_ , tk . SCREEN : session . display . screen_ , tk . LOCATE : session . text_screen . locate_ , tk . FILES : session . files . files_ , tk . FIELD : session . files . field_ , tk . NAME : session . files . name_ , tk . LSET : session . memory . lset_ , tk . RSET : session . memory . rset_ , tk . KILL : session . files . kill_ , tk . CHAIN : session . chain_ , tk . DATE : session . clock . date_ , tk . TIME : session . clock . time_ , tk . PAINT : session . graphics . paint_ , tk . COM : session . basic_events . com_ , tk . CIRCLE : session . graphics . circle_ , tk . DRAW : session . graphics . draw_ , tk . TIMER : session . basic_events . timer_ , tk . IOCTL : session . files . ioctl_statement_ , tk . CHDIR : session . files . chdir_ , tk . MKDIR : session . files . mkdir_ , tk . RMDIR : session . files . rmdir_ , tk . SHELL : session . shell_ , tk . ENVIRON : session . environment . environ_statement_ , tk . WINDOW : session . graphics . window_ , tk . LCOPY : session . files . lcopy_ , tk . PCOPY : session . display . pcopy_ , tk . LOCK : session . files . lock_ , tk . UNLOCK : session . files . unlock_ , tk . MID : session . memory . mid_ , tk . PEN : session . basic_events . pen_ , tk . TERM : session . term_ , tk . NOISE : session . sound . noise_ , tk . ON + tk . ERROR : session . interpreter . on_error_goto_ , tk . ON + tk . KEY : session . basic_events . on_event_gosub_ , tk . ON + tk . PEN : session . basic_events . on_event_gosub_ , tk . ON + tk . TIMER : session . basic_events . on_event_gosub_ , tk . ON + tk . PLAY : session . basic_events . on_event_gosub_ , tk . ON + tk . COM : session . basic_events . on_event_gosub_ , tk . ON + tk . STRIG : session . basic_events . on_event_gosub_ , tk . ON : session . interpreter . on_jump_ , tk . DEF + tk . FN : session . interpreter . def_fn_ , tk . DEF + tk . USR : session . all_memory . def_usr_ , tk . DEF : session . all_memory . def_seg_ , tk . LINE + tk . INPUT : session . line_input_ , tk . LINE : session . graphics . line_ , tk . KEY + tk . ON : session . console . key_ , tk . KEY + tk . OFF : session . console . key_ , tk . KEY + tk . LIST : session . console . key_ , tk . KEY + b'(' : session . basic_events . key_ , tk . KEY : session . key_ , tk . PUT + b'(' : session . graphics . put_ , tk . PUT : session . files . put_ , tk . GET + b'(' : session . graphics . get_ , tk . GET : session . files . get_ , tk . PLAY + tk . ON : session . basic_events . play_ , tk . PLAY + tk . OFF : session . basic_events . play_ , tk . PLAY + tk . STOP : session . basic_events . play_ , tk . PLAY : session . sound . play_ , tk . VIEW + tk . PRINT : session . text_screen . view_print_ , tk . VIEW : session . graphics . view_ , tk . PALETTE + tk . USING : session . display . palette_using_ , tk . PALETTE : session . display . palette_ , tk . STRIG + tk . ON : session . stick . strig_statement_ , tk . STRIG + tk . OFF : session . stick . strig_statement_ , tk . STRIG : session . basic_events . strig_ , b'_' : session . extensions . call_as_statement , }