zenilib: pp::Diagnostics Class Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Member Functions | List of all members
pp::Diagnostics Class Referenceabstract

`#include <DiagnosticsBase.h>`

Inherited by TDiagnostics.

## Public Types

enum

ID {
ERROR_BEGIN, INTERNAL_ERROR, OUT_OF_MEMORY, INVALID_CHARACTER,
INVALID_NUMBER, INTEGER_OVERFLOW, FLOAT_OVERFLOW, TOKEN_TOO_LONG,
INVALID_EXPRESSION, DIVISION_BY_ZERO, EOF_IN_COMMENT, UNEXPECTED_TOKEN,
DIRECTIVE_INVALID_NAME, MACRO_NAME_RESERVED, MACRO_REDEFINED, MACRO_PREDEFINED_REDEFINED,
MACRO_PREDEFINED_UNDEFINED, MACRO_UNTERMINATED_INVOCATION, MACRO_TOO_FEW_ARGS, MACRO_TOO_MANY_ARGS,
CONDITIONAL_ENDIF_WITHOUT_IF, CONDITIONAL_ELSE_WITHOUT_IF, CONDITIONAL_ELSE_AFTER_ELSE, CONDITIONAL_ELIF_WITHOUT_IF,
CONDITIONAL_ELIF_AFTER_ELSE, CONDITIONAL_UNTERMINATED, INVALID_EXTENSION_NAME, INVALID_EXTENSION_BEHAVIOR,
INVALID_EXTENSION_DIRECTIVE, INVALID_VERSION_NUMBER, INVALID_VERSION_DIRECTIVE, VERSION_NOT_FIRST_STATEMENT,
INVALID_LINE_NUMBER, INVALID_FILE_NUMBER, INVALID_LINE_DIRECTIVE, ERROR_END,
WARNING_BEGIN, EOF_IN_DIRECTIVE, CONDITIONAL_UNEXPECTED_TOKEN, UNRECOGNIZED_PRAGMA,
WARNING_END
}

enum | Severity { ERROR, WARNING }

## Public Member Functions

virtual | ~Diagnostics ()
void | report (ID id, const SourceLocation &loc, const std::string &text)

## Protected Member Functions

std::string | message (ID id)
virtual void | print (ID id, const SourceLocation &loc, const std::string &text)=0
Severity | severity (ID id)

## Detailed Description

Definition at line 19 of file DiagnosticsBase.h.

## Member Enumeration Documentation

enum pp::Diagnostics::ID

Enumerator
ERROR_BEGIN |
INTERNAL_ERROR |
OUT_OF_MEMORY |
INVALID_CHARACTER |
INVALID_NUMBER |
INTEGER_OVERFLOW |
FLOAT_OVERFLOW |
TOKEN_TOO_LONG |
INVALID_EXPRESSION |
DIVISION_BY_ZERO |
EOF_IN_COMMENT |
UNEXPECTED_TOKEN |
DIRECTIVE_INVALID_NAME |
MACRO_NAME_RESERVED |
MACRO_REDEFINED |
MACRO_PREDEFINED_REDEFINED |
MACRO_PREDEFINED_UNDEFINED |
MACRO_UNTERMINATED_INVOCATION |
MACRO_TOO_FEW_ARGS |
MACRO_TOO_MANY_ARGS |
CONDITIONAL_ENDIF_WITHOUT_IF |
CONDITIONAL_ELSE_WITHOUT_IF |
CONDITIONAL_ELSE_AFTER_ELSE |
CONDITIONAL_ELIF_WITHOUT_IF |
CONDITIONAL_ELIF_AFTER_ELSE |
CONDITIONAL_UNTERMINATED |
INVALID_EXTENSION_NAME |
INVALID_EXTENSION_BEHAVIOR |
INVALID_EXTENSION_DIRECTIVE |
INVALID_VERSION_NUMBER |
INVALID_VERSION_DIRECTIVE |
VERSION_NOT_FIRST_STATEMENT |
INVALID_LINE_NUMBER |
INVALID_FILE_NUMBER |
INVALID_LINE_DIRECTIVE |
ERROR_END |
WARNING_BEGIN |
EOF_IN_DIRECTIVE |
CONDITIONAL_UNEXPECTED_TOKEN |
UNRECOGNIZED_PRAGMA |
WARNING_END |

Definition at line 27 of file DiagnosticsBase.h.

enum pp::Diagnostics::Severity

Enumerator
ERROR |
WARNING |

Definition at line 22 of file DiagnosticsBase.h.

## Constructor & Destructor Documentation

pp::Diagnostics::~Diagnostics | ( |  | ) |

virtual

Definition at line 14 of file DiagnosticsBase.cpp.

## Member Function Documentation

std::string pp::Diagnostics::message | ( | ID | id | ) |

protected

Definition at line 38 of file DiagnosticsBase.cpp.

References assert, CONDITIONAL_ELIF_AFTER_ELSE, CONDITIONAL_ELIF_WITHOUT_IF, CONDITIONAL_ELSE_AFTER_ELSE, CONDITIONAL_ELSE_WITHOUT_IF, CONDITIONAL_ENDIF_WITHOUT_IF, CONDITIONAL_UNEXPECTED_TOKEN, CONDITIONAL_UNTERMINATED, DIRECTIVE_INVALID_NAME, DIVISION_BY_ZERO, EOF_IN_COMMENT, EOF_IN_DIRECTIVE, FLOAT_OVERFLOW, INTEGER_OVERFLOW, INTERNAL_ERROR, INVALID_CHARACTER, INVALID_EXPRESSION, INVALID_EXTENSION_BEHAVIOR, INVALID_EXTENSION_DIRECTIVE, INVALID_EXTENSION_NAME, INVALID_FILE_NUMBER, INVALID_LINE_DIRECTIVE, INVALID_LINE_NUMBER, INVALID_NUMBER, INVALID_VERSION_DIRECTIVE, INVALID_VERSION_NUMBER, MACRO_NAME_RESERVED, MACRO_PREDEFINED_REDEFINED, MACRO_PREDEFINED_UNDEFINED, MACRO_REDEFINED, MACRO_TOO_FEW_ARGS, MACRO_TOO_MANY_ARGS, MACRO_UNTERMINATED_INVOCATION, OUT_OF_MEMORY, TOKEN_TOO_LONG, UNEXPECTED_TOKEN, UNRECOGNIZED_PRAGMA, and VERSION_NOT_FIRST_STATEMENT.

Referenced by TDiagnostics::print().

virtual void pp::Diagnostics::print | ( | ID | id,
|  | const SourceLocation & | loc,
|  | const std::string & | text
| ) |  |

protectedpure virtual

Implemented in TDiagnostics.

Referenced by report().

void pp::Diagnostics::report | ( | ID | id,
|  | const SourceLocation & | loc,
|  | const std::string & | text
| ) |  |

Definition at line 18 of file DiagnosticsBase.cpp.

References print().

Referenced by TDirectiveHandler::handlePragma(), pp::DirectiveParser::lex(), pp::Tokenizer::lex(), and pp::ExpressionParser::parse().

Diagnostics::Severity pp::Diagnostics::severity | ( | ID | id | ) |

protected

Definition at line 26 of file DiagnosticsBase.cpp.

References assert, ERROR, ERROR_BEGIN, ERROR_END, WARNING, WARNING_BEGIN, and WARNING_END.

Referenced by TDiagnostics::print().

The documentation for this class was generated from the following files:

- zenilib/jni/external/angle/src/compiler/preprocessor/DiagnosticsBase.h
- zenilib/jni/external/angle/src/compiler/preprocessor/DiagnosticsBase.cpp