Home
last modified time | relevance | path

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

123

/drivers/hdf_core/framework/tools/hdi-gen/parser/
Dparser.cpp116 Token token = lexer_.PeekToken(false); in ParseLicense() local
117 if (token.kind == TokenType::COMMENT_BLOCK) { in ParseLicense()
119 return token.value; in ParseLicense()
127 Token token = lexer_.PeekToken(); in ParsePackage() local
128 if (token.kind != TokenType::PACKAGE) { in ParsePackage()
129 …LogError(token, StringHelper::Format("expected 'package' before '%s' token", token.value.c_str())); in ParsePackage()
134 token = lexer_.PeekToken(); in ParsePackage()
135 if (token.kind != TokenType::ID) { in ParsePackage()
136 …LogError(token, StringHelper::Format("expected name of package before '%s' token", token.value.c_s… in ParsePackage()
140 std::string packageName = token.value; in ParsePackage()
[all …]
Dparser.h92 void CheckInterfaceAttr(const AutoPtr<ASTInterfaceType> &interface, Token token);
172 bool CheckType(const Token &token, const AutoPtr<ASTType> &type);
174 bool CheckTypeByMode(const Token &token, const AutoPtr<ASTType> &type);
199 inline static bool IsPrimitiveType(Token token) in IsPrimitiveType() argument
201 return token.kind >= TokenType::BOOLEAN && token.kind <= TokenType::ASHMEM; in IsPrimitiveType()
208 void LogError(const Token &token, const std::string &message);
/drivers/hdf_core/framework/tools/hdi-gen/lexer/
Dlexer.cpp163 Token token = PeekToken(); in SkipUntilToken() local
164 while (token.kind != tokenType) { in SkipUntilToken()
166 token = PeekToken(); in SkipUntilToken()
176 void Lexer::ReadToken(Token &token, bool skipComment) in ReadToken() argument
179 InitCurToken(token); in ReadToken()
187 token.location.row = file_->GetCharLineNumber(); in ReadToken()
188 token.location.col = file_->GetCharColumnNumber(); in ReadToken()
190 ReadId(token); in ReadToken()
193 ReadNum(token); in ReadToken()
196 ReadShiftLeftOp(token); in ReadToken()
[all …]
Dlexer.h62 void ReadToken(Token &token, bool skipComment = true);
64 void InitCurToken(Token &token);
66 void ReadId(Token &token);
68 void ReadNum(Token &token);
70 void ReadBinaryNum(Token &token);
72 void ReadOctNum(Token &token);
74 void ReadHexNum(Token &token);
76 void ReadDecNum(Token &token);
78 void ReadNumSuffix(Token &token);
80 void ReadShiftLeftOp(Token &token);
[all …]
Dtoken.cpp28 std::string LocInfo(const Token &token) in LocInfo() argument
30 size_t index = token.location.filePath.rfind(SEPARATOR); in LocInfo()
32 …(index == std::string::npos) ? token.location.filePath : token.location.filePath.substr(index + 1); in LocInfo()
33 …return StringHelper::Format("%s:%zu:%zu", fileName.c_str(), token.location.row, token.location.col… in LocInfo()
/drivers/hdf_core/framework/tools/hc-gen/src/
Dlexer.cpp51 bool Lexer::SetTokenCharacter(char c, Token &token) in SetTokenCharacter() argument
64 token.type = c; in SetTokenCharacter()
65 token.lineNo = lineno_; in SetTokenCharacter()
68 return LexFromString(token); in SetTokenCharacter()
71 return LexFromNumber(token); in SetTokenCharacter()
73 token.type = EOF; in SetTokenCharacter()
82 bool Lexer::Lex(Token &token) in Lex() argument
85 InitToken(token); in Lex()
88 token.type = EOF; in Lex()
92 return LexInclude(token); in Lex()
[all …]
Dtoken.cpp46 std::ostream &OHOS::Hardware::operator<<(std::ostream &stream, const OHOS::Hardware::Token &token) in operator <<() argument
48 …stream << "Token: type: " << std::setw(WIDTH_EIGHT) << ::std::left << TokenType2String(token.type); in operator <<()
50 token.type != NUMBER ? stream << std::setw(WIDTH_TWENTY) << token.strval in operator <<()
52 std::hex << token.numval; in operator <<()
53 stream << " lineno:" << token.lineNo; in operator <<()
68 bool Token::operator==(const Token &token) const in operator ==()
70 return token.type == type && token.numval == numval && token.strval == strval; in operator ==()
73 bool Token::operator!=(const Token &token) const in operator !=()
75 return token.type != type || token.numval != numval || token.strval != strval; in operator !=()
Dlexer.h29 bool Lex(Token &token);
31 bool SetTokenCharacter(char c, Token &token);
44 void InitToken(Token &token) const;
60 bool LexInclude(Token &token);
62 bool LexFromString(Token &token);
64 bool LexFromNumber(Token &token);
68 void LexFromLiteral(Token &token);
Dtoken.h39 bool operator==(const Token &token) const;
40 bool operator!=(const Token &token) const;
43 friend std::ostream &operator<<(std::ostream &stream, const Token &token);
46 std::ostream &operator<<(std::ostream &stream, const Token &token);
/drivers/hdf_core/framework/tools/hcs-view/hcsWebView/src/hcs/
Dlexer.js92 lexInclude(token) { argument
94 this.lexFromLiteral(token);
95 if (token.strval != 'include') {
99 token.type = TokenType.INCLUDE;
120 lex(token) { argument
122 this.initToken(token);
125 token.type = TokenType.EOF;
129 return this.lexInclude(token);
132 this.lexFromLiteral(token);
137 return this.lexFromNumber(token);
[all …]
/drivers/peripheral/user_auth/test/unittest/idm_test/
Denroll_specification_check_test.cpp73 UserAuthTokenHal token = {}; variable
74 token.tokenDataPlain.authType = FACE_AUTH;
75 EXPECT_EQ(CheckIdmOperationToken(0, &token), RESULT_BAD_MATCH);
77 token.tokenDataPlain.time = GetSystemTime();
80 GENERATE_TOKEN(data, token, tokenKey);
81 EXPECT_EQ(CheckIdmOperationToken(0, &token), RESULT_VERIFY_TOKEN_FAIL);
82 token.tokenDataPlain.authType = PIN_AUTH;
83 GENERATE_TOKEN(data, token, tokenKey);
84 EXPECT_EQ(CheckIdmOperationToken(0, &token), RESULT_BAD_MATCH);
95 UserAuthTokenHal token = {}; variable
[all …]
/drivers/hdf_core/framework/tools/hdi-gen/preprocessor/
Dpreprocessor.cpp150 Token token = lexer.PeekToken(); in ParsePackage() local
151 if (token.kind != TokenType::PACKAGE) { in ParsePackage()
152 …Logger::E(TAG, "%s: expected 'package' before '%s' token", LocInfo(token).c_str(), token.value.c_s… in ParsePackage()
157 token = lexer.PeekToken(); in ParsePackage()
158 if (token.kind != TokenType::ID) { in ParsePackage()
159 …Logger::E(TAG, "%s: expected package name before '%s' token", LocInfo(token).c_str(), token.value.… in ParsePackage()
163 if (!CheckPackageName(info.filePath_, token.value)) { in ParsePackage()
164 Logger::E(TAG, "%s:package name '%s' does not match file path '%s'", LocInfo(token).c_str(), in ParsePackage()
165 token.value.c_str(), info.filePath_.c_str()); in ParsePackage()
168 info.packageName_ = token.value; in ParsePackage()
[all …]
/drivers/hdf_core/framework/core/host/src/
Dhdf_device_token.c20 struct HdfDeviceToken *token = in HdfDeviceTokenCreate() local
22 if (token != NULL) { in HdfDeviceTokenCreate()
23 HdfDeviceTokenConstruct(token); in HdfDeviceTokenCreate()
25 return (struct HdfObject *)token; in HdfDeviceTokenCreate()
43 void HdfDeviceTokenFreeInstance(struct IHdfDeviceToken *token) in HdfDeviceTokenFreeInstance() argument
45 if (token != NULL) { in HdfDeviceTokenFreeInstance()
46 HdfObjectManagerFreeObject(&token->object); in HdfDeviceTokenFreeInstance()
Dhdf_device_node.c119 ret = DevmgrServiceClntAttachDevice(devNode->token); in HdfDeviceLaunchNode()
213 devNode->token = HdfDeviceTokenNewInstance(); in HdfDeviceNodeConstruct()
231 HdfDeviceTokenFreeInstance(devNode->token); in HdfDeviceNodeDestruct()
232 devNode->token = NULL; in HdfDeviceNodeDestruct()
263 devNode->token->devid = deviceInfo->deviceId; in HdfDeviceNodeNewInstance()
265 devNode->token->servName = HdfStringCopy(deviceInfo->svcName); in HdfDeviceNodeNewInstance()
266 devNode->token->deviceName = HdfStringCopy(deviceInfo->deviceName); in HdfDeviceNodeNewInstance()
Dpower_state_token.c92 static void PowerStateTokenAcquireWakeLock(struct IPowerStateToken *token) in PowerStateTokenAcquireWakeLock() argument
95 struct PowerStateToken *stateToken = (struct PowerStateToken *)token; in PowerStateTokenAcquireWakeLock()
105 static void PowerStateTokenReleaseWakeLock(struct IPowerStateToken *token) in PowerStateTokenReleaseWakeLock() argument
108 struct PowerStateToken *stateToken = (struct PowerStateToken *)token; in PowerStateTokenReleaseWakeLock()
Dhdf_power_manager.c58 tokenIf = (struct IPowerStateToken *)pmRequest->token; in PmTaskFunc()
88 pmRequest->token = powerToken; in HdfPmTaskPut()
/drivers/peripheral/user_auth/test/unittest/user_auth_test/
Duser_sign_centre_test.cpp63 UserAuthTokenHal token = {}; variable
64 token.tokenDataPlain.time = UINT64_MAX;
65 EXPECT_FALSE(IsTimeValid(&token));
66 token.tokenDataPlain.time = 0;
67 IsTimeValid(&token);
68 token.tokenDataPlain.time = GetSystemTime();
69 EXPECT_TRUE(IsTimeValid(&token));
74 UserAuthTokenHal token = {}; variable
76 EXPECT_EQ(UserAuthTokenSign(&token, &userAuthTokenKey), RESULT_SUCCESS);
90 UserAuthTokenHal token = { variable
[all …]
Duser_auth_funcs_test.cpp62 UserAuthTokenHal token = {}; variable
65 EXPECT_EQ(RequestAuthResultFunc(contextId, scheduleResult, &token, nullptr), RESULT_BAD_PARAM);
67 EXPECT_EQ(RequestAuthResultFunc(contextId, scheduleResult, &token, &result), RESULT_BAD_PARAM);
Didentify_funcs_test.cpp59 UserAuthTokenHal token = {}; variable
66 …EXPECT_EQ(DoUpdateIdentify(contextId, scheduleResult, &userId, &token, &result), RESULT_GENERAL_ER…
/drivers/external_device_manager/services/native/driver_extension/src/
Ddriver_extension.cpp58 const sptr<IRemoteObject> &token) in Init() argument
60 ExtensionBase<DriverExtensionContext>::Init(record, application, handler, token); in Init()
68 const sptr<IRemoteObject> &token) in CreateAndInitContext() argument
71 … ExtensionBase<DriverExtensionContext>::CreateAndInitContext(record, application, handler, token); in CreateAndInitContext()
/drivers/hdf_core/adapter/uhdf2/host/src/
Ddevmgr_service_proxy.c56 int DevmgrServiceProxyAttachDevice(struct IDevmgrService *inst, struct IHdfDeviceToken *token) in DevmgrServiceProxyAttachDevice() argument
62 …eProxy == NULL || serviceProxy->remote == NULL || data == NULL || reply == NULL || token == NULL) { in DevmgrServiceProxyAttachDevice()
67 const char *srvName = (token->servName == NULL) ? "" : token->servName; in DevmgrServiceProxyAttachDevice()
68 const char *deviceName = (token->deviceName == NULL) ? "" : token->deviceName; in DevmgrServiceProxyAttachDevice()
69 …if (!HdfRemoteServiceWriteInterfaceToken(remoteService, data) || !HdfSbufWriteInt32(data, token->d… in DevmgrServiceProxyAttachDevice()
/drivers/peripheral/user_auth/hdi_service/user_auth/src/
Didentify_funcs.c47 UserAuthTokenHal *token, int32_t *result) in DoUpdateIdentify() argument
49 if (!IsBufferValid(scheduleResult) || token == NULL || userId == NULL || result == NULL) { in DoUpdateIdentify()
79 ret = GetTokenDataAndSign(identifyContext, credentialId, SCHEDULE_MODE_IDENTIFY, token); in DoUpdateIdentify()
/drivers/peripheral/user_auth/hdi_service/idm/inc/
Duser_idm_funcs.h28 uint8_t token[AUTH_TOKEN_LEN]; member
35 uint8_t token[AUTH_TOKEN_LEN]; member
/drivers/external_device_manager/services/native/driver_extension/include/
Ddriver_extension.h49 const sptr<IRemoteObject> &token) override;
62 const sptr<IRemoteObject> &token) override;
/drivers/hdf_core/framework/tools/hdi-gen/
Dbuild_hdi_files_info.py366 token = lex.peek_token()
369 token.info(), token.value))
371 CodeGen.get_package_path(token.value) + ".idl")
405 token = lex.peek_token()
406 if token.token_type != TokenType.ID:
408 token.info(), token.value))
409 token = lex.get_token()
410 if not self.parse_version(token.value, cur_idl_detail):
412 token.info(), token.vlaue))
427 token = lex.peek_token()
[all …]

123