# efficiently detect the symbols without using RAM. See common.py for formatting # ---------------------------------------------------------------------------------------- import subprocess import re import json import sys import os sys.path.append(".") import common # Scans files for comments of the form /*JSON......*/ and then builds a tree structure of ifs to # efficiently detect the symbols without using RAM. See common.py for formatting jsondatas = common.get_jsondata(False) includes = common.get_includes_from_jsondata(jsondatas) # ------------------------------------------------------------------------------------------------------ def treewalk(tree, name, jsondata): if len(name) == 0: tree[""] = jsondata else: firstchar = name[:1] if not firstchar in tree: tree[firstchar] = {} treewalk(tree[firstchar], name[1:], jsondata) # ------------------------------------------------------------------------------------------------------ # Creates something like 'name[0]=='s' && name[1]=='e' && name[2]=='t' && name[3]==0'
# efficiently detect the symbols without using RAM. See common.py for formatting # ---------------------------------------------------------------------------------------- import subprocess; import re; import json; import sys; import os; sys.path.append("."); import common # Scans files for comments of the form /*JSON......*/ and then builds a tree structure of ifs to # efficiently detect the symbols without using RAM. See common.py for formatting jsondatas = common.get_jsondata(False) includes = common.get_includes_from_jsondata(jsondatas) # ------------------------------------------------------------------------------------------------------ def treewalk(tree, name, jsondata): if len(name)==0: tree[""] = jsondata else: firstchar = name[:1] if not firstchar in tree: tree[firstchar] = {} treewalk(tree[firstchar], name[1:], jsondata) # ------------------------------------------------------------------------------------------------------ # Creates something like 'name[0]=='s' && name[1]=='e' && name[2]=='t' && name[3]==0' def createStringCompare(varName, checkOffsets, checkCharacters): checks = []