Initial changes to support use of const_generator.py

This commit is contained in:
Chris Eagle
2015-08-28 19:41:13 -07:00
parent 3f8370b4f8
commit 1a081c5ed8
12 changed files with 88 additions and 1420 deletions

16
bindings/const_generator.py Normal file → Executable file
View File

@ -36,6 +36,22 @@ template = {
'x86.h': 'x86',
'sparc.h': 'sparc',
'm68k.h': 'm68k',
'unicorn.h': 'Unicorn',
'comment_open': '//',
'comment_close': '',
},
'java': {
'header': "// For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT\n\npackage unicorn;\n\npublic interface %sConst {\n",
'footer': "\n}\n",
'line_format': ' public static final int %s = %s;\n',
'out_file': './java/unicorn/%sConst.java',
# prefixes for constant filenames of all archs - case sensitive
'arm.h': 'Arm',
'arm64.h': 'Arm64',
'mips.h': 'Mips',
'x86.h': 'X86',
'sparc.h': 'Sparc',
'm68k.h': 'M68k',
'unicorn.h': 'unicorn',
'comment_open': '//',
'comment_close': '',