|
@@ -36,10 +36,10 @@ with open(infile, 'r') as file:
|
|
|
preamble_regex = re.compile( '^(.*?)^(struct|const struct|static struct|static const struct)', re.MULTILINE | re.DOTALL )
|
|
|
|
|
|
preamble = re.search( preamble_regex, data )
|
|
|
-struct_block_regex = re.compile( '^(struct|const struct|static struct|static const struct).*?(\w+) (.*?)\[\] = {(.*?)^};', re.MULTILINE | re.DOTALL )
|
|
|
-field_regex = re.compile( '{.*?},', re.MULTILINE | re.DOTALL )
|
|
|
-cpuid_regex = re.compile( '\.cpuid = (.*?),', re.MULTILINE | re.DOTALL )
|
|
|
-name_regex = re.compile( '\.name = (.*?),', re.MULTILINE | re.DOTALL )
|
|
|
+struct_block_regex = re.compile(r'^(struct|const struct|static struct|static const struct).*?(\w+) (.*?)\[\] = {(.*?)^};', re.MULTILINE | re.DOTALL )
|
|
|
+field_regex = re.compile(r'{.*?},', re.MULTILINE | re.DOTALL )
|
|
|
+cpuid_regex = re.compile(r'\.cpuid = (.*?),', re.MULTILINE | re.DOTALL )
|
|
|
+name_regex = re.compile(r'\.name = (.*?),', re.MULTILINE | re.DOTALL )
|
|
|
|
|
|
# create a dictionary structure to store all the structs, their
|
|
|
# types and then their fields.
|