# Matrix grammar G = ({S,A,B,C}, {a,b,c}, S, M), the same as above, with the first rule of each matrix in component 1.
#   m1 = (S -> ABC)   m2 = (A -> aA, B -> bB, C -> cC)   m3 = (A -> a, B -> b, C -> c)
# L(G) = { a^n b^n c^n : n >= 1 }.
# A matrix is a chain of components, one per rule. The first rules of all the matrices are in component 1, so the matrix does not
# have to be chosen with send(): the first rule that is applied chooses it. The last rule of m2 returns to component 1, and the last
# rule of m3 ends in component 6, where the words of the language are.

# the words of the language: a string of terminal symbols (lower-case letters) that reaches component 6 is marked
[model.components.6.marks]
terminal = '\A[a-z]*\Z'

[axioms]
1 = ["S"]

[rules.1]
# m1 (one rule), and the first rules of m2 and m3
S -> A B C, 1
A -> a A, 2
A -> a, 4
# m2 = (A -> aA, B -> bB, C -> cC)
[rules.2]
B -> b B, 3
[rules.3]
C -> c C, 1
# m3 = (A -> a, B -> b, C -> c)
[rules.4]
B -> b, 5
[rules.5]
C -> c, 6
