swap location of exceptions

This commit is contained in:
Thomas Ave 2016-05-29 01:36:11 +02:00
parent 1858126b13
commit c26bf1f171
2 changed files with 27 additions and 0 deletions

View File

@ -43,6 +43,19 @@ namespace lxs {
std::string m_language;
std::string m_lexername;
};
/**
* Used to throw errors when the driver could generate a valid lexer name or find the backend for a language
*/
class DriverException: public std::exception {
public:
DriverException(std::string what);
virtual const char* what() const throw();
private:
std::string m_what;
};
}
#endif //LEXESIS_DRIVER_H

View File

@ -10,6 +10,7 @@ namespace lxs {
struct DFA;
struct ENFA;
/**
* Used for parsing token rules
*/
@ -30,6 +31,19 @@ namespace lxs {
*/
static std::vector<ENFA> linesToEnfa(std::vector<std::pair<std::string,std::string> > &input);
};
/**
* Used to throw errors when the inputfile was not valid
*/
class InputParserException: public std::exception {
public:
InputParserException(std::string what);
virtual const char* what() const throw();
private:
std::string m_what;
};
}
#endif // INPUT_PARSER_H