def state_index ( state )
      raise TypeError, ps.class.to_s + ': Incorrectly types for \'state_index\' method of <Parser>.' unless
	state.instance_of? State
	
      @states.each_with_index do |st,i|
	return i if state == st
      end
      raise "State <#{state.statename}> is not exist in Parser."
    end
def state_index ( state )
      raise TypeError, ps.class.to_s + ': Incorrectly types for \'state_index\' method of <Parser>.' unless
	state.instance_of? State
	
      @states.each_with_index do |st,i|
	return i if state == st
      end
      raise "State <#{state.statename}> is not exist in Parser."
    end
call-seq:
   some_state1.branches << parser.state_index(some_state2).
 Return index