1. An engine for generating lookups and making decisions (LDE) for packet modifying and forwarding in a software-defined network (SDN) system, the LDE comprising: a Key Generator configured to generate a lookup key for each input token; an Output Generator configured to generate an output token by modifying the input token based on content of a lookup result associated with the lookup key; and a Template Table for identifying positions of fields in each of the input tokens.