diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-10-15 04:43:13 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-10-15 04:44:07 +0300 |
commit | 95908b0f50e26fe2c90687966b60a0cf195f71de (patch) | |
tree | 4bdbe99b47accb07ae45e50a8944be6a67679313 /extmod/re1.5/dumpcode.c | |
parent | d27c0bb3aa3e571a9efc43fa54c16b85e91a7b03 (diff) | |
download | micropython-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/dumpcode.c')
-rw-r--r-- | extmod/re1.5/dumpcode.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/extmod/re1.5/dumpcode.c b/extmod/re1.5/dumpcode.c index b91ded03a6..ca41cfeda4 100644 --- a/extmod/re1.5/dumpcode.c +++ b/extmod/re1.5/dumpcode.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" void re1_5_dumpcode(ByteProg *prog) { @@ -32,6 +32,16 @@ void re1_5_dumpcode(ByteProg *prog) case Any: printf("any\n"); break; + case Class: { + int num = code[pc++]; + printf("class %d", num); + while (num--) { + printf(" 0x%02x-0x%02x", code[pc], code[pc + 1]); + pc += 2; + } + printf("\n"); + break; + } case Match: printf("match\n"); break; |