commonMain.piacenti.dslmaker.dsl.antlr.BailoutErrorStrategy.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dsl-maker-js Show documentation
Show all versions of dsl-maker-js Show documentation
Kotlin multiplatform library to facilitate creation of DSLs with ANTLR or a simple built in parser
package piacenti.dslmaker.dsl.antlr
import org.antlr.v4.kotlinruntime.*
class BailoutErrorStrategy : DefaultErrorStrategy() {
override fun recover(recognizer: Parser, e: RecognitionException) {
throw e
}
override fun recoverInline(recognizer: Parser): Token {
throw RuntimeException(InputMismatchException(recognizer))
}
override fun sync(recognizer: Parser) {
//don't sync
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy