From ce05175372a9ddca1a225db0765ace1127a39293 Mon Sep 17 00:00:00 2001 From: Nicholas Date: Fri, 12 Nov 2021 09:22:01 -0800 Subject: chore: simplified organizational structure --- sys/libsre/sre.h | 93 -------------------------------------------------------- 1 file changed, 93 deletions(-) delete mode 100644 sys/libsre/sre.h (limited to 'sys/libsre/sre.h') diff --git a/sys/libsre/sre.h b/sys/libsre/sre.h deleted file mode 100644 index a7ace1a..0000000 --- a/sys/libsre/sre.h +++ /dev/null @@ -1,93 +0,0 @@ -#pragma once - -#include -#include - -enum -{ - Toperator = RuneMask + 1, - Tstart = Toperator, - Trparen, - Tlparen, - Tor, - Tcat, - Tstar, - Tplus, - Tqmark, - - Tany = Toperator << 1, - Tnop, - Tbol, - Teol, - Tcclass, - Tnclass, - Tend, - - isoptor = Toperator, - isopand = Toperator << 1, -}; - -typedef struct Class Class; -typedef struct State State; -typedef struct Patch Patch; -typedef struct Node Node; - -typedef struct Parser Parser; -typedef struct Machine Machine; - -struct Class -{ - rune *end; - rune span[64]; -}; - -struct State -{ - int type; - union { - State *l; - }; - union { - State *r; - State *out; - }; -}; - -struct Patch -{ - State *s; - Patch *link; -}; - -struct Node -{ - State *beg; - State *end; -}; - -struct Parser -{ - Machine *mach; - byte *re; - int wasopand : 1; - int *optor, optorstk[1000]; - Node *node, nodestk[1000]; -}; - -struct Machine -{ - /* memory buffers */ - struct { - void *heap; - mem·Reallocator; - }; - State *state, statestk[1000]; - - struct { - int cap; - int len; - Class *c; - } class; - - State *entry; -}; -- cgit v1.2.1