Lines Matching full:error
42 context_.err = GetError("Expected keyword.", Error::ErrorType::ERR_BAD_KEYWORD); in ParseRecordFields()
66 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseRecordFields()
75 …context_.err = GetError("Expected a new field on the next line.", Error::ErrorType::ERR_BAD_KEYWOR… in ParseRecordFields()
94 … GetError("Repeating field names in the same record.", Error::ErrorType::ERR_REPEATING_FIELD_NAME); in ParseFieldName()
111 context_.err = GetError("Invalid name of field.", Error::ErrorType::ERR_BAD_OPERATION_NAME); in ParseFieldName()
128 context_.err = GetError("Expected ']'.", Error::ErrorType::ERR_BAD_ARRAY_TYPE_BOUND); in ParseType()
150 context_.err = GetError("Not a correct type.", Error::ErrorType::ERR_BAD_FIELD_VALUE_TYPE); in ParseFieldType()
172 … context_.err = GetError("Expected field name.", Error::ErrorType::ERR_BAD_FIELD_MISSING_NAME, +1); in ParseRecordField()
232 …GetError("No one array can be defined inside another array.", Error::ErrorType::ERR_BAD_DEFINITION… in ParseAsArray()
252 …GetError("Сonstant array must contain at least one element.", Error::ErrorType::ERR_BAD_ARRAY_SIZE… in ParseAsArray()
267 …GetError("Constant array must contain at least one element.", Error::ErrorType::ERR_BAD_ARRAY_SIZE… in ParseAsArray()
288 context_.err = GetError("Expected keyword.", Error::ErrorType::ERR_BAD_KEYWORD); in ParseArrayElements()
299 …GetError("Constant array must contain at least one element.", Error::ErrorType::ERR_BAD_ARRAY_SIZE… in ParseArrayElements()
314 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseArrayElements()
324 …GetError("Constant array must contain at least one element.", Error::ErrorType::ERR_BAD_ARRAY_SIZE… in ParseArrayElements()
329 … GetError("Expected a new array element on the next line.", Error::ErrorType::ERR_BAD_KEYWORD); in ParseArrayElements()
350 …GetError("Expected array element value.", Error::ErrorType::ERR_BAD_ARRAY_ELEMENT_MISSING_VALUE, +… in ParseArrayElement()
364 …GetError("Constant array must contain at least one element.", Error::ErrorType::ERR_BAD_ARRAY_SIZE… in ParseArrayElement()
379 …context_.err = GetError("Not a correct type.", Error::ErrorType::ERR_BAD_ARRAY_ELEMENT_VALUE_TYPE); in ParseArrayElementType()
417 …GetError("Invalid value of array integer element.", Error::ErrorType::ERR_BAD_ARRAY_ELEMENT_VALUE_… in ParseArrayElementValueInteger()
443 …GetError("Invalid value of array float element.", Error::ErrorType::ERR_BAD_ARRAY_ELEMENT_VALUE_FL… in ParseArrayElementValueFloat()
456 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseArrayElementValueString()
463 …GetError("Invalid value of array string element.", Error::ErrorType::ERR_BAD_ARRAY_ELEMENT_VALUE_S… in ParseArrayElementValueString()
505 context_.err = GetError("Expected keyword.", Error::ErrorType::ERR_BAD_KEYWORD); in ParseFunctionCode()
547 …GetError("No one record can be defined inside another record.", Error::ErrorType::ERR_BAD_DEFINITI… in ParseAsRecord()
592 …GetError("No one function can be defined inside another function.", Error::ErrorType::ERR_BAD_DEFI… in ParseAsFunction()
630 …GetError("Delimiter '}' for the code area is outside a function.", Error::ErrorType::ERR_BAD_BOUND… in ParseAsBraceRight()
644 …GetError("Constant array must contain at least one element.", Error::ErrorType::ERR_BAD_ARRAY_SIZE… in ParseAsBraceRight()
648 LOG(FATAL, ASSEMBLER) << "Internal error: either function or record must be parsed here"; in ParseAsBraceRight()
655 if (open_ || err_.err != Error::ErrorType::ERR_NONE) { in ParseResetFunctionLabelsAndParams()
662 …context_.err = Error("This label does not exist.", line_stric_, Error::ErrorType::ERR_BAD_LABEL_EX… in ParseResetFunctionLabelsAndParams()
683 … Error("Register width mismatch.", debug.line_number, Error::ErrorType::ERR_BAD_NAME_REG, "", in ParseResetFunctionLabelsAndParams()
697 … context_.err = Error("This function does not exist.", k.second.file_location->line_number, in ParseResetFunctionTable()
698 … Error::ErrorType::ERR_BAD_ID_FUNCTION, "", k.second.file_location->bound_left, in ParseResetFunctionTable()
716 … context_.err = Error("Unable to resolve ambiguous function call", debug.line_number, in ParseResetFunctionTable()
717 … Error::ErrorType::ERR_FUNCTION_MULTIPLE_ALTERNATIVES, "", debug.bound_left, in ParseResetFunctionTable()
733 context_.err = Error("Function argument mismatch.", debug.line_number, in ParseResetFunctionTable()
734 … Error::ErrorType::ERR_FUNCTION_ARGUMENT_MISMATCH, "", debug.bound_left, in ParseResetFunctionTable()
747 context_.err = Error("This record does not exist.", k.second.file_location->line_number, in ParseResetRecordTable()
748 … Error::ErrorType::ERR_BAD_ID_RECORD, "", k.second.file_location->bound_left, in ParseResetRecordTable()
752 context_.err = Error("Inconsistency of the definition of the record and its metadata.", in ParseResetRecordTable()
753 … k.second.file_location->line_number, Error::ErrorType::ERR_BAD_DEFINITION_RECORD, "", in ParseResetRecordTable()
761 … Error("This field does not exist.", fld.line_of_def, Error::ErrorType::ERR_BAD_ID_FIELD, "", in ParseResetRecordTable()
771 if (err_.err != Error::ErrorType::ERR_NONE) { in ParseResetTables()
777 if (err_.err != Error::ErrorType::ERR_NONE) { in ParseResetTables()
790 Error::ErrorType::ERR_BAD_DIRECTIVE_DECLARATION); in ParseAsLanguageDirective()
798 …GetError("Incorrect .language directive: Unknown language", Error::ErrorType::ERR_UNKNOWN_LANGUAGE… in ParseAsLanguageDirective()
806 Error::ErrorType::ERR_BAD_DIRECTIVE_DECLARATION); in ParseAsLanguageDirective()
837 … context_.err = GetError("Expected comma.", Error::ErrorType::ERR_BAD_DIRECTIVE_DECLARATION); in PrepareCatchBlock()
845 …GetError(std::string("Invalid name of the ") + label_name + " label.", Error::ErrorType::ERR_BAD_L… in PrepareCatchBlock()
880 Error::ErrorType::ERR_BAD_DIRECTIVE_DECLARATION); in ParseAsCatchDirective()
888 Error::ErrorType::ERR_BAD_DIRECTIVE_DECLARATION); in ParseAsCatchDirective()
895 …context_.err = GetError("Invalid name of the exception record.", Error::ErrorType::ERR_BAD_RECORD_… in ParseAsCatchDirective()
910 Error::ErrorType::ERR_INCORRECT_DIRECTIVE_LOCATION); in ParseAsCatchall()
923 …context_.err = GetError("Multiple .language directives", Error::ErrorType::ERR_MULTIPLE_DIRECTIVES… in ParseAsLanguage()
929 Error::ErrorType::ERR_INCORRECT_DIRECTIVE_LOCATION); in ParseAsLanguage()
945 if (!context_.Mask() && err_.err == Error::ErrorType::ERR_NONE) { in ParseAfterLine()
946 context_.err = GetError("There can be nothing after.", Error::ErrorType::ERR_BAD_END); in ParseAfterLine()
949 if (err_.err != Error::ErrorType::ERR_NONE) { in ParseAfterLine()
950 LOG(DEBUG, ASSEMBLER) << "processing aborted (error detected)"; in ParseAfterLine()
963 Expected<Program, Error> Parser::ParseAfterMainLoop(const std::string &file_name) in ParseAfterMainLoop()
967 if (open_ && err_.err == Error::ErrorType::ERR_NONE) { in ParseAfterMainLoop()
968 context_.err = Error("Code area is not closed.", curr_func_->file_location->line_number, in ParseAfterMainLoop()
969 … Error::ErrorType::ERR_BAD_CLOSE, "", 0, curr_func_->name.size(), curr_func_->name); in ParseAfterMainLoop()
975 if (err_.err != Error::ErrorType::ERR_NONE) { in ParseAfterMainLoop()
994 Expected<Program, Error> Parser::Parse(TokenSet &vectors_tokens, const std::string &file_name) in Parse()
1054 Expected<Program, Error> Parser::Parse(const std::string &source, const std::string &file_name) in Parse()
1063 auto [tokens, error] = l.TokenizeString(line); in Parse()
1064 if (error.err != Error::ErrorType::ERR_NONE) { in Parse()
1065 return Unexpected(error); in Parse()
1081 if (context_.err.err != Error::ErrorType::ERR_NONE) { in RegValidName()
1190 … context_.err = GetError("This label already exists.", Error::ErrorType::ERR_BAD_LABEL_EXT); in ParseLabel()
1200 Error::ErrorType::ERR_BAD_LABEL); in ParseLabel()
1250 context_.err = GetError("Invalid operation.", Error::ErrorType::ERR_BAD_OPERATION_NAME); in ParseOperation()
1257 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseOperandVreg()
1262 context_.err = GetError("Expected register.", Error::ErrorType::ERR_BAD_OPERAND, +1); in ParseOperandVreg()
1289 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseOperandCall()
1294 context_.err = GetError("Invalid name of function.", Error::ErrorType::ERR_BAD_NAME_REG); in ParseOperandCall()
1319 Error::ErrorType::ERR_FUNCTION_MULTIPLE_ALTERNATIVES); in ParseOperandCall()
1349 … context_.err = GetError("Expected \'(\' before signature", Error::ErrorType::ERR_BAD_SIGNATURE); in ParseOperandSignature()
1362 …context_.err = GetError("Expected \')\' at the end of the signature", Error::ErrorType::ERR_BAD_SI… in ParseOperandSignature()
1395 …context_.err = GetError("Expected signature arguments", Error::ErrorType::ERR_BAD_SIGNATURE_PARAME… in ParseOperandSignatureTypesList()
1400 context_.err = GetError("Expected valid type", Error::ErrorType::ERR_BAD_TYPE); in ParseOperandSignatureTypesList()
1445 Expected<char, Error> Parser::ParseOctalEscapeSequence(std::string_view s, size_t *i) in ParseOctalEscapeSequence()
1465 Expected<char, Error> Parser::ParseHexEscapeSequence(std::string_view s, size_t *i) in ParseHexEscapeSequence()
1477 … Error::ErrorType::ERR_BAD_STRING_INVALID_HEX_ESCAPE_SEQUENCE, idx - HEX_SHIFT)); in ParseHexEscapeSequence()
1489 Expected<char, Error> Parser::ParseEscapeSequence(std::string_view s, size_t *i) in ParseEscapeSequence()
1529 …GetError("Unknown escape sequence", Error::ErrorType::ERR_BAD_STRING_UNKNOWN_ESCAPE_SEQUENCE, idx … in ParseEscapeSequence()
1536 context_.err = GetError("Expected string literal", Error::ErrorType::ERR_BAD_OPERAND); in ParseStringLiteral()
1555 context_.err = res.Error(); in ParseStringLiteral()
1569 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseOperandString()
1587 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseOperandComma()
1596 context_.err = GetError("Expected comma.", Error::ErrorType::ERR_BAD_NUMBER_OPERANDS); in ParseOperandComma()
1605 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseInteger()
1613 context_.err = GetError("Expected immediate.", Error::ErrorType::ERR_BAD_OPERAND, +1); in ParseInteger()
1619 context_.err = GetError("Expected integer.", Error::ErrorType::ERR_BAD_INTEGER_NAME); in ParseInteger()
1626 …GetError("Too large immediate (length is more than 64 bit).", Error::ErrorType::ERR_BAD_INTEGER_WI… in ParseInteger()
1635 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseFloat()
1643 context_.err = GetError("Expected immediate.", Error::ErrorType::ERR_BAD_OPERAND, +1); in ParseFloat()
1649 context_.err = GetError("Expected float.", Error::ErrorType::ERR_BAD_FLOAT_NAME); in ParseFloat()
1656 …GetError("Too large immediate (length is more than 64 bit).", Error::ErrorType::ERR_BAD_FLOAT_WIDT… in ParseFloat()
1689 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseOperandLabel()
1694 context_.err = GetError("Invalid name of Label.", Error::ErrorType::ERR_BAD_NAME_ID); in ParseOperandLabel()
1709 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseOperandId()
1714 context_.err = GetError("Expected Label.", Error::ErrorType::ERR_BAD_OPERAND); in ParseOperandId()
1718 context_.err = GetError("Invalid name of Label.", Error::ErrorType::ERR_BAD_NAME_ID); in ParseOperandId()
1733 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseOperandType()
1738 context_.err = GetError("Expected type.", Error::ErrorType::ERR_BAD_OPERAND); in ParseOperandType()
1742 context_.err = GetError("Invalid name of type.", Error::ErrorType::ERR_BAD_NAME_ID); in ParseOperandType()
1758 Error::ErrorType::WAR_UNEXPECTED_TYPE_ID); in ParseOperandType()
1770 Error::ErrorType::WAR_UNEXPECTED_TYPE_ID); in ParseOperandType()
1781 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseOperandLiteralArray()
1786 context_.err = GetError("Expected array id.", Error::ErrorType::ERR_BAD_OPERAND); in ParseOperandLiteralArray()
1790 context_.err = GetError("Invalid name of array.", Error::ErrorType::ERR_BAD_NAME_ID); in ParseOperandLiteralArray()
1798 …context_.err = GetError("No array was found for this array id", Error::ErrorType::ERR_BAD_ID_ARRAY… in ParseOperandLiteralArray()
1811 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseOperandField()
1816 context_.err = GetError("Expected field.", Error::ErrorType::ERR_BAD_OPERAND); in ParseOperandField()
1820 context_.err = GetError("Invalid name of field.", Error::ErrorType::ERR_BAD_NAME_ID); in ParseOperandField()
1862 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseOperandNone()
1871 … context_.err = GetError("Invalid number of operands.", Error::ErrorType::ERR_BAD_NUMBER_OPERANDS); in ParseOperandNone()
1902 context_.err = GetError("Expected ')'.", Error::ErrorType::ERR_BAD_ARGS_BOUND); in ParseFunctionFullSign()
1905 context_.err = GetError("Expected '('.", Error::ErrorType::ERR_BAD_ARGS_BOUND); in ParseFunctionFullSign()
1929 context_.err = GetError("This function already exists.", Error::ErrorType::ERR_BAD_ID_FUNCTION); in UpdateFunctionName()
1948 …context_.err = GetError("Invalid array type for static array.", Error::ErrorType::ERR_BAD_ARRAY_TY… in ParseArrayFullSign()
1956 … context_.err = GetError("No array size for static array.", Error::ErrorType::ERR_BAD_ARRAY_SIZE); in ParseArrayFullSign()
1966 …GetError("Invalid value for static array size value.", Error::ErrorType::ERR_BAD_ARRAY_SIZE_VALUE); in ParseArrayFullSign()
1982 context_.err = GetError("No record name.", Error::ErrorType::ERR_BAD_RECORD_NAME); in ParseRecordName()
1985 … context_.err = GetError("Invalid name of the record.", Error::ErrorType::ERR_BAD_RECORD_NAME); in ParseRecordName()
1994 context_.err = GetError("This record already exists.", Error::ErrorType::ERR_BAD_ID_RECORD); in ParseRecordName()
2018 context_.err = GetError("No function name.", Error::ErrorType::ERR_BAD_FUNCTION_NAME); in ParseFunctionName()
2021 … context_.err = GetError("Invalid name of the function.", Error::ErrorType::ERR_BAD_FUNCTION_NAME); in ParseFunctionName()
2051 context_.err = GetError("No array name.", Error::ErrorType::ERR_BAD_ARRAY_NAME); in ParseArrayName()
2054 context_.err = GetError("Invalid name of the array.", Error::ErrorType::ERR_BAD_ARRAY_NAME); in ParseArrayName()
2064 context_.err = GetError("This array already exists.", Error::ErrorType::ERR_BAD_ID_ARRAY); in ParseArrayName()
2101 … context_.err = GetError("No return type.", Error::ErrorType::ERR_BAD_FUNCTION_RETURN_VALUE); in ParseFunctionReturn()
2104 … context_.err = GetError("Not a return type.", Error::ErrorType::ERR_BAD_FUNCTION_RETURN_VALUE); in ParseFunctionReturn()
2129 … context_.err = GetError("Expected identifier.", Error::ErrorType::ERR_BAD_FUNCTION_PARAMETERS); in ParseFunctionArg()
2134 context_.err = GetError("Expected parameter type.", Error::ErrorType::ERR_BAD_TYPE); in ParseFunctionArg()
2148 … context_.err = GetError("Expected identifier.", Error::ErrorType::ERR_BAD_FUNCTION_PARAMETERS); in ParseFunctionArg()
2153 … context_.err = GetError("Incorrect name of parameter.", Error::ErrorType::ERR_BAD_PARAM_NAME); in ParseFunctionArg()
2174 context_.err = GetError("Expected comma.", Error::ErrorType::ERR_BAD_NUMBER_OPERANDS); in ParseFunctionArgComma()
2238 context_.err = GetError("Expected '<'.", Error::ErrorType::ERR_BAD_METADATA_BOUND); in ParseMetaDef()
2245 if (flag && context_.err.err == Error::ErrorType::ERR_NONE) { in ParseMetaDef()
2252 void Parser::SetMetadataContextError(const Metadata::Error &err, bool has_value) in SetMetadataContextError()
2259 case Metadata::Error::Type::UNKNOWN_ATTRIBUTE: { in SetMetadataContextError()
2260 … context_.err = GetError(err.GetMessage(), Error::ErrorType::ERR_BAD_METADATA_UNKNOWN_ATTRIBUTE, 0, in SetMetadataContextError()
2264 case Metadata::Error::Type::MISSING_ATTRIBUTE: { in SetMetadataContextError()
2265 … context_.err = GetError(err.GetMessage(), Error::ErrorType::ERR_BAD_METADATA_MISSING_ATTRIBUTE); in SetMetadataContextError()
2268 case Metadata::Error::Type::MISSING_VALUE: { in SetMetadataContextError()
2269 … context_.err = GetError(err.GetMessage(), Error::ErrorType::ERR_BAD_METADATA_MISSING_VALUE); in SetMetadataContextError()
2272 case Metadata::Error::Type::UNEXPECTED_ATTRIBUTE: { in SetMetadataContextError()
2273 …context_.err = GetError(err.GetMessage(), Error::ErrorType::ERR_BAD_METADATA_UNEXPECTED_ATTRIBUTE,… in SetMetadataContextError()
2277 case Metadata::Error::Type::UNEXPECTED_VALUE: { in SetMetadataContextError()
2279 … GetError(err.GetMessage(), Error::ErrorType::ERR_BAD_METADATA_UNEXPECTED_VALUE, 0, SPECIAL_OFF); in SetMetadataContextError()
2282 case Metadata::Error::Type::INVALID_VALUE: { in SetMetadataContextError()
2283 …context_.err = GetError(err.GetMessage(), Error::ErrorType::ERR_BAD_METADATA_INVALID_VALUE, 0, -1); in SetMetadataContextError()
2286 case Metadata::Error::Type::MULTIPLE_ATTRIBUTE: { in SetMetadataContextError()
2287 …context_.err = GetError(err.GetMessage(), Error::ErrorType::ERR_BAD_METADATA_MULTIPLE_ATTRIBUTE, 0, in SetMetadataContextError()
2300 context_.err = GetError("Expected comma.", Error::ErrorType::ERR_BAD_NUMBER_OPERANDS); in ParseMetaListComma()
2316 …context_.err = GetError("Expected identifier.", Error::ErrorType::ERR_BAD_DEFINITION_METADATA, +1); in MeetExpMetaList()
2322 …GetError("Expected identifier or string literal.", Error::ErrorType::ERR_BAD_DEFINITION_METADATA, … in MeetExpMetaList()
2327 context_.err = GetError("Invalid attribute name.", Error::ErrorType::ERR_BAD_NAME_ID); in MeetExpMetaList()
2366 context_.err = GetError("'=' was not expected.", Error::ErrorType::ERR_BAD_NOEXP_DELIM); in BuildMetaListAttr()
2373 std::optional<Metadata::Error> res; in BuildMetaListAttr()
2396 … context_.err = GetError("No meta data expected.", Error::ErrorType::ERR_BAD_DEFINITION_METADATA); in ParseMetaList()
2408 context_.err = GetError("Expected '>'.", Error::ErrorType::ERR_BAD_METADATA_BOUND, +1); in ParseMetaList()
2431 context_.err = GetError("Expected '>'.", Error::ErrorType::ERR_BAD_METADATA_BOUND); in ParseMetaList()