From c7044367124c7257682bae2ff030ea30a5e135e2 Mon Sep 17 00:00:00 2001
From: Henning Glawe <glaweh@debian.org>
Date: Fri, 19 Aug 2016 01:37:04 +0200
Subject: [PATCH] properly define 'match' and 'coverageIgnore' as 2 bits wide

---
 common/python/nomadcore/simple_parser.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/common/python/nomadcore/simple_parser.py b/common/python/nomadcore/simple_parser.py
index 368929f..34d2c60 100644
--- a/common/python/nomadcore/simple_parser.py
+++ b/common/python/nomadcore/simple_parser.py
@@ -700,8 +700,8 @@ class CompiledMatcher(object):
             'matcher_does_nothing': self.matcher.does_nothing, # matcher without effect
             'which_re': 'end' if targetStartEnd else 'start',
             # classification of match
-            'match': 0, # 0 - no, 1 - partial, 2 - full
-            'coverageIgnore': 0, # 0 - no, 1 - local, 2 - global
+            'match': 0, # 0 - no, 1 - partial, 3 - full
+            'coverageIgnore': 0, # 0 - no, 1 - local, 3 - global
             # overall span of match
             'span': [],
             # capture groups
@@ -710,7 +710,7 @@ class CompiledMatcher(object):
         if match:
             result['span'] = match.span()
             if result['span'][0] == 0 and result['span'][1] == len(line):
-                result['match'] = 2 # full match
+                result['match'] = 3 # full match
             else:
                 result['match'] = 1 # partial match
             if self.matcher.coverageIgnore: # matcher is local coverageIgnore
@@ -732,7 +732,7 @@ class CompiledMatcher(object):
         else:
             m_ci = parser.coverageIgnore.match(line) # check global coverageIgnore
             if m_ci:
-                result['coverageIgnore'] = 2
+                result['coverageIgnore'] = 3
                 result['span'] = [m_ci.start(), m_ci.end()]
         return result
 
-- 
GitLab