All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.unibo.tuprolog.parser.Antlr4Extensions.kt Maven / Gradle / Ivy

Go to download

Internal, JS-specific implementation of a Prolog syntax parser supporting dynamic operators definition

There is a newer version: 1.0.4
Show newest version
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