I am looking for a scripting language that can be included in an embedded system to allow the user to pre-configure the unit behaviour based on the system events (I/O port changes, time events...). The sort of control required is
if (some_event)
{ 
    do some stuff
    delay N seconds
    do more stuff
    if (some condition)
    {
        do something
    }
    else
    {
        delay until condition
        do something else
    }
}
Each of the "do stuff" parts of the would typically be to change the state of the IO or to allow/disallow the processing of one or more events.
There is no requirement for text processing or file handling unless it is required internally by the scripting language implementation.
The processor that I am using has some 8K of RAM and 20K of program store available after the normal operating code has been built. The firmware is written in C, so any source for the scripting language must also be in C.