Skip to content

Commit c3d79de

Browse files
committed
bipartitle_graph_test_add
1 parent 29dbc92 commit c3d79de

File tree

6 files changed

+101306
-0
lines changed

6 files changed

+101306
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package solver.corectnessTests.BipartitleGrammarTest
2+
3+
4+
import org.ucfs.grammar.combinator.Grammar
5+
import org.ucfs.grammar.combinator.regexp.*
6+
import org.ucfs.rsm.symbol.Term
7+
8+
class BipartitleGrammar : Grammar() {
9+
val A by Nt()
10+
val B by Nt((Term("b") * A) or (Term("b")))
11+
val S by Nt(A).asStart()
12+
init {
13+
A /= (Term("a") * B) or (Term("a"))
14+
}
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package solver.corectnessTests.BipartitleGrammarTest
2+
3+
import org.junit.jupiter.api.Test
4+
import solver.corectnessTests.AbstractCorrectnessTest
5+
6+
class BipartitleGrammarTreeCorrectnessTest : AbstractCorrectnessTest() {
7+
@Test
8+
override fun checkTreeCorrectnessForGrammar() {
9+
runTests(BipartitleGrammar())
10+
}
11+
}

0 commit comments

Comments
 (0)