Worked on SRegex transpiler to RegEx,

This commit is contained in:
2022-07-17 03:09:42 -04:00
parent 7197ef4262
commit 5ae405e284
5 changed files with 1037 additions and 6 deletions

View File

@ -9,7 +9,7 @@ Langauge : A set of strings over a particular alphabet.
L1(Sigma) = { a, aa, b, ab, ba, bba, .. } (Infinite)
L2(Sigma) = { aa, bb, ab, ba }; (Length = 2, Finite)
Any time you constraint a langauge you are
Any time you constrain a langauge you are
defining a formal grammar.
## Formal Grammars:

View File

@ -1,7 +1,7 @@
## Concatenation
Regex : `/^AB%/`
Psuedo: `str.start str(AB) str.end`
Regex : `/^AB$/`
Psuedo: `start str(AB) end`
Machine:
```
@ -13,7 +13,7 @@ Submachine_A --epsilon--> Submachine_B
## Union
Regex : `/^A|B$/`
Psuedo: `str.start glyph(A) | glyph(B) str.end`
Psuedo: `start glyph(A) | glyph(B) end`
Machine:
```
@ -27,11 +27,11 @@ Machine:
## Kleene Closure
Regex : `/^A*$/`
Psuedo: `str.start glyph(A).repeating str.end`
Psuedo: `start glyph(A).repeating end`
Machine:
```
<------episolon-------
<------episilon-------
/ \
->o --epsilon--> o --A--> o --epsilon--> (o)
\ /