"_Thread_local" return y_tab.THREAD_LOCAL
"__func__" return y_tab.FUNC_NAME
-FILE|GRAM_STYPE|YYLTYPE|assoc|bool|boundary|code_props|code_props_type|location|muscle_kind|named_ref|param_type|scanflags_t|size_t|symbol|symbol_class|symbol_list|uniqstr|variant|warnings|u?int(8|16|32|64)_t|BaseType_t|TickType_t {
+FILE|GRAM_STYPE|YYLTYPE|assoc|bool|boundary|code_props|code_props_type|location|muscle_kind|named_ref|param_type|scanflags_t|size_t|symbol|symbol_class|symbol_list|uniqstr|variant|warnings|u?int(8|16|32|64)_t|BaseType_t|TickType_t|AmazonGetFfsDeviceTypeIdProductId|AmazonStateFfsDeviceTypeIdProductId|AmazonGetFfsPin|AmazonStateFfsPin|AmazonGetFfsX509Csr|AmazonStateFfsX509Csr|AmazonSetFfsX509CertChainDownload|AmazonGetFfsX509CertChainStatus|AmazonFfsX509CertChainStorageStatus|AmazonStateFfsX509CertChainStatus|AmazonSetFfsStaticKey {
# THIS IS A HACK FOR NOW
return y_tab.TYPEDEF_NAME
}
root = y_tab.yyparse(t_def.AST.TranslationUnit)
element.serialize(root, 'a.xml', 'utf-8')
root = element.deserialize('a.xml', t_def.factory, 'utf-8')
-xml.etree.ElementTree.dump(root)
+#xml.etree.ElementTree.dump(root)
-for i in root:
+for i in root.children:
if isinstance(i, t_def.AST.Declaration):
- base_type = i[0].get_type()
- for j in i[1]:
- type, name = j[0].get_type_and_name(base_type)
+ base_type = i.children[0].get_type()
+ for j in i.children[1].children:
+ type, name = j.children[0].get_type_and_name(base_type)
sys.stdout.write('{0:s} {1:s}\n'.format(str(type), name))