| 1 | tim | 770 | /* ANTLR Translator Generator | 
| 2 |  |  | * Project led by Terence Parr at http://www.jGuru.com | 
| 3 |  |  | * Software rights: http://www.antlr.org/license.html | 
| 4 |  |  | * | 
| 5 | gezelter | 1442 | * $Id$ | 
| 6 | tim | 770 | */ | 
| 7 |  |  |  | 
| 8 |  |  | #include "antlr/NoViableAltForCharException.hpp" | 
| 9 |  |  | #include "antlr/String.hpp" | 
| 10 |  |  |  | 
| 11 |  |  | #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE | 
| 12 |  |  | namespace antlr { | 
| 13 |  |  | #endif | 
| 14 |  |  |  | 
| 15 |  |  | NoViableAltForCharException::NoViableAltForCharException(int c, CharScanner* scanner) | 
| 16 |  |  | : RecognitionException("NoViableAlt", | 
| 17 |  |  | scanner->getFilename(), | 
| 18 |  |  | scanner->getLine(),scanner->getColumn()), | 
| 19 |  |  | foundChar(c) | 
| 20 |  |  | { | 
| 21 |  |  | } | 
| 22 |  |  |  | 
| 23 |  |  | NoViableAltForCharException::NoViableAltForCharException( | 
| 24 |  |  | int c, | 
| 25 |  |  | const ANTLR_USE_NAMESPACE(std)string& fileName_, | 
| 26 |  |  | int line_, int column_) | 
| 27 |  |  | : RecognitionException("NoViableAlt",fileName_,line_,column_), | 
| 28 |  |  | foundChar(c) | 
| 29 |  |  | { | 
| 30 |  |  | } | 
| 31 |  |  |  | 
| 32 |  |  | ANTLR_USE_NAMESPACE(std)string NoViableAltForCharException::getMessage() const | 
| 33 |  |  | { | 
| 34 |  |  | return ANTLR_USE_NAMESPACE(std)string("unexpected char: ")+charName(foundChar); | 
| 35 |  |  | } | 
| 36 |  |  |  | 
| 37 |  |  | #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE | 
| 38 |  |  | } | 
| 39 |  |  | #endif |