[Cmap-cvs] libs/eval parser.h,1.2,1.3 parser.cpp,1.1.1.1,1.2
Status: Beta
Brought to you by:
dyp
From: Denis P. <dy...@us...> - 2004-11-07 14:01:40
|
Update of /cvsroot/cmap/libs/eval In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30034 Modified Files: parser.h parser.cpp Log Message: Add line number to ParserException (not used yet) Make parseBlockStart not abstract. Index: parser.cpp =================================================================== RCS file: /cvsroot/cmap/libs/eval/parser.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- parser.cpp 31 Oct 2004 06:03:32 -0000 1.1.1.1 +++ parser.cpp 7 Nov 2004 14:01:23 -0000 1.2 @@ -3,7 +3,7 @@ #include "object.h" #include "parser.h" -ParserException::ParserException(const char *_msg) : msg(_msg) { +ParserException::ParserException(const char *_msg, int _line) : msg(_msg), line(_line) { } ParserException::~ParserException() throw () { @@ -364,3 +364,6 @@ } } } + +void ConfigParser::parseBlockStart(ObjectConf *) { +} Index: parser.h =================================================================== RCS file: /cvsroot/cmap/libs/eval/parser.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- parser.h 31 Oct 2004 09:06:40 -0000 1.2 +++ parser.h 7 Nov 2004 14:01:23 -0000 1.3 @@ -8,13 +8,15 @@ class ParserException : public std::exception { public: - ParserException(const char *_msg); + ParserException(const char *_msg, int lineno = 0); virtual ~ParserException() throw (); static void raise(const char *_msg); virtual const char *name() const throw(); virtual const char *what() const throw(); + int lineno() const { return line; } private: std::string msg; + int line; }; class ConfigParser { @@ -44,7 +46,7 @@ void parseAssign(Block *b, const std::string &varName); void parseBlock(Block *b, ObjectConf *obj = NULL); - virtual void parseBlockStart(ObjectConf *obj) = 0; + virtual void parseBlockStart(ObjectConf *obj); virtual bool parseObject() = 0; |