Integrated photonics, because of its intrinsic high speed, large bandwidth and unlimited parallelism, is critical in the drive to ease the increasing data traffic. Its technological enabler is high-precision lithography, which allows for the fabrication of high-resolution photonic structures. Here, in complete contrast to the state of the art, where photonic functions are predefined by lithographically modulating the real index, we report a lithography-free paradigm for an integrated photonic processor, targeting dynamic control of spatial-temporal modulations of the imaginary index on an active semiconductor platform, without the need for lithography. We demonstrate an imaginary-index-driven methodology to tailor optical-gain distributions to rationally execute prescribed optical responses and configure desired photonic functionality to route and switch optical signals. Leveraging its real-time reconfigurability, we realize photonic neural networks with extraordinary flexibility, performing in situ training of vowel recognition with high accuracy. The programmability and multifunctionality intrinsically arising from the lithography-free characteristics can lead to a new paradigm for integrated photonic signal processing to conduct and reconfigure complex computation algorithms, accelerating the information-processing speed to achieve long-term performance requirements.