function AnsiParser(terminal) {
            this.initial_state = 0;  // 'GROUND' is default
            this.current_state = this.initial_state|0;

            // clone global transition table
            this.transitions = new Uint8Array(4095);
            this.transitions.set(TRANSITION_TABLE);

            // global non pushable buffers for multiple parse invocations
            this.osc = '';
            this.params = [0];
            this.collected = '';

            // back reference to terminal
            this.term = terminal || {};
            var instructions = ['inst_p', 'inst_o', 'inst_x', 'inst_c',
                                'inst_e', 'inst_H', 'inst_P', 'inst_U', 'inst_E'];
            for (var i=0; i<instructions.length; ++i)
                if (!(instructions[i] in this.term))
                    this.term[instructions[i]] = function() {};
        }
AnsiParser - Parser for ANSI terminal escape sequences.

@param {Object=} terminal emulation object
@constructor