final InputChannel channel = ((InputPort) (inputPortMap
.get(inputPattern.getPortname()))).getChannel(0); // FIXME
local.bind(vars[j], new SingleTokenReaderThunk(channel, j));
}
} else {
SimpleThunk repExprThunk = new SimpleThunk(repExpr, context,
local);
local.bind(new EnvironmentKey(inputPattern.getPortname()),
repExprThunk);
for (int j = 0; j < vars.length; j++) {
final InputChannel channel = ((InputPort) (inputPortMap
.get(inputPattern.getPortname()))).getChannel(0); // FIXME
local.bind(vars[j], new MultipleTokenReaderThunk(channel,
j, vars.length, repExprThunk, context));
}
}
}
final Decl[] decls = action.getDecls();
for (int i = 0; i < decls.length; i++) {
final Expression v = decls[i].getInitialValue();
if (v == null) {
local.bind(decls[i].getName(), null);
} else {
local.bind(decls[i].getName(), new SimpleThunk(v, context,
local));
}
}
env = local;