modure: Initial module, using re1.5 (which is based on re1 codebase).

https://github.com/pfalcon/re1.5
diff --git a/py/builtin.h b/py/builtin.h
index 9c8b2b9..526157f 100644
--- a/py/builtin.h
+++ b/py/builtin.h
@@ -90,3 +90,4 @@
 extern const mp_obj_module_t mp_module_uctypes;
 extern const mp_obj_module_t mp_module_zlibd;
 extern const mp_obj_module_t mp_module_ujson;
+extern const mp_obj_module_t mp_module_ure;
diff --git a/py/builtintables.c b/py/builtintables.c
index 5712a3e..1fd60d8 100644
--- a/py/builtintables.c
+++ b/py/builtintables.c
@@ -209,6 +209,9 @@
 #if MICROPY_PY_UJSON
     { MP_OBJ_NEW_QSTR(MP_QSTR_ujson), (mp_obj_t)&mp_module_ujson },
 #endif
+#if MICROPY_PY_URE
+    { MP_OBJ_NEW_QSTR(MP_QSTR_ure), (mp_obj_t)&mp_module_ure },
+#endif
 
     // extra builtin modules as defined by a port
     MICROPY_PORT_BUILTIN_MODULES
diff --git a/py/mpconfig.h b/py/mpconfig.h
index bf86862..92b61d0 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -394,6 +394,10 @@
 #define MICROPY_PY_UJSON (0)
 #endif
 
+#ifndef MICROPY_PY_URE
+#define MICROPY_PY_URE (0)
+#endif
+
 /*****************************************************************************/
 /* Hooks for a port to add builtins                                          */
 
diff --git a/py/py.mk b/py/py.mk
index fb59b89..bd5e695 100644
--- a/py/py.mk
+++ b/py/py.mk
@@ -113,6 +113,10 @@
 	../extmod/moductypes.o \
 	../extmod/modzlibd.o \
 	../extmod/modujson.o \
+	../extmod/modure.o \
+	../extmod/re1.5/compilecode.o \
+	../extmod/re1.5/dumpcode.o \
+	../extmod/re1.5/recursiveloop.o \
 
 # prepend the build destination prefix to the py object files
 PY_O = $(addprefix $(PY_BUILD)/, $(PY_O_BASENAME))
@@ -166,3 +170,6 @@
 # optimising vm for speed, adds only a small amount to code size but makes a huge difference to speed (20% faster)
 $(PY_BUILD)/vm.o: CFLAGS += $(CSUPEROPT)
 
+# Additional options for 3rd-party libs
+
+$(PY_BUILD)/../extmod/re1.5/recursiveloop.o: CFLAGS += "-Dre1_5_fatal(x)=assert(!x)"
diff --git a/py/qstrdefs.h b/py/qstrdefs.h
index 6a63f07..eb99e1b 100644
--- a/py/qstrdefs.h
+++ b/py/qstrdefs.h
@@ -473,3 +473,12 @@
 Q(dumps)
 Q(loads)
 #endif
+
+#if MICROPY_PY_URE
+Q(ure)
+Q(compile)
+Q(match)
+Q(search)
+Q(group)
+Q(DEBUG)
+#endif