bootstrap/peg_cbyte.rb
# TODO: the cnt stack var is only needed for op +
the cnt stack var is only needed for op +
the cnt stack var is only needed for op +
def append_instructions(inst)
                    case @op
                    when '+'
                        add_inst(inst, @parse_state, :RPBEG, 0)
                        super
                        add_inst(inst, @success_state, :RPMAT, @data[0].parse_state - 1)
                        add_inst(inst, @failure_state, :RPDONE, @parent.fail_state(self) - 1)
                    when '*'
                        add_inst(inst, @parse_state, :RSBEG, 0)
                        super
                        add_inst(inst, @success_state, :RSMAT, @data[0].parse_state - 1)
                        add_inst(inst, @failure_state, :RSDONE, 0)
                    when '?'
                        add_inst(inst, @parse_state, :RQBEG, 0)
                        super
                        add_inst(inst, @success_state, :RQMAT, 0)
                        add_inst(inst, @failure_state, :RQDONE, 0)
                    end
                end
def append_instructions ( inst ) case @op when '+' add_inst ( inst , @parse_state , :RPBEG , 0 ) super add_inst ( inst , @success_state , :RPMAT , @data [ 0 ] . parse_state - 1 ) add_inst ( inst , @failure_state , :RPDONE , @parent . fail_state ( self ) - 1 ) when '*' add_inst ( inst , @parse_state , :RSBEG , 0 ) super add_inst ( inst , @success_state , :RSMAT , @data [ 0 ] . parse_state - 1 ) add_inst ( inst , @failure_state , :RSDONE , 0 ) when '?' add_inst ( inst , @parse_state , :RQBEG , 0 ) super add_inst ( inst , @success_state , :RQMAT , 0 ) add_inst ( inst , @failure_state , :RQDONE , 0 ) end end
TODO: the cnt stack var is only needed for op +
TODO : the cnt stack var is only needed for op +
inst
<not_specific>