# Matrix insertion-deletion system, size 110110, variant a.
# Rules written as insertions / deletions / substitutions; the line before each translated rule starts with '# old:'
# and shows the original rule. The component numbers are those of the original model. The rule `Yq1->Y,11` sends its
# result to component 11, which has no rules: it is a trap rule that discards that branch on purpose (the rules numbered 12 are
# not reached from it). Run:  gcrsim examples/real/mat_insdel/mat_insdel_110110a.txt 5

[symbols]
# the symbols with an index (p1, S2, R1, ...) are single symbols
alphabet = "X Y A Q U D b C o P - 9 p1 p2 p3 q1 q2 q3"

[model]
# Translation of the Perl filter_next of the original configuration: rejections are filters,
# the printed '!!Terminal!!' lines are the mark 'terminal'.
history = true
reject_strings = ""
reject_max_len = 100

[run]
print_hide = ""
print_max_len = 100

[model.components.0.filters]
forbid = ['(p2.*){3}', '(q2.*){3}', '(\-.*){3}', '(9.*){3}']

[model.components.1.marks]
terminal = { pattern = '\A[QUXYDb9-]*\Z', message = "!!Terminal!!:{string} ({component})" }

[axioms]

1 = ["XAY"]

#A->Cb & C->D#

[rules]

# old: A->,2
del(,A,),2
# old: 2,Y->Yp1
2,ins(Y,p1,)

# old: p1->p1p2,3
ins(p1,p2,),3
# old: 3,p1->p1p3
3,ins(p1,p3,)

# old: p1p3->p1,4
del(p1,p3,),4
# old: 4,X->XQ
4,ins(X,Q,)

# old: Yp1->Y,5
del(Y,p1,),5
# old: 5,Q->Qb
5,ins(Q,b,)

# old: Yp2->Y,6
del(Y,p2,),6
# old: 6,Q->QC
6,ins(Q,C,)

# old: XQ->X,7
del(X,Q,),7
# old: 7,C->Co
7,ins(C,o,)

# old: C->,8
del(,C,),8
# old: 8,Y->Yq1
8,ins(Y,q1,)

# old: q1->q1q2,9
ins(q1,q2,),9
# old: 9,q1->q1q3
9,ins(q1,q3,)

# old: q1q3->q1,10
del(q1,q3,),10
# old: 10,X->XP
10,ins(X,P,)

# old: Yq1->Y,11
del(Y,q1,),11
# old: 12,P->P-
12,ins(P,-,)

# old: Yq2->Y,13
del(Y,q2,),13
# old: 13,P->PD
13,ins(P,D,)

# old: XP->X,14
del(X,P,),14
# old: 14,D->Do
14,ins(D,o,)
