swap location of exceptions
This commit is contained in:
parent
1858126b13
commit
c26bf1f171
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue