package parser

import com.github.h0tk3y.betterParse.grammar.Grammar
import com.github.h0tk3y.betterParse.grammar.parseToEnd
import parser.grammars.QueryGrammar
import prolog.builtins.Query

class ReplParser : Parser {
    private val grammar: Grammar<Query> = QueryGrammar() as Grammar<Query>

    override fun parse(input: String): Query = grammar.parseToEnd(input)
}