Systems and methods for extending or modifying the behavior of mobile
(downloadable) software, such as JavaScript, HTML, and/or data that can
be downloaded to a client device. One or more morphing agents are
provided for translating and modifying code and data from a software
source, such as a remote server. Each morphing agent translates and
modifies one or more particular types of code. For example, one morphing
agent may be provided for processing JavaScript code and another may be
provided for processing HTML code and data. Each morphing agent typically
includes a tokenizer module, a parser module and a translation module,
each of which follows specific rule sets. Original software content is
first tokenized according to a set of tokenizer rules, and subsequently
parsed according to a set of parser rules. The parsed code is then
translated according to the set of translator rules to produce the
desired modified software content. An exception handler module is also
provided for implementing exception rules when an exception occurs.