use of priv.bajdcc.LALR1.grammar.runtime.RuntimeObject in project jMiniLang by bajdcc.
the class RuntimeMachine method opMap.
@Override
public void opMap() throws RuntimeException {
int size = current();
next();
RuntimeMap map = new RuntimeMap();
for (int i = 0; i < size; i++) {
map.put(loadString(), load());
}
stack.pushData(new RuntimeObject(map));
}
use of priv.bajdcc.LALR1.grammar.runtime.RuntimeObject in project jMiniLang by bajdcc.
the class RuntimeMachine method opArr.
@Override
public void opArr() throws RuntimeException {
int size = current();
next();
RuntimeArray arr = new RuntimeArray();
for (int i = 0; i < size; i++) {
arr.add(load());
}
stack.pushData(new RuntimeObject(arr));
}
use of priv.bajdcc.LALR1.grammar.runtime.RuntimeObject in project jMiniLang by bajdcc.
the class RuntimeMachine method opReloadFunc.
@Override
public void opReloadFunc() throws RuntimeException {
int idx = loadInt();
RuntimeFuncObject func = new RuntimeFuncObject(stack.reg.pageId, stack.reg.execId);
RuntimeObject obj = new RuntimeObject(func);
obj.setSymbol(currentPage.getData().get(idx));
stack.storeVariableDirect(idx, obj);
}
use of priv.bajdcc.LALR1.grammar.runtime.RuntimeObject in project jMiniLang by bajdcc.
the class RuntimePipeService method stat.
@Override
public RuntimeArray stat() {
RuntimeArray array = new RuntimeArray();
array.add(new RuntimeObject(String.format(" %-5s %-15s %-15s %-15s", "Id", "Name", "Queue", "Waiting")));
mapPipeNames.values().stream().sorted(Comparator.naturalOrder()).collect(Collectors.toList()).forEach((value) -> {
array.add(new RuntimeObject(String.format(" %-5s %-15s %-15d %-15d", String.valueOf(value), arrPipes[value].name, arrPipes[value].queue.size(), arrPipes[value].waiting_pids.size())));
});
return array;
}
use of priv.bajdcc.LALR1.grammar.runtime.RuntimeObject in project jMiniLang by bajdcc.
the class RuntimeShareService method stat.
@Override
public RuntimeArray stat() {
RuntimeArray array = new RuntimeArray();
array.add(new RuntimeObject(String.format(" %-15s %-15s %-5s %-5s", "Name", "Type", "Ref", "Locked")));
mapShares.values().stream().sorted(Comparator.comparing(ShareStruct::getObjType).thenComparing(ShareStruct::getName)).collect(Collectors.toList()).forEach((value) -> {
array.add(new RuntimeObject(String.format(" %-15s %-15s %-5s %-5s", value.name, value.obj.getType().name(), String.valueOf(value.reference), String.valueOf(value.locked))));
});
return array;
}
Aggregations