LangStudies/App/RegM/Lectures/Lecture.5.6.7.Notes.md
Ed94 17c3b8fe36 SRegEx works!!!!
Its not a full flegged transpiler but it works at least on RDP's lexer. I can expand on demand.
2022-07-17 07:32:57 -04:00

727 B

Concatenation

Regex : /^AB$/
Psuedo: start AB end

Machine:

->o --A--> o --epsilon--> o --B--> (o)

Submachine_A --epsilon--> Submachine_B

Union

Regex : /^A|B$/
Psuedo: start A | B end

Machine:

    epsilon--> o --A--> o --epsilon
   /                               \
->o                                 ->(o)
   \                               /
    epsilon--> o --B--> o --epsilon

Kleene Closure

Regex : /^A*$/
Psuedo: start A.repeat(0-) end

Machine:

                   <------episilon-------
                  /                      \
->o --epsilon--> o --A--> o --epsilon--> (o)
   \                                     /
    -------------epsilon---------------->