Interface IProblem

All Known Subinterfaces:
IASTProblem, IPersistableProblem
All Known Implementing Classes:
AbstractPersistableProblem

public interface IProblem
Description of a C/C++ syntax problems and spelling errors as detected by the lexer, preprocessor, parser or the spelling engine. A problem provides access to:
  • its location (originating source file name, source position, line number),
  • its message description and a predicate to check its severity (warning or error).
  • its ID : an number identifying the very nature of this problem. All possible IDs are listed as constants on this interface.

Note, that semantic problems are modeled via ISemanticProblem.

Restriction:
This interface is not intended to be implemented by clients.
Restriction:
This interface is not intended to be extended by clients.
  • Field Details

    • INT_VALUE_NOT_PROVIDED

      static final int INT_VALUE_NOT_PROVIDED
      -1, returned when an offset or a line number is unknown.
      See Also:
    • IGNORE_CATEGORIES_MASK

      static final int IGNORE_CATEGORIES_MASK
      Mask to use in order to filter out the category portion of the problem ID.
      See Also:
    • SCANNER_BAD_CHARACTER

      static final int SCANNER_BAD_CHARACTER
      Bad character encountered by Scanner. Required attributes: A_SCANNER_BADCHAR
      See Also:
    • SCANNER_UNBOUNDED_STRING

      static final int SCANNER_UNBOUNDED_STRING
      Unbounded literal string encountered by Scanner. Required attributes: none.
      See Also:
    • SCANNER_INVALID_ESCAPECHAR

      static final int SCANNER_INVALID_ESCAPECHAR
      Invalid escape sequence encountered by Scanner. Required attributes: none.
      See Also:
    • SCANNER_BAD_FLOATING_POINT

      static final int SCANNER_BAD_FLOATING_POINT
      Bad floating point encountered by Scanner. Required attributes: none.
      See Also:
    • SCANNER_BAD_HEX_FORMAT

      static final int SCANNER_BAD_HEX_FORMAT
      Bad hexadecimal encountered by Scanner. Required attributes: none.
      See Also:
    • SCANNER_UNEXPECTED_EOF

      static final int SCANNER_UNEXPECTED_EOF
      Unexpected EOF encountered by Scanner. Required attributes: none.
      See Also:
    • SCANNER_BAD_OCTAL_FORMAT

      static final int SCANNER_BAD_OCTAL_FORMAT
      Bad octal encountered by Scanner. Required attributes: none.
      See Also:
    • SCANNER_BAD_DECIMAL_FORMAT

      static final int SCANNER_BAD_DECIMAL_FORMAT
      Bad decimal encountered by Scanner. Required attributes: none.
      See Also:
    • SCANNER_ASSIGNMENT_NOT_ALLOWED

      static final int SCANNER_ASSIGNMENT_NOT_ALLOWED
      Assignment '=' encountered in macro by Scanner. Required attributes: none.
      See Also:
    • SCANNER_DIVIDE_BY_ZERO

      static final int SCANNER_DIVIDE_BY_ZERO
      Division by 0 encountered in macro by Scanner. Required attributes: none.
      See Also:
    • SCANNER_MISSING_R_PAREN

      static final int SCANNER_MISSING_R_PAREN
      Missing ')' encountered in macro by Scanner. Required attributes: none.
      See Also:
    • SCANNER_EXPRESSION_SYNTAX_ERROR

      static final int SCANNER_EXPRESSION_SYNTAX_ERROR
      Expression syntax error encountered in macro by Scanner. Required attributes: none.
      See Also:
    • SCANNER_ILLEGAL_IDENTIFIER

      static final int SCANNER_ILLEGAL_IDENTIFIER
      Expression syntax error encountered in macro by Scanner. Required attributes: none.
      See Also:
    • SCANNER_BAD_CONDITIONAL_EXPRESSION

      static final int SCANNER_BAD_CONDITIONAL_EXPRESSION
      Division by 0 encountered in macro by Scanner. Required attributes: none.
      See Also:
    • SCANNER_BAD_BINARY_FORMAT

      static final int SCANNER_BAD_BINARY_FORMAT
      Bad binary encountered by Scanner. Required attributes: none.
      Since:
      5.1
      See Also:
    • SCANNER_CONSTANT_WITH_BAD_SUFFIX

      static final int SCANNER_CONSTANT_WITH_BAD_SUFFIX
      Invalid suffix on constant
      Since:
      5.11
      See Also:
    • SCANNER_FLOAT_WITH_BAD_PREFIX

      static final int SCANNER_FLOAT_WITH_BAD_PREFIX
      Invalid prefix on float
      Since:
      5.11
      See Also:
    • PREPROCESSOR_POUND_ERROR

      static final int PREPROCESSOR_POUND_ERROR
      #error encountered by Preprocessor. Required attributes: A_PREPROC_POUND_ERROR
      See Also:
    • PREPROCESSOR_INCLUSION_NOT_FOUND

      static final int PREPROCESSOR_INCLUSION_NOT_FOUND
      Inclusion not found by Preprocessor. Required attributes: A_PREPROC_INCLUDE_FILENAME
      See Also:
    • PREPROCESSOR_DEFINITION_NOT_FOUND

      static final int PREPROCESSOR_DEFINITION_NOT_FOUND
      Macro definition not found by Preprocessor. Required attributes: A_PREPROC_MACRO_NAME
      See Also:
    • PREPROCESSOR_UNBALANCE_CONDITION

      static final int PREPROCESSOR_UNBALANCE_CONDITION
      Preprocessor conditionals seem unbalanced. Required attributes: A_PREPROC_CONDITIONAL_MISMATCH
      See Also:
    • PREPROCESSOR_INVALID_MACRO_DEFN

      static final int PREPROCESSOR_INVALID_MACRO_DEFN
      Invalid format to Macro definition. Required attributes: A_PREPROC_MACRO_NAME
      See Also:
    • PREPROCESSOR_INVALID_DIRECTIVE

      static final int PREPROCESSOR_INVALID_DIRECTIVE
      Invalid or unknown preprocessor directive encountered by Preprocessor. Required attributes: A_PREPROC_UNKNOWN_DIRECTIVE
      See Also:
    • PREPROCESSOR_INVALID_MACRO_REDEFN

      static final int PREPROCESSOR_INVALID_MACRO_REDEFN
      Invalid macro redefinition encountered by Preprocessor. Required attributes: A_PREPROC_MACRO_NAME
      See Also:
    • PREPROCESSOR_CONDITIONAL_EVAL_ERROR

      static final int PREPROCESSOR_CONDITIONAL_EVAL_ERROR
      Preprocessor Conditional cannot not be evaluated due. Required attributes: A_PREPROC_CONDITION
      See Also:
    • PREPROCESSOR_MACRO_USAGE_ERROR

      static final int PREPROCESSOR_MACRO_USAGE_ERROR
      Invalid macro usage encountered by Preprocessor. Required attributes: A_PREPROC_MACRO_NAME
      See Also:
    • PREPROCESSOR_MACRO_PASTING_ERROR

      static final int PREPROCESSOR_MACRO_PASTING_ERROR
      Invalid Macro Pasting encountered by Preprocessor. Required attributes: A_PREPROC_MACRO_NAME
      See Also:
    • PREPROCESSOR_CIRCULAR_INCLUSION

      static final int PREPROCESSOR_CIRCULAR_INCLUSION
      Circular inclusion encountered by Preprocessor. Required attributes: A_PREPROC_INCLUDE_FILENAME
      See Also:
    • PREPROCESSOR_MISSING_RPAREN_PARMLIST

      static final int PREPROCESSOR_MISSING_RPAREN_PARMLIST
      macro argument "..." encountered without the required ')' i.e. must be last argument if used Required attributes: none
      See Also:
    • PREPROCESSOR_INVALID_VA_ARGS

      static final int PREPROCESSOR_INVALID_VA_ARGS
      __VA_ARGS__ encountered in macro definition without the required '...' parameter Required attributes: none
      See Also:
    • PREPROCESSOR_POUND_WARNING

      static final int PREPROCESSOR_POUND_WARNING
      #warning encountered by Preprocessor. Required attributes: A_PREPROC_POUND_WARNING
      See Also:
    • PREPROCESSOR_EXCEEDS_MAXIMUM_INCLUSION_DEPTH

      static final int PREPROCESSOR_EXCEEDS_MAXIMUM_INCLUSION_DEPTH
      Maximum inclusion depth is exceeded
      Since:
      5.4
      See Also:
    • PREPROCESSOR_MULTIPLE_USER_DEFINED_SUFFIXES_IN_CONCATENATION

      static final int PREPROCESSOR_MULTIPLE_USER_DEFINED_SUFFIXES_IN_CONCATENATION
      During concatenation of string literals, at least two were found with more than one type of UDL suffix.
      Since:
      5.11
      See Also:
    • PREPROCESSOR_INVALID_USE_OUTSIDE_PREPROCESSOR_DIRECTIVE

      static final int PREPROCESSOR_INVALID_USE_OUTSIDE_PREPROCESSOR_DIRECTIVE
      Since:
      7.1
      See Also:
    • SYNTAX_ERROR

      static final int SYNTAX_ERROR
      See Also:
    • MISSING_SEMICOLON

      static final int MISSING_SEMICOLON
      Missing semicolon.
      Since:
      5.3
      See Also:
    • TEMPLATE_ARGUMENT_NESTING_DEPTH_LIMIT_EXCEEDED

      static final int TEMPLATE_ARGUMENT_NESTING_DEPTH_LIMIT_EXCEEDED
      The parser's template argument nesting depth limit was exceeded.
      Since:
      6.4
      See Also:
    • A_PREPROC_POUND_ERROR

      @Deprecated static final String A_PREPROC_POUND_ERROR
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • A_PREPROC_POUND_WARNING

      @Deprecated static final String A_PREPROC_POUND_WARNING
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • A_PREPROC_INCLUDE_FILENAME

      @Deprecated static final String A_PREPROC_INCLUDE_FILENAME
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • A_PREPROC_MACRO_NAME

      @Deprecated static final String A_PREPROC_MACRO_NAME
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • A_PREPROC_CONDITION

      @Deprecated static final String A_PREPROC_CONDITION
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • A_PREPROC_UNKNOWN_DIRECTIVE

      @Deprecated static final String A_PREPROC_UNKNOWN_DIRECTIVE
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • A_PREPROC_CONDITIONAL_MISMATCH

      @Deprecated static final String A_PREPROC_CONDITIONAL_MISMATCH
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • A_SCANNER_BADCHAR

      @Deprecated static final String A_SCANNER_BADCHAR
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • A_SYMBOL_NAME

      @Deprecated static final String A_SYMBOL_NAME
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • A_NAMESPACE_NAME

      @Deprecated static final String A_NAMESPACE_NAME
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • A_TYPE_NAME

      @Deprecated static final String A_TYPE_NAME
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • FILENAME_NOT_PROVIDED

      @Deprecated static final String FILENAME_NOT_PROVIDED
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • SEMANTIC_UNIQUE_NAME_PREDEFINED

      @Deprecated static final int SEMANTIC_UNIQUE_NAME_PREDEFINED
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • SEMANTIC_NAME_NOT_FOUND

      @Deprecated static final int SEMANTIC_NAME_NOT_FOUND
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • SEMANTIC_NAME_NOT_PROVIDED

      @Deprecated static final int SEMANTIC_NAME_NOT_PROVIDED
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • SEMANTIC_INVALID_OVERLOAD

      @Deprecated static final int SEMANTIC_INVALID_OVERLOAD
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • SEMANTIC_INVALID_USING

      @Deprecated static final int SEMANTIC_INVALID_USING
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • SEMANTIC_AMBIGUOUS_LOOKUP

      @Deprecated static final int SEMANTIC_AMBIGUOUS_LOOKUP
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • SEMANTIC_INVALID_TYPE

      @Deprecated static final int SEMANTIC_INVALID_TYPE
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • SEMANTIC_CIRCULAR_INHERITANCE

      @Deprecated static final int SEMANTIC_CIRCULAR_INHERITANCE
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • SEMANTIC_INVALID_TEMPLATE

      @Deprecated static final int SEMANTIC_INVALID_TEMPLATE
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • SEMANTIC_BAD_VISIBILITY

      @Deprecated static final int SEMANTIC_BAD_VISIBILITY
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • SEMANTIC_UNABLE_TO_RESOLVE_FUNCTION

      @Deprecated static final int SEMANTIC_UNABLE_TO_RESOLVE_FUNCTION
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • SEMANTIC_INVALID_TEMPLATE_ARGUMENT

      @Deprecated static final int SEMANTIC_INVALID_TEMPLATE_ARGUMENT
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • SEMANTIC_INVALID_TEMPLATE_PARAMETER

      @Deprecated static final int SEMANTIC_INVALID_TEMPLATE_PARAMETER
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • SEMANTIC_REDECLARED_TEMPLATE_PARAMETER

      @Deprecated static final int SEMANTIC_REDECLARED_TEMPLATE_PARAMETER
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • SEMANTIC_INVALID_CONVERSION_TYPE

      @Deprecated static final int SEMANTIC_INVALID_CONVERSION_TYPE
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • SEMANTIC_MALFORMED_EXPRESSION

      @Deprecated static final int SEMANTIC_MALFORMED_EXPRESSION
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • SEMANTIC_ILLFORMED_FRIEND

      @Deprecated static final int SEMANTIC_ILLFORMED_FRIEND
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
    • SEMANTIC_RECURSIVE_TEMPLATE_INSTANTIATION

      @Deprecated static final int SEMANTIC_RECURSIVE_TEMPLATE_INSTANTIATION
      Deprecated.
      Not used.
      See Also:
      Restriction:
      This field is not intended to be referenced by clients.
  • Method Details

    • getID

      int getID()
      Returns the problem id
    • getMessage

      String getMessage()
      Returns a human-readable message describing the problem.
    • getMessageWithLocation

      String getMessageWithLocation()
      Returns a human-readable message string describing the problem, adding location information.
    • getArguments

      String[] getArguments()
      Returns a possibly empty argument array to compute the message.
    • getOriginatingFileName

      char[] getOriginatingFileName()
      Returns the file name in which the problem was found
    • getSourceStart

      int getSourceStart()
      Returns the start position of the problem (inclusive), or INT_VALUE_NOT_PROVIDED if unknown.
    • getSourceEnd

      int getSourceEnd()
      Returns the end position of the problem (inclusive), or INT_VALUE_NOT_PROVIDED if unknown.
    • getSourceLineNumber

      int getSourceLineNumber()
      Returns the line number where the problem begins, or INT_VALUE_NOT_PROVIDED if unknown.
    • isError

      boolean isError()
      Returns whether the problem is an error.
    • isWarning

      boolean isWarning()
      Returns whether the problem is a warning.
    • checkCategory

      boolean checkCategory(int bitmask)
      Check the parameter bit-mask against an IProblem's ID to broadly segregate the types of problems.
      Parameters:
      bitmask -
      Returns:
      true if ( (id & bit-mask ) != 0 )