mjplusplus  v0.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | List of all members
ErrorReporter Class Reference

#include <ErrorReporter.hpp>

Public Types

enum  ErrorType { LEXER, PARSER, SEMANTIC }
 

Public Member Functions

void recordError (ErrorReporter::ErrorType type, std::string const &error_msg, source_position_t position)
 
void recordError (ErrorReporter::ErrorType type, std::string const &error_msg)
 
void printErrors () const
 
 ErrorReporter (std::string const &file_name, bool recordErrors)
 

Detailed Description

A common error reporter which can be used for lexer, parser and semantic errors

Member Enumeration Documentation

Enumerator
LEXER 
PARSER 
SEMANTIC 

Constructor & Destructor Documentation

ErrorReporter::ErrorReporter ( std::string const &  file_name,
bool  recordErrors 
)

Member Function Documentation

void ErrorReporter::printErrors ( ) const

Print all errors stored in the errors multimap to std::cerr. This should be called after parsing and semantic analysis are complete.

void ErrorReporter::recordError ( ErrorReporter::ErrorType  type,
std::string const &  error_msg,
source_position_t  position 
)
void ErrorReporter::recordError ( ErrorReporter::ErrorType  type,
std::string const &  error_msg 
)

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