Last active
March 22, 2022 13:04
-
-
Save conartist6/0f00f4c4f8f956762995a72b64b10937 to your computer and use it in GitHub Desktop.
@iter-tools/regex data structure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
┌───────────────┐ | |
│ Expression │ | |
│ root: true │ | |
│ globalIdx: 1 │ | |
└───────┬───────┘ | |
parentSeq │ ▲ | |
│ │ expr | |
┌──────────────┐ ┌───────┴─┴─────┐ | |
│ State │ │ State │ | |
│ type: cont │ │ type: success │ | |
└──────────────┘ └───────┬───────┘ | |
▲ │ ▲ | |
│ state ▼ │ state | |
better ┌────────┴─────┐ better ┌─────────┴─────┐ | |
null ◄──┤ Sequence │◄─────────┤ Sequence │ | |
│ │ worse │ │ worse | |
└──────┬───────┴─────────►└───────────────┴──► null | |
parentExpr │ ▲ | |
▼ │ best | |
┌────────┴─────┐ | |
│ Expression │ | |
│ │ | |
└──────┬───────┘ | |
parentSeq │ ▲ | |
│ │ expr | |
┌──────────────┐ ┌──────┴─┴─────┐ | |
│ State │ │ State │ | |
│ type: cont │ │ type: expr │ | |
└──────────────┘ └──────┬───────┘ | |
▲ │ ▲ | |
│ state ▼ │ state | |
better ┌────────┴─────┐ better ┌────────┴─────┐ | |
null ◄──┤ Sequence │◄─────────┤ Sequence │ | |
│ │ worse │ │ worse | |
└──────┬───────┴─────────►└──────────────┴──► null | |
parentExpr │ ▲ | |
▼ │ best | |
┌────────┴─────┐ | |
│ Expression │ | |
│ root: true │ | |
│ globalIdx: 0 │ | |
└──────────────┘ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment