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

commonMain.agl.runtime.structure.RulePositionWithLookahead.kt Maven / Gradle / Ivy

The newest version!
/**
 * Copyright (C) 2018 Dr. David H. Akehurst (http://dr.david.h.akehurst.net)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package net.akehurst.language.agl.runtime.structure

import kotlin.jvm.JvmInline

@JvmInline
internal value class StateNumber(val value:Int)

//TODO: how is this different to ParentRelation ?
internal data class RulePositionWithLookahead(
    val rulePosition: RulePosition,
    val lookahead: Set
) {

    //val items:Set get() { return this.rulePosition.items }
    //val runtimeRule:RuntimeRule get() { return this.rulePosition.runtimeRule }
    //val choice:Int get() { return this.rulePosition.option }
    //val position:Int get() { return this.rulePosition.position }

    val isAtStart: Boolean get() { return this.rulePosition.isAtStart }
    val isAtEnd: Boolean get() { return this.rulePosition.isAtEnd }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy