Fleshed out the UI for RegM, fixes to SRegEx

This commit is contained in:
2022-07-17 10:18:24 -04:00
parent 77e9e0431e
commit 2041732e28
8 changed files with 281 additions and 25 deletions

View File

@ -9,3 +9,31 @@ SRegEx: `a.repeat(1-) | set(0-3)`
`A?` === `A|ε` === `A.repeat(0-1)`
`[0-9]` === `0|1|2|3|4|5|6|7|8|9` === `set(0-9)`
# NFA Optimizations
Ex:
RegEx : `/[0-2]+/`
SRegEx: `set(0-2).repeat(1-)`
Machine (Optimized):
```
|<-epsi-<|
->o -0-> (o)
\--1-->/
\-2->/
```
A* (Optimized)
```
->o -A--> (o)
\-epsi->/
```
`[characters]`
```
->o --<num>--> (o)
..........
```