From 1e6f1e445e1c513e1d4f82aa87c9159b71a48367 Mon Sep 17 00:00:00 2001
From: Henning Glawe <glaweh@debian.org>
Date: Tue, 6 Sep 2016 08:53:06 +0200
Subject: [PATCH] fix case when floating matcher has submatchers

---
 common/python/nomadcore/simple_parser.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/python/nomadcore/simple_parser.py b/common/python/nomadcore/simple_parser.py
index 445649a..ba0dd5e 100644
--- a/common/python/nomadcore/simple_parser.py
+++ b/common/python/nomadcore/simple_parser.py
@@ -1159,7 +1159,7 @@ class SimpleParser(object):
                 idx -= 1
         elif self.context[len(self.context) - 1].compiledMatcher.floating and self.parserBuilder.compiledMatchers[targetMatcher.index].floating:
             # we are in a floating match and we go to another one, rewind only the floating part
-            while not states[idx].floating:
+            while not self.context[idx].compiledMatcher.floating:
                 idx += 1
             idx -= 1
         # close
-- 
GitLab