Checkpoint

This commit is contained in:
Tibo De Peuter 2025-05-01 21:16:48 +02:00
parent 9db1c66781
commit 724e911a6f
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
17 changed files with 288 additions and 95 deletions

View file

@ -1,5 +1,6 @@
package parser
import com.github.h0tk3y.betterParse.combinators.use
import com.github.h0tk3y.betterParse.grammar.Grammar
import com.github.h0tk3y.betterParse.grammar.parseToEnd
import com.github.h0tk3y.betterParse.parser.Parser
@ -13,7 +14,7 @@ import prolog.ast.terms.Structure
class OperatorParserTests {
class OperatorParser: TermsGrammar() {
override val rootParser: Parser<CompoundTerm> by operator
override val rootParser: Parser<CompoundTerm> by body use { this as CompoundTerm }
}
private var parser = OperatorParser() as Grammar<CompoundTerm>