This repository has been archived on 2025-09-23. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
2025LogProg-project-GhentPr.../src/Main.kt
2025-05-02 23:50:29 +02:00

29 lines
710 B
Kotlin

import com.xenomachina.argparser.ArgParser
import interpreter.FileLoader
import io.GhentPrologArgParser
import io.Logger
import repl.Repl
fun main(args: Array<String>) {
// Parse command line arguments
val parsedArgs = ArgParser(args).parseInto(::GhentPrologArgParser)
parsedArgs.run {
val loader = FileLoader()
// Set the verbosity level
Logger.level = verbosity
// Check if script was provided
for (file in script) {
loader.load(file)
}
// Check if REPL was requested
if (repl) {
Repl()
} else {
Logger.warn("REPL not started. Use -r or --repl to start the REPL.")
}
}
}