summaryrefslogtreecommitdiff
path: root/src/piraha/NegLookAhead.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/piraha/NegLookAhead.cc')
-rw-r--r--src/piraha/NegLookAhead.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/piraha/NegLookAhead.cc b/src/piraha/NegLookAhead.cc
new file mode 100644
index 00000000..a70e5539
--- /dev/null
+++ b/src/piraha/NegLookAhead.cc
@@ -0,0 +1,10 @@
+#include "Piraha.hpp"
+
+using namespace piraha;
+
+bool NegLookAhead::match(Matcher *m) {
+ int pos = m->pos;
+ bool b = pattern->match(m);
+ m->pos = pos;
+ return !b;
+}