necesito para analizar código estático-Objective C, principalmente AST, después de mirar en las posibles herramientas que he encontrado que la herramienta Sonido metálico de LLVM puede volcar la AST, por lo que utiliza el terminal para poner a prueba utilizando el siguiente comando:¿Cómo extraer AST del código Objective-C?
clang -cc1 -ast-dump ~/SomeTest.m
pero estoy recibiendo este error:
In file included from /Users/myusername/SomeTest.m:9:
/Users/myusername/SomeTest.h:9:9: fatal error: 'UIKit/UIKit.h' file not found
#import <UIKit/UIKit.h>
^
typedef __int128_t __int128_t;
typedef __uint128_t __uint128_t;
typedef SEL *SEL;
typedef id id;
typedef Class *Class;
struct __va_list_tag {
unsigned int gp_offset;
unsigned int fp_offset;
void *overflow_arg_area;
void *reg_save_area;
};
typedef struct __va_list_tag __va_list_tag;
typedef __va_list_tag __builtin_va_list[1];
@interface [email protected]
@implementation just4testViewController
- (void) dealloc (CompoundStmt 0x7f86b183b110 </Users/myusername/SomeTest.m:14:1, line:16:1>)
- (void) didReceiveMemoryWarning (CompoundStmt 0x7f86b183b2a0 </Users/myusername/SomeTest.m:19:1, line:24:1>)
- (void) viewDidUnload (CompoundStmt 0x7f86b183b430 </Users/myusername/SomeTest.m:37:1, line:41:1>)
- (id) shouldAutorotateToInterfaceOrientation:(id)interfaceOrientation (CompoundStmt 0x7f86b183b648 </Users/myusername/SomeTest.m:44:1, line:47:1>)
@end
1 error generated.
Cualquier idea de por qué me estoy haciendo esto? No me importa usar cualquier herramienta para extraer AST del código Objective-C, siempre que sea confiable y proporcione documentación para la salida
Hola, ¿Has logrado encontrar un analizador para extraer AST del código fuente del objetivo C? ¡Gracias! – ramo