+ ret = ctf_scanner_append_ast(scanner);
+ if (ret) {
+ fprintf(stdout, "Error creating AST\n");
+ goto end;
+ }
+
+ ret = ctf_visitor_print_xml(stdout, 0, &scanner->ast->root);
+ if (ret) {
+ fprintf(stdout, "Error visiting AST for XML output\n");
+ goto end;
+ }
+
+ ret = ctf_visitor_semantic_check(stdout, 0, &scanner->ast->root);
+ if (ret) {
+ fprintf(stdout, "Error in CTF semantic validation %d\n", ret);
+ goto end;
+ }
+end: