it.unibo.tuprolog.parser.Antlr4Extensions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of parser-js Show documentation
Show all versions of parser-js Show documentation
Internal, JS-specific implementation of a Prolog syntax parser supporting dynamic operators definition
package it.unibo.tuprolog.parser
fun Token.getNameAccordingTo(lexer: dynamic): String {
return lexer.symbolicNames[this.type] as String
}
fun jsClassName(obj: dynamic): String? =
obj?.__proto__?.constructor?.name as String?
fun isParseCancellationException(obj: dynamic): Boolean =
jsClassName(obj) == "ParseCancellationException"
fun isRecognitionException(obj: dynamic): Boolean =
jsClassName(obj) == "RecognitionException"
© 2015 - 2025 Weber Informatics LLC | Privacy Policy