jaula API Reference
version 1.4.0
|
00001 00002 /* 00003 * jaula_lexan.h : JSON Analysis User Library Acronym Lexical analysis 00004 * definitions 00005 * 00006 * Copyright (C) 2007, 2008, 2009 Kombo Morongo <morongo666@gmail.com> 00007 * 00008 * This library is free software; you can redistribute it and/or modify it 00009 * under the terms of the GNU Lesser General Public License as published by 00010 * the Free Software Foundation; either version 2.1 of the License, or (at 00011 * your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, but 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 00015 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 00016 * License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public License 00019 * along with this library; if not, write to the Free Software Foundation, 00020 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 00021 * 00022 * svn info: 00023 * $Author: morongo $ 00024 * $HeadURL: https://jaula.svn.sourceforge.net/svnroot/jaula/tags/jaula-1.4.0/jaula/jaula_lexan.h $ 00025 * $Id: jaula_lexan.h 45 2009-01-11 16:17:03Z morongo $ 00026 * $Revision: 45 $ 00027 */ 00028 00029 #ifndef _JAULA_LEXAN_H_ 00030 #define _JAULA_LEXAN_H_ 00031 00036 #ifndef YYTOKENTYPE 00037 # define YYTOKENTYPE 00038 00045 enum yytokentype 00046 { 00047 NULL_VALUE = 258 00048 , FALSE_VALUE 00049 , TRUE_VALUE 00050 , NUMBER_VALUE 00051 , NUMBER_INT_VALUE 00052 , STRING_VALUE 00053 }; 00054 #endif 00055 #define NULL_VALUE 258 00056 #define FALSE_VALUE 259 00057 #define TRUE_VALUE 260 00058 #define NUMBER_VALUE 261 00059 #define NUMBER_INT_VALUE 262 00060 #define STRING_VALUE 263 00061 00062 #ifndef __FLEX_LEXER_H 00063 #undef yyFlexLexer 00064 #define yyFlexLexer jaulaFlexLexer 00065 #include <FlexLexer.h> 00066 #endif 00067 00068 #include <jaula/jaula_lexan_error.h> 00069 00070 namespace JAULA 00071 { // namespace JAULA 00083 class Lexan : public ::jaulaFlexLexer 00084 { // class Lexan 00085 public: 00086 00098 Lexan(std::istream &in_stream, bool comments_allowed = false); 00099 00103 virtual ~Lexan(); 00104 00111 virtual int yylex(); 00112 00126 virtual void LexerError(const char *detail); 00127 00135 std::string const &getTokenData(void) const; 00136 00144 Lexan_Error const *getErrorReport(void) const; 00145 00146 private: 00147 00151 bool commented; 00152 00156 std::string tokenData; 00157 00161 Lexan_Error *pErrorReport; 00162 00163 }; // class Lexan 00164 } // namespace JAULA 00165 #endif 00166 00167 // EOF $Id: jaula_lexan.h 45 2009-01-11 16:17:03Z morongo $