Commit 8c07590f authored by Hans-Peter Deifel's avatar Hans-Peter Deifel 🐢
Browse files

examples: Give dfa example an initial state

It's just a natural place to showcase the initial state feature and we need a
few easy examples with initial states.

This removes dfa-with-init from ui-tests, since it's now covered by the main
example.
parent 229e6bf1
......@@ -11,10 +11,13 @@
# \ |
# -----------'
# b
#
# where q1 is the initial state and q3 the only final state.
{f,n}xX^{a,b}
@init q1
q1: (n, {a: q2, b: q3})
q2: (n, {a: q1, b: q3})
q3: (f, {a: q1, b: q2})
{f, n}xX^{a, b}
@init s0_q1_q2
s0_q1_q2: (n, {a: s0_q1_q2, b: s1_q3})
s1_q3: (f, {a: s0_q1_q2, b: s0_q1_q2})
# A deterministic finite automaton:
#
# b
# -----------.
# / |
# .>q1 <------- |
# / | a \ v
# b| |a q3
# \ v b / ^
# `-q2 <------- |
# \ |
# -----------'
# b
{f,n}xX^{a,b}
@init q1
q1: (n, {a: q2, b: q3})
q2: (n, {a: q1, b: q3})
q3: (f, {a: q1, b: q2})
{f, n}xX^{a, b}
@init s0_q1_q2
s0_q1_q2: (n, {a: s0_q1_q2, b: s1_q3})
s1_q3: (f, {a: s0_q1_q2, b: s0_q1_q2})
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment