Description: Fix breakage arising from newer versions of pyparsing
 The original implementation of the following code was
 .
 tokenDict = tokens.access[0].asDict()
 .
 The problem is that later versions of pyparsing return different
 result strings for the asDict() method compared to earlier ones.
 The specific breakage that occurred was between Ubuntu 16.04 (pyparsing 2.0.3)
 and Ubuntu 16.10 (pyparsing 2.1.8). The dictionary returned by
 pyparsing 2.1.8 has elements laid out in a different form, which then
 breaks later code in this function (specifically
 accessDict[key] = (' '.join(value[0].asList()), value.slice.start) )
 .
 To fix this, I skip the call to .asDict() and replace it with a simpler
 version of what pyparsing 2.0.3 was doing internally.
 This is backwards and forwards compatible for our purposes.
 It's not Python 3 safe, though; also the pyparsing people may have changed
 their code for good reason. Beware.
Author: Mattias Johnsson <mattias.johnsson@mq.edu.au>
Origin: https://sourceforge.net/p/xmds/code/2973
Reviewed-by: Rafael Laboissière <rafael@debian.org>
Last-Update: 2017-01-15

--- a/xpdeint/CodeParser.py
+++ b/xpdeint/CodeParser.py
@@ -151,7 +151,29 @@
     for tokens, start, end in parser.scanString(codeBlock.codeString):
         if tokens.name not in components: continue
         accessDict = {}
-        tokenDict = tokens.access[0].asDict()
+
+        # Note by MTJ:
+        #
+        # The original implementation of the following code was 
+        #
+        # tokenDict = tokens.access[0].asDict()
+        #
+        # The problem is that later versions of pyparsing return different
+        # result strings for the asDict() method compared to earlier ones.
+        # The specific breakage that occurred was between Ubuntu 16.04 (pyparsing 2.0.3)
+        # and Ubuntu 16.10 (pyparsing 2.1.8). The dictionary returned by 
+        # pyparsing 2.1.8 has elements laid out in a different form, which then
+        # breaks later code in this function (specifically 
+        # accessDict[key] = (' '.join(value[0].asList()), value.slice.start) )
+        # 
+        # To fix this, I skip the call to .asDict() and replace it with a simpler 
+        # version of what pyparsing 2.0.3 was doing internally.
+        # This is backwards and forwards compatible for our purposes.
+        # It's not Python 3 safe, though; also the pyparsing people may have changed
+        # their code for good reason. Beware.
+
+        tokenDict = dict(tokens.access[0].iteritems())
+
         for key, value in tokenDict.items():
             accessDict[key] = (' '.join(value[0].asList()), value.slice.start)
         results.append((tokens.name, accessDict, slice(start, end)))
