parsing works with polish notation, need function to turn infix to polish

This commit is contained in:
minjaesong
2020-06-10 07:08:18 +09:00
parent 1f88a878be
commit f357e15a88
4 changed files with 196 additions and 320 deletions

View File

@@ -54,8 +54,8 @@ class VMGUI(val appConfig: LwjglApplicationConfiguration) : ApplicationAdapter()
//val fr = FileReader("./assets/tvdos/command.js")
//val fr = FileReader("./assets/jscon.js")
//val fr1 = FileReader("./assets/bios1.js")
val fr1 = FileReader("./assets/phototest.js")
val fr1 = FileReader("./assets/bios1.js")
//val fr1 = FileReader("./assets/phototest.js")
val bios = fr1.readText()
fr1.close()

View File

@@ -14,11 +14,11 @@ class VMJSR223Delegate(val vm: VM) {
fun free(ptr: Int) = vm.free(ptr)
fun print(s: String) {
//print("[Nashorn] $s")
//System.out.print("[Nashorn] $s")
vm.getPrintStream().write(s.toByteArray())
}
fun println(s: String) {
//println("[Nashorn] $s")
//System.out.println("[Nashorn] $s")
vm.getPrintStream().write((s + '\n').toByteArray())
}
fun println() = print('\n')