diff options
author | Gustavo Niemeyer <gustavo@niemeyer.net> | 2003-10-17 22:13:16 (GMT) |
---|---|---|
committer | Gustavo Niemeyer <gustavo@niemeyer.net> | 2003-10-17 22:13:16 (GMT) |
commit | ad3fc44ccb40f2ad33c0d09f5a2dfbd4feb442eb (patch) | |
tree | 929ea71dea18a5ee0c5c862bbb39d37b693209ad /Modules/sre.h | |
parent | 41e2809febd6e09a34adf21beb6d2ae2360fdc46 (diff) | |
download | cpython-ad3fc44ccb40f2ad33c0d09f5a2dfbd4feb442eb.zip cpython-ad3fc44ccb40f2ad33c0d09f5a2dfbd4feb442eb.tar.gz cpython-ad3fc44ccb40f2ad33c0d09f5a2dfbd4feb442eb.tar.bz2 |
Implemented non-recursive SRE matching.
Diffstat (limited to 'Modules/sre.h')
-rw-r--r-- | Modules/sre.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Modules/sre.h b/Modules/sre.h index a7fdfba..452e77a 100644 --- a/Modules/sre.h +++ b/Modules/sre.h @@ -55,6 +55,7 @@ typedef unsigned int (*SRE_TOLOWER_HOOK)(unsigned int ch); typedef struct SRE_REPEAT_T { int count; SRE_CODE* pattern; /* points to REPEAT operator arguments */ + void* last_ptr; /* helper to check for infinite loops */ struct SRE_REPEAT_T *prev; /* points to previous repeat context */ } SRE_REPEAT; @@ -74,10 +75,11 @@ typedef struct { int lastmark; void* mark[SRE_MARK_SIZE]; /* dynamically allocated stuff */ - void** mark_stack; - int mark_stack_size; - int mark_stack_base; - SRE_REPEAT *repeat; /* current repeat context */ + char* data_stack; + int data_stack_size; + int data_stack_base; + /* current repeat context */ + SRE_REPEAT *repeat; /* hooks */ SRE_TOLOWER_HOOK lower; } SRE_STATE; |