Home
last modified time | relevance | path

Searched refs:ast (Results 1 – 25 of 28) sorted by relevance

12

/system/tools/hidl/c2hal/
DDefine.cpp21 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()
DExpression.cpp89 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()
Dmain.cpp30 extern status_t parseFile(android::AST *ast);
179 AST ast(path, outputDir, package, isOpenGl); in main() local
181 int res = parseFile(&ast); in main()
188 ast.processContents(); in main()
190 ast.generateCode(); in main()
Dc2hal_l.ll269 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 …]
DTypeDef.cpp37 void TypeDef::processContents(AST &ast) { in processContents() argument
38 mDeclaration->processContents(ast); in processContents()
DNote.cpp52 void Note::processContents(AST &ast) { in processContents() argument
54 mDecl->processContents(ast); in processContents()
DInclude.h37 void processContents(AST &ast) override;
DTypeDef.h36 void processContents(AST &ast) override;
DNote.h41 void processContents(AST &ast) override;
DEnumVarDeclaration.h41 void processContents(AST &ast) override;
DCompositeDeclaration.cpp107 void CompositeDeclaration::processContents(AST &ast) { in processContents() argument
109 declaration->processContents(ast); in processContents()
DVarDeclaration.h38 void processContents(AST &ast) override;
DDefine.h37 void processContents(AST &ast) override;
DFunctionDeclaration.h44 void processContents(AST &ast) override;
DDeclaration.h56 virtual void processContents(AST &ast) = 0;
DCompositeDeclaration.h41 void processContents(AST &ast) override;
Dc2hal_y.yy57 #define scanner ast->scanner()
72 %parse-param { android::AST *ast }
180 ast->setExpression($1);
187 ast->setDeclarations($1);
/system/tools/hidl/
DCoordinator.cpp221 status_t Coordinator::parseOptional(const FQName& fqName, AST** ast, std::set<AST*>* parsedASTs, in parseOptional() argument
227 *ast = (*it).second; in parseOptional()
229 if (*ast != nullptr && parsedASTs != nullptr) { in parseOptional()
230 parsedASTs->insert(*ast); in parseOptional()
233 if (*ast == nullptr) { in parseOptional()
263 *ast = new AST(this, &Hash::getHash(path)); in parseOptional()
268 (*ast)->addImportedAST(typesAST); in parseOptional()
275 delete *ast; in parseOptional()
276 *ast = nullptr; in parseOptional()
283 if (parseFile(*ast, std::move(file)) != OK || (*ast)->postParse() != OK) { in parseOptional()
[all …]
Dhidl-gen_y.yy45 void enterScope(AST* /* ast */, Scope** scope, Scope* container) {
50 void leaveScope(AST* ast, Scope** scope) {
51 CHECK((*scope) != ast->getRootScope());
212 const_cast<std::string *>(&ast->getFilename());
216 %parse-param { android::AST* const ast }
486 ast->addSyntaxError();
495 ast->addSyntaxError();
536 if (!ast->setPackage($2)) {
550 ast->addSyntaxError();
557 if (!ast->addImport($2)) {
[all …]
Dmain.cpp264 AST* ast = coordinator->parse(fqName); in astGenerationFunction() local
265 if (ast == nullptr) { in astGenerationFunction()
271 (ast->*generate)(out); in astGenerationFunction()
288 AST* ast; in generateJavaForPackage() local
296 ast = coordinator->parse(typesName); in generateJavaForPackage()
298 ast = coordinator->parse(fqName); in generateJavaForPackage()
300 if (ast == nullptr) { in generateJavaForPackage()
304 ast->generateJava(out, limitToType); in generateJavaForPackage()
362 AST *ast = coordinator->parse(fqName); in isPackageJavaCompatible() local
364 if (ast == nullptr) { in isPackageJavaCompatible()
[all …]
DAST.cpp390 AST* ast = mCoordinator->parse(subFQName, &mImportedASTs, Coordinator::Enforce::NONE); in addImport() local
391 if (ast == nullptr) { in addImport()
395 mImportedTypes.erase(ast); in addImport()
461 void AST::addImportedAST(AST *ast) { in addImportedAST() argument
462 mImportedASTs.insert(ast); in addImportedAST()
769 for (const auto &ast : mImportedASTs) { in getImportedPackagesHierarchy() local
770 if (importSet->find(ast->package()) != importSet->end()) { in getImportedPackagesHierarchy()
771 ast->getImportedPackagesHierarchy(&newSet); in getImportedPackagesHierarchy()
780 AST* ast = mCoordinator->parse(name, nullptr /* imported */, Coordinator::Enforce::NONE); in getAllImportedNames() local
781 ast->getAllImportedNames(allImportNames); in getAllImportedNames()
[all …]
Dhidl-gen_l.h30 status_t parseFile(AST* ast, std::unique_ptr<FILE, std::function<void(FILE*)>> file);
Dhidl-gen_l.ll195 status_t parseFile(AST* ast, std::unique_ptr<FILE, std::function<void(FILE *)>> file) {
201 Scope* scopeStack = ast->getRootScope();
202 int res = yy::parser(scanner, ast, &scopeStack).parse();
206 if (res != 0 || ast->syntaxErrors() != 0) {
DAndroid.bp102 name: "libhidl-gen-ast",
139 "libhidl-gen-ast",
/system/tools/hidl/test/host_test/
DAndroid.bp21 "libhidl-gen-ast",

12