Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

ConfigParserLexer.h

00001 /*****************************************************************************
00002  * Author:   Valient Gough <vgough@pobox.com>
00003  *
00004  *****************************************************************************
00005  * Copyright (c) 2001, Valient Gough
00006  *
00007  * This library is free software; you can distribute it and/or modify it under
00008  * the terms of the GNU Lesser General Public License (LGPL), as published by
00009  * the Free Software Foundation; either version 2.1 of the License, or (at your
00010  * option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful, but WITHOUT
00013  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014  * FITNESS FOR A PARTICULAR PURPOSE.  See the LGPL in the file COPYING for more
00015  * details.
00016  *
00017  */
00018 
00019 #ifndef _ConfigParserLexer_incl_
00020 #define _ConfigParserLexer_incl_
00021 
00022 #include <iostream>
00023 #include <string>
00024 
00025 #ifndef nodefine_rel_FlexLexer
00026 
00027 #undef yyFlexLexer
00028 #define yyFlexLexer rel_FlexLexer
00029 #include <FlexLexer.h>
00030 #undef yyFlexLexer
00031 
00032 #endif // nodefine_rel_FlexLexer
00033 
00034 namespace rel
00035 {
00036 
00037     class ConfigParserLexer : public rel_FlexLexer
00038     {
00039     public:
00040         ConfigParserLexer(std::istream *input);
00041         virtual ~ConfigParserLexer();
00042 
00043         int yylex(const char *&stringResult);
00044 
00045     public:
00046         // returns number of bytes read, or -1 on error
00047         int readBuffer(char *output, int maxSize);
00048 
00049         virtual void processComment(const char *text);
00050 
00051         int lineNum;
00052         std::string literal;
00053         std::istream *input;
00054         const char *lval;
00055     };
00056 
00057 
00058 } // namespace rel
00059 
00060 
00061 #endif
00062 

Generated at Sat Sep 22 02:20:00 2001 for librel by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001