try
{
// Invoke the sys:generate-event macro that generates the ECA code and compile the result
Pair code = (Pair)machine.invoke((Function)machine.getGlobalEnvironment().getVariable(Symbol.SYS_GENERATE_EVENT), args);
TextPosition pos = new TextPosition(0, 0);
posMap.put(code, pos);
urlMap.put(pos, sEventURL);
for (Pair pair = code; pair != null; pair = pair.getNext())
{
if (pair.getHead() instanceof Pair && !posMap.contains(pair.getHead()))
{
pos = new TextPosition(0, 0);
posMap.put(pair.getHead(), pos);
urlMap.put(pos, sEventURL);
}
}