Checkpoint
This commit is contained in:
parent
9db1c66781
commit
724e911a6f
17 changed files with 288 additions and 95 deletions
|
@ -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>
|
||||
|
|
Reference in a new issue