Lines Matching refs:Error
41 context_.err = GetError("Expected keyword.", Error::ErrorType::ERR_BAD_KEYWORD); in ParseRecordFields()
63 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseRecordFields()
72 …context_.err = GetError("Expected a new field on the next line.", Error::ErrorType::ERR_BAD_KEYWOR… in ParseRecordFields()
90 … GetError("Repeated field names in the same record.", Error::ErrorType::ERR_REPEATING_FIELD_NAME); in ParseFieldName()
104 context_.err = GetError("Invalid field name.", Error::ErrorType::ERR_BAD_OPERATION_NAME); in ParseFieldName()
121 context_.err = GetError("Expected ']'.", Error::ErrorType::ERR_BAD_ARRAY_TYPE_BOUND); in ParseType()
142 context_.err = GetError("Not a correct type.", Error::ErrorType::ERR_BAD_FIELD_VALUE_TYPE); in ParseFieldType()
164 … context_.err = GetError("Expected field name.", Error::ErrorType::ERR_BAD_FIELD_MISSING_NAME, +1); in ParseRecordField()
196 context_.err = GetError("Expected keyword.", Error::ErrorType::ERR_BAD_KEYWORD); in ParseFunctionCode()
237 … GetError("No record can be defined inside another record.", Error::ErrorType::ERR_BAD_DEFINITION); in ParseAsRecord()
279 …GetError("No one function can be defined inside another function.", Error::ErrorType::ERR_BAD_DEFI… in ParseAsFunction()
316 …GetError("Delimiter '}' for the code area is outside a function.", Error::ErrorType::ERR_BAD_BOUND… in ParseAsBraceRight()
335 if (open_ || err_.err != Error::ErrorType::ERR_NONE) { in ParseResetFunctionLabelsAndParams()
342 …context_.err = Error("This label does not exist.", line_stric_, Error::ErrorType::ERR_BAD_LABEL_EX… in ParseResetFunctionLabelsAndParams()
363 … Error("Register width mismatch.", debug.line_number, Error::ErrorType::ERR_BAD_NAME_REG, "", in ParseResetFunctionLabelsAndParams()
377 … context_.err = Error("This function does not exist.", k.second.file_location->line_number, in ParseResetFunctionTable()
378 … Error::ErrorType::ERR_BAD_ID_FUNCTION, "", k.second.file_location->bound_left, in ParseResetFunctionTable()
383 …Error("Inconsistent definition of the function and its metadata.", k.second.file_location->line_nu… in ParseResetFunctionTable()
384 … Error::ErrorType::ERR_BAD_DEFINITION_FUNCTION, "", k.second.file_location->bound_left, in ParseResetFunctionTable()
401 context_.err = Error("Function argument mismatch.", debug.line_number, in ParseResetFunctionTable()
402 … Error::ErrorType::ERR_FUNCTION_ARGUMENT_MISMATCH, "", debug.bound_left, in ParseResetFunctionTable()
415 context_.err = Error("This record does not exist.", k.second.file_location->line_number, in ParseResetRecordTable()
416 … Error::ErrorType::ERR_BAD_ID_RECORD, "", k.second.file_location->bound_left, in ParseResetRecordTable()
420 context_.err = Error("Inconsistency of the definition of the record and its metadata.", in ParseResetRecordTable()
421 … k.second.file_location->line_number, Error::ErrorType::ERR_BAD_DEFINITION_RECORD, "", in ParseResetRecordTable()
429 … Error("This field does not exist.", fld.line_of_def, Error::ErrorType::ERR_BAD_ID_FIELD, "", in ParseResetRecordTable()
440 if (err_.err != Error::ErrorType::ERR_NONE) { in ParseResetTables()
446 if (err_.err != Error::ErrorType::ERR_NONE) { in ParseResetTables()
459 Error::ErrorType::ERR_BAD_DIRECTIVE_DECLARATION); in ParseAsLanguageDirective()
467 …GetError("Incorrect .language directive: Unknown language", Error::ErrorType::ERR_UNKNOWN_LANGUAGE… in ParseAsLanguageDirective()
475 Error::ErrorType::ERR_BAD_DIRECTIVE_DECLARATION); in ParseAsLanguageDirective()
506 … context_.err = GetError("Expected comma.", Error::ErrorType::ERR_BAD_DIRECTIVE_DECLARATION); in PrepareCatchBlock()
514 …GetError(std::string("Invalid name of the ") + label_name + " label.", Error::ErrorType::ERR_BAD_L… in PrepareCatchBlock()
550 Error::ErrorType::ERR_BAD_DIRECTIVE_DECLARATION); in ParseAsCatchDirective()
558 Error::ErrorType::ERR_BAD_DIRECTIVE_DECLARATION); in ParseAsCatchDirective()
565 …context_.err = GetError("Invalid name of the exception record.", Error::ErrorType::ERR_BAD_RECORD_… in ParseAsCatchDirective()
580 Error::ErrorType::ERR_INCORRECT_DIRECTIVE_LOCATION); in ParseAsCatchall()
593 …context_.err = GetError("Multiple .language directives", Error::ErrorType::ERR_MULTIPLE_DIRECTIVES… in ParseAsLanguage()
599 Error::ErrorType::ERR_INCORRECT_DIRECTIVE_LOCATION); in ParseAsLanguage()
615 if (!context_.Mask() && err_.err == Error::ErrorType::ERR_NONE) { in ParseAfterLine()
616 context_.err = GetError("There should be nothing after.", Error::ErrorType::ERR_BAD_END); in ParseAfterLine()
619 if (err_.err != Error::ErrorType::ERR_NONE) { in ParseAfterLine()
633 Expected<Program, Error> Parser::ParseAfterMainLoop(const std::string &file_name) in ParseAfterMainLoop()
637 if (open_ && err_.err == Error::ErrorType::ERR_NONE) { in ParseAfterMainLoop()
638 context_.err = Error("Code area is not closed.", curr_func_->file_location->line_number, in ParseAfterMainLoop()
639 … Error::ErrorType::ERR_BAD_CLOSE, "", 0, curr_func_->name.size(), curr_func_->name); in ParseAfterMainLoop()
645 if (err_.err != Error::ErrorType::ERR_NONE) { in ParseAfterMainLoop()
664 Expected<Program, Error> Parser::Parse(TokenSet &vectors_tokens, const std::string &file_name) in Parse()
717 Expected<Program, Error> Parser::Parse(const std::string &source, const std::string &file_name) in Parse()
727 if (error.err != Error::ErrorType::ERR_NONE) { in Parse()
744 if (context_.err.err != Error::ErrorType::ERR_NONE) { in RegValidName()
846 … context_.err = GetError("This label already exists.", Error::ErrorType::ERR_BAD_LABEL_EXT); in ParseLabel()
856 Error::ErrorType::ERR_BAD_LABEL); in ParseLabel()
908 context_.err = GetError("Invalid operation name.", Error::ErrorType::ERR_BAD_OPERATION_NAME); in ParseOperation()
915 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseOperandVreg()
920 context_.err = GetError("Expected register.", Error::ErrorType::ERR_BAD_OPERAND, +1); in ParseOperandVreg()
948 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseOperandCall()
953 context_.err = GetError("Invalid name of function.", Error::ErrorType::ERR_BAD_NAME_REG); in ParseOperandCall()
996 Expected<char, Error> Parser::ParseOctalEscapeSequence(std::string_view s, size_t *i) in ParseOctalEscapeSequence()
1016 Expected<char, Error> Parser::ParseHexEscapeSequence(std::string_view s, size_t *i) in ParseHexEscapeSequence()
1027 … Error::ErrorType::ERR_BAD_STRING_INVALID_HEX_ESCAPE_SEQUENCE, idx - HEX_SHIFT)); in ParseHexEscapeSequence()
1039 Expected<char, Error> Parser::ParseEscapeSequence(std::string_view s, size_t *i) in ParseEscapeSequence()
1077 …GetError("Unknown escape sequence", Error::ErrorType::ERR_BAD_STRING_UNKNOWN_ESCAPE_SEQUENCE, idx … in ParseEscapeSequence()
1083 context_.err = GetError("Expected string literal", Error::ErrorType::ERR_BAD_OPERAND); in ParseStringLiteral()
1102 context_.err = res.Error(); in ParseStringLiteral()
1116 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseOperandString()
1133 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseOperandComma()
1142 context_.err = GetError("Expected comma.", Error::ErrorType::ERR_BAD_NUMBER_OPERANDS); in ParseOperandComma()
1151 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseOperandInteger()
1159 context_.err = GetError("Expected immediate.", Error::ErrorType::ERR_BAD_OPERAND, +1); in ParseOperandInteger()
1165 context_.err = GetError("Expected integer.", Error::ErrorType::ERR_BAD_INTEGER_NAME); in ParseOperandInteger()
1172 …GetError("Too large immediate (length is more than 64 bit).", Error::ErrorType::ERR_BAD_INTEGER_WI… in ParseOperandInteger()
1184 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseOperandFloat()
1192 context_.err = GetError("Expected immediate.", Error::ErrorType::ERR_BAD_OPERAND, +1); in ParseOperandFloat()
1198 context_.err = GetError("Expected float.", Error::ErrorType::ERR_BAD_FLOAT_NAME); in ParseOperandFloat()
1205 …GetError("Too large immediate (length is more than 64 bit).", Error::ErrorType::ERR_BAD_FLOAT_WIDT… in ParseOperandFloat()
1217 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseOperandLabel()
1222 context_.err = GetError("Invalid name of label.", Error::ErrorType::ERR_BAD_NAME_ID); in ParseOperandLabel()
1237 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseOperandId()
1242 context_.err = GetError("Expected label.", Error::ErrorType::ERR_BAD_OPERAND); in ParseOperandId()
1247 context_.err = GetError("Invalid name of label.", Error::ErrorType::ERR_BAD_NAME_ID); in ParseOperandId()
1262 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseOperandType()
1267 context_.err = GetError("Expected type.", Error::ErrorType::ERR_BAD_OPERAND); in ParseOperandType()
1272 context_.err = GetError("Invalid name of type.", Error::ErrorType::ERR_BAD_NAME_ID); in ParseOperandType()
1287 Error::ErrorType::WAR_UNEXPECTED_TYPE_ID); in ParseOperandType()
1299 Error::ErrorType::WAR_UNEXPECTED_TYPE_ID); in ParseOperandType()
1310 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseOperandField()
1315 context_.err = GetError("Expected field.", Error::ErrorType::ERR_BAD_OPERAND); in ParseOperandField()
1319 context_.err = GetError("Invalid field name.", Error::ErrorType::ERR_BAD_NAME_ID); in ParseOperandField()
1360 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseOperandNone()
1369 … context_.err = GetError("Invalid number of operands.", Error::ErrorType::ERR_BAD_NUMBER_OPERANDS); in ParseOperandNone()
1400 context_.err = GetError("Expected ')'.", Error::ErrorType::ERR_BAD_ARGS_BOUND); in ParseFunctionFullSign()
1403 context_.err = GetError("Expected '('.", Error::ErrorType::ERR_BAD_ARGS_BOUND); in ParseFunctionFullSign()
1416 context_.err = GetError("No record name.", Error::ErrorType::ERR_BAD_RECORD_NAME); in ParseRecordName()
1419 … context_.err = GetError("Invalid name of the record.", Error::ErrorType::ERR_BAD_RECORD_NAME); in ParseRecordName()
1427 context_.err = GetError("This record already exists.", Error::ErrorType::ERR_BAD_ID_RECORD); in ParseRecordName()
1451 context_.err = GetError("No function name.", Error::ErrorType::ERR_BAD_FUNCTION_NAME); in ParseFunctionName()
1454 … context_.err = GetError("Invalid name of the function.", Error::ErrorType::ERR_BAD_FUNCTION_NAME); in ParseFunctionName()
1463 … context_.err = GetError("This function already exists.", Error::ErrorType::ERR_BAD_ID_FUNCTION); in ParseFunctionName()
1502 … context_.err = GetError("No return type.", Error::ErrorType::ERR_BAD_FUNCTION_RETURN_VALUE); in ParseFunctionReturn()
1505 … context_.err = GetError("Invalid return type.", Error::ErrorType::ERR_BAD_FUNCTION_RETURN_VALUE); in ParseFunctionReturn()
1530 … context_.err = GetError("Expected identifier.", Error::ErrorType::ERR_BAD_FUNCTION_PARAMETERS); in ParseFunctionArg()
1535 context_.err = GetError("Invalid parameter type.", Error::ErrorType::ERR_BAD_TYPE); in ParseFunctionArg()
1549 … context_.err = GetError("Expected identifier.", Error::ErrorType::ERR_BAD_FUNCTION_PARAMETERS); in ParseFunctionArg()
1554 context_.err = GetError("Invalid parameter name.", Error::ErrorType::ERR_BAD_PARAM_NAME); in ParseFunctionArg()
1575 context_.err = GetError("Expected comma.", Error::ErrorType::ERR_BAD_NUMBER_OPERANDS); in ParseFunctionArgComma()
1639 context_.err = GetError("Expected '<'.", Error::ErrorType::ERR_BAD_METADATA_BOUND); in ParseMetaDef()
1646 if (flag && context_.err.err == Error::ErrorType::ERR_NONE) { in ParseMetaDef()
1653 void Parser::SetMetadataContextError(const Metadata::Error &err, bool has_value) in SetMetadataContextError()
1660 case Metadata::Error::Type::UNKNOWN_ATTRIBUTE: { in SetMetadataContextError()
1661 … context_.err = GetError(err.GetMessage(), Error::ErrorType::ERR_BAD_METADATA_UNKNOWN_ATTRIBUTE, 0, in SetMetadataContextError()
1665 case Metadata::Error::Type::MISSING_ATTRIBUTE: { in SetMetadataContextError()
1666 … context_.err = GetError(err.GetMessage(), Error::ErrorType::ERR_BAD_METADATA_MISSING_ATTRIBUTE); in SetMetadataContextError()
1669 case Metadata::Error::Type::MISSING_VALUE: { in SetMetadataContextError()
1670 … context_.err = GetError(err.GetMessage(), Error::ErrorType::ERR_BAD_METADATA_MISSING_VALUE); in SetMetadataContextError()
1673 case Metadata::Error::Type::UNEXPECTED_ATTRIBUTE: { in SetMetadataContextError()
1674 …context_.err = GetError(err.GetMessage(), Error::ErrorType::ERR_BAD_METADATA_UNEXPECTED_ATTRIBUTE,… in SetMetadataContextError()
1678 case Metadata::Error::Type::UNEXPECTED_VALUE: { in SetMetadataContextError()
1680 … GetError(err.GetMessage(), Error::ErrorType::ERR_BAD_METADATA_UNEXPECTED_VALUE, 0, SPECIAL_OFF); in SetMetadataContextError()
1683 case Metadata::Error::Type::INVALID_VALUE: { in SetMetadataContextError()
1684 …context_.err = GetError(err.GetMessage(), Error::ErrorType::ERR_BAD_METADATA_INVALID_VALUE, 0, -1); in SetMetadataContextError()
1687 case Metadata::Error::Type::MULTIPLE_ATTRIBUTE: { in SetMetadataContextError()
1688 …context_.err = GetError(err.GetMessage(), Error::ErrorType::ERR_BAD_METADATA_MULTIPLE_ATTRIBUTE, 0, in SetMetadataContextError()
1701 context_.err = GetError("Expected comma.", Error::ErrorType::ERR_BAD_NUMBER_OPERANDS); in ParseMetaListComma()
1717 …context_.err = GetError("Expected identifier.", Error::ErrorType::ERR_BAD_DEFINITION_METADATA, +1); in MeetExpMetaList()
1723 …GetError("Expected identifier or string literal.", Error::ErrorType::ERR_BAD_DEFINITION_METADATA, … in MeetExpMetaList()
1728 context_.err = GetError("Invalid attribute name.", Error::ErrorType::ERR_BAD_NAME_ID); in MeetExpMetaList()
1758 context_.err = GetError("Unexpected '='.", Error::ErrorType::ERR_BAD_NOEXP_DELIM); in BuildMetaListAttr()
1765 std::optional<Metadata::Error> res; in BuildMetaListAttr()
1788 … context_.err = GetError("No meta data expected.", Error::ErrorType::ERR_BAD_DEFINITION_METADATA); in ParseMetaList()
1800 context_.err = GetError("Expected '>'.", Error::ErrorType::ERR_BAD_METADATA_BOUND, +1); in ParseMetaList()
1823 context_.err = GetError("Expected '>'.", Error::ErrorType::ERR_BAD_METADATA_BOUND); in ParseMetaList()