MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / pcodeParser

Class pcodeParser

arch/armv7/thumb2_disasm/arm_pcode_parser/parse.py:48–638  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46
47
48class pcodeParser(Parser):
49 def __init__(
50 self,
51 whitespace=None,
52 nameguard=None,
53 comments_re=None,
54 eol_comments_re=None,
55 ignorecase=None,
56 left_recursion=False,
57 parseinfo=True,
58 keywords=None,
59 namechars='',
60 buffer_class=pcodeBuffer,
61 **kwargs
62 ):
63 if keywords is None:
64 keywords = KEYWORDS
65 super(pcodeParser, self).__init__(
66 whitespace=whitespace,
67 nameguard=nameguard,
68 comments_re=comments_re,
69 eol_comments_re=eol_comments_re,
70 ignorecase=ignorecase,
71 left_recursion=left_recursion,
72 parseinfo=parseinfo,
73 keywords=keywords,
74 namechars=namechars,
75 buffer_class=buffer_class,
76 **kwargs
77 )
78
79 @graken()
80 def _start_(self):
81 self._statement_()
82 with self._optional():
83 self._token(';')
84 self._check_eof()
85
86 @graken()
87 def _statement_(self):
88 with self._choice():
89 with self._option():
90 self._token('if')
91 self._expr0_()
92 self._token('then')
93 self._statement_()
94
95 def block0():
96 self._token('else')
97 self._statement_()
98 self._closure(block0)
99 with self._option():
100 self._token('UNPREDICTABLE')
101 with self._option():
102 self._token('UNDEFINED')
103 with self._option():
104 self._token('NOT_PERMITTED')
105 with self._option():

Callers 3

genFunction · 0.90
codegencpp.pyFile · 0.90
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected