summaryrefslogtreecommitdiff
path: root/lib/regex/types.myr
diff options
context:
space:
mode:
Diffstat (limited to 'lib/regex/types.myr')
-rw-r--r--lib/regex/types.myr52
1 files changed, 27 insertions, 25 deletions
diff --git a/lib/regex/types.myr b/lib/regex/types.myr
index a1e0208..b1ed4e3 100644
--- a/lib/regex/types.myr
+++ b/lib/regex/types.myr
@@ -11,31 +11,6 @@ pkg regex =
`Badescape char
;;
- type ast = union
- /* basic string building */
- `Alt (ast#, ast#)
- `Cat (ast#, ast#)
-
- /* repetition */
- `Star ast#
- `Rstar ast#
- `Plus ast#
- `Rplus ast#
- `Quest ast#
-
- /* end matches */
- `Chr char
- `Ranges char[2][:]
-
- /* meta */
- `Cap (std.size, ast#) /* id, ast */
- `Bol /* beginning of line */
- `Eol /* end of line */
- `Bow /* beginning of word */
- `Eow /* end of word */
- ;;
-
-
type regex = struct
/* compile state */
debug : bool
@@ -53,11 +28,38 @@ pkg regex =
nthr : std.size
str : byte[:]
strp : std.size
+ nexttid : std.size
/* debug state */
astloc : std.htab(ast#, std.size)#
+ traces : std.bitset#[:]
pcidx : std.size[:]
lastip : std.size
+ lastthr : std.size
+ ;;
+
+ type ast = union
+ /* basic string building */
+ `Alt (ast#, ast#)
+ `Cat (ast#, ast#)
+
+ /* repetition */
+ `Star ast#
+ `Rstar ast#
+ `Plus ast#
+ `Rplus ast#
+ `Quest ast#
+
+ /* end matches */
+ `Chr char
+ `Ranges char[2][:]
+
+ /* meta */
+ `Cap (std.size, ast#) /* id, ast */
+ `Bol /* beginning of line */
+ `Eol /* end of line */
+ `Bow /* beginning of word */
+ `Eow /* end of word */
;;
pkglocal type rethread = struct