From a3cb4c5d02f0ee75094fc27814c71f8a025d034b Mon Sep 17 00:00:00 2001 From: sbrandt Date: Wed, 3 Apr 2013 19:12:46 +0000 Subject: Add the basic grammar files, and the changes to the piraha code necessary to parse all of Cactus. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4990 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/piraha/NegLookAhead.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/piraha/NegLookAhead.cc (limited to 'src/piraha/NegLookAhead.cc') 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; +} -- cgit v1.2.3