ctrump/parser/CFrontError.hpp File Reference

#include "error.h"
#include "LocationNode.hpp"
#include <list>
#include <exception>
#include <cstdarg>

Include dependency graph for CFrontError.hpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  cfront

Data Structures

class  cfront::UncontinuableError
class  cfront::InternalError

Defines

#define ERROR_BASIC(code, fmt, filename, ln, col, logs,...)
#define POSTPROCESS_ERROR
#define ERROR(code, fmt, logs, locNode)
#define ERROR1(code, fmt, logs, locNode)
#define ERROR2(code, fmt, logs, tokenNode1, tokenNode2)
#define WARNING(code, fmt, logs, locNode)

Typedefs

typedef std::list< ctrump_loginfocfront::Logs

Functions

void ctrump_report_log (struct ctrump_loginfo *logInfo)
void ctrump_add_log (cfront::Logs *logs, int logLevel, enum ctrump_error_code code, const char *fmt, const cfront::Location &location,...)


Detailed Description

Utility functions of error handling (only C++ functions).

Definition in file CFrontError.hpp.


Define Documentation

#define ERROR ( code,
fmt,
logs,
locNode   ) 

Value:

do {                                                                \
        ctrump_add_log(logs, CTRUMP_LOGLEVEL_ERROR, code, fmt,          \
                       (locNode)->getLocation(), NULL);                 \
        POSTPROCESS_ERROR;                                              \
    } while (0)
This macro is processed by 'gen-error-code.sh script for collecting the ctrump_error_code.

Definition at line 109 of file CFrontError.hpp.

Referenced by cfront::CAnalyzer::checkArrayInitializer(), cfront::CAnalyzer::setTypeAttribute(), cfront::CAnalyzer::typeAssignmentExpr(), cfront::CAnalyzer::typeCastExpr(), and cfront::CAnalyzer::typeExpr().

#define ERROR1 ( code,
fmt,
logs,
locNode   ) 

Value:

do {                                                                \
        ctrump_add_log(logs, CTRUMP_LOGLEVEL_ERROR, code, fmt,          \
                       (locNode)->getLocation(),                        \
                       (locNode)->getText().c_str(), NULL);             \
        POSTPROCESS_ERROR;                                              \
    } while (0)
This macro is processed by 'gen-error-code.sh script for collecting the ctrump_error_code.

Definition at line 121 of file CFrontError.hpp.

Referenced by cfront::CAnalyzer::checkBinaryArithmetic(), cfront::CAnalyzer::checkStructOrUnionDefinition(), cfront::CAnalyzer::parseIntegerConstant(), cfront::CAnalyzer::typeAssignmentExpr(), cfront::CAnalyzer::typeComparisonExpr(), cfront::CAnalyzer::typeExpr(), cfront::CAnalyzer::typeFunctionArgument(), and cfront::CAnalyzer::typeFunctionArguments().

#define ERROR2 ( code,
fmt,
logs,
tokenNode1,
tokenNode2   ) 

Value:

do {                                                                \
        ctrump_add_log(logs, CTRUMP_LOGLEVEL_ERROR, code, fmt,          \
                       (tokenNode1)->getLocation(),                     \
                       (tokenNode1)->getText().c_str(),                 \
                       (tokenNode2)->getText().c_str(),                 \
                       NULL);                                           \
        POSTPROCESS_ERROR;                                              \
    } while (0)
This macro is processed by 'gen-error-code.sh script for collecting the ctrump_error_code.

Definition at line 134 of file CFrontError.hpp.

#define ERROR_BASIC ( code,
fmt,
filename,
ln,
col,
logs,
...   ) 

Value:

do {                                                                \
        Location loc;                                                   \
        loc.filePath = (filename);                                      \
        loc.line = (ln);                                                \
        loc.column = (col);                                             \
        ctrump_add_log((logs), CTRUMP_LOGLEVEL_ERROR, (code), (fmt), loc, __VA_ARGS__); \
    } while (0)
This macro is processed by 'gen-error-code.sh script for collecting the ctrump_error_code.

Definition at line 85 of file CFrontError.hpp.

Referenced by ctrump_parse(), and setInternalError().

#define POSTPROCESS_ERROR

Definition at line 101 of file CFrontError.hpp.

#define WARNING ( code,
fmt,
logs,
locNode   ) 

Value:

do {                                                                \
        ctrump_add_log(logs, CTRUMP_LOGLEVEL_WARNING, code, fmt,        \
                       (locNode)->getLocation(), NULL);                 \
    } while (0)

Definition at line 144 of file CFrontError.hpp.

Referenced by cfront::CAnalyzer::getInitializerListElemType(), cfront::CAnalyzer::parseGccAttribute(), and cfront::CAnalyzer::typeAssignmentExpr().


Function Documentation

void ctrump_add_log ( cfront::Logs logs,
int  logLevel,
enum ctrump_error_code  code,
const char *  fmt,
const cfront::Location location,
  ... 
)

void ctrump_report_log ( struct ctrump_loginfo logInfo  ) 


Generated on Tue Mar 31 20:19:25 2009 for ctrump by  doxygen 1.5.6