Home
last modified time | relevance | path

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

/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(NULL); in processContents()
58 mExpressionType = mExpression->getType(ast); in processContents()
60 ast.getDefinesScope().enter(getName(), this); in processContents()
DExpression.cpp89 virtual Type getType(const AST &ast) { in getType()
90 return mInner->getType(ast); in getType()
107 virtual Type getType(const AST &ast) { in getType()
112 Define *define = ast.getDefinesScope().lookup(mValue); in getType()
141 virtual Type getType(const AST &ast) { in getType()
142 return mRhs->getType(ast); in getType()
164 virtual Type getType(const AST &ast) { in getType()
165 return coalesceTypes(mLhs->getType(ast), mRhs->getType(ast)); in getType()
189 virtual Type getType(const AST &ast) { in getType()
190 return coalesceTypes(mMhs->getType(ast), mRhs->getType(ast)); in getType()
Dc2hal_l.ll270 status_t parseFile(AST *ast) {
271 FILE *file = fopen(ast->getFilename().c_str(), "rb");
278 isOpenGl = ast->isOpenGl();
282 yylex_init_extra(ast, &scanner);
283 ast->setScanner(scanner);
286 int res = yyparse(ast);
289 ast->setScanner(NULL);
297 status_t parseExpression(AST *ast, std::string str) {
299 isOpenGl = ast->isOpenGl();
303 yylex_init_extra(ast, &scanner);
[all …]
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()
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;
DCompositeDeclaration.cpp107 void CompositeDeclaration::processContents(AST &ast) { in processContents() argument
109 declaration->processContents(ast); in processContents()
DNote.h41 void processContents(AST &ast) override;
DEnumVarDeclaration.h41 void processContents(AST &ast) override;
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.cpp32 extern android::status_t parseFile(android::AST *ast);
72 AST *ast = (*it).second; in parse() local
74 if (ast != nullptr && parsedASTs != nullptr) { in parse()
75 parsedASTs->insert(ast); in parse()
78 return ast; in parse()
100 AST *ast = new AST(this, path); in parse() local
105 ast->addImportedAST(typesAST); in parse()
108 status_t err = parseFile(ast); in parse()
111 delete ast; in parse()
112 ast = nullptr; in parse()
[all …]
Dmain.cpp67 AST *ast; in generateSourcesForFile() local
76 ast = coordinator->parse(typesName); in generateSourcesForFile()
78 ast = coordinator->parse(fqName); in generateSourcesForFile()
81 if (ast == NULL) { in generateSourcesForFile()
93 return ast->generateCpp(outputDir); in generateSourcesForFile()
96 return ast->generateCppHeaders(outputDir); in generateSourcesForFile()
99 return ast->generateCppSources(outputDir); in generateSourcesForFile()
102 return ast->generateCppImpl(outputDir); in generateSourcesForFile()
105 return ast->generateStubImplHeader(outputDir); in generateSourcesForFile()
108 return ast->generateStubImplSource(outputDir); in generateSourcesForFile()
[all …]
Dhidl-gen_y.yy43 void enterScope(AST* /* ast */, Scope** scope, Scope* container) {
48 void leaveScope(AST* ast, Scope** scope) {
49 CHECK((*scope) != ast->getRootScope());
201 const_cast<std::string *>(&ast->getFilename());
205 %parse-param { android::AST* const ast }
447 ast->addSyntaxError();
456 ast->addSyntaxError();
486 $$ = ast->lookupType(*($1), *scope);
501 if (!ast->setPackage($2)) {
515 ast->addSyntaxError();
[all …]
DAST.cpp107 AST* ast = mCoordinator->parse(subFQName, &mImportedASTs, Coordinator::Enforce::NONE); in addImport() local
108 if (ast == nullptr) { in addImport()
112 mImportedTypes.erase(ast); in addImport()
174 void AST::addImportedAST(AST *ast) { in addImportedAST() argument
175 mImportedASTs.insert(ast); in addImportedAST()
485 for (const auto &ast : mImportedASTs) { in getImportedPackagesHierarchy() local
486 if (importSet->find(ast->package()) != importSet->end()) { in getImportedPackagesHierarchy()
487 ast->getImportedPackagesHierarchy(&newSet); in getImportedPackagesHierarchy()
496 AST* ast = mCoordinator->parse(name, nullptr /* imported */, Coordinator::Enforce::NONE); in getAllImportedNames() local
497 ast->getAllImportedNames(allImportNames); in getAllImportedNames()
DAndroid.bp100 // libhidl-gen-ast
104 name: "libhidl-gen-ast",
136 "libhidl-gen-ast",
Dhidl-gen_l.ll177 status_t parseFile(AST *ast) {
178 FILE *file = fopen(ast->getFilename().c_str(), "rb");
189 Scope* scopeStack = ast->getRootScope();
190 int res = yy::parser(scanner, ast, &scopeStack).parse();
197 if (res != 0 || ast->syntaxErrors() != 0) {
DAST.h70 void addImportedAST(AST *ast);
/system/update_engine/
Dpylintrc56 optimize-ast=no