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

commonMain.org.luaj.vm2.parser.LuaParserTokenManager.kt Maven / Gradle / Ivy

There is a newer version: 4.0.0-alpha-2
Show newest version
/* Generated By:JavaCC: Do not edit this line. LuaParserTokenManager.java */
package org.luaj.vm2.parser

import org.luaj.vm2.internal.*
import org.luaj.vm2.io.*

/** Token Manager.  */
class LuaParserTokenManager
/** Constructor.  */
    (protected var input_stream: SimpleCharStream) : LuaParserConstants {

    /** Debug output.  */
    @kotlin.jvm.JvmField
    var debugStream: LuaWriter = JSystem.out
    private val jjrounds = IntArray(66)
    private val jjstateSet = IntArray(132)
    private val jjimage = StringBuilder()
    private var image: StringBuilder? = jjimage
    private var jjimageLen: Int = 0
    private val lengthOfMatch: Int = 0
    protected var curChar: Char = ' '

    internal var curLexState = 0
    internal var defaultLexState = 0
    internal var jjnewStateCnt: Int = 0
    internal var jjround: Int = 0
    internal var jjmatchedPos: Int = 0
    internal var jjmatchedKind: Int = 0

    /** Get the next Token.  */
    val nextToken: Token
        get() {
            var specialToken: Token? = null
            var matchedToken: Token
            var curPos = 0

            EOFLoop@ while (true) {
                try {
                    curChar = input_stream.BeginToken()
                } catch (e: IOException) {
                    jjmatchedKind = 0
                    matchedToken = jjFillToken()
                    matchedToken.specialToken = specialToken
                    return matchedToken
                }

                image = jjimage
                image!!.clear()
                jjimageLen = 0

                while (true) {
                    when (curLexState) {
                        0 -> {
                            try {
                                input_stream.backup(0)
                                while (curChar.toInt() <= 32 && 0x100003600L and (1L shl curChar.toInt()) != 0L)
                                    curChar = input_stream.BeginToken()
                            } catch (e1: IOException) {
                                continue@EOFLoop
                            }

                            jjmatchedKind = 0x7fffffff
                            jjmatchedPos = 0
                            curPos = jjMoveStringLiteralDfa0_0()
                        }
                        1 -> {
                            jjmatchedKind = 17
                            jjmatchedPos = -1
                            curPos = 0
                            curPos = jjMoveStringLiteralDfa0_1()
                        }
                        2 -> {
                            jjmatchedKind = 0x7fffffff
                            jjmatchedPos = 0
                            curPos = jjMoveStringLiteralDfa0_2()
                            if (jjmatchedPos == 0 && jjmatchedKind > 28) {
                                jjmatchedKind = 28
                            }
                        }
                        3 -> {
                            jjmatchedKind = 0x7fffffff
                            jjmatchedPos = 0
                            curPos = jjMoveStringLiteralDfa0_3()
                            if (jjmatchedPos == 0 && jjmatchedKind > 28) {
                                jjmatchedKind = 28
                            }
                        }
                        4 -> {
                            jjmatchedKind = 0x7fffffff
                            jjmatchedPos = 0
                            curPos = jjMoveStringLiteralDfa0_4()
                            if (jjmatchedPos == 0 && jjmatchedKind > 28) {
                                jjmatchedKind = 28
                            }
                        }
                        5 -> {
                            jjmatchedKind = 0x7fffffff
                            jjmatchedPos = 0
                            curPos = jjMoveStringLiteralDfa0_5()
                            if (jjmatchedPos == 0 && jjmatchedKind > 28) {
                                jjmatchedKind = 28
                            }
                        }
                        6 -> {
                            jjmatchedKind = 0x7fffffff
                            jjmatchedPos = 0
                            curPos = jjMoveStringLiteralDfa0_6()
                            if (jjmatchedPos == 0 && jjmatchedKind > 28) {
                                jjmatchedKind = 28
                            }
                        }
                        7 -> {
                            jjmatchedKind = 0x7fffffff
                            jjmatchedPos = 0
                            curPos = jjMoveStringLiteralDfa0_7()
                            if (jjmatchedPos == 0 && jjmatchedKind > 28) {
                                jjmatchedKind = 28
                            }
                        }
                        8 -> {
                            jjmatchedKind = 0x7fffffff
                            jjmatchedPos = 0
                            curPos = jjMoveStringLiteralDfa0_8()
                            if (jjmatchedPos == 0 && jjmatchedKind > 28) {
                                jjmatchedKind = 28
                            }
                        }
                        9 -> {
                            jjmatchedKind = 0x7fffffff
                            jjmatchedPos = 0
                            curPos = jjMoveStringLiteralDfa0_9()
                            if (jjmatchedPos == 0 && jjmatchedKind > 28) {
                                jjmatchedKind = 28
                            }
                        }
                        10 -> {
                            jjmatchedKind = 0x7fffffff
                            jjmatchedPos = 0
                            curPos = jjMoveStringLiteralDfa0_10()
                            if (jjmatchedPos == 0 && jjmatchedKind > 28) {
                                jjmatchedKind = 28
                            }
                        }
                        11 -> {
                            jjmatchedKind = 0x7fffffff
                            jjmatchedPos = 0
                            curPos = jjMoveStringLiteralDfa0_11()
                            if (jjmatchedPos == 0 && jjmatchedKind > 28) {
                                jjmatchedKind = 28
                            }
                        }
                    }
                    if (jjmatchedKind != 0x7fffffff) {
                        if (jjmatchedPos + 1 < curPos)
                            input_stream.backup(curPos - jjmatchedPos - 1)
                        if (jjtoToken[jjmatchedKind shr 6] and (1L shl (jjmatchedKind and 63)) != 0L) {
                            matchedToken = jjFillToken()
                            matchedToken.specialToken = specialToken
                            if (jjnewLexState[jjmatchedKind] != -1)
                                curLexState = jjnewLexState[jjmatchedKind]
                            return matchedToken
                        } else if (jjtoSkip[jjmatchedKind shr 6] and (1L shl (jjmatchedKind and 63)) != 0L) {
                            if (jjtoSpecial[jjmatchedKind shr 6] and (1L shl (jjmatchedKind and 63)) != 0L) {
                                matchedToken = jjFillToken()
                                if (specialToken == null)
                                    specialToken = matchedToken
                                else {
                                    matchedToken.specialToken = specialToken
                                    specialToken = (run { specialToken!!.next = matchedToken; matchedToken })
                                }
                                SkipLexicalActions(matchedToken)
                            } else
                                SkipLexicalActions(null)
                            if (jjnewLexState[jjmatchedKind] != -1)
                                curLexState = jjnewLexState[jjmatchedKind]
                            continue@EOFLoop
                        }
                        jjimageLen += jjmatchedPos + 1
                        if (jjnewLexState[jjmatchedKind] != -1)
                            curLexState = jjnewLexState[jjmatchedKind]
                        curPos = 0
                        jjmatchedKind = 0x7fffffff
                        try {
                            curChar = input_stream.readChar()
                            continue
                        } catch (e1: IOException) {
                        }

                    }
                    var error_line = input_stream.endLine
                    var error_column = input_stream.endColumn
                    var error_after: String? = null
                    var EOFSeen = false
                    try {
                        input_stream.readChar()
                        input_stream.backup(1)
                    } catch (e1: IOException) {
                        EOFSeen = true
                        error_after = if (curPos <= 1) "" else input_stream.GetImage()
                        if (curChar == '\n' || curChar == '\r') {
                            error_line++
                            error_column = 0
                        } else
                            error_column++
                    }

                    if (!EOFSeen) {
                        input_stream.backup(1)
                        error_after = if (curPos <= 1) "" else input_stream.GetImage()
                    }
                    throw TokenMgrError(
                        EOFSeen,
                        curLexState,
                        error_line,
                        error_column,
                        error_after!!,
                        curChar,
                        TokenMgrError.LEXICAL_ERROR
                    )
                }
            }
        }

    /** Set debug output.  */
    fun setDebugStream(ds: LuaWriter) {
        debugStream = ds
    }

    private fun jjStopAtPos(pos: Int, kind: Int): Int {
        jjmatchedKind = kind
        jjmatchedPos = pos
        return pos + 1
    }

    private fun jjMoveStringLiteralDfa0_2(): Int {
        when (curChar.toInt()) {
            93 -> return jjMoveStringLiteralDfa1_2(0x40000L)
            else -> return 1
        }
    }

    private fun jjMoveStringLiteralDfa1_2(active0: Long): Int {
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            return 1
        }

        when (curChar.toInt()) {
            93 -> if (active0 and 0x40000L != 0L)
                return jjStopAtPos(1, 18)
            else -> return 2
        }
        return 2
    }

    private fun jjMoveStringLiteralDfa0_11(): Int {
        return jjMoveNfa_11(6, 0)
    }

    private fun jjMoveNfa_11(startState: Int, curPos: Int): Int {
        var curPos = curPos
        var startsAt = 0
        jjnewStateCnt = 7
        var i = 1
        jjstateSet[0] = startState
        var kind = 0x7fffffff
        while (true) {
            if (++jjround == 0x7fffffff)
                ReInitRounds()
            if (curChar.toInt() < 64) {
                val l = 1L shl curChar.toInt()
                do {
                    when (jjstateSet[--i]) {
                        0, 1 -> if (curChar.toInt() == 61)
                            jjCheckNAddTwoStates(1, 2)
                        3 -> if (curChar.toInt() == 61)
                            jjstateSet[jjnewStateCnt++] = 0
                        4 -> if (curChar.toInt() == 61)
                            jjstateSet[jjnewStateCnt++] = 3
                        5 -> if (curChar.toInt() == 61)
                            jjstateSet[jjnewStateCnt++] = 4
                        else -> {
                        }
                    }
                } while (i != startsAt)
            } else if (curChar.toInt() < 128) {
                val l = 1L shl (curChar.toInt() and 63)
                do {
                    when (jjstateSet[--i]) {
                        2 -> if (curChar.toInt() == 93 && kind > 27)
                            kind = 27
                        6 -> if (curChar.toInt() == 93)
                            jjstateSet[jjnewStateCnt++] = 5
                        else -> {
                        }
                    }
                } while (i != startsAt)
            } else {
                val hiByte = curChar.toInt() shr 8
                val i1 = hiByte shr 6
                val l1 = 1L shl (hiByte and 63)
                val i2 = curChar.toInt() and 0xff shr 6
                val l2 = 1L shl (curChar.toInt() and 63)
                do {
                    when (jjstateSet[--i]) {
                        else -> {
                        }
                    }
                } while (i != startsAt)
            }
            if (kind != 0x7fffffff) {
                jjmatchedKind = kind
                jjmatchedPos = curPos
                kind = 0x7fffffff
            }
            ++curPos
            if ((run { i = jjnewStateCnt; i }) == (run { startsAt = 7 - (run { jjnewStateCnt = startsAt; startsAt }); startsAt }))
                return curPos
            try {
                curChar = input_stream.readChar()
            } catch (e: IOException) {
                return curPos
            }

        }
    }

    private fun jjMoveStringLiteralDfa0_10(): Int {
        when (curChar.toInt()) {
            93 -> return jjMoveStringLiteralDfa1_10(0x4000000L)
            else -> return 1
        }
    }

    private fun jjMoveStringLiteralDfa1_10(active0: Long): Int {
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            return 1
        }

        when (curChar.toInt()) {
            61 -> return jjMoveStringLiteralDfa2_10(active0, 0x4000000L)
            else -> return 2
        }
    }

    private fun jjMoveStringLiteralDfa2_10(old0: Long, active0: Long): Int {
        var active0 = active0
        active0 = active0 and old0
        if ((active0) == 0L)
            return 2
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            return 2
        }

        when (curChar.toInt()) {
            61 -> return jjMoveStringLiteralDfa3_10(active0, 0x4000000L)
            else -> return 3
        }
    }

    private fun jjMoveStringLiteralDfa3_10(old0: Long, active0: Long): Int {
        var active0 = active0
        active0 = active0 and old0
        if ((active0) == 0L)
            return 3
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            return 3
        }

        when (curChar.toInt()) {
            61 -> return jjMoveStringLiteralDfa4_10(active0, 0x4000000L)
            else -> return 4
        }
    }

    private fun jjMoveStringLiteralDfa4_10(old0: Long, active0: Long): Int {
        var active0 = active0
        active0 = active0 and old0
        if (active0 == 0L)
            return 4
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            return 4
        }

        when (curChar.toInt()) {
            93 -> if (active0 and 0x4000000L != 0L)
                return jjStopAtPos(4, 26)
            else -> return 5
        }
        return 5
    }

    private fun jjMoveStringLiteralDfa0_9(): Int {
        when (curChar.toInt()) {
            93 -> return jjMoveStringLiteralDfa1_9(0x2000000L)
            else -> return 1
        }
    }

    private fun jjMoveStringLiteralDfa1_9(active0: Long): Int {
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            return 1
        }

        when (curChar.toInt()) {
            61 -> return jjMoveStringLiteralDfa2_9(active0, 0x2000000L)
            else -> return 2
        }
    }

    private fun jjMoveStringLiteralDfa2_9(old0: Long, active0: Long): Int {
        var active0 = active0
        active0 = active0 and old0
        if ((active0) == 0L)
            return 2
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            return 2
        }

        when (curChar.toInt()) {
            61 -> return jjMoveStringLiteralDfa3_9(active0, 0x2000000L)
            else -> return 3
        }
    }

    private fun jjMoveStringLiteralDfa3_9(old0: Long, active0: Long): Int {
        var active0 = active0
        active0 = active0 and old0
        if ((active0) == 0L)
            return 3
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            return 3
        }

        when (curChar.toInt()) {
            93 -> if (active0 and 0x2000000L != 0L)
                return jjStopAtPos(3, 25)
            else -> return 4
        }
        return 4
    }

    private fun jjMoveStringLiteralDfa0_8(): Int {
        when (curChar.toInt()) {
            93 -> return jjMoveStringLiteralDfa1_8(0x1000000L)
            else -> return 1
        }
    }

    private fun jjMoveStringLiteralDfa1_8(active0: Long): Int {
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            return 1
        }

        when (curChar.toInt()) {
            61 -> return jjMoveStringLiteralDfa2_8(active0, 0x1000000L)
            else -> return 2
        }
    }

    private fun jjMoveStringLiteralDfa2_8(old0: Long, active0: Long): Int {
        var active0 = active0
        active0 = active0 and old0
        if ((active0) == 0L)
            return 2
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            return 2
        }

        when (curChar.toInt()) {
            93 -> if (active0 and 0x1000000L != 0L)
                return jjStopAtPos(2, 24)
            else -> return 3
        }
        return 3
    }

    private fun jjMoveStringLiteralDfa0_7(): Int {
        when (curChar.toInt()) {
            93 -> return jjMoveStringLiteralDfa1_7(0x800000L)
            else -> return 1
        }
    }

    private fun jjMoveStringLiteralDfa1_7(active0: Long): Int {
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            return 1
        }

        when (curChar.toInt()) {
            93 -> if (active0 and 0x800000L != 0L)
                return jjStopAtPos(1, 23)
            else -> return 2
        }
        return 2
    }

    private fun jjStopStringLiteralDfa_0(pos: Int, active0: Long, active1: Long): Int {
        when (pos) {
            0 -> {
                if (active0 and 0x7800L != 0L || active1 and 0x2000L != 0L)
                    return 14
                if (active1 and 0x1008200L != 0L)
                    return 31
                if (active0 and 0x7ffffe0000000L != 0L) {
                    jjmatchedKind = 51
                    return 17
                }
                return if (active0 and 0x103c0L != 0L || active1 and 0x80000L != 0L) 7 else -1
            }
            1 -> {
                if (active0 and 0x103c0L != 0L)
                    return 6
                if (active0 and 0x7000L != 0L)
                    return 13
                if (active0 and 0x118080000000L != 0L)
                    return 17
                if (active0 and 0x7ee7f60000000L != 0L) {
                    if (jjmatchedPos != 1) {
                        jjmatchedKind = 51
                        jjmatchedPos = 1
                    }
                    return 17
                }
                return -1
            }
            2 -> {
                if (active0 and 0x7e26b40000000L != 0L) {
                    jjmatchedKind = 51
                    jjmatchedPos = 2
                    return 17
                }
                if (active0 and 0x6000L != 0L)
                    return 12
                if (active0 and 0x3c0L != 0L)
                    return 5
                return if (active0 and 0xc1420000000L != 0L) 17 else -1
            }
            3 -> {
                if (active0 and 0x380L != 0L)
                    return 4
                if (active0 and 0x6622840000000L != 0L) {
                    if (jjmatchedPos != 3) {
                        jjmatchedKind = 51
                        jjmatchedPos = 3
                    }
                    return 17
                }
                if (active0 and 0x1804300000000L != 0L)
                    return 17
                return if (active0 and 0x4000L != 0L) 9 else -1
            }
            4 -> {
                if (active0 and 0x602200000000L != 0L) {
                    jjmatchedKind = 51
                    jjmatchedPos = 4
                    return 17
                }
                if (active0 and 0x300L != 0L)
                    return 3
                return if (active0 and 0x6020840000000L != 0L) 17 else -1
            }
            5 -> {
                if (active0 and 0x200L != 0L)
                    return 0
                if (active0 and 0x600200000000L != 0L)
                    return 17
                if (active0 and 0x2000000000L != 0L) {
                    jjmatchedKind = 51
                    jjmatchedPos = 5
                    return 17
                }
                return -1
            }
            6 -> {
                if (active0 and 0x2000000000L != 0L) {
                    jjmatchedKind = 51
                    jjmatchedPos = 6
                    return 17
                }
                return -1
            }
            else -> return -1
        }
    }

    private fun jjStartNfa_0(pos: Int, active0: Long, active1: Long): Int {
        return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1)
    }

    private fun jjMoveStringLiteralDfa0_0(): Int {
        when (curChar.toInt()) {
            35 -> return jjStopAtPos(0, 69)
            37 -> return jjStopAtPos(0, 87)
            40 -> return jjStopAtPos(0, 75)
            41 -> return jjStopAtPos(0, 76)
            42 -> return jjStopAtPos(0, 84)
            43 -> return jjStopAtPos(0, 82)
            44 -> return jjStopAtPos(0, 72)
            45 -> {
                jjmatchedKind = 83
                return jjMoveStringLiteralDfa1_0(0x103c0L, 0x0L)
            }
            46 -> {
                jjmatchedKind = 73
                return jjMoveStringLiteralDfa1_0(0x0L, 0x1008000L)
            }
            47 -> return jjStopAtPos(0, 85)
            58 -> {
                jjmatchedKind = 74
                return jjMoveStringLiteralDfa1_0(0x0L, 0x2L)
            }
            59 -> return jjStopAtPos(0, 70)
            60 -> {
                jjmatchedKind = 89
                return jjMoveStringLiteralDfa1_0(0x0L, 0x4000000L)
            }
            61 -> {
                jjmatchedKind = 71
                return jjMoveStringLiteralDfa1_0(0x0L, 0x20000000L)
            }
            62 -> {
                jjmatchedKind = 91
                return jjMoveStringLiteralDfa1_0(0x0L, 0x10000000L)
            }
            91 -> {
                jjmatchedKind = 77
                return jjMoveStringLiteralDfa1_0(0x7800L, 0x0L)
            }
            93 -> return jjStopAtPos(0, 78)
            94 -> return jjStopAtPos(0, 86)
            97 -> return jjMoveStringLiteralDfa1_0(0x20000000L, 0x0L)
            98 -> return jjMoveStringLiteralDfa1_0(0x40000000L, 0x0L)
            100 -> return jjMoveStringLiteralDfa1_0(0x80000000L, 0x0L)
            101 -> return jjMoveStringLiteralDfa1_0(0x700000000L, 0x0L)
            102 -> return jjMoveStringLiteralDfa1_0(0x3800000000L, 0x0L)
            103 -> return jjMoveStringLiteralDfa1_0(0x4000000000L, 0x0L)
            105 -> return jjMoveStringLiteralDfa1_0(0x18000000000L, 0x0L)
            108 -> return jjMoveStringLiteralDfa1_0(0x20000000000L, 0x0L)
            110 -> return jjMoveStringLiteralDfa1_0(0xc0000000000L, 0x0L)
            111 -> return jjMoveStringLiteralDfa1_0(0x100000000000L, 0x0L)
            114 -> return jjMoveStringLiteralDfa1_0(0x600000000000L, 0x0L)
            116 -> return jjMoveStringLiteralDfa1_0(0x1800000000000L, 0x0L)
            117 -> return jjMoveStringLiteralDfa1_0(0x2000000000000L, 0x0L)
            119 -> return jjMoveStringLiteralDfa1_0(0x4000000000000L, 0x0L)
            123 -> return jjStopAtPos(0, 80)
            125 -> return jjStopAtPos(0, 81)
            126 -> return jjMoveStringLiteralDfa1_0(0x0L, 0x40000000L)
            else -> return jjMoveNfa_0(8, 0)
        }
    }

    private fun jjMoveStringLiteralDfa1_0(active0: Long, active1: Long): Int {
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            jjStopStringLiteralDfa_0(0, active0, active1)
            return 1
        }

        when (curChar.toInt()) {
            45 -> {
                if (active0 and 0x10000L != 0L) {
                    jjmatchedKind = 16
                    jjmatchedPos = 1
                }
                return jjMoveStringLiteralDfa2_0(active0, 0x3c0L, active1, 0L)
            }
            46 -> {
                if (active1 and 0x1000000L != 0L) {
                    jjmatchedKind = 88
                    jjmatchedPos = 1
                }
                return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x8000L)
            }
            58 -> if (active1 and 0x2L != 0L)
                return jjStopAtPos(1, 65)
            61 -> {
                if (active1 and 0x4000000L != 0L)
                    return jjStopAtPos(1, 90)
                else if (active1 and 0x10000000L != 0L)
                    return jjStopAtPos(1, 92)
                else if (active1 and 0x20000000L != 0L)
                    return jjStopAtPos(1, 93)
                else if (active1 and 0x40000000L != 0L)
                    return jjStopAtPos(1, 94)
                return jjMoveStringLiteralDfa2_0(active0, 0x7000L, active1, 0L)
            }
            91 -> if (active0 and 0x800L != 0L)
                return jjStopAtPos(1, 11)
            97 -> return jjMoveStringLiteralDfa2_0(active0, 0x800000000L, active1, 0L)
            101 -> return jjMoveStringLiteralDfa2_0(active0, 0x600000000000L, active1, 0L)
            102 -> if (active0 and 0x8000000000L != 0L)
                return jjStartNfaWithStates_0(1, 39, 17)
            104 -> return jjMoveStringLiteralDfa2_0(active0, 0x4800000000000L, active1, 0L)
            105 -> return jjMoveStringLiteralDfa2_0(active0, 0x40000000000L, active1, 0L)
            108 -> return jjMoveStringLiteralDfa2_0(active0, 0x300000000L, active1, 0L)
            110 -> {
                return if (active0 and 0x10000000000L != 0L) jjStartNfaWithStates_0(
                    1,
                    40,
                    17
                ) else jjMoveStringLiteralDfa2_0(
                    active0,
                    0x2000420000000L,
                    active1,
                    0L
                )
            }
            111 -> {
                return if (active0 and 0x80000000L != 0L) jjStartNfaWithStates_0(
                    1,
                    31,
                    17
                ) else jjMoveStringLiteralDfa2_0(active0, 0xa5000000000L, active1, 0L)
            }
            114 -> {
                return if (active0 and 0x100000000000L != 0L) jjStartNfaWithStates_0(
                    1,
                    44,
                    17
                ) else jjMoveStringLiteralDfa2_0(
                    active0,
                    0x1000040000000L,
                    active1,
                    0L
                )
            }
            117 -> return jjMoveStringLiteralDfa2_0(active0, 0x2000000000L, active1, 0L)
            else -> {
            }
        }
        return jjStartNfa_0(0, active0, active1)
    }

    private fun jjMoveStringLiteralDfa2_0(old0: Long, active0: Long, old1: Long, active1: Long): Int {
        var active0 = active0
        var active1 = active1
        if ((run { active0 = active0 and old0; active0 }) or (run { active1 = active1 and old1; active1 }) == 0L)
            return jjStartNfa_0(0, old0, old1)
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            jjStopStringLiteralDfa_0(1, active0, active1)
            return 2
        }

        when (curChar.toInt()) {
            46 -> if (active1 and 0x8000L != 0L)
                return jjStopAtPos(2, 79)
            61 -> return jjMoveStringLiteralDfa3_0(active0, 0x6000L, active1, 0L)
            91 -> {
                return if (active0 and 0x1000L != 0L) jjStopAtPos(2, 12) else jjMoveStringLiteralDfa3_0(
                    active0,
                    0x3c0L,
                    active1,
                    0L
                )
            }
            99 -> return jjMoveStringLiteralDfa3_0(active0, 0x20000000000L, active1, 0L)
            100 -> if (active0 and 0x20000000L != 0L)
                return jjStartNfaWithStates_0(2, 29, 17)
            else if (active0 and 0x400000000L != 0L)
                return jjStartNfaWithStates_0(2, 34, 17)
            101 -> return jjMoveStringLiteralDfa3_0(active0, 0x800040000000L, active1, 0L)
            105 -> return jjMoveStringLiteralDfa3_0(active0, 0x4000000000000L, active1, 0L)
            108 -> {
                return if (active0 and 0x40000000000L != 0L) jjStartNfaWithStates_0(
                    2,
                    42,
                    17
                ) else jjMoveStringLiteralDfa3_0(
                    active0,
                    0x800000000L,
                    active1,
                    0L
                )
            }
            110 -> return jjMoveStringLiteralDfa3_0(active0, 0x2000000000L, active1, 0L)
            112 -> return jjMoveStringLiteralDfa3_0(active0, 0x400000000000L, active1, 0L)
            114 -> if (active0 and 0x1000000000L != 0L)
                return jjStartNfaWithStates_0(2, 36, 17)
            115 -> return jjMoveStringLiteralDfa3_0(active0, 0x300000000L, active1, 0L)
            116 -> {
                return if (active0 and 0x80000000000L != 0L) jjStartNfaWithStates_0(
                    2,
                    43,
                    17
                ) else jjMoveStringLiteralDfa3_0(active0, 0x2204000000000L, active1, 0L)
            }
            117 -> return jjMoveStringLiteralDfa3_0(active0, 0x1000000000000L, active1, 0L)
            else -> {
            }
        }
        return jjStartNfa_0(1, active0, active1)
    }

    private fun jjMoveStringLiteralDfa3_0(old0: Long, active0: Long, old1: Long, active1: Long): Int {
        var active0 = active0
        var active1 = active1
        if ((run { active0 = active0 and old0; active0 }) or (run { active1 = active1 and old1; active1 }) == 0L)
            return jjStartNfa_0(1, old0, old1)
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            jjStopStringLiteralDfa_0(2, active0, 0L)
            return 3
        }

        when (curChar.toInt()) {
            61 -> return jjMoveStringLiteralDfa4_0(active0, 0x4380L)
            91 -> if (active0 and 0x40L != 0L)
                return jjStopAtPos(3, 6)
            else if (active0 and 0x2000L != 0L)
                return jjStopAtPos(3, 13)
            97 -> return jjMoveStringLiteralDfa4_0(active0, 0x20040000000L)
            99 -> return jjMoveStringLiteralDfa4_0(active0, 0x2000000000L)
            101 -> {
                if (active0 and 0x100000000L != 0L) {
                    jjmatchedKind = 32
                    jjmatchedPos = 3
                } else if (active0 and 0x1000000000000L != 0L)
                    return jjStartNfaWithStates_0(3, 48, 17)
                return jjMoveStringLiteralDfa4_0(active0, 0x400200000000L)
            }
            105 -> return jjMoveStringLiteralDfa4_0(active0, 0x2000000000000L)
            108 -> return jjMoveStringLiteralDfa4_0(active0, 0x4000000000000L)
            110 -> if (active0 and 0x800000000000L != 0L)
                return jjStartNfaWithStates_0(3, 47, 17)
            111 -> if (active0 and 0x4000000000L != 0L)
                return jjStartNfaWithStates_0(3, 38, 17)
            115 -> return jjMoveStringLiteralDfa4_0(active0, 0x800000000L)
            117 -> return jjMoveStringLiteralDfa4_0(active0, 0x200000000000L)
            else -> {
            }
        }
        return jjStartNfa_0(2, active0, 0L)
    }

    private fun jjMoveStringLiteralDfa4_0(old0: Long, active0: Long): Int {
        var active0 = active0
        active0 = active0 and old0
        if ((active0) == 0L)
            return jjStartNfa_0(2, old0, 0L)
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            jjStopStringLiteralDfa_0(3, active0, 0L)
            return 4
        }

        when (curChar.toInt()) {
            61 -> return jjMoveStringLiteralDfa5_0(active0, 0x300L)
            91 -> if (active0 and 0x80L != 0L)
                return jjStopAtPos(4, 7)
            else if (active0 and 0x4000L != 0L)
                return jjStopAtPos(4, 14)
            97 -> return jjMoveStringLiteralDfa5_0(active0, 0x400000000000L)
            101 -> if (active0 and 0x800000000L != 0L)
                return jjStartNfaWithStates_0(4, 35, 17)
            else if (active0 and 0x4000000000000L != 0L)
                return jjStartNfaWithStates_0(4, 50, 17)
            105 -> return jjMoveStringLiteralDfa5_0(active0, 0x200000000L)
            107 -> if (active0 and 0x40000000L != 0L)
                return jjStartNfaWithStates_0(4, 30, 17)
            108 -> if (active0 and 0x20000000000L != 0L)
                return jjStartNfaWithStates_0(4, 41, 17)
            else if (active0 and 0x2000000000000L != 0L)
                return jjStartNfaWithStates_0(4, 49, 17)
            114 -> return jjMoveStringLiteralDfa5_0(active0, 0x200000000000L)
            116 -> return jjMoveStringLiteralDfa5_0(active0, 0x2000000000L)
            else -> {
            }
        }
        return jjStartNfa_0(3, active0, 0L)
    }

    private fun jjMoveStringLiteralDfa5_0(old0: Long, active0: Long): Int {
        var active0 = active0
        active0 = active0 and old0
        if ((active0) == 0L)
            return jjStartNfa_0(3, old0, 0L)
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            jjStopStringLiteralDfa_0(4, active0, 0L)
            return 5
        }

        when (curChar.toInt()) {
            61 -> return jjMoveStringLiteralDfa6_0(active0, 0x200L)
            91 -> if (active0 and 0x100L != 0L)
                return jjStopAtPos(5, 8)
            102 -> if (active0 and 0x200000000L != 0L)
                return jjStartNfaWithStates_0(5, 33, 17)
            105 -> return jjMoveStringLiteralDfa6_0(active0, 0x2000000000L)
            110 -> if (active0 and 0x200000000000L != 0L)
                return jjStartNfaWithStates_0(5, 45, 17)
            116 -> if (active0 and 0x400000000000L != 0L)
                return jjStartNfaWithStates_0(5, 46, 17)
            else -> {
            }
        }
        return jjStartNfa_0(4, active0, 0L)
    }

    private fun jjMoveStringLiteralDfa6_0(old0: Long, active0: Long): Int {
        var active0 = active0
        active0 = active0 and old0
        if ((active0) == 0L)
            return jjStartNfa_0(4, old0, 0L)
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            jjStopStringLiteralDfa_0(5, active0, 0L)
            return 6
        }

        when (curChar.toInt()) {
            91 -> if (active0 and 0x200L != 0L)
                return jjStopAtPos(6, 9)
            111 -> return jjMoveStringLiteralDfa7_0(active0, 0x2000000000L)
            else -> {
            }
        }
        return jjStartNfa_0(5, active0, 0L)
    }

    private fun jjMoveStringLiteralDfa7_0(old0: Long, active0: Long): Int {
        var active0 = active0
        active0 = active0 and old0
        if ((active0) == 0L)
            return jjStartNfa_0(5, old0, 0L)
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            jjStopStringLiteralDfa_0(6, active0, 0L)
            return 7
        }

        when (curChar.toInt()) {
            110 -> if (active0 and 0x2000000000L != 0L)
                return jjStartNfaWithStates_0(7, 37, 17)
            else -> {
            }
        }
        return jjStartNfa_0(6, active0, 0L)
    }

    private fun jjStartNfaWithStates_0(pos: Int, kind: Int, state: Int): Int {
        jjmatchedKind = kind
        jjmatchedPos = pos
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            return pos + 1
        }

        return jjMoveNfa_0(state, pos + 1)
    }

    private fun jjMoveNfa_0(startState: Int, curPos: Int): Int {
        var curPos = curPos
        var startsAt = 0
        jjnewStateCnt = 66
        var i = 1
        jjstateSet[0] = startState
        var kind = 0x7fffffff
        while (true) {
            if (++jjround == 0x7fffffff)
                ReInitRounds()
            if (curChar.toInt() < 64) {
                val l = 1L shl curChar.toInt()
                do {
                    when (jjstateSet[--i]) {
                        8 -> {
                            when {
                                0x3ff000000000000L and l != 0L -> {
                                    if (kind > 52)
                                        kind = 52
                                    jjCheckNAddStates(0, 3)
                                }
                                curChar.toInt() == 39 -> jjCheckNAddStates(4, 6)
                                curChar.toInt() == 34 -> jjCheckNAddStates(7, 9)
                                curChar.toInt() == 46 -> jjCheckNAdd(31)
                                curChar.toInt() == 45 -> jjstateSet[jjnewStateCnt++] = 7
                            }
                            if (curChar.toInt() == 48)
                                jjstateSet[jjnewStateCnt++] = 19
                        }
                        0, 1 -> if (curChar.toInt() == 61)
                            jjCheckNAddTwoStates(1, 2)
                        3 -> if (curChar.toInt() == 61)
                            jjstateSet[jjnewStateCnt++] = 0
                        4 -> if (curChar.toInt() == 61)
                            jjstateSet[jjnewStateCnt++] = 3
                        5 -> if (curChar.toInt() == 61)
                            jjstateSet[jjnewStateCnt++] = 4
                        7 -> if (curChar.toInt() == 45)
                            jjstateSet[jjnewStateCnt++] = 6
                        9, 10 -> if (curChar.toInt() == 61)
                            jjCheckNAddTwoStates(10, 11)
                        12 -> if (curChar.toInt() == 61)
                            jjstateSet[jjnewStateCnt++] = 9
                        13 -> if (curChar.toInt() == 61)
                            jjstateSet[jjnewStateCnt++] = 12
                        14 -> if (curChar.toInt() == 61)
                            jjstateSet[jjnewStateCnt++] = 13
                        17 -> {
                            if (0x3ff000000000000L and l == 0L) {

                            } else {
                                if (kind > 51)
                                    kind = 51
                                jjstateSet[jjnewStateCnt++] = 17
                            }
                        }
                        18 -> if (curChar.toInt() == 48)
                            jjstateSet[jjnewStateCnt++] = 19
                        20 -> if (curChar.toInt() == 46)
                            jjCheckNAdd(21)
                        21 -> {
                            if (0x3ff000000000000L and l == 0L) Unit else {
                                if (kind > 52)
                                    kind = 52
                                jjCheckNAddTwoStates(21, 22)
                            }
                        }
                        23 -> if (0x280000000000L and l != 0L)
                            jjCheckNAdd(24)
                        24 -> {
                            if (0x3ff000000000000L and l == 0L) Unit else {
                                if (kind > 52)
                                    kind = 52
                                jjCheckNAdd(24)
                            }
                        }
                        25 -> {
                            if (0x3ff000000000000L and l == 0L) Unit else {

                                if (kind > 52)
                                    kind = 52
                                jjCheckNAddStates(10, 13)
                            }
                        }
                        26 -> if (0x3ff000000000000L and l != 0L)
                            jjCheckNAddTwoStates(26, 27)
                        27 -> {
                            if (curChar.toInt() != 46) Unit else {
                                if (kind > 52)
                                    kind = 52
                                jjCheckNAddTwoStates(28, 22)
                            }
                        }
                        28 -> {
                            if (0x3ff000000000000L and l == 0L) Unit else {
                                if (kind > 52)
                                    kind = 52
                                jjCheckNAddTwoStates(28, 22)
                            }
                        }
                        29 -> {
                            if (0x3ff000000000000L and l == 0L) Unit else {
                                if (kind > 52)
                                    kind = 52
                                jjCheckNAddTwoStates(29, 22)
                            }
                        }
                        30 -> if (curChar.toInt() == 46)
                            jjCheckNAdd(31)
                        31 -> {
                            if (0x3ff000000000000L and l == 0L) Unit else {
                                if (kind > 52)
                                    kind = 52
                                jjCheckNAddTwoStates(31, 32)
                            }
                        }
                        33 -> if (0x280000000000L and l != 0L)
                            jjCheckNAdd(34)
                        34 -> {
                            if (0x3ff000000000000L and l == 0L) Unit else {
                                if (kind > 52)
                                    kind = 52
                                jjCheckNAdd(34)
                            }
                        }
                        35 -> if (curChar.toInt() == 34)
                            jjCheckNAddStates(7, 9)
                        36 -> if (-0x400000001L and l != 0L)
                            jjCheckNAddStates(7, 9)
                        37 -> if (curChar.toInt() == 34 && kind > 61)
                            kind = 61
                        39 -> jjCheckNAddStates(7, 9)
                        41 -> if (0x3ff000000000000L and l != 0L)
                            jjstateSet[jjnewStateCnt++] = 42
                        42 -> if (0x3ff000000000000L and l != 0L)
                            jjstateSet[jjnewStateCnt++] = 43
                        43 -> if (0x3ff000000000000L and l != 0L)
                            jjstateSet[jjnewStateCnt++] = 44
                        44, 47 -> if (0x3ff000000000000L and l != 0L)
                            jjCheckNAddStates(7, 9)
                        45 -> if (0x3ff000000000000L and l != 0L)
                            jjCheckNAddStates(14, 17)
                        46 -> if (0x3ff000000000000L and l != 0L)
                            jjCheckNAddStates(18, 21)
                        48 -> if (curChar.toInt() == 39)
                            jjCheckNAddStates(4, 6)
                        49 -> if (-0x8000000001L and l != 0L)
                            jjCheckNAddStates(4, 6)
                        50 -> if (curChar.toInt() == 39 && kind > 62)
                            kind = 62
                        52 -> jjCheckNAddStates(4, 6)
                        54 -> if (0x3ff000000000000L and l != 0L)
                            jjstateSet[jjnewStateCnt++] = 55
                        55 -> if (0x3ff000000000000L and l != 0L)
                            jjstateSet[jjnewStateCnt++] = 56
                        56 -> if (0x3ff000000000000L and l != 0L)
                            jjstateSet[jjnewStateCnt++] = 57
                        57, 60 -> if (0x3ff000000000000L and l != 0L)
                            jjCheckNAddStates(4, 6)
                        58 -> if (0x3ff000000000000L and l != 0L)
                            jjCheckNAddStates(22, 25)
                        59 -> if (0x3ff000000000000L and l != 0L)
                            jjCheckNAddStates(26, 29)
                        61 -> {
                            if (0x3ff000000000000L and l == 0L) Unit else {
                                if (kind > 52)
                                    kind = 52
                                jjCheckNAddStates(0, 3)
                            }
                        }
                        62 -> if (0x3ff000000000000L and l != 0L)
                            jjCheckNAddTwoStates(62, 63)
                        63 -> {
                            if (curChar.toInt() != 46) Unit else {
                                if (kind > 52)
                                    kind = 52
                                jjCheckNAddTwoStates(64, 32)
                            }
                        }
                        64 -> {
                            if (0x3ff000000000000L and l == 0L) Unit else {
                                if (kind > 52)
                                    kind = 52
                                jjCheckNAddTwoStates(64, 32)
                            }
                        }
                        65 -> {
                            if (0x3ff000000000000L and l == 0L) Unit else {
                                if (kind > 52)
                                    kind = 52
                                jjCheckNAddTwoStates(65, 32)
                            }
                        }
                        else -> {
                        }
                    }
                } while (i != startsAt)
            } else if (curChar.toInt() < 128) {
                val l = 1L shl (curChar.toInt() and 63)
                do {
                    when (jjstateSet[--i]) {
                        8 -> if (0x7fffffe87fffffeL and l != 0L) {
                            if (kind > 51)
                                kind = 51
                            jjCheckNAdd(17)
                        } else if (curChar.toInt() == 91)
                            jjstateSet[jjnewStateCnt++] = 14
                        2 -> if (curChar.toInt() == 91 && kind > 10)
                            kind = 10
                        6 -> if (curChar.toInt() == 91)
                            jjstateSet[jjnewStateCnt++] = 5
                        11 -> if (curChar.toInt() == 91 && kind > 15)
                            kind = 15
                        15 -> if (curChar.toInt() == 91)
                            jjstateSet[jjnewStateCnt++] = 14
                        16, 17 -> {
                            if (0x7fffffe87fffffeL and l == 0L) Unit else {
                                if (kind > 51)
                                    kind = 51
                                jjCheckNAdd(17)
                            }
                        }
                        19 -> if (0x100000001000000L and l != 0L)
                            jjAddStates(30, 31)
                        21 -> {
                            if (0x7e0000007eL and l == 0L) Unit else {
                                if (kind > 52)
                                    kind = 52
                                jjCheckNAddTwoStates(21, 22)
                            }
                        }
                        22 -> if (0x1002000010020L and l != 0L)
                            jjAddStates(32, 33)
                        25 -> {
                            if (0x7e0000007eL and l == 0L) Unit else {
                                if (kind > 52)
                                    kind = 52
                                jjCheckNAddStates(10, 13)
                            }
                        }
                        26 -> if (0x7e0000007eL and l != 0L)
                            jjCheckNAddTwoStates(26, 27)
                        28 -> {
                            if (0x7e0000007eL and l == 0L) Unit else {
                                if (kind > 52)
                                    kind = 52
                                jjCheckNAddTwoStates(28, 22)
                            }
                        }
                        29 -> {
                            if (0x7e0000007eL and l == 0L) Unit else {
                                if (kind > 52)
                                    kind = 52
                                jjCheckNAddTwoStates(29, 22)
                            }
                        }
                        32 -> if (0x2000000020L and l != 0L)
                            jjAddStates(34, 35)
                        36 -> if (-0x10000001L and l != 0L)
                            jjCheckNAddStates(7, 9)
                        38 -> if (curChar.toInt() == 92)
                            jjAddStates(36, 38)
                        39 -> jjCheckNAddStates(7, 9)
                        40 -> if (curChar.toInt() == 117)
                            jjstateSet[jjnewStateCnt++] = 41
                        41 -> if (0x7e0000007eL and l != 0L)
                            jjstateSet[jjnewStateCnt++] = 42
                        42 -> if (0x7e0000007eL and l != 0L)
                            jjstateSet[jjnewStateCnt++] = 43
                        43 -> if (0x7e0000007eL and l != 0L)
                            jjstateSet[jjnewStateCnt++] = 44
                        44 -> if (0x7e0000007eL and l != 0L)
                            jjCheckNAddStates(7, 9)
                        49 -> if (-0x10000001L and l != 0L)
                            jjCheckNAddStates(4, 6)
                        51 -> if (curChar.toInt() == 92)
                            jjAddStates(39, 41)
                        52 -> jjCheckNAddStates(4, 6)
                        53 -> if (curChar.toInt() == 117)
                            jjstateSet[jjnewStateCnt++] = 54
                        54 -> if (0x7e0000007eL and l != 0L)
                            jjstateSet[jjnewStateCnt++] = 55
                        55 -> if (0x7e0000007eL and l != 0L)
                            jjstateSet[jjnewStateCnt++] = 56
                        56 -> if (0x7e0000007eL and l != 0L)
                            jjstateSet[jjnewStateCnt++] = 57
                        57 -> if (0x7e0000007eL and l != 0L)
                            jjCheckNAddStates(4, 6)
                        else -> {
                        }
                    }
                } while (i != startsAt)
            } else {
                val hiByte = curChar.toInt() shr 8
                val i1 = hiByte shr 6
                val l1 = 1L shl (hiByte and 63)
                val i2 = curChar.toInt() and 0xff shr 6
                val l2 = 1L shl (curChar.toInt() and 63)
                do {
                    when (jjstateSet[--i]) {
                        36, 39 -> if (jjCanMove_0(hiByte, i1, i2, l1, l2))
                            jjCheckNAddStates(7, 9)
                        49, 52 -> if (jjCanMove_0(hiByte, i1, i2, l1, l2))
                            jjCheckNAddStates(4, 6)
                        else -> {
                        }
                    }
                } while (i != startsAt)
            }
            if (kind != 0x7fffffff) {
                jjmatchedKind = kind
                jjmatchedPos = curPos
                kind = 0x7fffffff
            }
            ++curPos
            if ((run { i = jjnewStateCnt; i }) == (run { startsAt = 66 - (run { jjnewStateCnt = startsAt; jjnewStateCnt }); startsAt }))
                return curPos
            try {
                curChar = input_stream.readChar()
            } catch (e: IOException) {
                return curPos
            }

        }
    }

    private fun jjMoveStringLiteralDfa0_1(): Int {
        return jjMoveNfa_1(4, 0)
    }

    private fun jjMoveNfa_1(startState: Int, curPos: Int): Int {
        var curPos = curPos
        var startsAt = 0
        jjnewStateCnt = 4
        var i = 1
        jjstateSet[0] = startState
        var kind = 0x7fffffff
        while (true) {
            if (++jjround == 0x7fffffff)
                ReInitRounds()
            if (curChar.toInt() < 64) {
                val l = 1L shl curChar.toInt()
                do {
                    when (jjstateSet[--i]) {
                        4 -> {
                            if (-0x2401L and l != 0L) {
                                if (kind > 17)
                                    kind = 17
                                jjCheckNAddStates(42, 44)
                            } else if (0x2400L and l != 0L) {
                                if (kind > 17)
                                    kind = 17
                            }
                            if (curChar.toInt() == 13)
                                jjstateSet[jjnewStateCnt++] = 2
                        }
                        0 -> {
                            if (-0x2401L and l == 0L) Unit else {
                                kind = 17
                                jjCheckNAddStates(42, 44)
                            }
                        }
                        1 -> if (0x2400L and l != 0L && kind > 17)
                            kind = 17
                        2 -> if (curChar.toInt() == 10 && kind > 17)
                            kind = 17
                        3 -> if (curChar.toInt() == 13)
                            jjstateSet[jjnewStateCnt++] = 2
                        else -> {
                        }
                    }
                } while (i != startsAt)
            } else if (curChar.toInt() < 128) {
                val l = 1L shl (curChar.toInt() and 63)
                do {
                    when (jjstateSet[--i]) {
                        4, 0 -> {
                            kind = 17
                            jjCheckNAddStates(42, 44)
                        }
                        else -> {
                        }
                    }
                } while (i != startsAt)
            } else {
                val hiByte = curChar.toInt() shr 8
                val i1 = hiByte shr 6
                val l1 = 1L shl (hiByte and 63)
                val i2 = curChar.toInt() and 0xff shr 6
                val l2 = 1L shl (curChar.toInt() and 63)
                do {
                    when (jjstateSet[--i]) {
                        4, 0 -> {
                            if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) Unit else {
                                if (kind > 17)
                                    kind = 17
                                jjCheckNAddStates(42, 44)
                            }
                        }
                        else -> {
                        }
                    }
                } while (i != startsAt)
            }
            if (kind != 0x7fffffff) {
                jjmatchedKind = kind
                jjmatchedPos = curPos
                kind = 0x7fffffff
            }
            ++curPos
            if ((run { i = jjnewStateCnt; i }) == (run { startsAt = 4 - (run { jjnewStateCnt = startsAt; jjnewStateCnt }); startsAt }))
                return curPos
            try {
                curChar = input_stream.readChar()
            } catch (e: IOException) {
                return curPos
            }

        }
    }

    private fun jjMoveStringLiteralDfa0_6(): Int {
        return jjMoveNfa_6(6, 0)
    }

    private fun jjMoveNfa_6(startState: Int, curPos: Int): Int {
        var curPos = curPos
        var startsAt = 0
        jjnewStateCnt = 7
        var i = 1
        jjstateSet[0] = startState
        var kind = 0x7fffffff
        while (true) {
            if (++jjround == 0x7fffffff)
                ReInitRounds()
            if (curChar.toInt() < 64) {
                val l = 1L shl curChar.toInt()
                do {
                    when (jjstateSet[--i]) {
                        0, 1 -> if (curChar.toInt() == 61)
                            jjCheckNAddTwoStates(1, 2)
                        3 -> if (curChar.toInt() == 61)
                            jjstateSet[jjnewStateCnt++] = 0
                        4 -> if (curChar.toInt() == 61)
                            jjstateSet[jjnewStateCnt++] = 3
                        5 -> if (curChar.toInt() == 61)
                            jjstateSet[jjnewStateCnt++] = 4
                        else -> {
                        }
                    }
                } while (i != startsAt)
            } else if (curChar.toInt() < 128) {
                val l = 1L shl (curChar.toInt() and 63)
                do {
                    when (jjstateSet[--i]) {
                        2 -> if (curChar.toInt() == 93 && kind > 22)
                            kind = 22
                        6 -> if (curChar.toInt() == 93)
                            jjstateSet[jjnewStateCnt++] = 5
                        else -> {
                        }
                    }
                } while (i != startsAt)
            } else {
                val hiByte = curChar.toInt() shr 8
                val i1 = hiByte shr 6
                val l1 = 1L shl (hiByte and 63)
                val i2 = curChar.toInt() and 0xff shr 6
                val l2 = 1L shl (curChar.toInt() and 63)
                do {
                    when (jjstateSet[--i]) {
                        else -> {
                        }
                    }
                } while (i != startsAt)
            }
            if (kind != 0x7fffffff) {
                jjmatchedKind = kind
                jjmatchedPos = curPos
                kind = 0x7fffffff
            }
            ++curPos
            if ((run { i = jjnewStateCnt; i }) == (run { startsAt = 7 - (run { jjnewStateCnt = startsAt; jjnewStateCnt }); startsAt }))
                return curPos
            try {
                curChar = input_stream.readChar()
            } catch (e: IOException) {
                return curPos
            }

        }
    }

    private fun jjMoveStringLiteralDfa0_5(): Int {
        when (curChar.toInt()) {
            93 -> return jjMoveStringLiteralDfa1_5(0x200000L)
            else -> return 1
        }
    }

    private fun jjMoveStringLiteralDfa1_5(active0: Long): Int {
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            return 1
        }

        when (curChar.toInt()) {
            61 -> return jjMoveStringLiteralDfa2_5(active0, 0x200000L)
            else -> return 2
        }
    }

    private fun jjMoveStringLiteralDfa2_5(old0: Long, active0: Long): Int {
        var active0 = active0
        active0 = active0 and old0
        if ((active0) == 0L)
            return 2
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            return 2
        }

        when (curChar.toInt()) {
            61 -> return jjMoveStringLiteralDfa3_5(active0, 0x200000L)
            else -> return 3
        }
    }

    private fun jjMoveStringLiteralDfa3_5(old0: Long, active0: Long): Int {
        var active0 = active0
        active0 = active0 and old0
        if ((active0) == 0L)
            return 3
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            return 3
        }

        when (curChar.toInt()) {
            61 -> return jjMoveStringLiteralDfa4_5(active0, 0x200000L)
            else -> return 4
        }
    }

    private fun jjMoveStringLiteralDfa4_5(old0: Long, active0: Long): Int {
        var active0 = active0
        active0 = active0 and old0
        if ((active0) == 0L)
            return 4
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            return 4
        }

        when (curChar.toInt()) {
            93 -> if (active0 and 0x200000L != 0L)
                return jjStopAtPos(4, 21)
            else -> return 5
        }
        return 5
    }

    private fun jjMoveStringLiteralDfa0_4(): Int {
        when (curChar.toInt()) {
            93 -> return jjMoveStringLiteralDfa1_4(0x100000L)
            else -> return 1
        }
    }

    private fun jjMoveStringLiteralDfa1_4(active0: Long): Int {
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            return 1
        }

        when (curChar.toInt()) {
            61 -> return jjMoveStringLiteralDfa2_4(active0, 0x100000L)
            else -> return 2
        }
    }

    private fun jjMoveStringLiteralDfa2_4(old0: Long, active0: Long): Int {
        var active0 = active0
        active0 = active0 and old0
        if ((active0) == 0L)
            return 2
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            return 2
        }

        when (curChar.toInt()) {
            61 -> return jjMoveStringLiteralDfa3_4(active0, 0x100000L)
            else -> return 3
        }
    }

    private fun jjMoveStringLiteralDfa3_4(old0: Long, active0: Long): Int {
        var active0 = active0
        active0 = active0 and old0
        if ((active0) == 0L)
            return 3
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            return 3
        }

        when (curChar.toInt()) {
            93 -> if (active0 and 0x100000L != 0L)
                return jjStopAtPos(3, 20)
            else -> return 4
        }
        return 4
    }

    private fun jjMoveStringLiteralDfa0_3(): Int {
        when (curChar.toInt()) {
            93 -> return jjMoveStringLiteralDfa1_3(0x80000L)
            else -> return 1
        }
    }

    private fun jjMoveStringLiteralDfa1_3(active0: Long): Int {
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            return 1
        }

        when (curChar.toInt()) {
            61 -> return jjMoveStringLiteralDfa2_3(active0, 0x80000L)
            else -> return 2
        }
    }

    private fun jjMoveStringLiteralDfa2_3(old0: Long, active0: Long): Int {
        var active0 = active0
        active0 = active0 and old0
        if (active0 == 0L)
            return 2
        try {
            curChar = input_stream.readChar()
        } catch (e: IOException) {
            return 2
        }

        when (curChar.toInt()) {
            93 -> if (active0 and 0x80000L != 0L)
                return jjStopAtPos(2, 19)
            else -> return 3
        }
        return 3
    }

    init {
        if (SimpleCharStream.staticFlag)
            throw Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.")
    }

    /** Constructor.  */
    constructor(stream: SimpleCharStream, lexState: Int) : this(stream) {
        SwitchTo(lexState)
    }

    /** Reinitialise parser.  */
    fun ReInit(stream: SimpleCharStream) {
        jjnewStateCnt = 0
        jjmatchedPos = jjnewStateCnt
        curLexState = defaultLexState
        input_stream = stream
        ReInitRounds()
    }

    private fun ReInitRounds() {
        var i: Int
        jjround = -0x7fffffff
        i = 66
        while (i-- > 0)
            jjrounds[i] = -0x80000000
    }

    /** Reinitialise parser.  */
    fun ReInit(stream: SimpleCharStream, lexState: Int) {
        ReInit(stream)
        SwitchTo(lexState)
    }

    /** Switch to specified lex state.  */
    fun SwitchTo(lexState: Int) {
        if (lexState >= 12 || lexState < 0)
            throw TokenMgrError(
                "Error: Ignoring invalid lexical state : $lexState. State unchanged.",
                TokenMgrError.INVALID_LEXICAL_STATE
            )
        else
            curLexState = lexState
    }

    protected fun jjFillToken(): Token {
        val t: Token
        val curTokenImage: String
        val beginLine: Int
        val endLine: Int
        val beginColumn: Int
        val endColumn: Int
        if (jjmatchedPos < 0) {
            if (image == null)
                curTokenImage = ""
            else
                curTokenImage = image!!.toString()
            endLine = input_stream.beginLine
            beginLine = endLine
            endColumn = input_stream.beginColumn
            beginColumn = endColumn
        } else {
            val im = jjstrLiteralImages[jjmatchedKind]
            curTokenImage = im ?: input_stream.GetImage()
            beginLine = input_stream.beginLine
            beginColumn = input_stream.beginColumn
            endLine = input_stream.endLine
            endColumn = input_stream.endColumn
        }
        t = Token.newToken(jjmatchedKind, curTokenImage)

        t.beginLine = beginLine
        t.endLine = endLine
        t.beginColumn = beginColumn
        t.endColumn = endColumn

        return t
    }

    internal fun SkipLexicalActions(matchedToken: Token?) {
        when (jjmatchedKind) {
            else -> {
            }
        }
    }

    private fun jjCheckNAdd(state: Int) {
        if (jjrounds[state] != jjround) {
            jjstateSet[jjnewStateCnt++] = state
            jjrounds[state] = jjround
        }
    }

    private fun jjAddStates(start: Int, end: Int) {
        var start = start
        do {
            jjstateSet[jjnewStateCnt++] = jjnextStates[start]
        } while (start++ != end)
    }

    private fun jjCheckNAddTwoStates(state1: Int, state2: Int) {
        jjCheckNAdd(state1)
        jjCheckNAdd(state2)
    }

    private fun jjCheckNAddStates(start: Int, end: Int) {
        var start = start
        do {
            jjCheckNAdd(jjnextStates[start])
        } while (start++ != end)
    }

    companion object {
        internal val jjbitVec0 = longArrayOf(-0x2L, -0x1L, -0x1L, -0x1L)
        internal val jjbitVec2 = longArrayOf(0x0L, 0x0L, -0x1L, -0x1L)
        internal val jjnextStates = intArrayOf(
            62,
            63,
            65,
            32,
            49,
            50,
            51,
            36,
            37,
            38,
            26,
            27,
            29,
            22,
            36,
            37,
            38,
            46,
            36,
            47,
            37,
            38,
            49,
            50,
            51,
            59,
            49,
            60,
            50,
            51,
            20,
            25,
            23,
            24,
            33,
            34,
            39,
            40,
            45,
            52,
            53,
            58,
            0,
            1,
            3
        )

        private fun jjCanMove_0(hiByte: Int, i1: Int, i2: Int, l1: Long, l2: Long): Boolean {
            when (hiByte) {
                0 -> return jjbitVec2[i2] and l2 != 0L
                else -> {
                    return if (jjbitVec0[i1] and l1 != 0L) true else false
                }
            }
        }

        /** Token literal values.  */
        val jjstrLiteralImages = arrayOf(
            "",
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            "\u0061\u006e\u0064",
            "\u0062\u0072\u0065\u0061\u006b",
            "\u0064\u006f",
            "\u0065\u006c\u0073\u0065",
            "\u0065\u006c\u0073\u0065\u0069\u0066",
            "\u0065\u006e\u0064",
            "\u0066\u0061\u006c\u0073\u0065",
            "\u0066\u006f\u0072",
            "\u0066\u0075\u006e\u0063\u0074\u0069\u006f\u006e",
            "\u0067\u006f\u0074\u006f",
            "\u0069\u0066",
            "\u0069\u006e",
            "\u006c\u006f\u0063\u0061\u006c",
            "\u006e\u0069\u006c",
            "\u006e\u006f\u0074",
            "\u006f\u0072",
            "\u0072\u0065\u0074\u0075\u0072\u006e",
            "\u0072\u0065\u0070\u0065\u0061\u0074",
            "\u0074\u0068\u0065\u006e",
            "\u0074\u0072\u0075\u0065",
            "\u0075\u006e\u0074\u0069\u006c",
            "\u0077\u0068\u0069\u006c\u0065",
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            "\u003a\u003a",
            null,
            null,
            null,
            "\u0023",
            "\u003b",
            "\u003d",
            "\u002c",
            "\u002e",
            "\u003a",
            "\u0028",
            "\u0029",
            "\u005b",
            "\u005d",
            "\u002e\u002e\u002e",
            "\u007b",
            "\u007d",
            "\u002b",
            "\u002d",
            "\u002a",
            "\u002f",
            "\u005e",
            "\u0025",
            "\u002e\u002e",
            "\u003c",
            "\u003c\u003d",
            "\u003e",
            "\u003e\u003d",
            "\u003d\u003d",
            "\u007e\u003d"
        )

        /** Lexer state names.  */
        val lexStateNames = arrayOf(
            "DEFAULT",
            "IN_COMMENT",
            "IN_LC0",
            "IN_LC1",
            "IN_LC2",
            "IN_LC3",
            "IN_LCN",
            "IN_LS0",
            "IN_LS1",
            "IN_LS2",
            "IN_LS3",
            "IN_LSN"
        )

        /** Lex State array.  */
        val jjnewLexState = intArrayOf(
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            1,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1
        )
        internal val jjtoToken = longArrayOf(0x601fffffef800001L, 0x7fffffe2L)
        internal val jjtoSkip = longArrayOf(0x7e003eL, 0x0L)
        internal val jjtoSpecial = longArrayOf(0x7e0000L, 0x0L)
        internal val jjtoMore = longArrayOf(0x1001ffc0L, 0x0L)
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy