wrap/gtwrap/interface_parser/__init__.py
Go to the documentation of this file.
1 """
2 GTSAM Copyright 2010-2020, Georgia Tech Research Corporation,
3 Atlanta, Georgia 30332-0415
4 All Rights Reserved
5 
6 See LICENSE for the license information
7 
8 Parser to get the interface of a C++ source file
9 
10 Author: Duy Nguyen Ta, Fan Jiang, Matthew Sklar, Varun Agrawal, and Frank Dellaert
11 """
12 
13 import sys
14 
15 import pyparsing # type: ignore
16 
17 from .classes import *
18 from .declaration import *
19 from .enum import *
20 from .function import *
21 from .module import *
22 from .namespace import *
23 from .template import *
24 from .tokens import *
25 from .type import *
26 
27 # Fix deepcopy issue with pyparsing
28 # Can remove once https://github.com/pyparsing/pyparsing/issues/208 is resolved.
29 if sys.version_info >= (3, 8):
30 
31  def fixed_get_attr(self, item):
32  """
33  Fix for monkey-patching issue with deepcopy in pyparsing.ParseResults
34  """
35  if item == '__deepcopy__':
36  raise AttributeError(item)
37  try:
38  return self[item]
39  except KeyError:
40  return ""
41 
42  # apply the monkey-patch
43  pyparsing.ParseResults.__getattr__ = fixed_get_attr
44 
45 pyparsing.ParserElement.enablePackrat()
gtwrap.interface_parser.fixed_get_attr
def fixed_get_attr(self, item)
Definition: wrap/gtwrap/interface_parser/__init__.py:31


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:05