/system/tools/hidl/c2hal/ |
D | Define.cpp | 21 extern android::status_t parseExpression(android::AST *ast, std::string str); 47 void Define::processContents(AST &ast) { in processContents() argument 48 status_t res = parseExpression(&ast, mSlurp); in processContents() 55 mExpression = ast.getExpression(); in processContents() 56 ast.setExpression(nullptr); in processContents() 58 mExpressionType = mExpression->getType(ast); in processContents() 60 ast.getDefinesScope().enter(getName(), this); in processContents()
|
D | Expression.cpp | 89 Type getType(const AST &ast) override { in getType() 90 return mInner->getType(ast); in getType() 107 Type getType(const AST &ast) override { in getType() 112 Define *define = ast.getDefinesScope().lookup(mValue); in getType() 141 Type getType(const AST &ast) override { in getType() 142 return mRhs->getType(ast); in getType() 164 Type getType(const AST &ast) override { in getType() 165 return coalesceTypes(mLhs->getType(ast), mRhs->getType(ast)); in getType() 189 Type getType(const AST &ast) override { in getType() 190 return coalesceTypes(mMhs->getType(ast), mRhs->getType(ast)); in getType()
|
D | main.cpp | 30 extern status_t parseFile(android::AST *ast); 184 AST ast(path, outputDir, package, isOpenGl); in main() local 186 int res = parseFile(&ast); in main() 193 ast.processContents(); in main() 195 ast.generateCode(); in main()
|
D | c2hal_l.ll | 269 status_t parseFile(AST *ast) { 270 FILE *file = fopen(ast->getFilename().c_str(), "rb"); 277 isOpenGl = ast->isOpenGl(); 281 yylex_init_extra(ast, &scanner); 282 ast->setScanner(scanner); 285 int res = yyparse(ast); 288 ast->setScanner(NULL); 296 status_t parseExpression(AST *ast, std::string str) { 298 isOpenGl = ast->isOpenGl(); 302 yylex_init_extra(ast, &scanner); [all …]
|
D | TypeDef.cpp | 37 void TypeDef::processContents(AST &ast) { in processContents() argument 38 mDeclaration->processContents(ast); in processContents()
|
D | Note.cpp | 52 void Note::processContents(AST &ast) { in processContents() argument 54 mDecl->processContents(ast); in processContents()
|
/system/tools/hidl/ |
D | hidl-gen_y.yy | 46 void enterScope(AST* /* ast */, Scope** scope, Scope* container) { 51 void leaveScope(AST* ast, Scope** scope) { 52 CHECK((*scope) != &ast->getRootScope()); 56 ::android::Location convertYYLoc(const yy::parser::location_type& loc, const AST* ast) { 58 ::android::Position(ast->getCoordinator().makeRelative(*(loc.begin.filename)), 60 ::android::Position(ast->getCoordinator().makeRelative(*(loc.end.filename)), 214 const_cast<std::string *>(&ast->getFilename()); 218 %parse-param { android::AST* const ast } 221 %lex-param { android::AST* const ast } 347 ast->setHeader($1); [all …]
|
D | Coordinator.cpp | 226 status_t Coordinator::parseOptional(const FQName& fqName, AST** ast, std::set<AST*>* parsedASTs, in parseOptional() argument 232 *ast = (*it).second; in parseOptional() 234 if (*ast != nullptr && parsedASTs != nullptr) { in parseOptional() 235 parsedASTs->insert(*ast); in parseOptional() 238 if (*ast == nullptr) { in parseOptional() 256 *ast = new AST(this, &Hash::getHash(path)); in parseOptional() 261 (*ast)->addImplicitImport(fqName.getTypesForPackage()); in parseOptional() 268 delete *ast; in parseOptional() 269 *ast = nullptr; in parseOptional() 276 if (parseFile(*ast, std::move(file)) != OK || (*ast)->postParse() != OK) { in parseOptional() [all …]
|
D | main.cpp | 265 AST* ast = coordinator->parse(fqName); in astGenerationFunction() local 266 if (ast == nullptr) { in astGenerationFunction() 278 (ast->*generate)(out); in astGenerationFunction() 295 AST* ast; in generateJavaForPackage() local 308 ast = coordinator->parse(fqName.getTypesForPackage()); in generateJavaForPackage() 314 ast = coordinator->parse(fqName); in generateJavaForPackage() 317 if (ast == nullptr) { in generateJavaForPackage() 322 Type* type = ast->lookupType(typeName, &ast->getRootScope()); in generateJavaForPackage() 333 ast->generateJava(out, limitToType); in generateJavaForPackage() 391 AST *ast = coordinator->parse(fqName); in isPackageJavaCompatible() local [all …]
|
D | hidl-gen_l.ll | 66 yyscan_t yyscanner, android::AST* const ast, android::Scope** const scope) 99 ast->addUnhandledComment( 101 convertYYLoc(*yylloc, ast), 196 status_t parseFile(AST* ast, std::unique_ptr<FILE, std::function<void(FILE *)>> file) { 202 Scope* scopeStack = ast->getMutableRootScope(); 203 int res = yy::parser(scanner, ast, &scopeStack).parse(); 207 if (res != 0 || ast->syntaxErrors() != 0) {
|
D | AST.cpp | 398 AST* ast = mCoordinator->parse(subFQName, &mImportedASTs, Coordinator::Enforce::NONE); in importFQName() local 399 if (ast == nullptr) { in importFQName() 405 mImportedTypes.erase(ast); in importFQName() 502 void AST::addImportedAST(AST *ast) { in addImportedAST() argument 503 mImportedASTs.insert(ast); in addImportedAST() 815 for (const auto &ast : mImportedASTs) { in getImportedPackagesHierarchy() local 816 if (importSet->find(ast->package()) != importSet->end()) { in getImportedPackagesHierarchy() 817 ast->getImportedPackagesHierarchy(&newSet); in getImportedPackagesHierarchy() 826 AST* ast = mCoordinator->parse(name, nullptr /* imported */, Coordinator::Enforce::NONE); in getAllImportedNames() local 827 ast->getAllImportedNames(allImportNames); in getAllImportedNames() [all …]
|
D | hidl-gen_l.h | 30 status_t parseFile(AST* ast, std::unique_ptr<FILE, std::function<void(FILE*)>> file);
|
/system/tools/hidl/lint/lints/ |
D | importTypes.cpp | 26 static void importTypes(const AST& ast, std::vector<Lint>* errors) { in importTypes() argument 27 for (const ImportStatement& import : ast.getImportStatements()) { in importTypes() 30 if (fqName.package() == ast.package().package() && in importTypes() 31 fqName.version() == ast.package().version()) { in importTypes()
|
D | emptyStructs.cpp | 28 static void checkSmallStructs(const AST& ast, std::vector<Lint>* errors) { in checkSmallStructs() argument 31 ast.getRootScope().recursivePass( in checkSmallStructs() 40 ast.getRootScope().location())) { in checkSmallStructs()
|
D | enumMaxAndAll.cpp | 33 static void enumValueNames(const AST& ast, std::vector<Lint>* errors) { in enumValueNames() argument 35 ast.getRootScope().recursivePass( in enumValueNames() 41 if (!Location::inSameFile(ast.getRootScope().location(), enumType->location())) { in enumValueNames()
|
D | unhandledComments.cpp | 26 static void unhandledComments(const AST& ast, std::vector<Lint>* errors) { in unhandledComments() argument 27 for (const DocComment* docComment : ast.getUnhandledComments()) { in unhandledComments()
|
D | namingConventions.cpp | 33 static void namingConventions(const AST& ast, std::vector<Lint>* errors) { in namingConventions() argument 35 ast.getRootScope().recursivePass( in namingConventions() 43 if (!Location::inSameFile(ast.getRootScope().location(), namedType->location())) { in namingConventions()
|
D | methodVersions.cpp | 89 static void methodVersions(const AST& ast, std::vector<Lint>* errors) { in methodVersions() argument 90 const Interface* iface = ast.getInterface(); in methodVersions() 108 if (checkMethodVersion(*method, ast.package(), &errorString)) { in methodVersions()
|
D | oneway.cpp | 72 static void onewayLint(const AST& ast, std::vector<Lint>* errors) { in onewayLint() argument 73 const Interface* iface = ast.getInterface(); in onewayLint()
|
D | safeunion.cpp | 111 static void safeunionLint(const AST& ast, std::vector<Lint>* errors) { in safeunionLint() argument 115 lintUnionRecursively(&ast.getRootScope(), &visited, errors); in safeunionLint()
|
/system/tools/hidl/hidl2aidl/ |
D | main.cpp | 113 AST* ast = coordinator.parse(target); in parse() local 114 if (ast == nullptr) { in parse() 119 if (!ast->getUnhandledComments().empty()) { in parse() 124 for (const DocComment* docComment : ast->getUnhandledComments()) { in parse() 130 return ast; in parse() 252 AST* ast = parse(coordinator, target); in main() local 254 CHECK(!ast->isInterface()); in main() 256 std::vector<const NamedType*> types = ast->getRootScope().getSortedDefinedTypes(); in main() 275 AST* ast = parse(coordinator, target); in main() local 277 const Interface* iface = ast->getInterface(); in main()
|
/system/tools/hidl/lint/ |
D | LintRegistry.cpp | 26 void LintRegistry::runAllLintFunctions(const AST& ast, std::vector<Lint>* errors) { in runAllLintFunctions() argument 28 lintFunction(ast, errors); in runAllLintFunctions()
|
D | main.cpp | 130 AST* ast = coordinator.parse(target); in main() local 131 if (ast == nullptr) { in main() 137 LintRegistry::get()->runAllLintFunctions(*ast, &lints); in main()
|
D | Android.bp | 34 "libhidl-gen-ast", 49 "libhidl-gen-ast",
|
/system/tools/hidl/lint/test/ |
D | main.cpp | 61 AST* ast = coordinator.parse(fqName); in getLintsForHal() local 62 if (ast == nullptr) { in getLintsForHal() 66 LintRegistry::get()->runAllLintFunctions(*ast, errors); in getLintsForHal()
|