summaryrefslogtreecommitdiffstatshomepage
path: root/extmod/re1.5/recursiveloop.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-10-15 04:43:13 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-10-15 04:44:07 +0300
commit95908b0f50e26fe2c90687966b60a0cf195f71de (patch)
tree4bdbe99b47accb07ae45e50a8944be6a67679313 /extmod/re1.5/recursiveloop.c
parentd27c0bb3aa3e571a9efc43fa54c16b85e91a7b03 (diff)
downloadmicropython-95908b0f50e26fe2c90687966b60a0cf195f71de.tar.gz
micropython-95908b0f50e26fe2c90687966b60a0cf195f71de.zip
modure: Update to re1.5 v0.6, support for char sets/classes ([a-c]).
Diffstat (limited to 'extmod/re1.5/recursiveloop.c')
-rw-r--r--extmod/re1.5/recursiveloop.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/extmod/re1.5/recursiveloop.c b/extmod/re1.5/recursiveloop.c
index 7b95eb4c95..26c6da43de 100644
--- a/extmod/re1.5/recursiveloop.c
+++ b/extmod/re1.5/recursiveloop.c
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "regexp.h"
+#include "re1.5.h"
static int
recursiveloop(char *pc, const char *sp, Subject *input, const char **subp, int nsubp)
@@ -23,6 +23,12 @@ recursiveloop(char *pc, const char *sp, Subject *input, const char **subp, int n
case Any:
sp++;
continue;
+ case Class:
+ if (!_re1_5_classmatch(pc, sp))
+ return 0;
+ pc += *(unsigned char*)pc * 2 + 1;
+ sp++;
+ continue;
case Match:
return 1;
case Jmp: