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

commonMain.piacenti.dslmaker.dsl.antlr.BailoutErrorStrategy.kt Maven / Gradle / Ivy

Go to download

Kotlin multiplatform library to facilitate creation of DSLs with ANTLR or a simple built in parser

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