Skip to content
This repository was archived by the owner on Sep 11, 2022. It is now read-only.

Commit 071ed6b

Browse files
committed
Update README.md
1 parent a411667 commit 071ed6b

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ Take the regular expression `(a|b)*abb` for example.
1212

1313
1. Create an NFA.
1414

15-
![KPTaGR.png](https://s2.ax1x.com/2019/10/16/KPTaGR.png)
15+
![1-NFA](https://raw.githubusercontent.com/AlumiK/github-playground/master/Pictures/parse-tree/1_nfa.png)
1616

1717
2. Convert the NFA to a DFA.
1818

19-
![KPTtIJ.png](https://s2.ax1x.com/2019/10/16/KPTtIJ.png)
19+
![1-DFA](https://raw.githubusercontent.com/AlumiK/github-playground/master/Pictures/parse-tree/1_dfa.png)
2020

2121
#### Merge multiple NFAs
2222

2323
Take the regular expressions `a*b+`, `a`, `abb` for example.
2424

2525
1. Create three NFAs and combine them into one large NFA.
2626

27-
![KPTYa4.png](https://s2.ax1x.com/2019/10/16/KPTYa4.png)
27+
![2-NFA](https://raw.githubusercontent.com/AlumiK/github-playground/master/Pictures/parse-tree/2_nfa.png)
2828

2929
2. Convert the DFA to DFA.
3030

31-
![KPTUi9.png](https://s2.ax1x.com/2019/10/16/KPTUi9.png)
31+
![2-DFA](https://raw.githubusercontent.com/AlumiK/github-playground/master/Pictures/parse-tree/2_dfa.png)
3232

3333
### Creating Parse Tree
3434

@@ -57,19 +57,19 @@ Take the regular expressions `a*b+`, `a`, `abb` for example.
5757
? S
5858
terminalSymbols:
5959
# name: regex
60-
a: a
61-
b: b
60+
α: a
61+
β: b
6262
ignoredSymbols:
6363
startSymbol: S
6464
productions:
6565
# - left part -> right part
66-
- S -> C b B A
67-
- A -> A a b
68-
- A -> a b
66+
- S -> C β B A
67+
- A -> A α β
68+
- A -> α β
6969
- B -> C
70-
- B -> D b
71-
- C -> a
72-
- D -> a
70+
- B -> D β
71+
- C -> α
72+
- D -> α
7373
```
7474
7575
3. Generate the parse table.
@@ -82,8 +82,8 @@ Take the regular expressions `a*b+`, `a`, `abb` for example.
8282
</tr>
8383
<tr>
8484
<td></td>
85-
<td>a</td>
86-
<td>b</td>
85+
<td>α</td>
86+
<td>β</td>
8787
<td>$</td>
8888
<td>S</td>
8989
<td>A</td>
@@ -262,4 +262,4 @@ Take the regular expressions `a*b+`, `a`, `abb` for example.
262262
263263
The input string is `abababab`.
264264
265-
![KC59Yt.png](https://s2.ax1x.com/2019/10/15/KC59Yt.png)
265+
![Parse Tree](https://raw.githubusercontent.com/AlumiK/github-playground/master/Pictures/parse-tree/parse_tree.png)

0 commit comments

Comments
 (0)